4
1
mirror of https://github.com/QuasarApp/Snake.git synced 2025-05-12 01:19:46 +00:00

added build rules for server

This commit is contained in:
Andrei Yankovich 2019-01-08 22:52:45 +03:00
parent f1f81d2865
commit 5b8a3efee1
4 changed files with 34 additions and 23 deletions
.gitignore
SnakeServer
installer

1
.gitignore vendored

@ -13,6 +13,7 @@
# Qt-es
/Build*
/build*
*.stash
/Release*
/parts/*

@ -24,11 +24,3 @@ CONFIG(release, debug|release): {
} else {
DESTDIR = $$PWD/build/debug
}
include($$PWD/../../QuasarAppLib/Etalons/qmake/install_prefix.pri)
include($$PWD/../../QuasarAppLib/QuasarLib.pri)
include($$PWD/../ServerProtocol/ServerProtocol.pri)
install_data.files += $$QUASARAPP_LIB_OUTPUT_DIR/$$libfiletype
install_data.files += $$SERVERPROTOCOL_LIB_OUTPUT_DIR/$$libfiletype
install_data.files += $$DESTDIR/$$runfiletype

@ -28,13 +28,5 @@ CONFIG(release, debug|release): {
DESTDIR = $$PWD/build/debug
}
include($$PWD/../../QuasarAppLib/Etalons/qmake/install_prefix.pri)
include($$PWD/../../QuasarAppLib/QuasarLib.pri)
include($$PWD/../ServerProtocol/ServerProtocol.pri)
install_data.files += $$QUASARAPP_LIB_OUTPUT_DIR/$$libfiletype
install_data.files += $$SERVERPROTOCOL_LIB_OUTPUT_DIR/$$libfiletype
install_data.files += $$DESTDIR/$$runfiletype
HEADERS += \
sarverdaemon.h

@ -1,12 +1,14 @@
QT_DIR = $$dirname(QMAKE_QMAKE)
QML_DIR = $$PWD/../Snake
DEPLOY_TARGET = $$PWD/../Snake/build/release
DEPLOY_TARGET_ALL = $$PWD/../Snake/build/release,$$PWD/../SnakeServer/Daemon/build/release,$$PWD/../SnakeServer/Client/build/release,$$PWD/../SnakeServer/ServerProtocol/build/release,$$PWD/../QuasarAppLib/build/release
DEPLOY_TARGET_SNAKE = $$PWD/../Snake/build/release,$$PWD/../QuasarAppLib/build/release
DEPLOY_TARGET_SERVER = $$PWD/../SnakeServer/Daemon/build/release,SnakeServer/Client/build/release,$$PWD/../SnakeServer/ServerProtocol/build/release,$$PWD/../QuasarAppLib/build/release
LUPDATE = $$QT_DIR/lupdate
LRELEASE = $$QT_DIR/lrelease
win32:DEPLOYER = $$PWD/../CQtDeployerBinaries/Windows/cqtdeployer.exe
unix:DEPLOYER = $$PWD/../CQtDeployerBinaries/Linux/cqtdeployer.sh
unix:DEPLOYER = cqtdeployer
OUT_FILE = installer
@ -80,13 +82,32 @@ for(command, commands) {
system($$command)|error("Failed to run: $$command")
}
deploy_depends.commands += $$DEPLOYER -bin $$DEPLOY_TARGET -qmlDir $$QML_DIR clear -qmake $$QMAKE_QMAKE -targetDir $$PWD/packages/Snake/data
BASE_DEPLOY_FLAGS= clear -qmake $$QMAKE_QMAKE -targetDir $$PWD/packages/Snake/data
deploy_depends_all.commands += $$DEPLOYER -bin $$DEPLOY_TARGET_ALL $$BASE_DEPLOY_FLAGS -qmlDir $$QML_DIR
deploy_depends_server.commands += $$DEPLOYER -bin $$DEPLOY_TARGET_SERVER $$BASE_DEPLOY_FLAGS
deploy_depends_snake.commands += $$DEPLOYER -bin $$DEPLOY_TARGET_SNAKE $$BASE_DEPLOY_FLAGS -qmlDir $$QML_DIR
create_installer.commands = $$EXEC \
-c $$PWD/config/config.xml \
-p $$PWD/packages \
$$PWD/$$OUT_FILE
create_installer_all.commands = $$EXEC \
-c $$PWD/config/config.xml \
-p $$PWD/packages \
$$PWD/$$OUT_FILE
create_installer_snake.commands = $$EXEC \
-c $$PWD/config/config.xml \
-p $$PWD/packages \
$$PWD/$$OUT_FILE
create_installer_server.commands = $$EXEC \
-c $$PWD/config/config.xml \
-p $$PWD/packages \
$$PWD/$$OUT_FILE
OTHER_FILES += \
$$PWD/config/config.xml \
$$PWD/config/controlScript.js \
@ -103,9 +124,14 @@ OTHER_FILES += \
$$PWD/packages/Snake/meta/installscript.js \
$$PWD/packages/Snake/meta/ru.ts
deploy_depends.depends = install
create_installer.depends = deploy_depends
create_installer_all.depends = deploy_depends_all
create_installer_snake.depends = deploy_depends_snake
create_installer_server.depends = deploy_depends_server
QMAKE_EXTRA_TARGETS += \
deploy_depends \
create_installer
deploy_depends_all \
deploy_depends_snake \
deploy_depends_server \
create_installer_all \
create_installer_snake \
create_installer_server