makedist-win.bat (5030B)
1 @echo off 2 3 REM - batch file to build Visual Studio project and zip the resulting binaries (or make installer) 4 REM - updating version numbers requires python and python path added to %PATH% env variable 5 REM - zipping requires 7zip in %ProgramFiles%\7-Zip\7z.exe 6 REM - building installer requires innosetup 6 in "%ProgramFiles(x86)%\Inno Setup 6\iscc" 7 REM - AAX codesigning requires wraptool tool added to %PATH% env variable and aax.key/.crt in .\..\..\iPlug2\Certificates\ 8 9 REM - two arguments are demo/full and zip/installer 10 11 set DEMO_ARG="%1" 12 set ZIP_ARG="%2" 13 14 if [%DEMO_ARG%]==[] goto USAGE 15 if [%ZIP_ARG%]==[] goto USAGE 16 17 echo SCRIPT VARIABLES ----------------------------------------------------- 18 echo DEMO_ARG %DEMO_ARG% 19 echo ZIP_ARG %ZIP_ARG% 20 echo END SCRIPT VARIABLES ----------------------------------------------------- 21 22 if %DEMO_ARG% == "demo" ( 23 echo Making NeuralAmpModeler Windows DEMO VERSION distribution ... 24 set DEMO=1 25 ) else ( 26 echo Making NeuralAmpModeler Windows FULL VERSION distribution ... 27 set DEMO=0 28 ) 29 30 if %ZIP_ARG% == "zip" ( 31 set ZIP=1 32 ) else ( 33 set ZIP=0 34 ) 35 36 echo ------------------------------------------------------------------ 37 echo Updating version numbers ... 38 39 call python prepare_resources-win.py %DEMO% 40 call python update_installer-win.py %DEMO% 41 42 cd ..\ 43 44 echo "touching source" 45 46 copy /b *.cpp+,, 47 48 echo ------------------------------------------------------------------ 49 echo Building ... 50 51 REM Remove previous build logs 52 if exist "build-win.log" (del build-win.log) 53 54 if exist "%ProgramFiles(x86)%" (goto 64-Bit) else (goto 32-Bit) 55 56 if not defined DevEnvDir ( 57 :32-Bit 58 echo 32-Bit O/S detected 59 call "%ProgramFiles%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_x64 60 goto END 61 62 :64-Bit 63 echo 64-Bit Host O/S detected 64 call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_x64 65 goto END 66 :END 67 ) 68 69 70 REM - set preprocessor macros like this, for instance to set demo preprocessor macro: 71 if %DEMO% == 1 ( 72 set CMDLINE_DEFINES="DEMO_VERSION=1" 73 REM -copy ".\resources\img\AboutBox_Demo.png" ".\resources\img\AboutBox.png" 74 ) else ( 75 set CMDLINE_DEFINES="DEMO_VERSION=0" 76 REM -copy ".\resources\img\AboutBox_Registered.png" ".\resources\img\AboutBox.png" 77 ) 78 79 REM - Could build individual targets like this: 80 REM - msbuild NeuralAmpModeler-app.vcxproj /p:configuration=release /p:platform=win32 81 82 REM echo Building 32 bit binaries... 83 REM msbuild NeuralAmpModeler.sln /p:configuration=release /p:platform=win32 /nologo /verbosity:minimal /fileLogger /m /flp:logfile=build-win.log;errorsonly 84 85 REM echo Building 64 bit binaries... 86 REM add projects with /t to build VST2 and AAX 87 msbuild NeuralAmpModeler.sln /t:NeuralAmpModeler-app;NeuralAmpModeler-vst3 /p:configuration=release /p:platform=x64 /nologo /verbosity:minimal /fileLogger /m /flp:logfile=build-win.log;errorsonly;append 88 89 REM --echo Copying AAX Presets 90 91 REM --echo ------------------------------------------------------------------ 92 REM --echo Code sign AAX binary... 93 REM --info at pace central, login via iLok license manager https://www.paceap.com/pace-central.html 94 REM --wraptool sign --verbose --account XXXXX --wcguid XXXXX --keyfile XXXXX.p12 --keypassword XXXXX --in .\build-win\aax\bin\NeuralAmpModeler.aaxplugin\Contents\Win32\NeuralAmpModeler.aaxplugin --out .\build-win\aax\bin\NeuralAmpModeler.aaxplugin\Contents\Win32\NeuralAmpModeler.aaxplugin 95 REM --wraptool sign --verbose --account XXXXX --wcguid XXXXX --keyfile XXXXX.p12 --keypassword XXXXX --in .\build-win\aax\bin\NeuralAmpModeler.aaxplugin\Contents\x64\NeuralAmpModeler.aaxplugin --out .\build-win\aax\bin\NeuralAmpModeler.aaxplugin\Contents\x64\NeuralAmpModeler.aaxplugin 96 97 if %ZIP% == 0 ( 98 REM - Make Installer (InnoSetup) 99 100 echo ------------------------------------------------------------------ 101 echo Making Installer ... 102 103 REM if exist "%ProgramFiles(x86)%" (goto 64-Bit-is) else (goto 32-Bit-is) 104 105 REM :32-Bit-is 106 REM REM "%ProgramFiles%\Inno Setup 6\iscc" /Q ".\installer\NeuralAmpModeler.iss" 107 REM goto END-is 108 109 REM :64-Bit-is 110 "%ProgramFiles(x86)%\Inno Setup 6\iscc" /Q ".\installer\NeuralAmpModeler.iss" 111 REM goto END-is 112 113 REM :END-is 114 115 REM - Codesign Installer for Windows 8+ 116 REM -"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\signtool.exe" sign /f "XXXXX.p12" /p XXXXX /d "NeuralAmpModeler Installer" ".\installer\NeuralAmpModeler Installer.exe" 117 118 REM -if %1 == 1 ( 119 REM -copy ".\installer\NeuralAmpModeler Installer.exe" ".\installer\NeuralAmpModeler Demo Installer.exe" 120 REM -del ".\installer\NeuralAmpModeler Installer.exe" 121 REM -) 122 123 echo Making Zip File of Installer ... 124 ) else ( 125 echo Making Zip File ... 126 ) 127 128 FOR /F "tokens=* USEBACKQ" %%F IN (`call python scripts\makezip-win.py %DEMO% %ZIP%`) DO ( 129 SET ZIP_NAME=%%F 130 ) 131 132 echo ------------------------------------------------------------------ 133 echo Printing log file to console... 134 135 type build-win.log 136 goto SUCCESS 137 138 :USAGE 139 echo Usage: %0 [demo/full] [zip/installer] 140 exit /B 1 141 142 :SUCCESS 143 echo %ZIP_NAME% 144 145 exit /B 0