diff --git a/.gitignore b/.gitignore
index 356e055..8ff7975 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
# User Specific Project Files
*.pro.user
*.pro.user.*
+rpm/harbour-sailotp.spec
diff --git a/harbour-sailotp.pro b/harbour-sailotp.pro
index bc48895..6bfb246 100644
--- a/harbour-sailotp.pro
+++ b/harbour-sailotp.pro
@@ -8,6 +8,9 @@
# - icon definition filename in desktop file must be changed
TARGET = harbour-sailotp
+DEFINES += APP_VERSION=\\\"$$VERSION\\\"
+DEFINES += APP_BUILDNUM=\\\"$$RELEASE\\\"
+
CONFIG += sailfishapp
SOURCES += src/harbour-sailotp.cpp
diff --git a/harbour-sailotp.pro.user b/harbour-sailotp.pro.user
deleted file mode 100644
index 8537e8a..0000000
--- a/harbour-sailotp.pro.user
+++ /dev/null
@@ -1,529 +0,0 @@
-
-
-
-
-
- ProjectExplorer.Project.ActiveTarget
- 1
-
-
- ProjectExplorer.Project.EditorSettings
-
- true
- false
- true
-
- Cpp
-
- CppGlobal
-
-
-
- QmlJS
-
- QmlJSGlobal
-
-
- 2
- UTF-8
- false
- 4
- false
- true
- 1
- true
- 0
- true
- 0
- 8
- true
- 1
- true
- true
- true
- false
-
-
-
- ProjectExplorer.Project.PluginSettings
-
-
-
- ProjectExplorer.Project.Target.0
-
- MerSDK-SailfishOS-armv7hl
- MerSDK-SailfishOS-armv7hl
- {45efb901-3e2e-4d50-95ba-c432b8781a69}
- 0
- 0
- 0
-
-
-
- true
- qmake
-
- QtProjectManager.QMakeBuildStep
- false
- true
-
- false
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- false
-
-
-
- 2
- Build
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- true
- clean
-
-
- 1
- Bereinigen
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- Debug
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
- /home/seiichiro/Projekte/Sailfish/build-harbour-sailotp-MerSDK_SailfishOS_armv7hl-Debug
- true
-
-
-
-
- true
- qmake
-
- QtProjectManager.QMakeBuildStep
- false
- true
-
- false
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- false
-
-
-
- 2
- Build
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- true
- clean
-
-
- 1
- Bereinigen
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- Release
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- /home/seiichiro/Projekte/Sailfish/build-harbour-sailotp-MerSDK_SailfishOS_armv7hl-Release
- true
-
- 2
-
-
-
- true
- Rpm
-
- Qt4ProjectManager.MerRpmBuildStep
-
- 1
- Deployment
-
- ProjectExplorer.BuildSteps.Deploy
-
- 1
- Deploy By Building An RPM Package
-
- Qt4ProjectManager.MerArmDeployConfiguration
-
-
-
-
- true
- Rsync
-
- Qt4ProjectManager.MerRsyncDeployStep
-
- 1
- Deployment
-
- ProjectExplorer.BuildSteps.Deploy
-
- 1
- Deploy By Copying Binaries
-
- Qt4ProjectManager.MerRSyncDeployConfiguration
-
-
-
-
- true
- Rpm
-
- Qt4ProjectManager.MerRpmDeployStep
-
- 1
- Deployment
-
- ProjectExplorer.BuildSteps.Deploy
-
- 1
- Deploy As RPM Package
-
- Qt4ProjectManager.MerRpmDeployConfiguration
-
- 3
-
-
- true
-
- false
- false
- false
- false
- true
- 0.01
- 10
- true
- 25
-
- true
- valgrind
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
-
- 1
-
- harbour-sailotp (auf Mobilgerät)
-
- Qt4ProjectManager.MerRunConfiguration:/home/seiichiro/Projekte/Sailfish/harbour-sailotp/harbour-sailotp.pro
-
- harbour-sailotp.pro
-
- false
-
- 3768
- true
- false
- false
- true
- false
-
- 1
-
-
-
- ProjectExplorer.Project.Target.1
-
- MerSDK-SailfishOS-i486-x86
- MerSDK-SailfishOS-i486-x86
- {08e6ddb6-6d52-4f4e-938d-998fac04baad}
- 0
- 0
- 0
-
-
-
- true
- qmake
-
- QtProjectManager.QMakeBuildStep
- false
- true
-
- false
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- false
-
-
-
- 2
- Build
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- true
- clean
-
-
- 1
- Bereinigen
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- Debug
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
- /home/seiichiro/Projekte/Sailfish/build-harbour-sailotp-MerSDK_SailfishOS_i486_x86-Debug
- true
-
-
-
-
- true
- qmake
-
- QtProjectManager.QMakeBuildStep
- false
- true
-
- false
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- false
-
-
-
- 2
- Build
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- -w
- -r
-
- true
- clean
-
-
- 1
- Bereinigen
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- Release
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- /home/seiichiro/Projekte/Sailfish/build-harbour-sailotp-MerSDK_SailfishOS_i486_x86-Release
- true
-
- 2
-
-
-
- true
- Start Emulator
-
- Qt4ProjectManager.MerEmulatorStartStep
-
-
- true
- Rsync
-
- Qt4ProjectManager.MerRsyncDeployStep
-
- 2
- Deployment
-
- ProjectExplorer.BuildSteps.Deploy
-
- 1
- Deploy By Copying Binaries
-
- Qt4ProjectManager.MerRSyncDeployConfiguration
-
-
-
-
- true
- Start Emulator
-
- Qt4ProjectManager.MerEmulatorStartStep
-
-
- true
- Rpm
-
- Qt4ProjectManager.MerRpmDeployStep
-
- 2
- Deployment
-
- ProjectExplorer.BuildSteps.Deploy
-
- 1
- Deploy As RPM Package
-
- Qt4ProjectManager.MerRpmDeployConfiguration
-
- 2
-
-
- true
-
- false
- false
- false
- false
- true
- 0.01
- 10
- true
- 25
-
- true
- valgrind
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
-
- 1
-
- harbour-sailotp (auf Mobilgerät)
-
- Qt4ProjectManager.MerRunConfiguration:/home/seiichiro/Projekte/Sailfish/harbour-sailotp/harbour-sailotp.pro
-
- harbour-sailotp.pro
-
- false
-
- 3768
- true
- false
- false
- true
- false
-
- 1
-
-
-
- ProjectExplorer.Project.TargetCount
- 2
-
-
- ProjectExplorer.Project.Updater.EnvironmentId
- {ea1259ba-c840-46cd-876a-b91d58edff1f}
-
-
- ProjectExplorer.Project.Updater.FileVersion
- 14
-
-
diff --git a/qml/pages/About.qml b/qml/pages/About.qml
index d2dcf17..799baa8 100644
--- a/qml/pages/About.qml
+++ b/qml/pages/About.qml
@@ -44,7 +44,7 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter
y: 320
font.bold: true
- text: "SailOTP 0.4"
+ text: "SailOTP " + Qt.application.version
}
Text {
id: desc
@@ -67,9 +67,9 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: copyright.bottom
anchors.topMargin: 20
- text: "SailOTP on Github"
+ text: "Source Code"
onClicked: {
- Qt.openUrlExternally("https://github.com/seiichiro0185/sailotp")
+ Qt.openUrlExternally("https://www.seiichiro0185.org/gitlab/seiichiro0185/harbour-sailotp.git")
}
}
Text {
diff --git a/qml/pages/MainView.qml b/qml/pages/MainView.qml
index eb46901..0077d37 100644
--- a/qml/pages/MainView.qml
+++ b/qml/pages/MainView.qml
@@ -239,6 +239,7 @@ Page {
Component.onCompleted: {
// Load list of OTP-Entries
refreshOTPList();
+ console.log("SailOTP Version " + Qt.application.version + " started");
}
}
}
diff --git a/rpm/harbour-sailotp.spec b/rpm/harbour-sailotp.spec
deleted file mode 100644
index ed19a0c..0000000
--- a/rpm/harbour-sailotp.spec
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Do NOT Edit the Auto-generated Part!
-# Generated by: spectacle version 0.27
-#
-
-Name: harbour-sailotp
-
-# >> 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: SailOTP
-Version: 0.2
-Release: 1
-Group: Security
-License: BSD
-URL: https://github.com/seiichiro0185/sailotp/
-Source0: %{name}-%{version}.tar.bz2
-Source100: harbour-sailotp.yaml
-Requires: sailfishsilica-qt5 >= 0.10.9
-BuildRequires: pkgconfig(sailfishapp) >= 0.0.10
-BuildRequires: pkgconfig(Qt5Core)
-BuildRequires: pkgconfig(Qt5Qml)
-BuildRequires: pkgconfig(Qt5Quick)
-BuildRequires: desktop-file-utils
-
-%description
-A Sailfish implementation of the Timebased One Time Pad algorithm as used by Google Authenticator and a growing number of Websites.
-
-
-%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/icons/hicolor/86x86/apps
-/usr/share/applications
-/usr/share/harbour-sailotp
-/usr/bin
-%{_datadir}/icons/hicolor/86x86/apps/%{name}.png
-%{_datadir}/applications/%{name}.desktop
-%{_datadir}/%{name}/qml
-%{_bindir}
-# >> files
-# << files
diff --git a/rpm/harbour-sailotp.yaml b/rpm/harbour-sailotp.yaml
index a529c1c..d078793 100644
--- a/rpm/harbour-sailotp.yaml
+++ b/rpm/harbour-sailotp.yaml
@@ -11,20 +11,23 @@ Description: |
A Sailfish implementation of the One Time Pad algorithm as used by Google Authenticator and a growing number of Websites.
Configure: none
Builder: qtc5
+QMakeOptions:
+- VERSION=%{version}
+- RELEASE=%{release}
PkgConfigBR:
-- sailfishapp >= 0.0.10
-- Qt5Core
-- Qt5Qml
- Qt5Quick
+- Qt5Qml
+- Qt5Core
+- sailfishapp >= 0.0.10
Requires:
- sailfishsilica-qt5 >= 0.10.9
Files:
-- /usr/share/icons/hicolor/86x86/apps
-- /usr/share/applications
-- /usr/share/harbour-sailotp
-- /usr/bin
-- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png'
-- '%{_datadir}/applications/%{name}.desktop'
-- '%{_datadir}/%{name}/qml'
- '%{_bindir}'
+- '%{_datadir}/%{name}/qml'
+- '%{_datadir}/applications/%{name}.desktop'
+- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png'
+- /usr/bin
+- /usr/share/harbour-sailotp
+- /usr/share/applications
+- /usr/share/icons/hicolor/86x86/apps
PkgBR: []
diff --git a/src/harbour-sailotp.cpp b/src/harbour-sailotp.cpp
index f6d8d32..b967dae 100644
--- a/src/harbour-sailotp.cpp
+++ b/src/harbour-sailotp.cpp
@@ -32,9 +32,11 @@
#endif
#include
+#include
int main(int argc, char *argv[])
{
+ QCoreApplication::setApplicationVersion(APP_VERSION);
+
return SailfishApp::main(argc, argv);
}
-