-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDistribution_Windows.pri
58 lines (45 loc) · 2.14 KB
/
Distribution_Windows.pri
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
include (src/Common.pri)
CONFIG(debug, debug|release) {
BIN_DIR = ./bin/debug
message(Distributing $$APP_NAME in DEBUG mode)
} else {
BIN_DIR = ./bin/release
message(Distributing $$APP_NAME in RELEASE mode)
}
DIST_DIR = ./dist
DIST_EXE = $${DIST_DIR}/$${APP_NAME}.exe
#
# Distribution
#
distribution.commands += @echo Making distribution for Windows;
# Copy compiled binaries
distribution.commands += cp $${BIN_DIR}/Utils$${VERSION_MAJ}.dll ./$${DIST_DIR};
distribution.commands += cp $${BIN_DIR}/Model$${VERSION_MAJ}.dll ./$${DIST_DIR};
distribution.commands += cp $${BIN_DIR}/Kernel$${VERSION_MAJ}.dll ./$${DIST_DIR};
distribution.commands += cp $${BIN_DIR}/Resources$${VERSION_MAJ}.dll ./$${DIST_DIR};
distribution.commands += cp $${BIN_DIR}/$${APP_NAME}.exe ./$${DIST_EXE};
distribution.commands += windeployqt --no-angle --no-translations --no-svg $${DIST_EXE};
# qt.conf
distribution.commands += cp ./src/Resources/Windows/qt.conf ./$${DIST_DIR};
# Remove unnecessary plug-ins
distribution.commands += rm $${DIST_DIR}/imageformats/qdds.dll;
distribution.commands += rm $${DIST_DIR}/imageformats/qicns.dll;
distribution.commands += rm $${DIST_DIR}/imageformats/qico.dll;
distribution.commands += rm $${DIST_DIR}/imageformats/qjp2.dll;
distribution.commands += rm $${DIST_DIR}/imageformats/qmng.dll;
distribution.commands += rm $${DIST_DIR}/imageformats/qtga.dll;
distribution.commands += rm $${DIST_DIR}/imageformats/qwebp.dll;
#
# Installer
#
# Make sure the WiX installer tools candle.exe and light.exe are in the PATH
# e.g. set PATH="c:\Programme\Windows Installer XML v3.5\bin";%PATH%
CONFIG(debug, debug|release) {
message("Installer: skipping this build step. Target 'Installer' can only be done in RELEASE mode.")
} else {
installer.commands = candle.exe -nologo "Installer/Windows/Screenie.wxs" -out "Installer/Windows/Screenie.wixobj" -ext WixUIExtension &&
installer.commands += light.exe -nologo "Installer/Windows/Screenie.wixobj" -out "Installer/Windows/Screenie-$${VERSION}.msi" -ext WixUIExtension
}
OTHER_FILES += Installer/Windows/Screenie.wxs \
Installer/Windows/GPL3.rtf \
Installer/Windows/README.txt