Final tweaks to MSVC build (#1139)

* Quote paths in msvc postbuildevent scripts

* Update MSVC readme with some new advice
This commit is contained in:
Audrey Dutcher 2019-09-06 19:46:28 -07:00 committed by Nguyen Anh Quynh
parent 626d72d6df
commit 4fd2f8c524
3 changed files with 49 additions and 31 deletions

View File

@ -5,15 +5,33 @@ Zak Escano - January 2017
These notes are to help myself and others with the upkeep of the msvc native port
of unicorn-engine.
:: Command line build instructions
msbuild -m -p:Configuration=Release -p:Platform=Win32
msbuild -m -p:Configuration=Release -p:Platform=x64
Then bundle and release the folder "distro".
:: Build settings
Visual Studio Version: Visual Studio 2012 v11.061219.00 Update 5
Platform Toolset: Visual Studio 2012 - Windows XP (v110_xp)
Visual Studio Version: Visual Studio 2017 v15.9.15
Platform Toolset: Default. Known to work with the 8.1 SDK
Character Set: Use Multi-Byte Character Set
Runtime Library Debug: Multi-threaded Debug (/MTd)
Runtime Library Release: Multi-threaded (/MT)
Precompiled Header: Not Using Precompiled Headers
Additional Options: /wd4018 /wd4244 /wd4267
Additional Options: /wd4018 /wd4244 /wd4267
:: Build advice
- If you see warnings about spectre-mitigated libraries and then some strange
errors, the errors may be related to the spectre libraries. Install them.
(via the visual studio installation manager)
- The "platform default" target SDK may not actually be installed for you. Try
installing the Windows 8.1 SDK via the visual studio installation manager.
:: Changes porting unicorn from GNU/GCC to MSVC.

View File

@ -145,15 +145,15 @@
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>mkdir $(SolutionDir)distro\
mkdir $(SolutionDir)distro\include
mkdir $(SolutionDir)distro\include\unicorn
mkdir $(SolutionDir)distro\$(Platform)
<Command>mkdir "$(SolutionDir)distro\"
mkdir "$(SolutionDir)distro\include"
mkdir "$(SolutionDir)distro\include\unicorn"
mkdir "$(SolutionDir)distro\$(Platform)"
copy $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).dll $(SolutionDir)distro\$(Platform)\
copy $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).lib $(SolutionDir)distro\$(Platform)\
copy "$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)distro\$(Platform)\"
copy "$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).lib" "$(SolutionDir)distro\$(Platform)\"
copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
copy "$(SolutionDir)..\include\unicorn\*.h" "$(SolutionDir)distro\include\unicorn\"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
@ -180,15 +180,15 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)\</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>mkdir $(SolutionDir)distro\
mkdir $(SolutionDir)distro\include
mkdir $(SolutionDir)distro\include\unicorn
mkdir $(SolutionDir)distro\$(Platform)
<Command>mkdir "$(SolutionDir)distro\"
mkdir "$(SolutionDir)distro\include"
mkdir "$(SolutionDir)distro\include\unicorn"
mkdir "$(SolutionDir)distro\$(Platform)"
copy $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).dll $(SolutionDir)distro\$(Platform)\
copy $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).lib $(SolutionDir)distro\$(Platform)\
copy "$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).dll" "$(SolutionDir)distro\$(Platform)\"
copy "$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).lib" "$(SolutionDir)distro\$(Platform)\"
copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
copy "$(SolutionDir)..\include\unicorn\*.h" "$(SolutionDir)distro\include\unicorn\"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
@ -360,4 +360,4 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View File

@ -310,14 +310,14 @@
<Command>..\prebuild_script.bat</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>mkdir $(SolutionDir)distro\
mkdir $(SolutionDir)distro\include
mkdir $(SolutionDir)distro\include\unicorn
mkdir $(SolutionDir)distro\$(Platform)
<Command>mkdir "$(SolutionDir)distro\"
mkdir "$(SolutionDir)distro\include"
mkdir "$(SolutionDir)distro\include\unicorn"
mkdir "$(SolutionDir)distro\$(Platform)"
copy $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).lib $(SolutionDir)distro\$(Platform)\
copy "$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).lib" "$(SolutionDir)distro\$(Platform)\"
copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
copy "$(SolutionDir)..\include\unicorn\*.h" "$(SolutionDir)distro\include\unicorn\"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
@ -350,18 +350,18 @@ copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
<Command>..\prebuild_script.bat</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>mkdir $(SolutionDir)distro\
mkdir $(SolutionDir)distro\include
mkdir $(SolutionDir)distro\include\unicorn
mkdir $(SolutionDir)distro\$(Platform)
<Command>mkdir "$(SolutionDir)distro\"
mkdir "$(SolutionDir)distro\include"
mkdir "$(SolutionDir)distro\include\unicorn"
mkdir "$(SolutionDir)distro\$(Platform)"
copy $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).lib $(SolutionDir)distro\$(Platform)\
copy "$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName).lib" "$(SolutionDir)distro\$(Platform)\"
copy $(SolutionDir)..\include\unicorn\*.h $(SolutionDir)distro\include\unicorn\
copy "$(SolutionDir)..\include\unicorn\*.h" "$(SolutionDir)distro\include\unicorn\"
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>