Visual Studio Projects: Add XP build support when building with Visual Studio 2012+ ONLY when Visual Studio XP support is available.

This commit is contained in:
Mark Pizzolato 2015-09-02 09:51:42 -07:00
parent 7619f88e66
commit 6d61821e3c
16 changed files with 52 additions and 56 deletions

View file

@ -35,9 +35,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
@ -119,9 +116,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />

View file

@ -33,9 +33,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
@ -115,9 +112,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />

View file

@ -35,9 +35,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
@ -119,9 +116,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />

View file

@ -161,7 +161,7 @@
StackCommitSize="10485760" StackCommitSize="10485760"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
LinkTimeCodeGeneration="0" LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"

View file

@ -35,9 +35,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
@ -119,9 +116,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
@ -130,6 +124,7 @@
Optimization="2" Optimization="2"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
OmitFramePointers="true" OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="./;../;../PDP10/;../PDP11/;../VAX/;&quot;../../windows-build/PCRE/include/&quot;" AdditionalIncludeDirectories="./;../;../PDP10/;../PDP11/;../VAX/;&quot;../../windows-build/PCRE/include/&quot;"
PreprocessorDefinitions="USE_INT64;VM_PDP10;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCREPOSIX_H;PCRE_STATIC" PreprocessorDefinitions="USE_INT64;VM_PDP10;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;SIM_NEED_GIT_COMMIT_ID;HAVE_PCREPOSIX_H;PCRE_STATIC"
StringPooling="true" StringPooling="true"
@ -160,6 +155,7 @@
StackCommitSize="10485760" StackCommitSize="10485760"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"

View file

@ -124,6 +124,7 @@
Optimization="2" Optimization="2"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
OmitFramePointers="true" OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="./;../;../PDP11/;&quot;../../windows-build/winpcap/Wpdpack/Include&quot;;&quot;../../windows-build/PCRE/include/&quot;;&quot;../../windows-build/pthreads&quot;" AdditionalIncludeDirectories="./;../;../PDP11/;&quot;../../windows-build/winpcap/Wpdpack/Include&quot;;&quot;../../windows-build/PCRE/include/&quot;;&quot;../../windows-build/pthreads&quot;"
PreprocessorDefinitions="USE_SHARED;USE_DISPLAY;VM_PDP11;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;PTW32_STATIC_LIB;SIM_ASYNCH_IO;USE_READER_THREAD;SIM_NEED_GIT_COMMIT_ID;HAVE_PCREPOSIX_H;PCRE_STATIC" PreprocessorDefinitions="USE_SHARED;USE_DISPLAY;VM_PDP11;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;PTW32_STATIC_LIB;SIM_ASYNCH_IO;USE_READER_THREAD;SIM_NEED_GIT_COMMIT_ID;HAVE_PCREPOSIX_H;PCRE_STATIC"
StringPooling="true" StringPooling="true"
@ -150,10 +151,11 @@
AdditionalLibraryDirectories="&quot;../../windows-build/winpcap/Wpdpack/Lib/&quot;;&quot;../../windows-build/PCRE/lib/&quot;" AdditionalLibraryDirectories="&quot;../../windows-build/winpcap/Wpdpack/Lib/&quot;;&quot;../../windows-build/PCRE/lib/&quot;"
GenerateDebugInformation="false" GenerateDebugInformation="false"
SubSystem="1" SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
StackReserveSize="10485760" StackReserveSize="10485760"
StackCommitSize="10485760" StackCommitSize="10485760"
OptimizeReferences="2"
EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"

View file

