Merge pull request #82 from QuasarApp/alpha1

ref #81 fix build debub windows version
This commit is contained in:
Andrei Yankovich 2018-10-25 19:57:03 +03:00 committed by GitHub
commit a426444e5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 90 additions and 104 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
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): {

View File

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

View File

@ -4,7 +4,6 @@
#include <QObject>
#include <QPixmap>
/**
* @brief The SyncEngine class - this class is interface between syncLine and qml application.
*/

View File

@ -5,7 +5,7 @@
#include <QList>
#include <QDataStream>
#include "syncpackage.h"
#include "sync_global.h"
/**
* @brief The ETcpSocket class
@ -29,7 +29,7 @@
*/
class ETcpSocket:public QObject
class SYNCSHARED_EXPORT ETcpSocket:public QObject
{
Q_OBJECT
private:

View File

@ -6,7 +6,7 @@
#include <QDateTime>
#include "sync_global.h"
enum SYNCSHARED_EXPORT LogType{ERROR, WARNING, INFORMATION, NONE};
enum LogType{ERROR, WARNING, INFORMATION, NONE};
class SYNCSHARED_EXPORT Log
{

View File

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

View File

@ -8,9 +8,17 @@ 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

View File

@ -2,11 +2,12 @@
#define MYSQL_H
#include <QString>
#include "playlist.h"
#include "sync_global.h"
class QSqlDatabase;
class QSqlQuery;
class MySql
class SYNCSHARED_EXPORT MySql
{
private:
QSqlDatabase *db;

View File

@ -5,11 +5,12 @@
#include <QTimer>
#include "basepackage.h"
#include "syncpackage.h"
#include "sync_global.h"
/**
* @brief The Node class is tcp server class
*/
class Node:public QTcpServer{
class SYNCSHARED_EXPORT Node:public QTcpServer{
Q_OBJECT
private:
QTimer *timer;

View File

@ -2,12 +2,13 @@
#define PLAYLIST_H
#include <QMediaPlaylist>
#include "song.h"
#include "sync_global.h"
/**
* @brief The PlayList class
* palyList with songs info
*/
class PlayList
class SYNCSHARED_EXPORT PlayList
{
private:
/**

View File

@ -5,7 +5,7 @@
#include <QDataStream>
#include "chronotime.h"
#include <QMediaContent>
#include "sync_global.h"
/**
* @brief The Syncer struct
*
@ -27,7 +27,7 @@ struct Syncer
* @brief The SongHeader class sound header with media information
* (id,size and name)
*/
class SongHeader{
class SYNCSHARED_EXPORT SongHeader{
protected:
bool getName(QString &name, const QUrl& url)const;
bool getSize(int &size, const QUrl& url)const;
@ -61,7 +61,7 @@ public:
* @brief The Song class
* into this calss added mediadata of playable media file.
*/
class Song : public SongHeader {
class SYNCSHARED_EXPORT Song : public SongHeader {
private:
QByteArray source;
public:
@ -82,7 +82,7 @@ public:
* @brief The SongStorage class
* header with url to song source
*/
class SongStorage : public SongHeader {
class SYNCSHARED_EXPORT SongStorage : public SongHeader {
private:
QUrl url;
public:

View File

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

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
win32 {
TARGET_LIST += SoundBand.exe
TARGET_LIST += Sync.dll
TARGET_LIST += QUasarApp.dll
}
# linux

View File

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

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/deployFiles.pri)
include($$PWD/../../../deploy.pri)
TEMPLATE = aux

View File

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