From db01789373141914d6f09e7e57f799cda11f0f29 Mon Sep 17 00:00:00 2001 From: dos Date: Mon, 13 Jul 2020 13:28:53 -0300 Subject: [PATCH 1/3] Add TARGET_CPU requirement for x86 DLL build. --- docs/msw/install.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/msw/install.md b/docs/msw/install.md index 1c70494833..eef51a59b7 100644 --- a/docs/msw/install.md +++ b/docs/msw/install.md @@ -84,11 +84,13 @@ Microsoft Visual C++ Compilation {#msw_build_msvs} to build a release version or - > nmake /f makefile.vc BUILD=release SHARED=1 + > nmake /f makefile.vc BUILD=release SHARED=1 TARGET_CPU=X86 - to build a release DLL version. Finally, you can also add - `TARGET_CPU=X64` to nmake command line to build Win64 versions - (this only works if you are using a 64 bit compiler, of course). + to build a 32 bit release DLL version from an x86 command prompt, or + + > nmake /f makefile.vc BUILD=release SHARED=1 TARGET_CPU=X64 + + to build a 64 bit release DLL version from an x64 command prompt. See "Configuring the Build" for more information about the additional parameters that can be specified on the command line. From 050df54930d915294f535a47e2bbfe18dfeb658d Mon Sep 17 00:00:00 2001 From: dos Date: Mon, 13 Jul 2020 13:32:24 -0300 Subject: [PATCH 2/3] Add TARGET_CPU=X86 to 32 bit builds. --- build/tools/msvs/officialbuild.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/tools/msvs/officialbuild.bat b/build/tools/msvs/officialbuild.bat index a503a0c1e6..e492cd8219 100755 --- a/build/tools/msvs/officialbuild.bat +++ b/build/tools/msvs/officialbuild.bat @@ -124,7 +124,7 @@ if "%compvers%" == "vc90" call "%WINDOWS61SDK%SetEnv.Cmd" /X86 /Release @echo 32 bit release build -nmake -f makefile.vc BUILD=release SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 CPPFLAGS=/arch:SSE CFLAGS=/arch:SSE >> %compvers%x86_Release.txt +nmake -f makefile.vc BUILD=release SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 CPPFLAGS=/arch:SSE CFLAGS=/arch:SSE TARGET_CPU=X86 >> %compvers%x86_Release.txt if ERRORLEVEL 1 goto ERR_BUILD @@ -132,7 +132,7 @@ cd ..\..\utils\wxrc rmdir %compvers%_mswuddll /s /q del %compvers%x86_Release.txt -nmake -f makefile.vc BUILD=release SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 CPPFLAGS=/arch:SSE CFLAGS=/arch:SSE >> %compvers%x86_Release.txt +nmake -f makefile.vc BUILD=release SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 CPPFLAGS=/arch:SSE CFLAGS=/arch:SSE TARGET_CPU=X86 >> %compvers%x86_Release.txt cd %build_dir% @@ -143,7 +143,7 @@ if ERRORLEVEL 1 goto ERR_BUILD if "%compvers%" == "vc100" call "%WINDOWS71SDK%SetEnv.Cmd" /X86 /Debug if "%compvers%" == "vc90" call "%WINDOWS61SDK%SetEnv.Cmd" /X86 /Debug -nmake -f makefile.vc BUILD=debug SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 CPPFLAGS=/arch:SSE CFLAGS=/arch:SSE >> %compvers%x86_Debug.txt +nmake -f makefile.vc BUILD=debug SHARED=1 COMPILER_VERSION=%comp% OFFICIAL_BUILD=1 CPPFLAGS=/arch:SSE CFLAGS=/arch:SSE TARGET_CPU=X86 >> %compvers%x86_Debug.txt if ERRORLEVEL 1 goto ERR_BUILD From 5ed09da80c47dd611254dca12edd0bf1e8a6c203 Mon Sep 17 00:00:00 2001 From: dos Date: Mon, 13 Jul 2020 13:34:02 -0300 Subject: [PATCH 3/3] Copy wxwidgets.props to root of *Dev.7z packages; use full source path with fciv command. --- build/tools/msvs/package.bat | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/build/tools/msvs/package.bat b/build/tools/msvs/package.bat index 3024911e21..c44067eb94 100755 --- a/build/tools/msvs/package.bat +++ b/build/tools/msvs/package.bat @@ -79,22 +79,20 @@ rem included from it. 7z a -t7z %packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_Dev.7z build\msw\wx_setup.props 7z a -t7z %packagePath%\%VCver%\wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_Dev.7z build\msw\wx_setup.props -rem Create a modified copy of wxwidgets.props suitable for use with our -rem binaries: we need to enable automatic ABI-compatible MSVC version detection -rem for this, so we define it in the same place where WXUSINGDLL is defined (as -rem we only provide DLLs, this is sufficient). -powershell -noprofile -command "& { (Get-Content wxwidgets.props).Replace('WXUSINGDLL','WXUSINGDLL;wxMSVC_VERSION_ABI_COMPAT') | Set-Content %packagePath%\%VCver%\wxwidgets.props }" +copy wxwidgets.props %packagePath%\%VCver%\wxwidgets.props rem Change to the directory containing wxwidgets.props in order to include it rem into the archive without any path. cd %packagePath%\%VCver% + 7z a -t7z wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_Dev.7z wxwidgets.props 7z a -t7z wxMSW-%wxMAJOR_VERSION%.%wxMINOR_VERSION%.%wxRELEASE_NUMBER%_%VCver%_x64_Dev.7z wxwidgets.props del wxwidgets.props del sha1.txt -fciv . -type *.7z -sha1 -wp >> sha1.txt +rem fciv requies a complete path to files +fciv %cd%\. -type *.7z -sha1 -wp >> sha1.txt goto End