From: Ruediger Gad Date: Thu, 12 Apr 2012 06:20:44 +0000 (+0200) Subject: Initial commit. X-Git-Url: https://vcs.maemo.org/git/?p=qzeecontrol;a=commitdiff_plain;h=de39b00f71ae8e5a219e107bbb5766466c9d1642 Initial commit. --- de39b00f71ae8e5a219e107bbb5766466c9d1642 diff --git a/QZeeControl.desktop b/QZeeControl.desktop new file mode 100644 index 0000000..4d860be --- /dev/null +++ b/QZeeControl.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=QZeeControl +Exec=/opt/QZeeControl/bin/QZeeControl +Icon=QZeeControl64 +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/QZeeControl.pro b/QZeeControl.pro new file mode 100644 index 0000000..7e2fdb3 --- /dev/null +++ b/QZeeControl.pro @@ -0,0 +1,50 @@ +# Add more folders to ship with the application, here +folder_01.source = qml/QZeeControl +folder_01.target = qml +DEPLOYMENTFOLDERS = folder_01 + +# Additional import path used to resolve QML modules in Creator's code model +QML_IMPORT_PATH = + +symbian:TARGET.UID3 = 0xECA46AAE + +# Smart Installer package's UID +# This UID is from the protected range and therefore the package will +# fail to install if self-signed. By default qmake uses the unprotected +# range value if unprotected UID is defined for the application and +# 0x2002CCCF value if protected UID is given to the application +#symbian:DEPLOYMENT.installer_header = 0x2002CCCF + +# Allow network access on Symbian +symbian:TARGET.CAPABILITY += NetworkServices + +# If your application uses the Qt Mobility libraries, uncomment the following +# lines and add the respective components to the MOBILITY variable. +CONFIG += mobility +MOBILITY += connectivity + +# Speed up launching on MeeGo/Harmattan when using applauncherd daemon +# CONFIG += qdeclarative-boostable + +# Add dependency to Symbian components +# CONFIG += qt-components + +# The .cpp file which was generated for your project. Feel free to hack it. +SOURCES += main.cpp \ + btconnector.cpp + +# Please do not modify the following two lines. Required for deployment. +include(qmlapplicationviewer/qmlapplicationviewer.pri) +qtcAddDeployment() + +OTHER_FILES += \ + qtc_packaging/debian_harmattan/rules \ + qtc_packaging/debian_harmattan/README \ + qtc_packaging/debian_harmattan/manifest.aegis \ + qtc_packaging/debian_harmattan/copyright \ + qtc_packaging/debian_harmattan/control \ + qtc_packaging/debian_harmattan/compat \ + qtc_packaging/debian_harmattan/changelog + +HEADERS += \ + btconnector.h diff --git a/QZeeControl.pro.user b/QZeeControl.pro.user new file mode 100644 index 0000000..7b3de88 --- /dev/null +++ b/QZeeControl.pro.user @@ -0,0 +1,490 @@ + + + + + + ProjectExplorer.Project.ActiveTarget + 1 + + + ProjectExplorer.Project.EditorSettings + + true + false + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + System + false + 4 + true + 1 + true + 0 + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Harmattan + Harmattan + Qt4ProjectManager.Target.HarmattanDeviceTarget + 0 + 0 + 0 + + Qt4ProjectManager.ToolChain.Maemo:/home/rc/QtSDK/Madde/targets/harmattan_10.2011.34-1/bin/gcc.arm-linux-generic-elf-32bit./home/rc/QtSDK/debugger/Maemo/gdb + + + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + Make + + Qt4ProjectManager.MakeStep + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + Make + + Qt4ProjectManager.MakeStep + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Harmattan Target (Qt SDK) Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + /home/rc/repositories/private/qt/QZeeControl-build-harmattan-Harmattan_Target__Qt_SDK__Release + 1 + true + + + Qt4ProjectManager.ToolChain.Maemo:/home/rc/QtSDK/Madde/targets/harmattan_10.2011.34-1/bin/gcc.arm-linux-generic-elf-32bit./home/rc/QtSDK/debugger/Maemo/gdb + + + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + Make + + Qt4ProjectManager.MakeStep + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + Make + + Qt4ProjectManager.MakeStep + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Harmattan Target (Qt SDK) Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + /home/rc/repositories/private/qt/QZeeControl-build-harmattan-Harmattan_Target__Qt_SDK__Debug + 1 + true + + 2 + + + + Create Debian Package + + MaemoDebianPackageCreationStep + + + + Install Debian package to sysroot + MaemoInstallDebianPackageToSysrootStep + + + Deploy Debian package via SFTP upload + + MaemoUploadAndInstallDpkgPackageStep + + + + + + 3 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Build Debian Package and Install to Harmattan Device + + DeployToHarmattan + 0 + + 1 + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + QZeeControl (on Remote Device) + + Qt4ProjectManager.MaemoRunConfiguration + + 1 + + QZeeControl.pro + + + + false + 3768 + true + false + false + + 1 + + + + ProjectExplorer.Project.Target.1 + + Qt Simulator + Qt Simulator + Qt4ProjectManager.Target.QtSimulatorTarget + 0 + 0 + 0 + + ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit.gdb + + + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + Make + + Qt4ProjectManager.MakeStep + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + Make + + Qt4ProjectManager.MakeStep + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Simulator Qt for GCC (Qt SDK) Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + /home/rc/repositories/private/qt/QZeeControl-build-simulator-Simulator_Qt_for_GCC__Qt_SDK__Release + 2 + true + + + ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit.gdb + + + qmake + + QtProjectManager.QMakeBuildStep + false + true + + false + + + Make + + Qt4ProjectManager.MakeStep + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + Make + + Qt4ProjectManager.MakeStep + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Simulator Qt for GCC (Qt SDK) Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + /home/rc/repositories/private/qt/QZeeControl-build-simulator-Simulator_Qt_for_GCC__Qt_SDK__Debug + 2 + true + + 2 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + No deployment + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + + + false + false + false + false + false + false + false + false + true + true + 0.01 + 0.01 + 10 + 10 + true + true + 25 + 25 + + + true + true + valgrind + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + QZeeControl + + Qt4ProjectManager.Qt4RunConfiguration + 2 + + QZeeControl.pro + false + false + + + 3768 + true + true + false + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.EnvironmentId + {37f68296-874f-43e0-8501-dd67ea6705e0} + + + ProjectExplorer.Project.Updater.FileVersion + 10 + + diff --git a/QZeeControl.svg b/QZeeControl.svg new file mode 100644 index 0000000..566acfa --- /dev/null +++ b/QZeeControl.svg @@ -0,0 +1,93 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/QZeeControl64.png b/QZeeControl64.png new file mode 100644 index 0000000..707d5c4 Binary files /dev/null and b/QZeeControl64.png differ diff --git a/QZeeControl80.png b/QZeeControl80.png new file mode 100644 index 0000000..6ad8096 Binary files /dev/null and b/QZeeControl80.png differ diff --git a/QZeeControl_harmattan.desktop b/QZeeControl_harmattan.desktop new file mode 100644 index 0000000..5871b0a --- /dev/null +++ b/QZeeControl_harmattan.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=QZeeControl +Exec=/usr/bin/single-instance /opt/QZeeControl/bin/QZeeControl +Icon=/usr/share/icons/hicolor/80x80/apps/QZeeControl80.png +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/btconnector.cpp b/btconnector.cpp new file mode 100644 index 0000000..a078771 --- /dev/null +++ b/btconnector.cpp @@ -0,0 +1,2 @@ +#include "btconnector.h" + diff --git a/btconnector.h b/btconnector.h new file mode 100644 index 0000000..aaeac76 --- /dev/null +++ b/btconnector.h @@ -0,0 +1,67 @@ +#ifndef BTCONNECTOR_H +#define BTCONNECTOR_H + +#include +#include +#include + +QTM_USE_NAMESPACE +class BtConnector : public QObject +{ + Q_OBJECT +public: + explicit BtConnector(QObject *parent = 0){qDebug("BtConnector Constructor");} + ~BtConnector(){if(socket != NULL) delete socket;} + + Q_INVOKABLE void connect(QString address, int port){ + qDebug("Trying to connect to: %s--%d", address.toUtf8().constData(), port); + + if(socket != NULL) + delete socket; + socket = new QBluetoothSocket(QBluetoothSocket::RfcommSocket); + QObject::connect(socket, SIGNAL(connected()), this, SIGNAL(connected())); + QObject::connect(socket, SIGNAL(disconnected()), this, SIGNAL(disconnected())); + QObject::connect(socket, SIGNAL(error(QBluetoothSocket::SocketError)), this, SIGNAL(error(QBluetoothSocket::SocketError))); + + qDebug("Connecting..."); + socket->connectToService(QBluetoothAddress(address), port); + qDebug("Connected."); + + QObject::connect(socket, SIGNAL(readyRead()), this, SLOT(readData())); + } + +public slots: + void disconnect(){ + if(socket == NULL) + return; + + if(socket->isOpen()) + socket->close(); + + delete socket; + } + +signals: + void connected(); + void disconnected(); + void error(QBluetoothSocket::SocketError errorCode); + + void stickMoved(int x, int y); + +private slots: + void readData(){ + qDebug("readData..."); + QByteArray data = socket->readAll(); + qDebug("read %d bytes.", data.size()); + + for(int i=0; i < data.size(); i++){ + qDebug("%d: %d", i, ((signed char)data.at(i))); + } + } + +private: + QBluetoothSocket *socket; + +}; + +#endif // BTCONNECTOR_H diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..2312985 --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +mv qtc_packaging/debian_harmattan debian +rm -rf qtc_packaging +fakeroot dpkg-buildpackage -sa + diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..ada1050 --- /dev/null +++ b/main.cpp @@ -0,0 +1,14 @@ +#include +#include "qmlapplicationviewer.h" + +Q_DECL_EXPORT int main(int argc, char *argv[]) +{ + QScopedPointer app(createApplication(argc, argv)); + + QmlApplicationViewer viewer; + viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto); + viewer.setMainQmlFile(QLatin1String("qml/QZeeControl/main.qml")); + viewer.showExpanded(); + + return app->exec(); +} diff --git a/qml/QZeeControl/MainPage.qml b/qml/QZeeControl/MainPage.qml new file mode 100644 index 0000000..d624df6 --- /dev/null +++ b/qml/QZeeControl/MainPage.qml @@ -0,0 +1,75 @@ +import QtQuick 1.1 +import com.nokia.meego 1.0 +import QtMobility.connectivity 1.2 +import qzeecontrol 1.0 + +Page { + tools: commonTools + + Label { + id: label + anchors.centerIn: parent + text: "Click to Scan" + } + + Button{ + id: scanButton + + anchors { + horizontalCenter: parent.horizontalCenter + top: label.bottom + topMargin: 10 + } + + text: "Connect" + + onClicked: { + btDiscovery.discovery = true + } + } + + BluetoothDiscoveryModel{ + id: btDiscovery + + discovery: false + minimalDiscovery: true + + onDiscoveryChanged: { + if(discovery){ + label.text = "Scanning for devices..." + scanButton.enabled = false + }else{ + label.text = "Scan finished." + scanButton.enabled = true + } + } + + onNewServiceDiscovered: { + console.log("Service " + service.serviceName + " found on " + service.deviceName + " at address " + service.deviceAddress + " on port " + service.servicePort + ".") + //btSocket.service = service + btConn.connect(service.deviceAddress, service.servicePort) + } + } + + /* + BluetoothSocket{ + id: btSocket + + onDataAvailable: { + console.log("Data available: " + stringData.charCodeAt(0) + data) + } + + onServiceChanged: { + console.log("Service changed. Connecting...") + connected = true + } + + onConnectedChanged: { + console.log("Connected.") + } + }*/ + + BtConnector{ + id: btConn + } +} diff --git a/qml/QZeeControl/main.qml b/qml/QZeeControl/main.qml new file mode 100644 index 0000000..bfb4552 --- /dev/null +++ b/qml/QZeeControl/main.qml @@ -0,0 +1,30 @@ +import QtQuick 1.1 +import com.nokia.meego 1.0 + +PageStackWindow { + id: appWindow + + initialPage: mainPage + + MainPage { + id: mainPage + } + + ToolBarLayout { + id: commonTools + visible: true + ToolIcon { + platformIconId: "toolbar-view-menu" + anchors.right: (parent === undefined) ? undefined : parent.right + onClicked: (myMenu.status === DialogStatus.Closed) ? myMenu.open() : myMenu.close() + } + } + + Menu { + id: myMenu + visualParent: pageStack + MenuLayout { + MenuItem { text: qsTr("Sample menu item") } + } + } +} diff --git a/qmlapplicationviewer/qmlapplicationviewer.cpp b/qmlapplicationviewer/qmlapplicationviewer.cpp new file mode 100644 index 0000000..997bbfc --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -0,0 +1,174 @@ +// checksum 0xee24 version 0x70013 +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#include "qmlapplicationviewer.h" + +#include +#include +#include +#include +#include +#include + +#include // MEEGO_EDITION_HARMATTAN + +#ifdef HARMATTAN_BOOSTER +#include +#endif + +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 + +#include + +#if !defined(NO_JSDEBUGGER) +#include +#endif +#if !defined(NO_QMLOBSERVER) +#include +#endif + +// Enable debugging before any QDeclarativeEngine is created +struct QmlJsDebuggingEnabler +{ + QmlJsDebuggingEnabler() + { + QDeclarativeDebugHelper::enableDebugging(); + } +}; + +// Execute code in constructor before first QDeclarativeEngine is instantiated +static QmlJsDebuggingEnabler enableDebuggingHelper; + +#endif // QMLJSDEBUGGER + +class QmlApplicationViewerPrivate +{ + QString mainQmlFile; + friend class QmlApplicationViewer; + static QString adjustPath(const QString &path); +}; + +QString QmlApplicationViewerPrivate::adjustPath(const QString &path) +{ +#ifdef Q_OS_UNIX +#ifdef Q_OS_MAC + if (!QDir::isAbsolutePath(path)) + return QString::fromLatin1("%1/../Resources/%2") + .arg(QCoreApplication::applicationDirPath(), path); +#else + const QString pathInInstallDir = + QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path); + if (QFileInfo(pathInInstallDir).exists()) + return pathInInstallDir; +#endif +#endif + return path; +} + +QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) + : QDeclarativeView(parent) + , d(new QmlApplicationViewerPrivate()) +{ + connect(engine(), SIGNAL(quit()), SLOT(close())); + setResizeMode(QDeclarativeView::SizeRootObjectToView); + // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 +#if !defined(NO_JSDEBUGGER) + new QmlJSDebugger::JSDebuggerAgent(engine()); +#endif +#if !defined(NO_QMLOBSERVER) + new QmlJSDebugger::QDeclarativeViewObserver(this, this); +#endif +#endif +} + +QmlApplicationViewer::~QmlApplicationViewer() +{ + delete d; +} + +QmlApplicationViewer *QmlApplicationViewer::create() +{ + return new QmlApplicationViewer(); +} + +void QmlApplicationViewer::setMainQmlFile(const QString &file) +{ + d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file); + setSource(QUrl::fromLocalFile(d->mainQmlFile)); +} + +void QmlApplicationViewer::addImportPath(const QString &path) +{ + engine()->addImportPath(QmlApplicationViewerPrivate::adjustPath(path)); +} + +void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) +{ +#if defined(Q_OS_SYMBIAN) + // If the version of Qt on the device is < 4.7.2, that attribute won't work + if (orientation != ScreenOrientationAuto) { + const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { + qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); + return; + } + } +#endif // Q_OS_SYMBIAN + + Qt::WidgetAttribute attribute; + switch (orientation) { +#if QT_VERSION < 0x040702 + // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes + case ScreenOrientationLockPortrait: + attribute = static_cast(128); + break; + case ScreenOrientationLockLandscape: + attribute = static_cast(129); + break; + default: + case ScreenOrientationAuto: + attribute = static_cast(130); + break; +#else // QT_VERSION < 0x040702 + case ScreenOrientationLockPortrait: + attribute = Qt::WA_LockPortraitOrientation; + break; + case ScreenOrientationLockLandscape: + attribute = Qt::WA_LockLandscapeOrientation; + break; + default: + case ScreenOrientationAuto: + attribute = Qt::WA_AutoOrientation; + break; +#endif // QT_VERSION < 0x040702 + }; + setAttribute(attribute, true); +} + +void QmlApplicationViewer::showExpanded() +{ +#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR) + showFullScreen(); +#elif defined(Q_WS_MAEMO_5) + showMaximized(); +#else + show(); +#endif +} + +QApplication *createApplication(int &argc, char **argv) +{ +#ifdef HARMATTAN_BOOSTER + return MDeclarativeCache::qApplication(argc, argv); +#else + return new QApplication(argc, argv); +#endif +} diff --git a/qmlapplicationviewer/qmlapplicationviewer.h b/qmlapplicationviewer/qmlapplicationviewer.h new file mode 100644 index 0000000..b01cc88 --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.h @@ -0,0 +1,46 @@ +// checksum 0x898f version 0x70013 +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#ifndef QMLAPPLICATIONVIEWER_H +#define QMLAPPLICATIONVIEWER_H + +#include + +class QmlApplicationViewer : public QDeclarativeView +{ + Q_OBJECT + +public: + enum ScreenOrientation { + ScreenOrientationLockPortrait, + ScreenOrientationLockLandscape, + ScreenOrientationAuto + }; + + explicit QmlApplicationViewer(QWidget *parent = 0); + virtual ~QmlApplicationViewer(); + + static QmlApplicationViewer *create(); + + void setMainQmlFile(const QString &file); + void addImportPath(const QString &path); + + // Note that this will only have an effect on Symbian and Fremantle. + void setOrientation(ScreenOrientation orientation); + + void showExpanded(); + +private: + class QmlApplicationViewerPrivate *d; +}; + +QApplication *createApplication(int &argc, char **argv); + +#endif // QMLAPPLICATIONVIEWER_H diff --git a/qmlapplicationviewer/qmlapplicationviewer.pri b/qmlapplicationviewer/qmlapplicationviewer.pri new file mode 100644 index 0000000..b6931d0 --- /dev/null +++ b/qmlapplicationviewer/qmlapplicationviewer.pri @@ -0,0 +1,148 @@ +# checksum 0x5b42 version 0x70013 +# This file was generated by the Qt Quick Application wizard of Qt Creator. +# The code below adds the QmlApplicationViewer to the project and handles the +# activation of QML debugging. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +QT += declarative + +SOURCES += $$PWD/qmlapplicationviewer.cpp +HEADERS += $$PWD/qmlapplicationviewer.h +INCLUDEPATH += $$PWD + +# Include JS debugger library if QMLJSDEBUGGER_PATH is set +!isEmpty(QMLJSDEBUGGER_PATH) { + include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) +} else { + DEFINES -= QMLJSDEBUGGER +} + +contains(CONFIG,qdeclarative-boostable):contains(MEEGO_EDITION,harmattan) { + DEFINES += HARMATTAN_BOOSTER +} +# This file was generated by an application wizard of Qt Creator. +# The code below handles deployment to Symbian and Maemo, aswell as copying +# of the application data to shadow build directories on desktop. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +defineTest(qtcAddDeployment) { +for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemsources = $${item}.sources + $$itemsources = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath= $$eval($${deploymentfolder}.target) + export($$itemsources) + export($$itempath) + DEPLOYMENT += $$item +} + +MAINPROFILEPWD = $$PWD + +symbian { + isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg + isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} else:win32 { + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, /, \\) + sourcePathSegments = $$split(source, \\) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments) + target = $$replace(target, /, \\) + target ~= s,\\\\\\.?\\\\,\\, + !isEqual(source,$$target) { + !isEmpty(copyCommand):copyCommand += && + isEqual(QMAKE_DIR_SEP, \\) { + copyCommand += $(COPY_DIR) \"$$source\" \"$$target\" + } else { + source = $$replace(source, \\\\, /) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + target = $$replace(target, \\\\, /) + copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\" + } + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } +} else:unix { + maemo5 { + desktopfile.files = $${TARGET}.desktop + desktopfile.path = /usr/share/applications/hildon + icon.files = $${TARGET}64.png + icon.path = /usr/share/icons/hicolor/64x64/apps + } else:!isEmpty(MEEGO_VERSION_MAJOR) { + desktopfile.files = $${TARGET}_harmattan.desktop + desktopfile.path = /usr/share/applications + icon.files = $${TARGET}80.png + icon.path = /usr/share/icons/hicolor/80x80/apps + } else { # Assumed to be a Desktop Unix + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, \\\\, /) + macx { + target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) + } else { + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + } + target = $$replace(target, \\\\, /) + sourcePathSegments = $$split(source, /) + targetFullPath = $$target/$$last(sourcePathSegments) + targetFullPath ~= s,/\\.?/,/, + !isEqual(source,$$targetFullPath) { + !isEmpty(copyCommand):copyCommand += && + copyCommand += $(MKDIR) \"$$target\" + copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\" + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } + } + installPrefix = /opt/$${TARGET} + for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemfiles = $${item}.files + $$itemfiles = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target) + export($$itemfiles) + export($$itempath) + INSTALLS += $$item + } + + !isEmpty(desktopfile.path) { + export(icon.files) + export(icon.path) + export(desktopfile.files) + export(desktopfile.path) + INSTALLS += icon desktopfile + } + + target.path = $${installPrefix}/bin + export(target.path) + INSTALLS += target +} + +export (ICON) +export (INSTALLS) +export (DEPLOYMENT) +export (TARGET.EPOCHEAPSIZE) +export (TARGET.CAPABILITY) +export (LIBS) +export (QMAKE_EXTRA_TARGETS) +} diff --git a/qtc_packaging/debian_harmattan/README b/qtc_packaging/debian_harmattan/README new file mode 100644 index 0000000..df4fedf --- /dev/null +++ b/qtc_packaging/debian_harmattan/README @@ -0,0 +1,6 @@ +The Debian Package qzeecontrol +---------------------------- + +Comments regarding the Package + + -- Ruediger Gad Thu, 12 Apr 2012 08:17:41 +0200 diff --git a/qtc_packaging/debian_harmattan/changelog b/qtc_packaging/debian_harmattan/changelog new file mode 100644 index 0000000..2b572f3 --- /dev/null +++ b/qtc_packaging/debian_harmattan/changelog @@ -0,0 +1,5 @@ +qzeecontrol (0.0.1) unstable; urgency=low + + * Initial Release. + + -- Ruediger Gad Thu, 12 Apr 2012 08:17:41 +0200 diff --git a/qtc_packaging/debian_harmattan/compat b/qtc_packaging/debian_harmattan/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/qtc_packaging/debian_harmattan/compat @@ -0,0 +1 @@ +7 diff --git a/qtc_packaging/debian_harmattan/control b/qtc_packaging/debian_harmattan/control new file mode 100644 index 0000000..c45125d --- /dev/null +++ b/qtc_packaging/debian_harmattan/control @@ -0,0 +1,15 @@ +Source: qzeecontrol +Section: user/other +Priority: optional +Maintainer: Ruediger Gad +Build-Depends: debhelper (>= 5), libqt4-dev +Standards-Version: 3.7.3 +Homepage: + +Package: qzeecontrol +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + +XSBC-Maemo-Display-Name: QZeeControl +XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAADMFJREFUeJztm3uM3NV1xz/n95jXvnft9drrt9cYA4bEDwrEgG1i2kAUAsKmJaqi0jZUlfqSAJG2KLhSK1RURVVEadWo+astFVFQKichQYlDSBA41CRA/Jzd9Wtf3sfsY2Z3Hr/fPf1jdnd2dn6znn2ZPvyVRjvzu+fee86555x77vndhf/nkLIth7Bp2FxNwo+ubHGr9u9ZGd22PhZ1bWN8zwwSjQ7dfLEmdfjwq/415HfJUaqAL26IIKEDiB4SYfumlnD9XbfWxtY1h8Jh1w4pqMAI0I1yHtE4SlwsOW9UutJpGYw4udSR/W96116c+aNYAV/aXIdn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D2YKW1qjpHJj/PDk20VNIhZ3r3ucR274c/a2foGIXRNYOpsXhMvhMXt4cYPkUXwcXiBfRqF1RYhNq8O88u53uDzUU9QecWrY0Xwfe9Z8lrATW/hEBWZ/+vSvv5Fa5CDAEuaUrivc+8l6upLtvPCdfwo8MU5Dy/6Y8SxYSYpesuG1RbBahGIFLKI2oQprVoR4ZF8TJ3qP8uVv/QXHzvyIrpFOEuke+scv0DV2Cs9k8pXSkldwxXeLAplRzYrha8/tPfbBwjktxgK2wSBM3wBldVOIVXe4JCfe53sXP+KdgVoibgRfM2T8CTyTnVU6u5rWJ8dG+0X4msaqXhJZurNysQIWPGxBCNX8/l0by9/wyOowmck7nYWrMaX9ZsBTGBO0H/QySIeiZzDyEzX+iSO7jy5pIbHMJanZ5lnuuiwBz6dWbGrQfHEkAB6QRBkAvazQjhBHJY7ln3csuycXqko8v+voxFKu+GwUFGBEgxck6JLSXHSzy9/qA0lUBhAuAx0ocUs4hyXnLc/ujaR16Kn73xgPEvRIhYIsFHkFJDqS1LS9AnITUPrqtwjBFjElqKCDqnQJVqeKnhOxzonxzxuxe/ByQ+zbN35EjpScbZ9eKonmibwCXsXnK60vcakrg+pfA43lOij4oppSYRCkG7RD4BzQbonVaVS6YtZ4YvxTB1NBgkJpHeHjRLG9HsIm2vZb27fEXnz0nqZVli1JYEiELlXtRIiLWOfUN50Y0x1zc4PlBf3fgSCHtg78/a5777qldp0dsjscI11e2B78v/APUtdxHddxHddxHddxHdcxA/8Nah8Z0hX6vbsAAAAASUVORK5CYII= diff --git a/qtc_packaging/debian_harmattan/copyright b/qtc_packaging/debian_harmattan/copyright new file mode 100644 index 0000000..2f15c23 --- /dev/null +++ b/qtc_packaging/debian_harmattan/copyright @@ -0,0 +1,40 @@ +This package was debianized by Ruediger Gad on +Thu, 12 Apr 2012 08:17:41 +0200. + +It was downloaded from + +Upstream Author(s): + + + + +Copyright: + + + + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2012, Ruediger Gad and +is licensed under the GPL, see above. + + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. diff --git a/qtc_packaging/debian_harmattan/manifest.aegis b/qtc_packaging/debian_harmattan/manifest.aegis new file mode 100644 index 0000000..749f242 --- /dev/null +++ b/qtc_packaging/debian_harmattan/manifest.aegis @@ -0,0 +1,70 @@ +AutoGenerateAegisFile + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/qtc_packaging/debian_harmattan/rules b/qtc_packaging/debian_harmattan/rules new file mode 100755 index 0000000..3d97284 --- /dev/null +++ b/qtc_packaging/debian_harmattan/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + + +configure: configure-stamp +configure-stamp: + dh_testdir + qmake PREFIX=/usr + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/qzeecontrol.sgml > qzeecontrol.1 + + touch $@ + +clean: configure + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/qzeecontrol. + $(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/qzeecontrol install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure