Skip to content

Commit 7e67cbf

Browse files
committed
Add nsis support to the qmake script
1 parent 5328635 commit 7e67cbf

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

common.pri

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ CONFIG(debug, debug|release) {
1111
DEFINES *= QT_NO_DEBUG_OUTPUT # QT_NO_INFO_OUTPUT
1212
}
1313

14+
APP_BINS = $${PROJECT_ROOT_PATH}/bin/$${BUILD_FLAG}
15+
1416
CONFIG *= c++11
1517
CONFIG -= debug_and_release debug_and_release_target
1618

@@ -22,7 +24,7 @@ LANG_PATH = $${PROJECT_ROOT_PATH}/lang
2224
LANG_LIST = pl ca de fi cs_CZ es nl ru
2325

2426
!CONFIG(staticlib) {
25-
DESTDIR = $${PROJECT_ROOT_PATH}/bin/$${BUILD_FLAG}
27+
DESTDIR = $$APP_BINS
2628
}
2729

2830
!defined(PREFIX, var) {

gcodeworkshop_top.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ SUBDIRS = 3rdparty gcodeshared addons gcodeworkshop gcodefileserver
55

66

77
include(common.pri)
8+
include(install/install.pri)
89

910
QMAKE_EXTRA_TARGETS += lupdate
1011
lupdate.depends = lupdateGCodeWorkShop lupdateKdiff3

install/install.pri

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
!defined(INSTALLER_DIR, var):INSTALLER_DIR = $$shadowed($${PROJECT_ROOT_PATH})
3+
4+
win32:include(windows/windows.pri)

install/windows/windows.pri

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
APP_ARCH = $$QMAKE_HOST.arch
3+
4+
CXX_RUNTIME = $$system(where $$QMAKE_CXX)
5+
CXX_RUNTIME = $$first(CXX_RUNTIME)
6+
CXX_RUNTIME = $$dirname(CXX_RUNTIME)
7+
8+
QMAKE_EXTRA_TARGETS += nsis
9+
10+
mingw:NSIS_EXTRA_FILES = "$${PWD}/nsis/mingw.nsi"
11+
12+
nsis.commands = makensis \
13+
-DAPP_ARCH=$$APP_ARCH \
14+
-DINSTALLER_FILE="$${INSTALLER_DIR}/GCodeWorkShop_$${APP_ARCH}_Setup.exe" \
15+
-DPROJECT_ROOT="$$PROJECT_ROOT_PATH" \
16+
-DAPP_BINS="$$APP_BINS" \
17+
-DCXX_RUNTIME="$$CXX_RUNTIME" \
18+
-DQT_HOST_BINS="$$[QT_HOST_BINS]" \
19+
-DQT_HOST_DATA="$$[QT_HOST_DATA]" \
20+
"$${PWD}/nsis/app.nsi" \
21+
"$${NSIS_EXTRA_FILES}"

0 commit comments

Comments
 (0)