2018-08-16 23:20:33 +03:00
|
|
|
include($$PWD/deploy/targetList.pri)
|
|
|
|
include($$PWD/deploy/deployFiles.pri)
|
|
|
|
|
|
|
|
|
|
|
|
TEMPLATE = aux
|
|
|
|
|
|
|
|
INSTALLER = installerApp
|
|
|
|
|
|
|
|
INPUT = $$PWD/config/config.xml $$PWD/packages
|
|
|
|
installerApp.input = INPUT
|
|
|
|
installerApp.output = $$INSTALLER
|
|
|
|
|
|
|
|
QT_DIR = $$dirname(QMAKE_QMAKE)
|
|
|
|
LUPDATE = $$QT_DIR/lupdate
|
|
|
|
LRELEASE = $$QT_DIR/lrelease
|
|
|
|
|
2018-08-20 10:03:47 +03:00
|
|
|
OUT_FILE = SoundBandInstaller
|
2018-08-16 23:20:33 +03:00
|
|
|
|
|
|
|
QT_DIR = $$dirname(QMAKE_QMAKE)
|
|
|
|
QML_DIR = $$QT_DIR/../qml
|
|
|
|
|
|
|
|
|
|
|
|
WINDEPLY = $$QT_DIR/windeployqt.exe
|
|
|
|
MACDEPLY = $$QT_DIR/macdeployqt
|
2018-08-19 18:58:56 +03:00
|
|
|
LINUXDEPLOY = $$PWD/../CQtDeployer/build/CQtDeployer
|
2018-08-16 23:20:33 +03:00
|
|
|
|
|
|
|
message( QML_DIR = $$QML_DIR)
|
|
|
|
message( WINDEPLY = $$WINDEPLY)
|
|
|
|
message( MACDEPLY = $$MACDEPLY)
|
|
|
|
message( LINUXDEPLOY = $$LINUXDEPLOY)
|
|
|
|
|
|
|
|
win32 {
|
2018-08-21 18:21:38 +03:00
|
|
|
OUT_FILE = SoundBandInstaller.exe
|
2018-08-16 23:20:33 +03:00
|
|
|
LUPDATE = $$QT_DIR/lupdate.exe
|
|
|
|
LRELEASE = $$QT_DIR/lrelease.exe
|
|
|
|
}
|
|
|
|
|
|
|
|
message( QT_DIR = $$QT_DIR)
|
|
|
|
message( LUPDATE = $$LUPDATE)
|
|
|
|
message( LRELEASE = $$LRELEASE)
|
|
|
|
message( DEPLOY_FILES = $$DEPLOY_FILES)
|
|
|
|
|
|
|
|
# todo get inpot files
|
|
|
|
win32 {
|
|
|
|
for(command, TARGET_LIST) {
|
|
|
|
installerApp.commands += $$WINDEPLY --qmldir $$QML_DIR $$TARGET_PATH/$$command &&
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
unix {
|
|
|
|
for(command, TARGET_LIST) {
|
2018-08-19 18:58:56 +03:00
|
|
|
installerApp.commands += $$LINUXDEPLOY -bin $$TARGET_PATH/$$command -qmlDir $$QML_DIR -qmake $$QMAKE_QMAKE &&
|
2018-08-16 23:20:33 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
macx {
|
|
|
|
for(command, TARGET_LIST) {
|
|
|
|
installerApp.commands += $$MACDEPLY --qmldir $$QML_DIR $$TARGET_PATH/$$command &&
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
installerApp.commands += $$QT_DIR/../../../Tools/QtInstallerFramework/3.0/bin/binarycreator --offline-only -c $$PWD/config/config.xml -p $$PWD/packages $$PWD/$$OUT_FILE --verbose -f
|
|
|
|
installerApp.CONFIG += target_predeps no_link combine
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message( installComands = "$$installerApp.commands")
|
|
|
|
|
2018-08-21 18:21:38 +03:00
|
|
|
commands += "$$LUPDATE $$PWD/packages/SoundBand/meta/installscript.js -ts $$PWD/packages/SoundBand/meta/ru.ts"
|
|
|
|
commands += "$$LRELEASE $$PWD/packages/SoundBand/meta/ru.ts"
|
|
|
|
commands += "$$LUPDATE $$PWD/packages/SoundBand.Tests/meta/installscript.js -ts $$PWD/packages/SoundBand.Tests/meta/ru.ts"
|
|
|
|
commands += "$$LRELEASE $$PWD/packages/SoundBand.Tests/meta/ru.ts"
|
2018-08-16 23:20:33 +03:00
|
|
|
|
|
|
|
for(command, commands) {
|
|
|
|
system($$command)|error("Failed to run: $$command")
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QMAKE_EXTRA_COMPILERS += installerApp
|
|
|
|
|
|
|
|
DISTFILES += \
|
|
|
|
config/controlScript.js \
|
|
|
|
config/config.xml \
|
|
|
|
README.md \
|
|
|
|
config/ru.ts \
|
2018-08-21 18:21:38 +03:00
|
|
|
packages/SoundBand/meta/installscript.js \
|
|
|
|
packages/SoundBand/meta/package.xml \
|
|
|
|
packages/SoundBand/meta/ru.ts \
|
|
|
|
packages/SoundBand.Tests/meta/installscript.js \
|
|
|
|
packages/SoundBand.Tests/meta/package.xml \
|
|
|
|
packages/SoundBand.Tests/meta/ru.ts
|
2018-08-16 23:20:33 +03:00
|
|
|
|
2018-08-21 19:24:09 +03:00
|
|
|
#unix:extraclean.commands = chmod +x $$PWD/scripts/clear.sh && $$PWD/scripts/clear.sh
|
|
|
|
#win32:extraclean.commands = $$PWD/scripts/clear.bat;
|
|
|
|
|
|
|
|
#distclean.depends = extraclean
|
|
|
|
#QMAKE_EXTRA_TARGETS += distclean extraclean
|