Merge pull request #10 from Xray1870/master
Make read out SeaPrint version automatic from .yaml file.
This commit is contained in:
commit
b2a2dd5a9d
6 changed files with 18 additions and 7 deletions
|
@ -14,6 +14,13 @@ TARGET = harbour-seaprint
|
|||
|
||||
CONFIG += sailfishapp
|
||||
|
||||
# Write version file
|
||||
VERSION_H = \
|
||||
"$${LITERAL_HASH}ifndef SEAPRINT_VERSION" \
|
||||
"$${LITERAL_HASH} define SEAPRINT_VERSION \"$$VERSION\"" \
|
||||
"$${LITERAL_HASH}endif"
|
||||
write_file($$$$OUT_PWD/seaprint_version.h, VERSION_H)
|
||||
|
||||
SOURCES += src/harbour-seaprint.cpp \
|
||||
src/ippdiscovery.cpp \
|
||||
src/bytestream.cpp \
|
||||
|
|
|
@ -10,11 +10,6 @@ ApplicationWindow
|
|||
cover: Qt.resolvedUrl("cover/CoverPage.qml")
|
||||
allowedOrientations: defaultAllowedOrientations
|
||||
|
||||
id: appWin
|
||||
|
||||
property string appName: "SeaPrint"
|
||||
property string version: "0.3.1-1"
|
||||
|
||||
Item {
|
||||
id: db
|
||||
property var db_conn
|
||||
|
|
|
@ -54,7 +54,7 @@ Page {
|
|||
AboutLabel {
|
||||
font.pixelSize: Theme.fontSizeLarge
|
||||
color: Theme.highlightColor
|
||||
text: appWin.appName + " v" + appWin.version
|
||||
text: "SeaPrint v" + Qt.application.version
|
||||
}
|
||||
AboutLabel {
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
|
|
|
@ -37,7 +37,8 @@ Short description of my Sailfish OS Application
|
|||
# >> build pre
|
||||
# << build pre
|
||||
|
||||
%qmake5
|
||||
%qmake5 \
|
||||
VERSION=%{version}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
|
|
@ -16,6 +16,9 @@ Description: |
|
|||
Configure: none
|
||||
Builder: qmake5
|
||||
|
||||
QMakeOptions:
|
||||
- VERSION=%{version}
|
||||
|
||||
# This section specifies build dependencies that are resolved using pkgconfig.
|
||||
# This is the preferred way of specifying build dependencies for your package.
|
||||
PkgConfigBR:
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
#include <QtQuick>
|
||||
|
||||
#include <sailfishapp.h>
|
||||
#include <seaprint_version.h>
|
||||
#include <src/ippdiscovery.h>
|
||||
#include <src/ippprinter.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QGuiApplication* app = SailfishApp::application(argc, argv);
|
||||
|
||||
app->setApplicationVersion(QStringLiteral(SEAPRINT_VERSION));
|
||||
|
||||
qmlRegisterType<IppDiscovery>("seaprint.ippdiscovery", 1, 0, "IppDiscovery");
|
||||
qmlRegisterType<IppPrinter>("seaprint.ippprinter", 1, 0, "IppPrinter");
|
||||
|
||||
|
|
Loading…
Reference in a new issue