Re: Install shared libs in lib/ and bin/ with MSVC (Was: install libpq.dll in bin directory on Windows / Cygwin)

Поиск
Список
Период
Сортировка
От Asif Naeem
Тема Re: Install shared libs in lib/ and bin/ with MSVC (Was: install libpq.dll in bin directory on Windows / Cygwin)
Дата
Msg-id CAEB4t-OaRdzUs9xDXnPKk5vkG=wASmabcO_S=RQV1as6aGPiTg@mail.gmail.com
обсуждение исходный текст
Ответ на Install shared libs in lib/ and bin/ with MSVC (Was: install libpq.dll in bin directory on Windows / Cygwin)  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Install shared libs in lib/ and bin/ with MSVC (Was: install libpq.dll in bin directory on Windows / Cygwin)  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Thank you Michael. I have looked the patch. Overall logic looks good to me, I have checked it with MSVC{2013,2008}. It works for MSVC 2013 but fail for MSVC 2008, I think the condition "if ($proj =~ qr{ResourceCompile\s*Include="([^"]+)”})” is not going to work for MSVC2008 and MSVC2005 i.e.

MSVC2013
     <ResourceCompile Include="src\interfaces\ecpg\ecpglib\win32ver.rc" />

MSVC2008
     <File RelativePath="src\interfaces\ecpg\ecpglib\win32ver.rc" />

For more details please check i.e.
src/tools/msvc/MSBuildProject.pm (Visual C++ 2010 or greater)
src/tools/msvc/VCBuildProject.pm (Visual C++ 2005/2008)

It seems that search criteria can be narrowed to skip reading related Makefile for SO_MAJOR_VERSION string when VS project file is related to StaticLibrary or Application. Although this patch is going to make MSVC build consistent with Cygwin and MinGW build, following files seems redundant now, is there any use for them other than backward compatibility ? i.e.

inst\lib\libpq.dll
inst\lib\libpgtypes.dll
inst\lib\libecpg_compat.dll
inst\lib\libecpg.dll

Thanks.
 
Regards,
Muhammad Asif Naeem

On Tue, Jan 20, 2015 at 6:06 AM, Michael Paquier <michael.paquier@gmail.com> wrote:
Hi all,

Here is a continuation of the thread which covered $subject for MinGW
and Cygwin:
http://www.postgresql.org/message-id/51F19059.7050702@pgexperts.com
But this time it is for MSVC.

Just a bit of background... Since commit cb4a3b04 we are installing
shared libraries in bin/ and lib/ for Cygwin and MinGW on Windows, but
we are still missing MSVC, so as of now build method is inconsistent.
Attached is a patch aimed at fixing this inconsistency. What it does
is simple: when kicking Install.pm to install the deliverables of each
project, we check if the project Makefile contains SO_MAJOR_VERSION.
If yes, libraries of this project are installed in bin/ and lib/. The
path to the Makefile is found by scanning ResourceCompile in the
vcproj file, this method having the advantage to make the patch
independent of build process.

This also removes a wart present in Install.pm installing copying
manually libpq.dll:
-       lcopy($target . '/lib/libpq.dll', $target . '/bin/libpq.dll');

I am adding an entry in the upcoming CF for this patch, and let's use
this thread for this discussion.
Regards,
--
Michael


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kouhei Kaigai
Дата:
Сообщение: Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)
Следующее
От: Shigeru Hanada
Дата:
Сообщение: Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)