8000 Added support for more MSCV compiling while making the script general… · coderforlife/pe-file@7cbb661 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7cbb661

Browse files
committed
Added support for more MSCV compiling while making the script generalized.
1 parent b53a851 commit 7cbb661

6 files changed

+66
-80
lines changed

build-msvc-debug.bat

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
:: This builds using MS Visual C++ with debug symbols
2+
:: Looks if one of %VS*COMNTOOLS% variables exists where * is one of 140 (2015),
3+
:: 120 (2013), 110 (2012), 100 (2010), 90 (2008). They are tried in that order.
4+
5+
@set DIR=
6+
@if not "%VS90COMNTOOLS%"=="" set DIR=%VS90COMNTOOLS%
7+
@if not "%VS100COMNTOOLS%"=="" set DIR=%VS100COMNTOOLS%
8+
@if not "%VS110COMNTOOLS%"=="" set DIR=%VS110COMNTOOLS%
9+
@if not "%VS120COMNTOOLS%"=="" set DIR=%VS120COMNTOOLS%
10+
@if not "%VS140COMNTOOLS%"=="" set DIR=%VS140COMNTOOLS%
11+
@if "%DIR%"=="" (
12+
echo Could not find a Visual Studio toolkit
13+
goto :EOF
14+
)
15+
16+
@echo Compiling with toolchain at "%DIR%" [DEBUG]
17+
18+
@set FLAGS=/nologo /MDd /MP /D _DEBUG /Zi /W4 /wd4201 /wd4480 /O2 /GS /EHa /D _UNICODE /D UNICODE
19+
@set FILES=PEFile.cpp PEFileResources.cpp PEDataSource.cpp PEVersion.cpp
20+
21+
@echo Compiling 32-bit...
22+
@call "%DIR%\..\..\VC\vcvarsall.bat" x86
23+
cl %FLAGS% /FdPEFile_d.pdb %FILES%
24+
lib /nologo /out:PEFile_d.lib *.obj
25+
@del /F /Q *.obj >NUL 2>&1
26+
@echo.
27+
28+
@echo Compiling 64-bit...
29+
@call "%DIR%\..\..\VC\vcvarsall.bat" x64
30+
cl %FLAGS% /FdPEFile64_d.pdb /c %FILES%
31+
lib /nologo /out:PEFile64_d.lib *.obj
32+
@del /F /Q *.obj >NUL 2>&1
33+
@pause

build-msvc.bat

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
:: This builds using MS Visual C++
2+
:: Looks if one of %VS*COMNTOOLS% variables exists where * is one of 140 (2015),
3+
:: 120 (2013), 110 (2012), 100 (2010), 90 (2008). They are tried in that order.
4+
5+
@set DIR=
6+
@if not "%VS90COMNTOOLS%"=="" set DIR=%VS90COMNTOOLS%
7+
@if not "%VS100COMNTOOLS%"=="" set DIR=%VS100COMNTOOLS%
8+
@if not "%VS110COMNTOOLS%"=="" set DIR=%VS110COMNTOOLS%
9+
@if not "%VS120COMNTOOLS%"=="" set DIR=%VS120COMNTOOLS%
10+
@if not "%VS140COMNTOOLS%"=="" set DIR=%VS140COMNTOOLS%
11+
@if "%DIR%"=="" (
12+
echo Could not find a Visual Studio toolkit
13+
goto :EOF
14+
)
15+
16+
@echo Compiling with toolchain at "%DIR%"
17+
18+
@set FLAGS=/nologo /MT /MP /D NDEBUG /W4 /wd4201 /wd4480 /O2 /GS /GL /EHa /D _UNICODE /D UNICODE
19+
@set FILES=PEFile.cpp PEFileResources.cpp PEDataSource.cpp PEVersion.cpp
20+
21+
@echo Compiling 32-bit...
22+
@call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
23+
cl %FLAGS% /c %FILES%
24+
lib /nologo /ltcg /out:PEFile.lib *.obj
25+
@del /F /Q *.obj >NUL 2>&1
26+
@echo.
27+
28+
@echo Compiling 64-bit...
29+
@call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
30+
cl %FLAGS% /c %FILES%
31+
lib /nologo /ltcg /out:PEFile64.lib *.obj
32+
@del /F /Q *.obj >NUL 2>&1
33+
@pause

build-msvc10-debug.bat

Lines changed: 0 additions & 20 deletions
This file was deleted.

build-msvc10.bat

Lines changed: 0 additions & 20 deletions
This file was deleted.

build-msvc9-debug.bat

Lines changed: 0 additions & 20 deletions
This file was deleted.

build-msvc9.bat

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0