mirror of
https://github.com/QuasarApp/Hanoi-Towers.git
synced 2025-04-27 18:24:31 +00:00
test new cqtdeployer
This commit is contained in:
parent
78e25a0b2f
commit
b2e15551ed
4
.gitignore
vendored
4
.gitignore
vendored
@ -37,11 +37,15 @@ ui_*.h
|
||||
Makefile*
|
||||
*build-*
|
||||
|
||||
hanoi_towers/build/
|
||||
installer/installer
|
||||
|
||||
*.snap
|
||||
installer/packages/HanoiTowers/parts
|
||||
installer/packages/HanoiTowers/prime
|
||||
installer/packages/HanoiTowers/stage
|
||||
installer/packages/HanoiTowers/data/*
|
||||
.snapcraft
|
||||
|
||||
# QtCreator
|
||||
installer/HanoiTowersInstaller
|
||||
|
@ -1,39 +1,6 @@
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
include($$PWD/installer/deploy/deployFiles.pri)
|
||||
message( DEPLOY_FILES_MASTER = $$DEPLOY_FILES)
|
||||
SUBDIRS += hanoi_towers
|
||||
|
||||
ENABLE_SNAP = 1 #only linux
|
||||
ENABLE_INSTALLER = 0 #only desctop
|
||||
|
||||
SUBDIRS += hanoi_towers \
|
||||
CQtDeployer
|
||||
|
||||
equals( ENABLE_INSTALLER, 1) {
|
||||
!android:{
|
||||
message(desktopVersion: enabled)
|
||||
CONFIG(release, debug|release): {
|
||||
|
||||
SUBDIRS += installer
|
||||
|
||||
} else {
|
||||
message( Selected Debug mode. The installer will not be created )
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
equals( ENABLE_SNAP, 1) {
|
||||
!android:{
|
||||
message(desktopVersion: enabled)
|
||||
CONFIG(release, debug|release): {
|
||||
|
||||
SUBDIRS += installer/packages/HanoiTowers/snap.pro
|
||||
|
||||
} else {
|
||||
message( Selected Debug mode. The snap will not be created )
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
include($$PWD/installer/installer.pri)
|
||||
|
@ -10,9 +10,6 @@ SOURCES += main.cpp \
|
||||
RESOURCES += qml.qrc
|
||||
TARGET = hanoi-towers
|
||||
|
||||
include($$PWD/../installer/deploy/targetList.pri)
|
||||
include($$PWD/../installer/deploy/deployFiles.pri)
|
||||
|
||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
QML_IMPORT_PATH =
|
||||
|
||||
@ -36,10 +33,13 @@ QT_DIR = $$dirname(QMAKE_QMAKE)
|
||||
LUPDATE = $$QT_DIR/lupdate
|
||||
LRELEASE = $$QT_DIR/lrelease
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
CONFIG(release, debug|release): {
|
||||
DESTDIR = $$PWD/build/release
|
||||
|
||||
} else {
|
||||
DESTDIR = $$PWD/build/debug
|
||||
}
|
||||
|
||||
|
||||
DISTFILES += \
|
||||
android/AndroidManifest.xml \
|
||||
|
1
installer/config/ru.qm
Normal file
1
installer/config/ru.qm
Normal file
@ -0,0 +1 @@
|
||||
<クdハ<>箆!ソ`。スン
|
4
installer/config/ru.ts
Normal file
4
installer/config/ru.ts
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
</TS>
|
@ -1,41 +0,0 @@
|
||||
TEMPLATE = aux
|
||||
|
||||
INSTALLER = deployApp
|
||||
|
||||
INPUT = DEPLOY_FILES
|
||||
deployApp.input = INPUT
|
||||
deployApp.output = $$INSTALLER
|
||||
|
||||
|
||||
QT_DIR = $$dirname(QMAKE_QMAKE)
|
||||
QML_DIR = $$QT_DIR/../qml
|
||||
|
||||
|
||||
WINDEPLY = $$QT_DIR/windeployqt.exe
|
||||
MACDEPLY = $$QT_DIR/macdeployqt
|
||||
LINUXDEPLOY = $$PWD/linuxdeployqt-continuous-x86_64.AppImage
|
||||
|
||||
message( QML_DIR = $$QML_DIR)
|
||||
message( WINDEPLY = $$WINDEPLY)
|
||||
message( MACDEPLY = $$MACDEPLY)
|
||||
message( LINUXDEPLOY = $$LINUXDEPLOY)
|
||||
|
||||
win32 {
|
||||
deployApp.commands += "$$WINDEPLY --qmldir $$QML_DIR $$DEPLOY_FILES"
|
||||
}
|
||||
|
||||
unix {
|
||||
deployApp.commands += "$$LINUXDEPLOY --qmldir=$$QML_DIR --qmake=$$QMAKE_QMAKE $$DEPLOY_FILES"
|
||||
}
|
||||
|
||||
mac {
|
||||
deployApp.commands += "$$MACDEPLY --qmldir $$QML_DIR $$DEPLOY_FILES"
|
||||
}
|
||||
message( deployComand = "$$deployApp.commands")
|
||||
|
||||
commands += "chmod +x $$LINUXDEPLOY"
|
||||
|
||||
for(command, commands) {
|
||||
system($$command)|error("Failed to run: $$command")
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
TARGET_PATH = $$PWD/../packages/HanoiTowers/data
|
||||
equals( TEMPLATE, app) {
|
||||
DESTDIR = $$PWD/../packages/HanoiTowers/data
|
||||
}
|
||||
|
||||
equals( TEMPLATE, lib) {
|
||||
DESTDIR = $$PWD/../packages/HanoiTowers/data
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
# Here you need to specify a list of end targets for each platform.
|
||||
|
||||
# windows
|
||||
win32 {
|
||||
TARGET_LIST += HanoiTowers.exe
|
||||
}
|
||||
|
||||
# linux
|
||||
# by default installer create shortcut for last binary file of the list
|
||||
unix {
|
||||
TARGET_LIST += HanoiTowers
|
||||
}
|
||||
|
||||
# os X
|
||||
macx {
|
||||
TARGET_LIST += HanoiTowers
|
||||
}
|
106
installer/installer.pri
Normal file
106
installer/installer.pri
Normal file
@ -0,0 +1,106 @@
|
||||
QT_DIR = $$dirname(QMAKE_QMAKE)
|
||||
QML_DIR = $$PWD/../hanoi_towers/
|
||||
DEPLOY_TARGET = $$PWD/../hanoi_towers/build/release
|
||||
|
||||
LUPDATE = $$QT_DIR/lupdate
|
||||
LRELEASE = $$QT_DIR/lrelease
|
||||
|
||||
win32:DEPLOYER = $$PWD/../CQtDeployerBinaries/Windows/cqtdeployer.exe
|
||||
unix:DEPLOYER = cqtdeployer
|
||||
|
||||
OUT_FILE = installer
|
||||
|
||||
CONFIG(serverbuild): {
|
||||
EXEC = binarycreator
|
||||
} else: {
|
||||
|
||||
BINARY_LIST
|
||||
exists( $$QT_DIR/../../../Tools/QtInstallerFramework/3.0/bin/ ) {
|
||||
message( "QtInstallerFramework v3.0: yes" )
|
||||
BINARY_LIST += $$QT_DIR/../../../Tools/QtInstallerFramework/3.0/bin/binarycreator
|
||||
}
|
||||
exists( $$QT_DIR/../../../Tools/QtInstallerFramework/2.0/bin/ ) {
|
||||
message( "QtInstallerFramework v2.0: yes" )
|
||||
BINARY_LIST += $$QT_DIR/../../../Tools/QtInstallerFramework/2.0/bin/binarycreator
|
||||
}
|
||||
|
||||
isEmpty (BINARY_LIST) {
|
||||
error( "QtInstallerFramework not found!" )
|
||||
}
|
||||
|
||||
EXEC=$$first(BINARY_LIST)
|
||||
message( selected $$EXEC )
|
||||
|
||||
}
|
||||
|
||||
win32 {
|
||||
LUPDATE = $${LUPDATE}.exe
|
||||
LRELEASE = $${LRELEASE}.exe
|
||||
EXEC = $${EXEC}.exe
|
||||
OUT_FILE = $${OUT_FILE}.exe
|
||||
}
|
||||
|
||||
SUPPORT_LANGS = ru
|
||||
|
||||
defineReplace(findFiles) {
|
||||
patern = $$1
|
||||
path = $$2
|
||||
|
||||
all_files = $$files(*$${patern}, true)
|
||||
win32:all_files ~= s|\\\\|/|g
|
||||
win32:path ~= s|\\\\|/|g
|
||||
|
||||
for(file, all_files) {
|
||||
result += $$find(file, $$path)
|
||||
}
|
||||
|
||||
return($$result)
|
||||
}
|
||||
|
||||
XML_FILES = $$files(*.xml, true)
|
||||
|
||||
for(LANG, SUPPORT_LANGS) {
|
||||
for(XML, XML_FILES) {
|
||||
FILE_PATH = $$dirname(XML)
|
||||
|
||||
JS_FILES = $$findFiles(".js", $$FILE_PATH)
|
||||
UI_FILES = $$findFiles(".ui", $$FILE_PATH)
|
||||
|
||||
commands += "$$LUPDATE $$JS_FILES $$UI_FILES -ts $$FILE_PATH/$${LANG}.ts"
|
||||
TS_FILES += $$FILE_PATH/$${LANG}.ts
|
||||
|
||||
}
|
||||
|
||||
for(TS, TS_FILES) {
|
||||
commands += "$$LRELEASE $$TS"
|
||||
}
|
||||
}
|
||||
|
||||
for(command, commands) {
|
||||
system($$command)|error("Failed to run: $$command")
|
||||
}
|
||||
|
||||
BASE_DEPLOY_FLAGS = clear -qmake $$QMAKE_QMAKE -targetDir $$PWD/packages/HanoiTowers/data
|
||||
|
||||
deploy_depends.commands += $$DEPLOYER -bin $$DEPLOY_TARGET -qmlDir $$QML_DIR $$BASE_DEPLOY_FLAGS
|
||||
|
||||
create_installer.commands = $$EXEC \
|
||||
-c $$PWD/config/config.xml \
|
||||
-p $$PWD/packages \
|
||||
$$PWD/$$OUT_FILE
|
||||
|
||||
OTHER_FILES += \
|
||||
$$PWD/config/controlScript.js \
|
||||
$$PWD/config/config.xml \
|
||||
$$PWD/packages/HanoiTowers/meta/package.xml \
|
||||
$$PWD/packages/HanoiTowers/meta/installscript.js \
|
||||
$$PWD/packages/HanoiTowers/meta/ru.ts \
|
||||
$$PWD/packages/installer/meta/package.xml \
|
||||
$$PWD/packages/installer/meta/installscript.js \
|
||||
$$PWD/packages/installer/meta/ru.ts
|
||||
|
||||
create_installer.depends = deploy_depends
|
||||
|
||||
QMAKE_EXTRA_TARGETS += \
|
||||
deploy_depends \
|
||||
create_installer
|
@ -1,90 +0,0 @@
|
||||
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
|
||||
|
||||
OUT_FILE = HanoiTowersInstaller
|
||||
|
||||
QT_DIR = $$dirname(QMAKE_QMAKE)
|
||||
QML_DIR = $$PWD/../hanoi_towers
|
||||
|
||||
|
||||
WINDEPLY = $$QT_DIR/windeployqt.exe
|
||||
MACDEPLY = $$QT_DIR/macdeployqt
|
||||
LINUXDEPLOY = $$PWD/../CQtDeployer/build/CQtDeployer
|
||||
|
||||
message( QML_DIR = $$QML_DIR)
|
||||
message( WINDEPLY = $$WINDEPLY)
|
||||
message( MACDEPLY = $$MACDEPLY)
|
||||
message( LINUXDEPLOY = $$LINUXDEPLOY)
|
||||
|
||||
win32 {
|
||||
OUT_FILE = HanoiTowersInstaller.exe
|
||||
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) {
|
||||
installerApp.commands += $$LINUXDEPLOY -bin $$TARGET_PATH/$$command clear -qmlDir $$QML_DIR -qmake $$QMAKE_QMAKE &&
|
||||
}
|
||||
}
|
||||
|
||||
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")
|
||||
|
||||
commands += "$$LUPDATE $$PWD/packages/HanoiTowers/meta/installscript.js -ts $$PWD/packages/HanoiTowers/meta/ru.ts"
|
||||
commands += "$$LRELEASE $$PWD/packages/HanoiTowers/meta/ru.ts"
|
||||
|
||||
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 \
|
||||
packages/HanoiTowers/meta/installscript.js \
|
||||
packages/HanoiTowers/meta/package.xml \
|
||||
packages/HanoiTowers/meta/ru.ts
|
||||
|
||||
#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
|
Binary file not shown.
@ -37,13 +37,13 @@
|
||||
<message>
|
||||
<location filename="installscript.js" line="66"/>
|
||||
<source>HanoiTowers</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Ханойские башни</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="installscript.js" line="67"/>
|
||||
<source>Install HanoiTowers</source>
|
||||
<oldsource>Install SoundBand</oldsource>
|
||||
<translation type="unfinished">установка основного компонента</translation>
|
||||
<translation>установка основного компонента</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -1,41 +0,0 @@
|
||||
include($$PWD/../../deploy/targetList.pri)
|
||||
include($$PWD/../../deploy/deployFiles.pri)
|
||||
|
||||
|
||||
TEMPLATE = aux
|
||||
|
||||
SNAPCRAFT = runSnap.sh
|
||||
|
||||
DESTDIR = $$PWD
|
||||
|
||||
INPUT = $$PWD/snap/snapcraft.yaml
|
||||
snapApp.input = INPUT
|
||||
snapApp.output = $$SNAPCRAFT
|
||||
LINUXDEPLOY = $$PWD/../../../CQtDeployer/build/CQtDeployer
|
||||
|
||||
QT_DIR = $$dirname(QMAKE_QMAKE)
|
||||
QML_DIR = $$PWD/../../../hanoi_towers
|
||||
|
||||
unix {
|
||||
message($$DESTDIR);
|
||||
message($$TARGET_LIST);
|
||||
|
||||
for(command, TARGET_LIST) {
|
||||
snapApp.commands += $$LINUXDEPLOY -bin $$TARGET_PATH/$$command -qmlDir $$QML_DIR -qmake $$QMAKE_QMAKE &&
|
||||
}
|
||||
|
||||
snapApp.commands += $$DESTDIR/$$SNAPCRAFT
|
||||
snapApp.CONFIG += target_predeps no_link combine
|
||||
|
||||
message( snapComands = "$$snapApp.commands")
|
||||
}
|
||||
|
||||
|
||||
QMAKE_EXTRA_COMPILERS += snapApp
|
||||
|
||||
DISTFILES += \
|
||||
|
||||
unix:extraclean.commands = $$SNAPCRAFT clean
|
||||
|
||||
distclean.depends = extraclean
|
||||
QMAKE_EXTRA_TARGETS += distclean extraclean
|
@ -1,4 +0,0 @@
|
||||
!GlobalState
|
||||
assets:
|
||||
build-packages: []
|
||||
build-snaps: []
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
12
installer/packages/installer/meta/installscript.js
Normal file
12
installer/packages/installer/meta/installscript.js
Normal file
@ -0,0 +1,12 @@
|
||||
// Constructor
|
||||
function Component()
|
||||
{
|
||||
|
||||
generateTr();
|
||||
}
|
||||
|
||||
function generateTr() {
|
||||
component.setValue("DisplayName", qsTr("Installer"));
|
||||
component.setValue("Description", qsTr("Install components"));
|
||||
|
||||
}
|
15
installer/packages/installer/meta/package.xml
Normal file
15
installer/packages/installer/meta/package.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<Package>
|
||||
<DisplayName>from script</DisplayName>
|
||||
<Description>from script</Description>
|
||||
<Version>1.0.0</Version>
|
||||
<Default>true</Default>
|
||||
<Script>installscript.js</Script>
|
||||
<ReleaseDate>2018-08-25</ReleaseDate>
|
||||
<SortingPriority>200</SortingPriority>
|
||||
<ForcedInstallation>true</ForcedInstallation>
|
||||
|
||||
<Translations>
|
||||
<Translation>ru.qm</Translation>
|
||||
</Translations>
|
||||
</Package>
|
BIN
installer/packages/installer/meta/ru.qm
Normal file
BIN
installer/packages/installer/meta/ru.qm
Normal file
Binary file not shown.
53
installer/packages/installer/meta/ru.ts
Normal file
53
installer/packages/installer/meta/ru.ts
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ru_RU">
|
||||
<context>
|
||||
<name>TargetWidget</name>
|
||||
<message>
|
||||
<source>Install dir</source>
|
||||
<translation type="vanished">Папка установки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select the Installation directory</source>
|
||||
<translation type="vanished">Выберите директорию установки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>installscript</name>
|
||||
<message>
|
||||
<source>Virtus Rlo Images</source>
|
||||
<translation type="vanished">Изображения Virtus ИВС</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This package contains images for the sidebar of the rolo mode</source>
|
||||
<translation type="vanished">Этот пакет содержит изображения для боковой панели режима ИВС</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Choose your target directory.</source>
|
||||
<translation type="vanished">Выберите целевой каталог.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Attention! This directory is already taken, to continue the installation, select another directory!</source>
|
||||
<translation type="vanished">Внимание! Этот каталог уже создан, чтобы продолжить установку выберите другой каталог!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>App</source>
|
||||
<translation type="vanished">Основные компоненнты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Install HanoiTowers</source>
|
||||
<oldsource>Install SoundBand</oldsource>
|
||||
<translation type="obsolete">установка основного компонента</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="installscript.js" line="9"/>
|
||||
<source>Installer</source>
|
||||
<translation>Устанвщик</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="installscript.js" line="10"/>
|
||||
<source>Install components</source>
|
||||
<translation>Установочный компонент</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
Loading…
x
Reference in New Issue
Block a user