Recreate app with updated project template, now deploys on phone

This commit is contained in:
Mikko Ahlroth 2013-12-13 23:01:03 +02:00
parent da24e0ca95
commit 0971777d6c
9 changed files with 66 additions and 170 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
X-Nemo-Application-Type=silica-qt5
Name=SailTime
Name=harbour-sailtime
Icon=harbour-sailtime
Exec=harbour-sailtime

BIN
harbour-sailtime.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -10,20 +10,17 @@ TARGET = harbour-sailtime
CONFIG += sailfishapp
SOURCES += src/SailTime.cpp \
HEADERS += src/uptimechecker.h
SOURCES += src/harbour-sailtime.cpp \
src/uptimechecker.cpp
OTHER_FILES += \
OTHER_FILES += qml/harbour-sailtime.qml \
qml/cover/CoverPage.qml \
qml/pages/FirstPage.qml \
qml/pages/SecondPage.qml \
rpm/SailTime.spec \
rpm/SailTime.yaml \
qml/js/storage.js \
qml/js/uptime.js \
harbour-sailtime.desktop \
qml/harbour-sailtime.qml
HEADERS += \
src/uptimechecker.h
rpm/harbour-sailtime.spec \
rpm/harbour-sailtime.yaml \
harbour-sailtime.desktop

View file

@ -1,75 +0,0 @@
#
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.27
#
Name: SailTime
# >> macros
# << macros
%{!?qtc_qmake:%define qtc_qmake %qmake}
%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: SailTime
Version: 1.0
Release: 1
Group: Qt/Qt
License: LICENSE
Source0: %{name}-%{version}.tar.bz2
Source100: SailTime.yaml
Requires: sailfishsilica-qt5
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(sailfishapp)
BuildRequires: desktop-file-utils
%description
Short description of my SailfishOS Application
%prep
%setup -q -n %{name}-%{version}
# >> setup
# << setup
%build
# >> build pre
# << build pre
%qtc_qmake5
%qtc_make %{?_smp_mflags}
# >> build post
# << build post
%install
rm -rf %{buildroot}
# >> install pre
# << install pre
%qmake5_install
# >> install post
# << install post
desktop-file-install --delete-original \
--dir %{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/applications/*.desktop
%files
%defattr(-,root,root,-)
/usr/share/harbour-sailtime
/usr/share/icons/hicolor/90x90/apps
/usr/share/applications
/usr/share/SailTime
/usr/bin
%{_datadir}/icons/hicolor/90x90/apps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}/qml
%{_bindir}
# >> files
# << files

View file

@ -1,30 +0,0 @@
Name: SailTime
Summary: SailTime
Version: 1.0
Release: 1
Group: Qt/Qt
License: LICENSE
Sources:
- '%{name}-%{version}.tar.bz2'
Description: |
Short description of my SailfishOS Application
Configure: none
Builder: qtc5
PkgConfigBR:
- Qt5Core
- Qt5Qml
- Qt5Quick
- sailfishapp
Requires:
- sailfishsilica-qt5
Files:
- /usr/share/harbour-sailtime
- /usr/share/icons/hicolor/90x90/apps
- /usr/share/applications
- /usr/share/SailTime
- /usr/bin
- '%{_datadir}/icons/hicolor/90x90/apps/%{name}.png'
- '%{_datadir}/applications/%{name}.desktop'
- '%{_datadir}/%{name}/qml'
- '%{_bindir}'
PkgBR: []

30
rpm/harbour-sailtime.yaml Normal file
View file

@ -0,0 +1,30 @@
Name: harbour-sailtime
Summary: SailTime
Version: 0.1
Release: 1
Group: Qt/Qt
URL: http://example.org/
License:
Sources:
- '%{name}-%{version}.tar.bz2'
Description: |-
SailTime shows how long your phone has been sailing the open seas, or in other words, how long it has been switched on. It also displays the load averages for the last 1, 5 and 15 minutes.
Configure: none
Builder: qtc5
PkgConfigBR:
- sailfishapp >= 0.0.10
- Qt5Core
- Qt5Qml
- Qt5Quick
Requires:
- sailfishsilica-qt5 >= 0.10.9
Files:
- /usr/share/icons/hicolor/86x86/apps
- /usr/share/applications
- /usr/share/harbour-sailtime
- /usr/bin
- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png'
- '%{_datadir}/applications/%{name}.desktop'
- '%{_datadir}/%{name}/qml'
- '%{_bindir}'
PkgBR: []

View file

@ -1,54 +0,0 @@
/*
Copyright (C) 2013 Jolla Ltd.
Contact: Thomas Perl <thomas.perl@jollamobile.com>
All rights reserved.
You may use this file under the terms of BSD license as follows:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Jolla Ltd nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef QT_QML_DEBUG
#include <QtQuick>
#endif
#include <sailfishapp.h>
#include "uptimechecker.h"
int main(int argc, char *argv[])
{
// SailfishApp::main() will display "qml/template.qml", if you need more
// control over initialization, you can use:
//
// - SailfishApp::application(int, char *[]) to get the QGuiApplication *
// - SailfishApp::createView() to get a new QQuickView * instance
// - SailfishApp::pathTo(QString) to get a QUrl to a resource file
//
// To display the view, call "show()" (will show fullscreen on device).
qmlRegisterType<UptimeChecker>("harbour.sailtime.UptimeChecker", 1, 0, "UptimeChecker");
return SailfishApp::main(argc, argv);
}

28
src/harbour-sailtime.cpp Normal file
View file

@ -0,0 +1,28 @@
/*
*/
#ifdef QT_QML_DEBUG
#include <QtQuick>
#endif
#include <sailfishapp.h>
#include "uptimechecker.h"
int main(int argc, char *argv[])
{
// SailfishApp::main() will display "qml/template.qml", if you need more
// control over initialization, you can use:
//
// - SailfishApp::application(int, char *[]) to get the QGuiApplication *
// - SailfishApp::createView() to get a new QQuickView * instance
// - SailfishApp::pathTo(QString) to get a QUrl to a resource file
//
// To display the view, call "show()" (will show fullscreen on device).
qmlRegisterType<UptimeChecker>("harbour.sailtime.UptimeChecker", 1, 0, "UptimeChecker");
return SailfishApp::main(argc, argv);
}