Merge pull request #27 from QuasarApp/v1_5

fix victory rules
This commit is contained in:
Andrei Yankovich 2019-04-07 14:29:06 +03:00 committed by GitHub
commit 3e61db981c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 346 additions and 395 deletions

6
.gitignore vendored
View File

@ -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
@ -57,5 +61,5 @@ CMakeLists.txt.user*
snap/plugins/__pycache__/
*.snap
data/
\.buildconfig

9
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "CQtDeployer"]
path = CQtDeployer
url = https://github.com/QuasarApp/Console-QtDeployer.git
[submodule "CQtDeployerBinaries"]
path = CQtDeployerBinaries
url = https://github.com/QuasarApp/CQtDeployerBinaries.git
[submodule "QuasarAppLib"]
path = QuasarAppLib
url = https://github.com/QuasarApp/QuasarAppLib.git

@ -1 +0,0 @@
Subproject commit 56411c0fe893464b68493ca2322c53c4d731a51a

1
CQtDeployerBinaries Submodule

@ -0,0 +1 @@
Subproject commit f4f1f3373c03f76b63d5f63d3f6f02bf83395108

View File

@ -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)

1
QuasarAppLib Submodule

@ -0,0 +1 @@
Subproject commit 6d2c3c91fd2b25c75a4067a76a8744312ae8867f

View File

@ -47,7 +47,7 @@ Dialog {
wrapMode:Text.Wrap ;
text: qsTr("Your task is to transfer discs of different sizes" +
"from the left tower to any other free space." +
"from the left tower to third tower." +
"You can only transfer the top drive of the tower." +
"You can not transfer several disks at once and put larger disks on small disks.");

View File

@ -27,7 +27,7 @@ Rectangle {
color: Qt.rgba(0.5,0.5,0.5,1 / (Math.abs(spin.currentIndex - modelData)))
text: "" + (modelData + 1)
width: tumbler.width
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: (spin.height / 4) / (Math.abs(spin.currentIndex - modelData) + 1 )

View File

@ -39,7 +39,7 @@ Item {
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018 Yankovich N. Andrei.")
* Copyright (C) 2018-2019 Yankovich N. Andrei.")
}
MouseArea {
anchors.fill: parent

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<manifest package="df.mobily.hanoi_towers" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.1" android:versionCode="13" android:installLocation="auto">
<manifest package="df.mobily.hanoi_towers" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.2" android:versionCode="14" android:installLocation="auto">
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="-- %%INSERT_APP_NAME%% --" android:icon="@drawable/icon">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|navigation" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="-- %%INSERT_APP_NAME%% --" android:screenOrientation="landscape" android:launchMode="singleTop">
<intent-filter>
@ -63,7 +63,7 @@
</application>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26"/>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.

View File

@ -61,11 +61,11 @@ Rectangle {
id: towerheight
font.bold: true
font.pointSize: height / text.length * 2
horizontalAlignment: Text.AlignCenter
horizontalAlignment: Text.AlignHCenter
height: mouseContener.height
styleColor: "#973c3c"
verticalAlignment: Text.AlignCenter
verticalAlignment: Text.AlignVCenter
text: qsTr("Tower height:")
anchors.left: mouseContener.right
@ -174,7 +174,7 @@ Rectangle {
obj.pop()
}
}
if (tower2.items.length === all || tower3.items.length === all) {
if ( tower3.items.length === all) {
if (all == tumbler.spin.maximumValue) {
backEnd.save(tumbler.spin.value = tumbler.spin.maximumValue = all + 1)
popUp.text = qsTr("You have passed the level in %0 steps and unlocked level %1" +

View File

@ -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 \

View File

@ -54,7 +54,7 @@
<name>Help</name>
<message>
<location filename="../Help.qml" line="49"/>
<source>Your task is to transfer discs of different sizesfrom the left tower to any other free space.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<source>Your task is to transfer discs of different sizesfrom the left tower to third tower.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<translation type="unfinished"></translation>
</message>
<message>
@ -118,7 +118,7 @@
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018 Yankovich N. Andrei.</source>
* Copyright (C) 2018-2019 Yankovich N. Andrei.</source>
<translation type="unfinished"></translation>
</message>
</context>

Binary file not shown.

View File

@ -53,12 +53,20 @@
<context>
<name>Help</name>
<message>
<location filename="../Help.qml" line="49"/>
<source>Your task is to transfer discs of different sizesfrom the left tower to any other free space.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<translation type="vanished" variants="yes">
<lengthvariant></lengthvariant>
<lengthvariant></lengthvariant>
<lengthvariant></lengthvariant>
</translation>
</message>
<message>
<location filename="../Help.qml" line="49"/>
<source>Your task is to transfer discs of different sizesfrom the left tower to third tower.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<translation variants="yes">
<lengthvariant></lengthvariant>
<lengthvariant></lengthvariant>
<lengthvariant></lengthvariant>
<lengthvariant></lengthvariant>
<lengthvariant></lengthvariant>
<lengthvariant></lengthvariant>
</translation>
</message>
<message>
@ -122,8 +130,22 @@
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018-2019 Yankovich N. Andrei.</source>
<translation type="unfinished">QuasarAppの製品
*
*Yankovich N. Andrei
*LGPLv3ライセンスの下で配布されています
*https://github.com/EndrII
* CopyrightC2018 Yankovich N. Andrei {3 ?} {2018-2019 ?}</translation>
</message>
<message>
<source>Product of QuasarApp
* Developers:
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018 Yankovich N. Andrei.</source>
<translation>QuasarAppの製品
<translation type="vanished">QuasarAppの製品
*
*Yankovich N. Andrei
*LGPLv3ライセンスの下で配布されています

Binary file not shown.

View File

@ -53,9 +53,13 @@
<context>
<name>Help</name>
<message>
<location filename="../Help.qml" line="49"/>
<source>Your task is to transfer discs of different sizesfrom the left tower to any other free space.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<translation>Ваше задание состоит в том, чтобы, перенести диски разных размеров с левой башни в любу другую свободную. Вы можете переносить только верхней диск башни. Нельзя переносить сразу несколько дисков и ставить большее диски на маленькие.</translation>
<translation type="vanished">Ваше задание состоит в том, чтобы, перенести диски разных размеров с левой башни в любу другую свободную. Вы можете переносить только верхней диск башни. Нельзя переносить сразу несколько дисков и ставить большее диски на маленькие.</translation>
</message>
<message>
<location filename="../Help.qml" line="49"/>
<source>Your task is to transfer discs of different sizesfrom the left tower to third tower.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<translation>Ваше задание состоит в том, чтобы, перенести диски разных размеров с левой башни в третью башню. Вы можете переносить только верхней диск башни. Нельзя переносить сразу несколько дисков и ставить большее диски на маленькие.</translation>
</message>
<message>
<location filename="../Help.qml" line="62"/>
@ -118,8 +122,22 @@
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018-2019 Yankovich N. Andrei.</source>
<translation type="unfinished">Продукт QuasarApp
* Разработчики:
* Программист: Янкович А. Н.
* Эта игра распостроняеться в соотвецтвии с лицензией LGPLv3.
* Сайт игры: https://quasarapp.github.io/Hanoi-Towers/
* Copyright (C) 2018 Янкович А. Н. {3 ?} {2018-2019 ?}</translation>
</message>
<message>
<source>Product of QuasarApp
* Developers:
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018 Yankovich N. Andrei.</source>
<translation>Продукт QuasarApp
<translation type="vanished">Продукт QuasarApp
* Разработчики:
* Программист: Янкович А. Н.
* Эта игра распостроняеться в соотвецтвии с лицензией LGPLv3.

Binary file not shown.

View File

@ -53,9 +53,13 @@
<context>
<name>Help</name>
<message>
<location filename="../Help.qml" line="49"/>
<source>Your task is to transfer discs of different sizesfrom the left tower to any other free space.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<translation>Göreviniz, sol kuleden farklı boyuttaki diskleri başka bir boş alana aktarmaktır. Kulenin sadece üst sürücüsünü aktarabilirsiniz. Birkaç diski aynı anda transfer edemez ve daha küçük disklere daha büyük diskler yerleştiremezsiniz.</translation>
<translation type="vanished">Göreviniz, sol kuleden farklı boyuttaki diskleri başka bir boş alana aktarmaktır. Kulenin sadece üst sürücüsünü aktarabilirsiniz. Birkaç diski aynı anda transfer edemez ve daha küçük disklere daha büyük diskler yerleştiremezsiniz.</translation>
</message>
<message>
<location filename="../Help.qml" line="49"/>
<source>Your task is to transfer discs of different sizesfrom the left tower to third tower.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<translation>Göreviniz, sol kuleden farklı büyüklükteki diskleri üçüncü kuleye aktarmaktır. Yalnızca kulenin üst sürücüsünü aktarabilirsiniz. Aynı anda birkaç diski aktaramaz ve daha küçük disklere daha büyük diskler yerleştiremezsiniz.</translation>
</message>
<message>
<location filename="../Help.qml" line="62"/>
@ -118,8 +122,22 @@
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018-2019 Yankovich N. Andrei.</source>
<translation type="unfinished">QuasarApp ürünü
* Geliştiriciler:
* Programcı: Yankovich N. Andrei.
* Bu oyun LGPLv3 lisansı altında dağıtılmaktadır.
* İletişim: https://github.com/EndrII
* Telif Hakkı (C) 2018 Yankovich N. Andrei. {3 ?} {2018-2019 ?}</translation>
</message>
<message>
<source>Product of QuasarApp
* Developers:
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018 Yankovich N. Andrei.</source>
<translation>QuasarApp ürünü
<translation type="vanished">QuasarApp ürünü
* Geliştiriciler:
* Programcı: Yankovich N. Andrei.
* Bu oyun LGPLv3 lisansı altında dağıtılmaktadır.

Binary file not shown.

View File

@ -53,9 +53,13 @@
<context>
<name>Help</name>
<message>
<location filename="../Help.qml" line="49"/>
<source>Your task is to transfer discs of different sizesfrom the left tower to any other free space.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<translation>Ваше завдання полягає в тому, щоб перенести диски різних розмірів з лівої вежі на будь-яке інше вільне місце. Ви можете перенести тільки верхній привід башти. Ви не можете одночасно передати кілька дисків і розмістити на дисках великі диски.</translation>
<translation type="vanished">Ваше завдання полягає в тому, щоб перенести диски різних розмірів з лівої вежі на будь-яке інше вільне місце. Ви можете перенести тільки верхній привід башти. Ви не можете одночасно передати кілька дисків і розмістити на дисках великі диски.</translation>
</message>
<message>
<location filename="../Help.qml" line="49"/>
<source>Your task is to transfer discs of different sizesfrom the left tower to third tower.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
<translation>Ваше завдання полягає в тому, щоб передати диски різних розмірів з лівої вежі до третьої вежі.</translation>
</message>
<message>
<location filename="../Help.qml" line="62"/>
@ -118,8 +122,22 @@
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018-2019 Yankovich N. Andrei.</source>
<translation type="unfinished">Продукт компанії QuasarApp
* Розробники:
* Програміст: Янкович Н. Андрій.
* Ця гра поширюється під ліцензією LGPLv3.
* Контакт: https://github.com/EndrII
* Авторське право (C) 2018 Янкович Н. Андрій. {3 ?} {2018-2019 ?}</translation>
</message>
<message>
<source>Product of QuasarApp
* Developers:
* Programmer: Yankovich N. Andrei.
* This game is distributed under the LGPLv3 license.
* Contact: https://github.com/EndrII
* Copyright (C) 2018 Yankovich N. Andrei.</source>
<translation>Продукт компанії QuasarApp
<translation type="vanished">Продукт компанії QuasarApp
* Розробники:
* Програміст: Янкович Н. Андрій.
* Ця гра поширюється під ліцензією LGPLv3.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 175 KiB

View File

@ -9,6 +9,8 @@ function Controller()
function runProgramControl() {
if (systemInfo.kernelType === "winnt") {
installer.setValue("RunProgram", "@TargetDir@/HanoiTowers.exe");
} else {
installer.setValue("RunProgram", "@TargetDir@/HanoiTowers.sh");
}
}

1
installer/config/ru.qm Normal file
View File

@ -0,0 +1 @@
<クd<>箆!ソ`。スン

4
installer/config/ru.ts Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
</TS>

View File

@ -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")
}

View File

@ -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
}

View File

@ -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
View 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 = $$PWD/../CQtDeployerBinaries/Linux/cqtdeployer.sh
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)
message(XML_FILES $$XML_FILES)
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

View File

@ -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

View File

@ -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>

View File

@ -1,15 +0,0 @@
#!/bin/sh
OLD_DIR=$PWD
BASE_DIR=$(dirname $0)
TARGET_DIR="$BASE_DIR/../../"
echo "selected target dir $TARGET_DIR"
echo "cd to snapcraft dir $BASE_DIR"
cd $BASE_DIR
snapcraft
echo "return to old dir $OLD_DIR"
cd $OLD_DIR
rm -f $TARGET_DIR/*.snap
mv $BASE_DIR/*.snap $TARGET_DIR

View File

@ -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

View File

@ -1,4 +0,0 @@
!GlobalState
assets:
build-packages: []
build-snaps: []

View File

@ -1,24 +0,0 @@
name: hanoi-tower
version: '1.4'
summary: Hanoi Towers Game
description: |
The Hanoi Tower is one of the most popular puzzles of the 19th century. Three bars are given, on one of which eight rings are strung, the rings differ in size and lie smaller on larger ones. The problem is to transfer the pyramid from eight rings for the least number of moves to another rod. At a time, only one ring is allowed to carry, and you can not put a larger ring on less.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
icon: source/res/icon.png
apps:
hanoi-tower:
command: bin/hanoi-towers
# desktop: usr/share/applications/desc.desktop
plugs: [desktop, home, opengl, x11, wayland]
parts:
hanoi-tower:
plugin: dump
source: .

View File

@ -1,74 +0,0 @@
name: hanoi-tower
version: '1.4.testBuildStatic3'
summary: Hanoi Towers Game
description: |
The Hanoi Tower is one of the most popular puzzles of the 19th century. Three bars are given, on one of which eight rings are strung, the rings differ in size and lie smaller on larger ones. The problem is to transfer the pyramid from eight rings for the least number of moves to another rod. At a time, only one ring is allowed to carry, and you can not put a larger ring on less.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
icon: source/res/icon.png
apps:
hanoi-tower:
command: bin/hanoi-towers
# desktop: usr/share/applications/desc.desktop
plugs: [desktop, unity7, home, opengl, x11, wayland]
parts:
hanoi-tower:
plugin: qmake
source: source/
organize:
opt/hanoi-tower/bin: bin
after:
- qt
qt:
plugin: qtbuilder
qt-version: 5.9.5
qt-source-git: https://code.qt.io/qt/qt5.git
qt-submodules: ['qtbase']
build-packages:
- libasound2-dev
- libdbusmenu-glib-dev
- libffi-dev
- liblzma-dev
- libpulse-dev
- libssl-dev
- libx11-xcb-dev
- libxcb-icccm4-dev
- libxcb-image0-dev
- libxcb-keysyms1-dev
- libxcb-randr0-dev
- libxcb-render-util0-dev
- libxcb-sync-dev
- libxcb-util0-dev
- libxcb-xfixes0-dev
- libxcb1-dev
- libxrender-dev
configflags:
- -release
- -force-debug-info
- -opensource
- -confirm-license
- -qt-zlib
- -qt-libpng
- -qt-libjpeg
- -qt-freetype
- -qt-harfbuzz
- -qt-pcre
- -qt-xcb
- -qt-xkbcommon-x11
- -no-opengl
- -dbus-runtime
- -openssl-linked
- -nomake
- examples
- -nomake
- tests

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,12 @@
// Constructor
function Component()
{
generateTr();
}
function generateTr() {
component.setValue("DisplayName", qsTr("Installer"));
component.setValue("Description", qsTr("Install components"));
}

View 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>

Binary file not shown.

View 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>

17
runSnap.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
BASE_DIR=$(dirname $0)
TARGET_DIR="$BASE_DIR/installer/packages/HanoiTowers/data"
echo "selected target dir $TARGET_DIR"
echo "cd to snapcraft dir $BASE_DIR"
cd $BASE_DIR
rm -rdf $TARGET_DIR/*
make -j$(nproc)
make deploy_depends
snapcraft clean
snapcraft

View File

@ -1,5 +1,5 @@
[Desktop Entry]
Version=1.5
Version=1.5.2
Name=Hanoi Towers
Comment=Hanoi Towers Game.
Exec=hanoi-tower
@ -10,6 +10,6 @@ Categories=Games;Application;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=hanoi-tower
X-GNOME-Bugzilla-Component=General
X-GNOME-Bugzilla-Version=1.5
X-GNOME-Bugzilla-Version=1.5.2
StartupNotify=true
Name[ru_RU]=Hanoi-Tower.desktop
Name[ru_RU]=Hanoi-Tower

View File

@ -1,5 +1,5 @@
name: hanoi-tower
version: '1.5.1snap1'
version: '1.5.2'
summary: The Hanoi Tower is one of the most popular puzzles of the 19th century
description: |
The Hanoi Tower is one of the most popular puzzles of the 19th century. |
@ -10,11 +10,11 @@ description: |
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
base: core18
icon: data/icons/icon.png
icon: installer/packages/installer/data/icons/icon.png
apps:
hanoi-tower:
command: desktop-launch $SNAP/AppRun.sh
command: desktop-launch $SNAP/HanoiTowers.sh
plugs: [desktop, unity7, home, opengl, x11, wayland, gsettings]
@ -26,12 +26,16 @@ parts:
- libasn1-8-heimdal
- libgssapi3-heimdal
- libldap-2.4-2
after: [libsgl, desktop-glib-only, qtlib]
after: [libsgl, cqtdeployer-wrapper, qtlib]
cqtdeployer-wrapper:
plugin: dump
source: QuasarAppLib/Etalons/snap/wrapper
qtlib:
plugin: dump
source: data/
source: installer/packages/HanoiTowers/data
libsgl:
plugin: nil