@ -34,27 +34,47 @@ rem
if "%~x1" == ".vcproj" goto _done_xp_check if "%~x1" == ".vcproj" goto _done_xp_check
if not "%~x1" == ".vcxproj" goto _next_arg if not "%~x1" == ".vcxproj" goto _next_arg
findstr PlatformToolset %1 >NUL
if ERRORLEVEL 1 goto _next_arg
findstr PlatformToolset %1 | findstr _xp >NUL findstr PlatformToolset %1 | findstr _xp >NUL
if not ERRORLEVEL 1 goto _done_xp_check if not ERRORLEVEL 1 goto _done_xp_check
echo ********************************************************* echo *********************************************************
echo ********************************************************* echo *********************************************************
echo ** The %~n1.exe binary can't run on windows XP. ** echo warning: The %~n1.exe binary can't run on windows XP.
echo ** Adding Windows XP suppport to the %~n1 project file** echo warning: Adding Windows XP suppport to all of the project files
echo ********************************************************* echo *********************************************************
echo ********************************************************* echo *********************************************************
set _XP_Support_Available=
for /r "%PROGRAMDATA%" %%z in (packages\XPSupport\Win_XPSupport.msi) do if exist "%%z" set _XP_Support_Available=1
if "" == "%_XP_Support_Available%" goto _done_xp_check
echo Set objFSO = CreateObject("Scripting.FileSystemObject") >>%1.fix.vbs echo Set objFSO = CreateObject("Scripting.FileSystemObject") >>PlatformToolset.fix.vbs
echo Set objFile = objFSO.OpenTextFile(Wscript.Arguments(0), 1) >>%1.fix.vbs echo Set objFile = objFSO.OpenTextFile(Wscript.Arguments(0), 1) >>PlatformToolset.fix.vbs
echo. >>%1.fix.vbs echo. >>PlatformToolset.fix.vbs
echo strText = objFile.ReadAll >>%1.fix.vbs echo strText = objFile.ReadAll >>PlatformToolset.fix.vbs
echo objFile.Close >>%1.fix.vbs echo objFile.Close >>PlatformToolset.fix.vbs
echo strNewText = Replace(strText, "</PlatformToolset>", "_xp</PlatformToolset>") >>%1.fix.vbs echo strNewText = Replace(strText, "</PlatformToolset>", "_xp</PlatformToolset>") >>PlatformToolset.fix.vbs
echo. >>%1.fix.vbs echo. >>PlatformToolset.fix.vbs
echo Set objFile = objFSO.OpenTextFile(Wscript.Arguments(0), 2) >>%1.fix.vbs echo Set objFile = objFSO.OpenTextFile(Wscript.Arguments(0), 2) >>PlatformToolset.fix.vbs
echo objFile.Write strNewText >>%1.fix.vbs echo objFile.Write strNewText >>PlatformToolset.fix.vbs
echo objFile.Close >>%1.fix.vbs echo objFile.Close >>PlatformToolset.fix.vbs
cscript %1.fix.vbs %1 cd
del %1.fix.vbs for %%f in (*.vcxproj) do call :_Fix_PlatformToolset %%f
del PlatformToolset.fix.vbs
echo *********************************************************
echo *********************************************************
echo Error: Reload the changed projects and start the build again
echo *********************************************************
echo *********************************************************
exit /B 1
:_Fix_PlatformToolset
findstr PlatformToolset %1 >NUL
if ERRORLEVEL 1 exit /B 0
findstr PlatformToolset %1 | findstr _xp >NUL
if not ERRORLEVEL 1 exit /B 0
echo Adding XP support to project %1
cscript PlatformToolset.fix.vbs %1 > NUL 2>&1
exit /B 0
:_done_xp_check :_done_xp_check
shift shift
@ -119,7 +139,7 @@ if ERRORLEVEL 1 goto _notice2
if "%_X_LIBSDL%" == "" goto _done_libsdl if "%_X_LIBSDL%" == "" goto _done_libsdl
if not exist ../../windows-build/libSDL/SDL2-2.0.3/include/SDL.h goto _notice2 if not exist ../../windows-build/libSDL/SDL2-2.0.3/include/SDL.h goto _notice2
if not exist "../../windows-build/libSDL/Microsoft DirectX SDK (June 2010)/Lib/x86/dxguid.lib" goto _notice2 if not exist "../../windows-build/libSDL/Microsoft DirectX SDK (June 2010)/Lib/x86/dxguid.lib" goto _notice2
findstr "/c:__FLTUSED__" ..\..\windows-build\libSDL\SDL2-2.0.3\VisualC\SDL_Static\SDL_VS2008.vcproj >NUL findstr "/c:HAVE_FTOL2_SSE" ..\..\windows-build\libSDL\SDL2-2.0.3\VisualC\SDL_Static\SDL_VS2008.vcproj >NUL
if ERRORLEVEL 1 goto _notice2 if ERRORLEVEL 1 goto _notice2
:_done_libsdl :_done_libsdl
if "%_X_LIBPCRE%" == "" goto _done_libpcre if "%_X_LIBPCRE%" == "" goto _done_libpcre

View file

@ -163,6 +163,7 @@
StackCommitSize="10485760" StackCommitSize="10485760"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"

View file

