Skip to content

Commit

Permalink
N9: Added Harmattan packaging rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
leppa committed Nov 3, 2013
1 parent 033a5bc commit bcced7d
Show file tree
Hide file tree
Showing 14 changed files with 452 additions and 14 deletions.
10 changes: 5 additions & 5 deletions qmlapplicationviewer/qmlapplicationviewer.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// checksum 0xbe90 version 0x90018
/*
This file was generated by the Qt Quick Application wizard of Qt Creator.
QmlApplicationViewer is a convenience class containing mobile device specific
Expand Down Expand Up @@ -60,7 +61,7 @@ QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
if (!QDir::isAbsolutePath(path))
return QString::fromLatin1("%1/../Resources/%2")
.arg(QCoreApplication::applicationDirPath(), path);
#elif defined(Q_OS_QNX)
#elif defined(Q_OS_BLACKBERRY)
if (!QDir::isAbsolutePath(path))
return QString::fromLatin1("app/native/%1").arg(path);
#elif !defined(Q_OS_ANDROID)
Expand All @@ -82,7 +83,7 @@ QmlApplicationViewer::QmlApplicationViewer(QWidget *parent)
{
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)
Expand Down Expand Up @@ -157,9 +158,9 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)

void QmlApplicationViewer::showExpanded()
{
#if defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR)
#if defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
showFullScreen();
#elif defined(Q_WS_MAEMO_5) || defined(Q_OS_QNX)
#elif defined(Q_WS_MAEMO_5)
showMaximized();
#else
show();
Expand All @@ -174,4 +175,3 @@ QApplication *createApplication(int &argc, char **argv)
return new QApplication(argc, argv);
#endif
}

16 changes: 8 additions & 8 deletions qmlapplicationviewer/qmlapplicationviewer.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// checksum 0xc67a version 0x90018
/*
This file was generated by the Qt Quick Application wizard of Qt Creator.
QmlApplicationViewer is a convenience class containing mobile device specific
Expand All @@ -15,32 +16,31 @@
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 Fremantle.
void setOrientation(ScreenOrientation orientation);

void showExpanded();

private:
class QmlApplicationViewerPrivate *d;
};

QApplication *createApplication(int &argc, char **argv);

#endif // QMLAPPLICATIONVIEWER_H

168 changes: 168 additions & 0 deletions qmlapplicationviewer/qmlapplicationviewer.pri
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# checksum 0xf003 version 0x90018
# 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.
Expand All @@ -20,4 +21,171 @@ INCLUDEPATH += $$PWD
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 Android 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}
greaterThan(QT_MAJOR_VERSION, 4) {
itemsources = $${item}.files
} else {
itemsources = $${item}.sources
}
$$itemsources = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath= $$eval($${deploymentfolder}.target)
export($$itemsources)
export($$itempath)
DEPLOYMENT += $$item
}

MAINPROFILEPWD = $$PWD

android-no-sdk {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemfiles = $${item}.files
$$itemfiles = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath = /data/user/qt/$$eval($${deploymentfolder}.target)
export($$itemfiles)
export($$itempath)
INSTALLS += $$item
}

target.path = /data/user/qt

export(target.path)
INSTALLS += target
} else:android {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemfiles = $${item}.files
$$itemfiles = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath = /assets/$$eval($${deploymentfolder}.target)
export($$itemfiles)
export($$itempath)
INSTALLS += $$item
}

x86 {
target.path = /libs/x86
} else: armeabi-v7a {
target.path = /libs/armeabi-v7a
} else {
target.path = /libs/armeabi
}

export(target.path)
INSTALLS += target
} 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
}
}
!isEmpty(target.path) {
installPrefix = $${target.path}
} else {
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
}

isEmpty(target.path) {
target.path = $${installPrefix}/bin
export(target.path)
}
INSTALLS += target
}

export (ICON)
export (INSTALLS)
export (DEPLOYMENT)
export (LIBS)
export (QMAKE_EXTRA_TARGETS)
}
6 changes: 6 additions & 0 deletions qtc_packaging/debian_harmattan/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
The Debian Package taot
----------------------------

Comments regarding the Package

-- Oleksii Serdiuk <contacts@oleksii.name> Wed, 30 Oct 2013 21:12:15 +0100
5 changes: 5 additions & 0 deletions qtc_packaging/debian_harmattan/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
taot (0.1.4) unstable; urgency=low

* Initial Release.

-- Oleksii Serdiuk <contacts@oleksii.name> Wed, 30 Oct 2013 21:12:15 +0100
1 change: 1 addition & 0 deletions qtc_packaging/debian_harmattan/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7
28 changes: 28 additions & 0 deletions qtc_packaging/debian_harmattan/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Source: taot
Section: user/other
Priority: optional
Maintainer: Oleksii Serdiuk <contacts@oleksii.name>
Build-Depends: debhelper (>= 5), libqt4-dev
Standards-Version: 3.7.3
Homepage: https://github.com/leppa/taot

Package: taot
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Online Translator with some advanced features
The Advanced Online Translator uses available online translation
services to provide translations. Currently it supports only Google
Translate but more services are in the plans (i.e., Bing Translate,
Yandex Translate, etc.).
.
For Google Translate alternative and reverse translations are
displayed for single words.
XSBC-Maemo-Display-Name: The Advanced Online Translator
XB-Maemo-Flags: visible
XB-MeeGo-Desktop-Entry-Filename: taot_harmattan
XB-MeeGo-Desktop-Entry:
[Desktop Entry]
Type=Application
Name=taot
Icon=/usr/share/icons/hicolor/80x80/apps/taot80.png
XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAA7BAAAOwQG4kWvtAAAMgElEQVRoge2aeVAbdRvH98q5m202JBCOECjhTJFACOUSASnSlKMdYWrHjtAZbR2PenQq6m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rLVavX7/a2trX/CcmbD4XBYLBaO4xAEicXimJgYj8dDEAQIgvX19QKB4Oeffw5NgJaVleXl5XV2du7cudNsNhcWFp45c6a7uzsQCKAompyc7HA4vv32W5fLZbPZCIKoq6sbHR2dn5+fmpr66KOPdDpdY2Mjj8dzuVwzMzM7duxgehZ6vf7q1askSWq12o34ghk3hlYjmdbghp4FQTA5ORnHcRRFf1sGhmHwV657MnMGBMHQZzuhNYfQXcx5Npsd6ln9T7CRRvfIkSPt7e1PPfVUb29venr6+Pi4wWBITU0VCoV6vZ7H4yEIEhcXJ5PJHA7H888/L5fLd+3aZTAYNm/eLBKJTCYTiqL9/f1ZWVnz8/MSiSQuLu7VV18tLy/XarVWq9Vut3M4nGPHjt1Kmt5IQ5aamqpSqb7//vvy8vIrV66srKzY7XaSJAOBQFRU1PLy8sTEhNvtHh8f7+zsrKmpgSBIqVRaLBa1Wj08PBwTE9PR0VFdXb28vOx2uw0Gw+Li4vbt2zMzM5nOT2RkZHl5+cmTJzeg7TYTqtlM10WlUv1+sRDhnCSHYfjvXPK4cQzExsaWl5fn5OT09/ePj49LpVIEQRYWFnp7ewEAePzxx1NSUuLj4wcGBkAQPHHihNFoLCsrq62tNZvNJpOpqKjo0KFDr7322oULF2w22549e1544YW/6EOeGxuQk5MDAEBiYuLg4KBCoTCbzWtrayRJzs/PAwCwY8cOFovl9XqNRmNxcfH6+rrH4zl37hwz4XP+/HkOh8OYx+fzXS6X3+83m81/hfoNkpKS8ttDFov1968ip6amMjvBP9ZoNLd+M03T4V33RhDkww8/3Lt3r06nC+rgcDgwDPt8Poqi2Gz2+vp6GPX9KYLpIjs7m8/na7VasVi8devWu+jDgn8AUXpSk6Vy5ZcAAAAASUVORK5CYII=
34 changes: 34 additions & 0 deletions qtc_packaging/debian_harmattan/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This package was debianized by Oleksii Serdiuk <contacts@oleksii.name>
on Wed, 30 Oct 2013 21:09:27 +0100.

It was downloaded from <https://github.com/leppa/taot>

Upstream Author(s):

Oleksii Serdiuk <contacts@oleksii.name>

Copyright:

Copyright (C) 2013 Oleksii Serdiuk

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) 2013, unknown <> and
is licensed under the GPL, see above.
Loading

0 comments on commit bcced7d

Please sign in to comment.