-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbuild-windows-msvc.bat
62 lines (42 loc) · 1.57 KB
/
build-windows-msvc.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
SET BUILDARCH=x86_64
SET VCARCH=amd64
SET QTPATH=C:\Qt\6.6.2\msvc2019_64
SET EXTRALIBSPATH=C:\Users\test\Builder\extralibs
SET BUILDTYPE=release
:: Set up \Microsoft Visual Studio 2017
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %VCARCH%
:: for rc.exe
set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\8.1\bin\x64\;C:\Program Files\Git\bin\git;
set EXTRALIB=%EXTRALIBSPATH%\%BUILDARCH%\
set LIB=%LIB%;%EXTRALIB%\lib;%EXTRALIB%\lib\ffmpeg\
set INCLUDE=%INCLUDE%;%EXTRALIB%\include;%INCLUDE%;%EXTRALIB%\include\ffmpeg
:: Build and install directories
set BUILDDIR=build-%BUILDARCH%-%BUILDTYPE%
set INSTALLDIR=karlyriceditor-%BUILDARCH%-%BUILDTYPE%
:: Create the build dir
cd Builds
mkdir %BUILDDIR%
cd %BUILDDIR%
%QTPATH%\bin\qmake CONFIG+=%BUILDTYPE% .. || exit 1
nmake || exit 1
mkdir %INSTALLDIR%
copy src\bin\karlyriceditor.exe %INSTALLDIR%\
:: SSL dlls
copy %EXTRALIB%\dll\*.dll %INSTALLDIR%\
:: FFMpeg libs
copy %EXTRALIB%\dll\ffmpeg\*.dll %INSTALLDIR%\
:: copy Qt libs
%QTPATH%\bin\windeployqt --%BUILDTYPE% --compiler-runtime %INSTALLDIR%\
:: Rename vcredist arch to vcredist
rename %INSTALLDIR%\vcredist* vcredist.exe
:: Manifest
copy ..\nsis\*.manifest %INSTALLDIR%\
:: License
copy ..\nsis\license.txt %INSTALLDIR%\
:: Create ZIP archve
"C:\Program Files\7-Zip\7z.exe" a -r karlyriceditor-%BUILDARCH%-%BUILDTYPE%.zip %INSTALLDIR%
:: Move those to the output dir
mkdir ..\output
copy karlyriceditor-%BUILDARCH%-%BUILDTYPE%.zip ..\output\
::copy InstallSpivak.exe ..\output\InstallSpivak-%BUILDARCH%.exe
echo "SUCCESS"