@ -126,6 +126,7 @@
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="true" OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="./;../;../VAX/;../pdp11/;&quot;../../windows-build/winpcap/Wpdpack/Include&quot;;&quot;../../windows-build/PCRE/include/&quot;;&quot;../../windows-build/pthreads&quot;" AdditionalIncludeDirectories="./;../;../VAX/;../pdp11/;&quot;../../windows-build/winpcap/Wpdpack/Include&quot;;&quot;../../windows-build/PCRE/include/&quot;;&quot;../../windows-build/pthreads&quot;"
PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;VAX_730;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;PTW32_STATIC_LIB;USE_READER_THREAD;SIM_ASYNCH_IO;SIM_NEED_GIT_COMMIT_ID;HAVE_PCREPOSIX_H;PCRE_STATIC" PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;VAX_730;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;PTW32_STATIC_LIB;USE_READER_THREAD;SIM_ASYNCH_IO;SIM_NEED_GIT_COMMIT_ID;HAVE_PCREPOSIX_H;PCRE_STATIC"
StringPooling="true" StringPooling="true"
@ -157,6 +158,7 @@
StackCommitSize="10485760" StackCommitSize="10485760"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"

View file

@ -126,6 +126,7 @@
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1" FavorSizeOrSpeed="1"
OmitFramePointers="true" OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="./;../;../VAX/;../pdp11/;&quot;../../windows-build/winpcap/Wpdpack/Include&quot;;&quot;../../windows-build/PCRE/include/&quot;;&quot;../../windows-build/pthreads&quot;" AdditionalIncludeDirectories="./;../;../VAX/;../pdp11/;&quot;../../windows-build/winpcap/Wpdpack/Include&quot;;&quot;../../windows-build/PCRE/include/&quot;;&quot;../../windows-build/pthreads&quot;"
PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;VAX_750;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;PTW32_STATIC_LIB;USE_READER_THREAD;SIM_ASYNCH_IO;SIM_NEED_GIT_COMMIT_ID;HAVE_PCREPOSIX_H;PCRE_STATIC" PreprocessorDefinitions="USE_INT64;USE_ADDR64;VM_VAX;VAX_750;USE_SHARED;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;PTW32_STATIC_LIB;USE_READER_THREAD;SIM_ASYNCH_IO;SIM_NEED_GIT_COMMIT_ID;HAVE_PCREPOSIX_H;PCRE_STATIC"
StringPooling="true" StringPooling="true"
@ -150,13 +151,14 @@
AdditionalOptions="/fixed:no" AdditionalOptions="/fixed:no"
AdditionalDependencies="wsock32.lib winmm.lib pcrestatic.lib pcreposixstatic.lib" AdditionalDependencies="wsock32.lib winmm.lib pcrestatic.lib pcreposixstatic.lib"
LinkIncremental="1" LinkIncremental="1"
AdditionalLibraryDirectories="../../winpcap/Wpdpack/Lib/;&quot;../../pthreads/Pre-built.2/lib/&quot;;&quot;../../windows-build/PCRE/lib/&quot;" AdditionalLibraryDirectories="../../winpcap/Wpdpack/Lib/;&quot;../../windows-build/PCRE/lib/&quot;"
GenerateDebugInformation="false" GenerateDebugInformation="false"
SubSystem="1" SubSystem="1"
StackReserveSize="10485760" StackReserveSize="10485760"
StackCommitSize="10485760" StackCommitSize="10485760"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"

View file

@ -159,6 +159,7 @@
StackCommitSize="10485760" StackCommitSize="10485760"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"

View file

@ -159,6 +159,7 @@
StackCommitSize="10485760" StackCommitSize="10485760"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"

View file

@ -119,7 +119,7 @@ if not exist "%_ZipPath%" mkdir "%_ZipPath%"
set _ZipPath=%_ZipPath%\ set _ZipPath=%_ZipPath%\
if not exist "%_ZipPath%%_ZipName%" vcbuild /M2 /useenv /rebuild Simh.sln "Release|Win32" if not exist "%_ZipPath%%_ZipName%" vcbuild /M2 /useenv /rebuild Simh.sln "Release|Win32"
7z a -tzip "%_ZipPath%%_ZipName%" "..\BIN\NT\Win32-Release\*.exe" 7z a -tzip -x!BuildROMs.exe "%_ZipPath%%_ZipName%" "..\BIN\NT\Win32-Release\*.exe"
popd popd
pushd ..\%_ZipPath% pushd ..\%_ZipPath%
if "%1" neq "reset" goto GitAddNew if "%1" neq "reset" goto GitAddNew

View file

@ -35,9 +35,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
@ -119,9 +116,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />

View file

@ -35,9 +35,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />
@ -119,9 +116,6 @@
<Tool <Tool
Name="VCXMLDataGeneratorTool" Name="VCXMLDataGeneratorTool"
/> />
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
/> />

View file

@ -161,6 +161,7 @@
StackCommitSize="10485760" StackCommitSize="10485760"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
LinkTimeCodeGeneration="1"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="1"