-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakedist-win.bat
95 lines (66 loc) · 3.81 KB
/
makedist-win.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
echo off
REM - batch file to build VS2010 project and zip the resulting binaries (or make installer)
REM - updating version numbers requires python and python path added to %PATH% env variable
REM - zipping requires 7zip in %ProgramFiles%\7-Zip\7z.exe
REM - building installer requires innotsetup in "%ProgramFiles(x86)%\Inno Setup 5\iscc"
REM - AAX codesigning requires ashelper tool added to %PATH% env variable and aax.key/.crt in .\..\..\..\Certificates\
echo Making Evaluator win distribution ...
set /P PUBLISH=Publish to Itch? (y/n):
echo ------------------------------------------------------------------
echo Updating version numbers ...
call python update_version.py
echo ------------------------------------------------------------------
echo Building ...
if exist "%ProgramFiles(x86)%" (goto 64-Bit) else (goto 32-Bit)
:32-Bit
echo 32-Bit O/S detected
call "%ProgramFiles%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
goto END
:64-Bit
echo 64-Bit Host O/S detected
call "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
goto END
:END
REM - set preprocessor macros like this, for instance to enable demo build:
REM - SET CMDLINE_DEFINES="DEMO_VERSION"
REM - Could build individual targets like this:
REM - msbuild Evaluator-app.vcxproj /p:configuration=release /p:platform=win32
REM - do a clean and build for both platforms to ensure we don't build with any old object files that might have been from a debug build
msbuild Evaluator.sln /t:Clean,Build /p:configuration=release /p:platform=win32 /nologo /noconsolelogger /fileLogger /v:quiet /flp:logfile=build-win.log;errorsonly
msbuild Evaluator.sln /t:Clean,Build /p:configuration=release /p:platform=x64 /nologo /noconsolelogger /fileLogger /v:quiet /flp:logfile=build-win.log;errorsonly;append
REM echo ------------------------------------------------------------------
REM echo Code sign aax binary...
REM - x86
REM - x64
REM - Make Installer (InnoSetup)
echo ------------------------------------------------------------------
echo Making Installer ...
if exist "%ProgramFiles(x86)%" (goto 64-Bit-is) else (goto 32-Bit-is)
:32-Bit-is
"%ProgramFiles%\Inno Setup 5\iscc" ".\installer\Evaluator.iss"
goto END-is
:64-Bit-is
"%ProgramFiles(x86)%\Inno Setup 5\iscc" ".\installer\Evaluator.iss"
goto END-is
:END-is
REM - ZIP
REM - "%ProgramFiles%\7-Zip\7z.exe" a .\installer\Evaluator-win-32bit.zip .\build-win\app\win32\bin\Evaluator.exe .\build-win\vst3\win32\bin\Evaluator.vst3 .\build-win\vst2\win32\bin\Evaluator.dll .\build-win\rtas\bin\Evaluator.dpm .\build-win\rtas\bin\Evaluator.dpm.rsr .\build-win\aax\bin\Evaluator.aaxplugin* .\installer\license.rtf .\installer\readmewin.rtf
REM - "%ProgramFiles%\7-Zip\7z.exe" a .\installer\Evaluator-win-64bit.zip .\build-win\app\x64\bin\Evaluator.exe .\build-win\vst3\x64\bin\Evaluator.vst3 .\build-win\vst2\x64\bin\Evaluator.dll .\installer\license.rtf .\installer\readmewin.rtf
if "%PUBLISH%" NEQ "y" goto LOG
echo ------------------------------------------------------------------
echo copying files to builds folder...
set BUILD_FOLDER=..\..\..\Builds\Evaluator
xcopy /Y /F version.txt %BUILD_FOLDER%\version.txt
xcopy /Y /F .\build-win\app\win32\bin\Evaluator.exe %BUILD_FOLDER%\App32\Evaluator.exe
xcopy /Y /F .\manual\Evaluator_manual.pdf %BUILD_FOLDER%\App32\Evaluator_manual.pdf
xcopy /Y /F .\build-win\app\x64\bin\Evaluator.exe %BUILD_FOLDER%\App64\Evaluator.exe
xcopy /Y /F .\manual\Evaluator_manual.pdf %BUILD_FOLDER%\App64\Evaluator_manual.pdf
xcopy /Y /F ".\installer\Evaluator Installer.exe" "%BUILD_FOLDER%\Installer\Evaluator Installer.exe"
pushd %BUILD_FOLDER%
call .\publish-itch.bat
popd
:LOG
echo ------------------------------------------------------------------
echo Printing log file to console...
type build-win.log
pause