mirror of
https://github.com/QuasarApp/SoundBand.git
synced 2025-04-25 23:04:31 +00:00
win build fix
This commit is contained in:
parent
b57c954b34
commit
5065cdd6fc
@ -1 +1 @@
|
||||
Subproject commit 56a93aaf65cbf04ac06f400473563b95262ceec5
|
||||
Subproject commit 7c3b80c6600fe883df0331682dcdb9931542ad82
|
@ -1 +1 @@
|
||||
Subproject commit 745a66bd5bc9c0f9bd2f0add1e35a3b00f7d70a0
|
||||
Subproject commit 8b0865e9142457ec96e0bf434f85636dd7e1a906
|
@ -2,9 +2,8 @@
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
message( DEPLOY_FILES_MASTER = $$DEPLOY_FILES)
|
||||
|
||||
ENABLE_SNAP = 0 #only linux
|
||||
ENABLE_SNAP = 1 #only linux
|
||||
ENABLE_INSTALLER = 1 #only desctop
|
||||
|
||||
SUBDIRS += QuasarAppLib/QuasarApp.pro \
|
||||
@ -33,7 +32,7 @@ equals( ENABLE_INSTALLER, 1) {
|
||||
}
|
||||
|
||||
equals( ENABLE_SNAP, 1) {
|
||||
!android:{
|
||||
unix:!android:{
|
||||
message(desktopVersion: enabled)
|
||||
CONFIG(release, debug|release): {
|
||||
|
||||
|
@ -18,6 +18,13 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
TARGET = SoundBand
|
||||
|
||||
CONFIG(release, debug|release): {
|
||||
DESTDIR = $$PWD/build/release
|
||||
|
||||
} else {
|
||||
DESTDIR = $$PWD/build/debug
|
||||
}
|
||||
|
||||
SOURCES += main.cpp \
|
||||
syncengine.cpp \
|
||||
imageprovider.cpp \
|
||||
@ -59,7 +66,6 @@ HEADERS += \
|
||||
playlistsmodel.h \
|
||||
currentplaylistmodel.h
|
||||
|
||||
include($$PWD/../deploy.pri)
|
||||
include($$PWD/../Sync/Sync.pri)
|
||||
include('$$PWD/../QuasarAppLib/QuasarLib.pri');
|
||||
|
||||
|
@ -9,15 +9,12 @@
|
||||
SYNC_LIB = 1
|
||||
|
||||
#DEPENDS
|
||||
OLD_DEST_DIR=$$DESTDIR
|
||||
OLD_SOUND=$$SOUND_BAND_MODULE;
|
||||
|
||||
SOUND_BAND_MODULE = sync
|
||||
include($$PWD/../deploy.pri)
|
||||
CONFIG(release, debug|release): {
|
||||
LIBS += -L"$$PWD/build/release" -lSync
|
||||
|
||||
LIBS += -L"$$DESTDIR/" -lSync
|
||||
|
||||
SOUND_BAND_MODULE = $$OLD_SOUND
|
||||
DESTDIR = $$OLD_DEST_DIR
|
||||
} else {
|
||||
LIBS += -L"$$PWD/build/debug" -lSync
|
||||
}
|
||||
|
||||
INCLUDEPATH += "$$PWD/"
|
||||
|
@ -8,11 +8,16 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
TARGET = Sync
|
||||
TEMPLATE = lib
|
||||
|
||||
include($$PWD/../deploy.pri);
|
||||
include('$$PWD/../QuasarAppLib/QuasarLib.pri');
|
||||
|
||||
DEFINES += SYNC_LIBRARY
|
||||
|
||||
CONFIG(release, debug|release): {
|
||||
DESTDIR = $$PWD/build/release
|
||||
|
||||
} else {
|
||||
DESTDIR = $$PWD/build/debug
|
||||
}
|
||||
|
||||
DISTFILES += \
|
||||
sql/InitLacaleDataBase.sql
|
||||
|
@ -2,9 +2,16 @@ function Controller()
|
||||
{
|
||||
installer.uninstallationFinished.connect(this, Controller.prototype.uninstallationFinished);
|
||||
installer.installationFinished.connect(this, Controller.prototype.installationFinished);
|
||||
runProgramControl();
|
||||
}
|
||||
|
||||
|
||||
function runProgramControl() {
|
||||
if (systemInfo.kernelType === "winnt") {
|
||||
installer.setValue("RunProgram", "@TargetDir@/SoundBand.exe");
|
||||
}
|
||||
}
|
||||
|
||||
Controller.prototype.uninstallationFinished = function()
|
||||
{
|
||||
|
||||
|
26
installer/deploy/deploy.bat
Normal file
26
installer/deploy/deploy.bat
Normal 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"
|
||||
|
@ -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")
|
||||
}
|
||||
|
@ -3,6 +3,8 @@
|
||||
# windows
|
||||
win32 {
|
||||
TARGET_LIST += SoundBand.exe
|
||||
TARGET_LIST += Sync.dll
|
||||
TARGET_LIST += QUasarApp.dll
|
||||
}
|
||||
|
||||
# linux
|
||||
|
@ -1,6 +1,4 @@
|
||||
include($$PWD/deploy/targetList.pri)
|
||||
include($$PWD/deploy/deployFiles.pri)
|
||||
|
||||
|
||||
TEMPLATE = aux
|
||||
|
||||
@ -20,51 +18,33 @@ QT_DIR = $$dirname(QMAKE_QMAKE)
|
||||
QML_DIR = $$PWD/../SoundBand
|
||||
|
||||
|
||||
WINDEPLY = $$QT_DIR/windeployqt.exe
|
||||
MACDEPLY = $$QT_DIR/macdeployqt
|
||||
LINUXDEPLOY = $$PWD/../CQtDeployer/build/cqtdeployer
|
||||
WINDEPLOY = $$QT_DIR/windeployqt.exe
|
||||
WINDEPLOY_RUN = $$PWD/deploy/deploy.bat
|
||||
|
||||
message( QML_DIR = $$QML_DIR)
|
||||
message( WINDEPLY = $$WINDEPLY)
|
||||
message( MACDEPLY = $$MACDEPLY)
|
||||
message( LINUXDEPLOY = $$LINUXDEPLOY)
|
||||
LINUXDEPLOY = $$PWD/../CQtDeployer/build/cqtdeployer
|
||||
|
||||
win32 {
|
||||
OUT_FILE = SoundBandInstaller.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
|
||||
#prepare start
|
||||
win32 {
|
||||
for(command, TARGET_LIST) {
|
||||
installerApp.commands += $$WINDEPLY --qmldir $$QML_DIR $$TARGET_PATH/$$command &&
|
||||
}
|
||||
installerApp.commands += $$WINDEPLOY_RUN $$WINDEPLOY $$QML_DIR $$shell_path($$PWD) &&
|
||||
}
|
||||
#prepare end
|
||||
|
||||
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 += $$LINUXDEPLOY -bin $$DESTDIR/$$command clear -qmlDir $$QML_DIR -qmake $$QMAKE_QMAKE &&
|
||||
}
|
||||
}
|
||||
|
||||
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/SoundBand/meta/installscript.js -ts $$PWD/packages/SoundBand/meta/ru.ts"
|
||||
@ -89,10 +69,6 @@ DISTFILES += \
|
||||
packages/SoundBand/meta/ru.ts \
|
||||
packages/SoundBand.Tests/meta/installscript.js \
|
||||
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
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@ -1,5 +1,5 @@
|
||||
include($$PWD/../../deploy/targetList.pri)
|
||||
include($$PWD/../../deploy/deployFiles.pri)
|
||||
include($$PWD/../../../deploy.pri)
|
||||
|
||||
|
||||
TEMPLATE = aux
|
||||
|
@ -7,7 +7,12 @@ CONFIG -= app_bundle
|
||||
TEMPLATE = app
|
||||
TARGET = test
|
||||
|
||||
SOUND_BAND_MODULE=test
|
||||
CONFIG(release, debug|release): {
|
||||
DESTDIR = $$PWD/build/release
|
||||
|
||||
} else {
|
||||
DESTDIR = $$PWD/build/debug
|
||||
}
|
||||
|
||||
SOURCES += \
|
||||
tst_synctest.cpp
|
||||
@ -16,6 +21,5 @@ SOURCES += \
|
||||
RESOURCES += \
|
||||
res.qrc
|
||||
|
||||
include($$PWD/../deploy.pri)
|
||||
include($$PWD/../Sync/Sync.pri)
|
||||
include('$$PWD/../QuasarAppLib/QuasarLib.pri');
|
||||
|
Loading…
x
Reference in New Issue
Block a user