annotate deploy/clean-build-and-package.bat @ 399:a3912193ce69 tip

Default branch is now named default on git as well as hg, in case we ever want to switch to mirroring in the other direction
author Chris Cannam
date Thu, 27 Aug 2020 15:57:37 +0100
parents 885960538dd4
children
rev   line source
Chris@385 1 @rem Run this from within the top-level dir: deploy\clean-build-and-package
Chris@385 2 @echo on
Chris@385 3
Chris@385 4 @set /p VERSION=<version.h
Chris@385 5 @set VERSION=%VERSION:#define RUNNER_VERSION "=%
Chris@385 6 set VERSION=%VERSION:"=%
Chris@385 7
Chris@385 8 @echo(
Chris@385 9 @set YN=y
Chris@385 10 @set /p YN="Proceed to clean, rebuild, package, and sign version %VERSION% [Yn] ?"
Chris@385 11
Chris@385 12 @if "%YN%" == "Y" set YN=y
Chris@385 13 @if "%YN%" neq "y" exit /b 3
Chris@385 14
Chris@385 15 @echo Proceeding
Chris@385 16
Chris@394 17 del /q /s build_win32
Chris@394 18 del /q /s build_win64_static
Chris@394 19
Chris@394 20 @echo Rebuilding 32-bit
Chris@394 21
Chris@394 22 call .\deploy\win\build-32.bat
Chris@394 23 if %errorlevel% neq 0 exit /b %errorlevel%
Chris@394 24
Chris@394 25 @echo Rebuilding 64-bit
Chris@394 26
Chris@394 27 call .\deploy\win\build-64-static.bat
Chris@385 28 if %errorlevel% neq 0 exit /b %errorlevel%
Chris@385 29
Chris@391 30 @echo on
Chris@391 31
Chris@394 32 @echo Signing
Chris@394 33
Chris@385 34 set NAME=Open Source Developer, Christopher Cannam
Chris@385 35
Chris@385 36 @echo Signing 32-bit executables and libraries
Chris@385 37 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a build_win32\release\*.exe build_win32\release\*.dll
Chris@385 38
Chris@385 39 @echo Signing 64-bit executables and libraries
Chris@394 40 signtool sign /v /n "%NAME%" /t http://time.certum.pl /fd sha1 /a build_win64_static\release\*.exe build_win64_static\release\*.dll
Chris@385 41
Chris@385 42 @echo Zipping up 32-bit package
Chris@391 43 set pkg=sonic-annotator-%VERSION%-win32
Chris@385 44 set dir=%pkg%\%pkg%
Chris@385 45 mkdir %pkg%
Chris@385 46 mkdir %dir%
Chris@385 47 copy CHANGELOG %dir%\CHANGELOG.txt
Chris@385 48 copy CITATION %dir%\CITATION.txt
Chris@385 49 copy COPYING %dir%\COPYING.txt
Chris@385 50 copy README.md %dir%\README.txt
Chris@391 51 copy build_win32\release\Qt5Core.dll %dir%
Chris@391 52 copy build_win32\release\Qt5Network.dll %dir%
Chris@391 53 copy build_win32\release\Qt5Xml.dll %dir%
Chris@391 54 copy build_win32\release\libgcc_s_dw2-1.dll %dir%
Chris@391 55 copy build_win32\release\libwinpthread-1.dll %dir%
Chris@394 56 copy build_win32\release\libstd*.dll %dir%
Chris@391 57 copy build_win32\release\sonic-annotator.exe %dir%
Chris@391 58
Chris@394 59 del %pkg%.zip
Chris@387 60 powershell -NoProfile -ExecutionPolicy Bypass -Command "& 'deploy\win\zip.ps1' %pkg%.zip %pkg%"
Chris@387 61 del /q /s %pkg%
Chris@385 62
Chris@385 63 @echo Zipping up 64-bit package
Chris@391 64 set pkg=sonic-annotator-%VERSION%-win64
Chris@385 65 set dir=%pkg%\%pkg%
Chris@385 66 mkdir %pkg%
Chris@385 67 mkdir %dir%
Chris@385 68 copy CHANGELOG %dir%\CHANGELOG.txt
Chris@385 69 copy CITATION %dir%\CITATION.txt
Chris@385 70 copy COPYING %dir%\COPYING.txt
Chris@385 71 copy README.md %dir%\README.txt
Chris@394 72 copy build_win64_static\release\libsndfile-1.dll %dir%
Chris@394 73 copy build_win64_static\release\sonic-annotator.exe %dir%
Chris@391 74
Chris@394 75 del %pkg%.zip
Chris@387 76 powershell -NoProfile -ExecutionPolicy Bypass -Command "& 'deploy\win\zip.ps1' %pkg%.zip %pkg%"
Chris@387 77 del /q /s %pkg%
Chris@385 78
Chris@385 79 @echo Done