win build fix

This commit is contained in:
Andrei Yankovich 2018-10-25 19:54:40 +03:00
parent b57c954b34
commit 5065cdd6fc
14 changed files with 74 additions and 93 deletions

@ -1 +1 @@
Subproject commit 56a93aaf65cbf04ac06f400473563b95262ceec5 Subproject commit 7c3b80c6600fe883df0331682dcdb9931542ad82

@ -1 +1 @@
Subproject commit 745a66bd5bc9c0f9bd2f0add1e35a3b00f7d70a0 Subproject commit 8b0865e9142457ec96e0bf434f85636dd7e1a906

View File

@ -2,9 +2,8 @@
TEMPLATE = subdirs TEMPLATE = subdirs
CONFIG += ordered CONFIG += ordered
message( DEPLOY_FILES_MASTER = $$DEPLOY_FILES)
ENABLE_SNAP = 0 #only linux ENABLE_SNAP = 1 #only linux
ENABLE_INSTALLER = 1 #only desctop ENABLE_INSTALLER = 1 #only desctop
SUBDIRS += QuasarAppLib/QuasarApp.pro \ SUBDIRS += QuasarAppLib/QuasarApp.pro \
@ -33,7 +32,7 @@ equals( ENABLE_INSTALLER, 1) {
} }
equals( ENABLE_SNAP, 1) { equals( ENABLE_SNAP, 1) {
!android:{ unix:!android:{
message(desktopVersion: enabled) message(desktopVersion: enabled)
CONFIG(release, debug|release): { CONFIG(release, debug|release): {

View File

@ -18,6 +18,13 @@ DEFINES += QT_DEPRECATED_WARNINGS
TARGET = SoundBand TARGET = SoundBand
CONFIG(release, debug|release): {
DESTDIR = $$PWD/build/release
} else {
DESTDIR = $$PWD/build/debug
}
SOURCES += main.cpp \ SOURCES += main.cpp \
syncengine.cpp \ syncengine.cpp \
imageprovider.cpp \ imageprovider.cpp \
@ -59,7 +66,6 @@ HEADERS += \
playlistsmodel.h \ playlistsmodel.h \
currentplaylistmodel.h currentplaylistmodel.h
include($$PWD/../deploy.pri)
include($$PWD/../Sync/Sync.pri) include($$PWD/../Sync/Sync.pri)
include('$$PWD/../QuasarAppLib/QuasarLib.pri'); include('$$PWD/../QuasarAppLib/QuasarLib.pri');

View File

@ -9,15 +9,12 @@
SYNC_LIB = 1 SYNC_LIB = 1
#DEPENDS #DEPENDS
OLD_DEST_DIR=$$DESTDIR
OLD_SOUND=$$SOUND_BAND_MODULE;
SOUND_BAND_MODULE = sync CONFIG(release, debug|release): {
include($$PWD/../deploy.pri) LIBS += -L"$$PWD/build/release" -lSync
LIBS += -L"$$DESTDIR/" -lSync } else {
LIBS += -L"$$PWD/build/debug" -lSync
SOUND_BAND_MODULE = $$OLD_SOUND }
DESTDIR = $$OLD_DEST_DIR
INCLUDEPATH += "$$PWD/" INCLUDEPATH += "$$PWD/"

View File

@ -8,11 +8,16 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Sync TARGET = Sync
TEMPLATE = lib TEMPLATE = lib
include($$PWD/../deploy.pri);
include('$$PWD/../QuasarAppLib/QuasarLib.pri'); include('$$PWD/../QuasarAppLib/QuasarLib.pri');
DEFINES += SYNC_LIBRARY DEFINES += SYNC_LIBRARY
CONFIG(release, debug|release): {
DESTDIR = $$PWD/build/release
} else {
DESTDIR = $$PWD/build/debug
}
DISTFILES += \ DISTFILES += \
sql/InitLacaleDataBase.sql sql/InitLacaleDataBase.sql

View File

@ -2,9 +2,16 @@ function Controller()
{ {
installer.uninstallationFinished.connect(this, Controller.prototype.uninstallationFinished); installer.uninstallationFinished.connect(this, Controller.prototype.uninstallationFinished);
installer.installationFinished.connect(this, Controller.prototype.installationFinished); installer.installationFinished.connect(this, Controller.prototype.installationFinished);
runProgramControl();
} }
function runProgramControl() {
if (systemInfo.kernelType === "winnt") {
installer.setValue("RunProgram", "@TargetDir@/SoundBand.exe");
}
}
Controller.prototype.uninstallationFinished = function() Controller.prototype.uninstallationFinished = function()
{ {

View File

@ -0,0 +1,26 @@
echo off
set deploy=%1
set qmldir=%2
SET CURRENTDIR=%3
echo on
RMDIR /S /Q "%CURRENTDIR%\packages\SoundBand\data"
RMDIR /S /Q "%CURRENTDIR%\packages\SoundBand.tests\data"
MKDIR "%CURRENTDIR%\packages\SoundBand\data"
MKDIR "%CURRENTDIR%\packages\SoundBand.tests\data"
xcopy \d \y \r \f "%CURRENTDIR%packages\SoundBand\extra" "%CURRENTDIR%\packages\SoundBand\data"
copy /Y "%CURRENTDIR%\..\SoundBand\build\release\SoundBand.exe" "%CURRENTDIR%\packages\SoundBand\data\SoundBand.exe"
copy /Y "%CURRENTDIR%\..\QuasarAppLib\build\release\QuasarApp.dll" "%CURRENTDIR%\packages\SoundBand\data\QuasarApp.dll"
copy /Y "%CURRENTDIR%\..\Sync\build\release\Sync.dll" "%CURRENTDIR%\packages\SoundBand\data\Sync.dll"
copy /Y "%CURRENTDIR%\..\tests\build\release\test.exe" "%CURRENTDIR%\packages\SoundBand.Tests\data\test.exe"
%deploy% --qmldir %qmldir% "%CURRENTDIR%\packages\SoundBand\data\SoundBand.exe"
%deploy% --qmldir %qmldir% "%CURRENTDIR%\packages\SoundBand\data\QuasarApp.dll"
%deploy% --qmldir %qmldir% "%CURRENTDIR%\packages\SoundBand\data\Sync.dll"

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

@ -3,6 +3,8 @@
# windows # windows
win32 { win32 {
TARGET_LIST += SoundBand.exe TARGET_LIST += SoundBand.exe
TARGET_LIST += Sync.dll
TARGET_LIST += QUasarApp.dll
} }
# linux # linux

View File

@ -1,6 +1,4 @@
include($$PWD/deploy/targetList.pri) include($$PWD/deploy/targetList.pri)
include($$PWD/deploy/deployFiles.pri)
TEMPLATE = aux TEMPLATE = aux
@ -20,51 +18,33 @@ QT_DIR = $$dirname(QMAKE_QMAKE)
QML_DIR = $$PWD/../SoundBand QML_DIR = $$PWD/../SoundBand
WINDEPLY = $$QT_DIR/windeployqt.exe WINDEPLOY = $$QT_DIR/windeployqt.exe
MACDEPLY = $$QT_DIR/macdeployqt WINDEPLOY_RUN = $$PWD/deploy/deploy.bat
LINUXDEPLOY = $$PWD/../CQtDeployer/build/cqtdeployer
message( QML_DIR = $$QML_DIR) LINUXDEPLOY = $$PWD/../CQtDeployer/build/cqtdeployer
message( WINDEPLY = $$WINDEPLY)
message( MACDEPLY = $$MACDEPLY)
message( LINUXDEPLOY = $$LINUXDEPLOY)
win32 { win32 {
OUT_FILE = SoundBandInstaller.exe OUT_FILE = SoundBandInstaller.exe
LUPDATE = $$QT_DIR/lupdate.exe LUPDATE = $$QT_DIR/lupdate.exe
LRELEASE = $$QT_DIR/lrelease.exe LRELEASE = $$QT_DIR/lrelease.exe
} }
message( QT_DIR = $$QT_DIR) #prepare start
message( LUPDATE = $$LUPDATE)
message( LRELEASE = $$LRELEASE)
message( DEPLOY_FILES = $$DEPLOY_FILES)
# todo get inpot files
win32 { win32 {
for(command, TARGET_LIST) { installerApp.commands += $$WINDEPLOY_RUN $$WINDEPLOY $$QML_DIR $$shell_path($$PWD) &&
installerApp.commands += $$WINDEPLY --qmldir $$QML_DIR $$TARGET_PATH/$$command &&
}
} }
#prepare end
unix { unix {
for(command, TARGET_LIST) { for(command, TARGET_LIST) {
installerApp.commands += $$LINUXDEPLOY -bin $$TARGET_PATH/$$command clear -qmlDir $$QML_DIR -qmake $$QMAKE_QMAKE && installerApp.commands += $$LINUXDEPLOY -bin $$DESTDIR/$$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.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 installerApp.CONFIG += target_predeps no_link combine
message( installComands = "$$installerApp.commands") message( installComands = "$$installerApp.commands")
commands += "$$LUPDATE $$PWD/packages/SoundBand/meta/installscript.js -ts $$PWD/packages/SoundBand/meta/ru.ts" commands += "$$LUPDATE $$PWD/packages/SoundBand/meta/installscript.js -ts $$PWD/packages/SoundBand/meta/ru.ts"
@ -89,10 +69,6 @@ DISTFILES += \
packages/SoundBand/meta/ru.ts \ packages/SoundBand/meta/ru.ts \
packages/SoundBand.Tests/meta/installscript.js \ packages/SoundBand.Tests/meta/installscript.js \
packages/SoundBand.Tests/meta/package.xml \ packages/SoundBand.Tests/meta/package.xml \
packages/SoundBand.Tests/meta/ru.ts packages/SoundBand.Tests/meta/ru.ts \
deploy/deploy.bat
#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

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,5 +1,5 @@
include($$PWD/../../deploy/targetList.pri) include($$PWD/../../deploy/targetList.pri)
include($$PWD/../../deploy/deployFiles.pri) include($$PWD/../../../deploy.pri)
TEMPLATE = aux TEMPLATE = aux

View File

@ -7,7 +7,12 @@ CONFIG -= app_bundle
TEMPLATE = app TEMPLATE = app
TARGET = test TARGET = test
SOUND_BAND_MODULE=test CONFIG(release, debug|release): {
DESTDIR = $$PWD/build/release
} else {
DESTDIR = $$PWD/build/debug
}
SOURCES += \ SOURCES += \
tst_synctest.cpp tst_synctest.cpp
@ -16,6 +21,5 @@ SOURCES += \
RESOURCES += \ RESOURCES += \
res.qrc res.qrc
include($$PWD/../deploy.pri)
include($$PWD/../Sync/Sync.pri) include($$PWD/../Sync/Sync.pri)
include('$$PWD/../QuasarAppLib/QuasarLib.pri'); include('$$PWD/../QuasarAppLib/QuasarLib.pri');