Chris@685: rem Run this from within the top-level project dir: deploy\win32\build.bat Chris@685: Chris@686: rem NB PyQt5 build command, in PyQt5_gpl-5.11.3 directory: c:\Python27\python.exe configure.py --qmake=c:\qt\5.12.0\msvc2017\bin\qmake.exe --sip=c:\Python27\sip.exe --disable=QtNfc Chris@686: Chris@685: set STARTPWD=%CD% Chris@685: Chris@685: if not exist "C:\Program Files (x86)\WiX Toolset v3.11\bin" ( Chris@685: @ echo Could not find WiX Toolset Chris@685: @ exit /b 2 Chris@685: ) Chris@685: Chris@685: if not exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.15.26706\x64\Microsoft.VC141.CRT" ( Chris@686: @ echo Could not find Windows CRT directory Chris@686: @ exit /b 2 Chris@686: ) Chris@686: Chris@686: if not exist "C:/Python27/Lib/site-packages/PyQt5/" ( Chris@686: @ echo Could not find PyQt5 directory Chris@686: @ exit /b 2 Chris@686: ) Chris@686: Chris@686: if not exist "C:/Python27/Lib/site-packages/Crypto/" ( Chris@686: @ echo Could not find PyCrypto directory Chris@685: @ exit /b 2 Chris@685: ) Chris@685: Chris@685: set ORIGINALPATH=%PATH% Chris@685: set PATH=C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin;%PATH% Chris@685: set CRTDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.15.26706\x64\Microsoft.VC141.CRT Chris@686: set PYQTDIR=C:/Python27/Lib/site-packages/PyQt5/ Chris@686: set PYCRYPTODIR=C:/Python27/Lib/site-packages/Crypto/ Chris@685: set NAME=Open Source Developer, Christopher Cannam Chris@685: Chris@685: set ARG=%1 Chris@685: shift Chris@685: if "%ARG%" == "sign" ( Chris@685: @ echo NOTE: sign option specified, will attempt to codesign exe and msi Chris@685: ) else ( Chris@685: @ echo NOTE: sign option not specified, will not codesign anything Chris@685: ) Chris@685: Chris@685: cd %STARTPWD% Chris@685: rem del /q /s build_win32 Chris@685: call .\deploy\win32\build.bat Chris@685: if %errorlevel% neq 0 exit /b %errorlevel% Chris@685: Chris@685: if not exist mercurial-4.8.0-x86.msi ( Chris@685: C:\ProgramData\chocolatey\bin\wget https://bitbucket.org/tortoisehg/files/downloads/mercurial-4.8.0-x86.msi Chris@685: ) Chris@685: if %errorlevel% neq 0 exit /b %errorlevel% Chris@685: Chris@685: if not exist mercurial-4.8.0-x86 ( Chris@685: msiexec /a mercurial-4.8.0-x86.msi /qn TARGETDIR=%STARTPWD%\mercurial-4.8.0-x86 Chris@685: ) Chris@685: if %errorlevel% neq 0 exit /b %errorlevel% Chris@685: Chris@685: set HGDIR=%STARTPWD%\mercurial-4.8.0-x86 Chris@685: Chris@685: cd build_win32\release Chris@685: Chris@686: copy "%STARTPWD%\easyhg.py" . Chris@686: Chris@685: copy "%CRTDIR%\concrt140.DLL" . Chris@685: copy "%CRTDIR%\msvcp140.DLL" . Chris@685: copy "%CRTDIR%\vccorlib140.DLL" . Chris@685: copy "%CRTDIR%\vcruntime140.DLL" . Chris@685: Chris@685: copy "%HGDIR%\PFiles\Mercurial\hg.exe" . Chris@685: copy "%HGDIR%\PFiles\Mercurial\python27.dll" . Chris@685: Chris@685: mkdir lib Chris@686: copy "%HGDIR%\PFiles\Mercurial\lib\*" lib\ Chris@685: Chris@685: copy "%HGDIR%\windows\system32\msvcm90.dll" . Chris@685: copy "%HGDIR%\windows\system32\msvcp90.dll" . Chris@685: copy "%HGDIR%\windows\system32\msvcr90.dll" . Chris@685: Chris@686: mkdir PyQt5 Chris@686: copy "%PYQTDIR%\..\sip.pyd" . Chris@686: copy "%PYQTDIR%\__init__.py" PyQt5\ Chris@686: copy "%PYQTDIR%\QtCore.pyd" PyQt5\ Chris@686: copy "%PYQTDIR%\QtGui.pyd" PyQt5\ Chris@686: copy "%PYQTDIR%\QtWidgets.pyd" PyQt5\ Chris@686: Chris@686: mkdir Crypto Chris@686: mkdir Crypto\Cipher Chris@686: mkdir Crypto\Util Chris@686: Chris@686: copy "%PYCRYPTODIR%\Cipher\__init__.py" Crypto\Cipher\ Chris@686: copy "%PYCRYPTODIR%\Cipher\_AES.pyd" Crypto\Cipher\ Chris@686: copy "%PYCRYPTODIR%\Cipher\AES.py" Crypto\Cipher\ Chris@686: copy "%PYCRYPTODIR%\Cipher\blockalgo.py" Crypto\Cipher\ Chris@686: Chris@686: copy "%PYCRYPTODIR%\Util\__init__.py" Crypto\Util\ Chris@686: copy "%PYCRYPTODIR%\Util\py3compat.py" Crypto\Util\ Chris@686: Chris@686: copy "%PYCRYPTODIR%\__init__.py" Crypto\ Chris@686: Chris@685: if "%ARG%" == "sign" ( Chris@685: @echo Signing components Chris@685: signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 *.dll *.exe lib\* Chris@685: signtool verify /pa sonic-visualiser.msi Chris@687: rem AND MORE Chris@685: ) Chris@685: Chris@687: set PATH=%PATH%;"C:\Program Files (x86)\WiX Toolset v3.11\bin" Chris@687: Chris@687: del easyhg.msi Chris@687: candle -v ..\..\deploy\win32\easyhg.wxs Chris@687: light -b . -ext WixUIExtension -ext WixUtilExtension -v easyhg.wixobj Chris@687: Chris@685: rem Todo: the rest