-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.cmd
More file actions
38 lines (30 loc) · 988 Bytes
/
deploy.cmd
File metadata and controls
38 lines (30 loc) · 988 Bytes
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
REM This script creates a formal release build of the program.
set PROGRAM=lrtedit
set ROOTDIR=%CD%
set BUILDDIR=%CD%\.build
REM Ensure Qt is in the path (Would like to call this script from Qt Creator)?
set MYQTDIR=C:\Qt\5.9.7\mingw53_32
set MYCXXDIR=C:\Qt\Tools\mingw530_32\bin
set ZIPDIR=C:\Program Files\7-Zip
set PATH=%MYQTDIR%\bin;%MYCXXDIR%;%ZIPDIR%;%PATH%;
REM Build it
mkdir %BUILDDIR%
cd %BUILDDIR%
qmake ..\src
mingw32-make -j8 release
REM Create deployment dir
set DEPLOYDIR=%BUILDDIR%\%PROGRAM%
mkdir %DEPLOYDIR%
xcopy /Y %ROOTDIR%\LICENSE %DEPLOYDIR%
xcopy /Y %ROOTDIR%\README.md %DEPLOYDIR%
xcopy /Y %BUILDDIR%\release\%PROGRAM%.exe %DEPLOYDIR%
cd %DEPLOYDIR%
windeployqt --no-quick-import --no-translations --no-system-d3d-compiler --compiler-runtime --no-webkit2 --no-angle --no-opengl-sw %PROGRAM%.exe
REM Create an archive
cd %BUILDDIR%
7z a %ROOTDIR%\%PROGRAM%.zip %PROGRAM%
REM Show the user the status
pause
REM Tidy up
cd %ROOTDIR%
rmdir /S /Q %BUILDDIR%