Compare commits
8 Commits
Author | SHA1 | Date |
---|---|---|
Dorian Zedler | 17e278cd53 | |
Dorian Zedler | c7e7b1c950 | |
Dorian Zedler | d18468b555 | |
Dorian Zedler | 2d4689a01c | |
Dorian Zedler | b450d3a406 | |
Dorian Zedler | 60617daef2 | |
Dorian Zedler | 0ae9df710c | |
Dorian Zedler | 50af1fa4a8 |
|
@ -0,0 +1,26 @@
|
|||
kind: pipeline
|
||||
name: build and publish Qt Android-App
|
||||
steps:
|
||||
- name: submodules
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
|
||||
- name: build apk
|
||||
image: itsblue.dev/plugins/qt-android:5.15.5-1
|
||||
settings:
|
||||
qmake_arguments: "CONFIG+=release"
|
||||
androiddeployqt_arguments: "--android-platform android-31"
|
||||
|
||||
- name: publish package
|
||||
image: alpine/curl
|
||||
commands:
|
||||
- ls -l outputs
|
||||
- ls -l outputs/apk
|
||||
- ls -l outputs/apk/debug
|
||||
- "curl --fail --user $GITEA_USER:$GITEA_TOKEN --upload-file outputs/apk/debug/android-build-debug.apk https://itsblue.dev/api/packages/ScStw/generic/app/0.0.0-preview-${DRONE_COMMIT_SHA}/ScStwApp.apk"
|
||||
environment:
|
||||
GITEA_USER:
|
||||
from_secret: gitea-user
|
||||
GITEA_TOKEN:
|
||||
from_secret: gitea-token
|
|
@ -1,3 +1,3 @@
|
|||
[submodule "shared-libraries"]
|
||||
path = shared-libraries
|
||||
url = https://git.itsblue.de/ScStw/shared-libraries.git
|
||||
url = https://itsblue.dev/ScStw/shared-libraries.git
|
||||
|
|
30
ScStwApp.pro
30
ScStwApp.pro
|
@ -3,8 +3,15 @@ QT += quick qml quickcontrols2 sql multimedia
|
|||
android {
|
||||
QT += androidextras
|
||||
}
|
||||
VERSION = 0.04
|
||||
DEFINES += APP_VERSION=$$VERSION
|
||||
|
||||
VERSION = 1.0.1
|
||||
QMAKE_TARGET_PRODUCT = "ScStwApp"
|
||||
QMAKE_TARGET_COMPANY = "Itsblue Development"
|
||||
QMAKE_TARGET_COPYRIGHT = "Copyright (c) by Itsblue Development"
|
||||
|
||||
# Add to define
|
||||
DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
|
@ -66,5 +73,22 @@ DISTFILES += \
|
|||
|
||||
android {
|
||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||
ANDROID_ABIS = armeabi-v7a arm64-v8a
|
||||
defineReplace(droidVersionCode) {
|
||||
segments = $$split(1, ".")
|
||||
for (segment, segments): vCode = "$$first(vCode)$$format_number($$segment, width=3 zeropad)"
|
||||
|
||||
contains(ANDROID_TARGET_ARCH, arm64-v8a): \
|
||||
suffix = 1
|
||||
else:contains(ANDROID_TARGET_ARCH, armeabi-v7a): \
|
||||
suffix = 0
|
||||
# add more cases as needed
|
||||
|
||||
return($$first(vCode)$$first(suffix))
|
||||
}
|
||||
|
||||
ANDROID_VERSION_NAME = $$VERSION
|
||||
ANDROID_VERSION_CODE = $$droidVersionCode($$ANDROID_VERSION_NAME)
|
||||
}
|
||||
|
||||
# This has to be the last line in the file
|
||||
ANDROID_ABIS = armeabi-v7a arm64-v8a
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest package="com.itsblue.speedclimbing_stwtest" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="-- %%INSERT_VERSION_NAME%% --" android:versionCode="-- %%INSERT_VERSION_CODE%% --" android:installLocation="auto">
|
||||
<manifest package="com.itsblue.speedclimbing_stopwatch" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="-- %%INSERT_VERSION_NAME%% --" android:versionCode="-- %%INSERT_VERSION_CODE%% --" android:installLocation="auto">
|
||||
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
|
||||
Remove the comment if you do not require these default permissions. -->
|
||||
<!-- %%INSERT_PERMISSIONS -->
|
||||
|
||||
|
||||
<!-- The following comment will be replaced upon deployment with default features based on the dependencies of the application.
|
||||
Remove the comment if you do not require these default features. -->
|
||||
|
@ -71,6 +71,7 @@
|
|||
</activity>
|
||||
<!-- For adding service(s) please check: https://wiki.qt.io/AndroidServices -->
|
||||
</application>
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
</manifest>
|
||||
|
|
|
@ -74,4 +74,8 @@ android {
|
|||
minSdkVersion = qtMinSdkVersion
|
||||
targetSdkVersion = 29
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
import QtQuick 2.9
|
||||
import QtMultimedia 5.8
|
||||
import QtQuick.Window 2.2
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
|
||||
import de.itsblue.ScStw 2.0
|
||||
import de.itsblue.ScStw.Styling 2.0
|
||||
import de.itsblue.ScStw.Styling.Components 1.0
|
||||
import de.itsblue.ScStwApp 2.0
|
||||
|
||||
import "../components"
|
||||
|
||||
Column {
|
||||
id: control
|
||||
|
||||
spacing: parentObj.delegateHeight * 0.2
|
||||
|
||||
property string title: "about"
|
||||
property var parentObj
|
||||
|
||||
function updateSetting(key, val, del){
|
||||
del.busy = true
|
||||
scStwAppSettings.writeSetting(key, val, ScStwSettings.KeyLevel)
|
||||
del.busy = false
|
||||
}
|
||||
|
||||
function loadSetting(key, del){
|
||||
return scStwAppSettings.readSetting(key, ScStwSettings.KeyLevel)
|
||||
}
|
||||
|
||||
Label {
|
||||
id: headerLabel
|
||||
|
||||
width: parent.width
|
||||
height: parentObj.delegateHeight * 0.8
|
||||
|
||||
visible: true
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
fontSizeMode: Text.Fit
|
||||
font.pixelSize: height
|
||||
|
||||
minimumPixelSize: 1
|
||||
|
||||
color: appTheme.theme.colors.text
|
||||
|
||||
text: "ScStwApp"
|
||||
}
|
||||
|
||||
Label {
|
||||
width: parent.width * 1
|
||||
height: parentObj.delegateHeight * 0.6
|
||||
|
||||
|
||||
verticalAlignment: Text.AlignTop
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
fontSizeMode: Text.Fit
|
||||
font.pixelSize: height
|
||||
|
||||
minimumPixelSize: 1
|
||||
|
||||
color: appTheme.theme.colors.line
|
||||
|
||||
text: "V" + APP_VERSION + "<br><a href='https://itsblue.de/apps/scstw'><b>privacy policy</b></a>"
|
||||
|
||||
onLinkActivated: {
|
||||
Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
width: parent.width * 1
|
||||
height: parent.height
|
||||
|
||||
|
||||
verticalAlignment: Text.AlignTop
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
fontSizeMode: Text.Fit
|
||||
font.pixelSize: height
|
||||
|
||||
minimumPixelSize: 1
|
||||
|
||||
color: appTheme.theme.colors.line
|
||||
|
||||
text: " This app was built using the <a href='https://qt.io'>Qt Framework</a><br>
|
||||
licensed under the <a href='https://www.gnu.org/licenses/lgpl-3.0.en.html'>GNU lgplV3 license</a>.<br><br>
|
||||
|
||||
This app is open source and licensed<br>under the <a href='https://www.gnu.org/licenses/agpl-3.0.en.html'>GNU agplV3 license</a>,<br>
|
||||
the source code can be found <a href='https://itsblue.dev/ScStw/app/'>here</a>."
|
||||
|
||||
onLinkActivated: {
|
||||
Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -35,6 +35,14 @@ StackView {
|
|||
|
||||
}
|
||||
|
||||
Component {
|
||||
id: about
|
||||
|
||||
SettingsAboutPage {
|
||||
parentObj: control
|
||||
}
|
||||
}
|
||||
|
||||
/*-----Page to connect to the base station -----*/
|
||||
Component {
|
||||
id: connect
|
||||
|
|
|
@ -47,6 +47,19 @@ Column {
|
|||
}
|
||||
}
|
||||
|
||||
/*----About the app----*/
|
||||
NextPageDelegate {
|
||||
id: about_del
|
||||
|
||||
height: parentObj.delegateHeight
|
||||
|
||||
text: qsTr("about this app")
|
||||
|
||||
onClicked: {
|
||||
parentObj.push(about)
|
||||
}
|
||||
}
|
||||
|
||||
/*----Style Settings----*/
|
||||
SmoothSwitchDelegate {
|
||||
id: styleDel
|
||||
|
|
|
@ -30,5 +30,6 @@
|
|||
<file>components/BatteryIndicator.qml</file>
|
||||
<file>components/ExtensionOverview.qml</file>
|
||||
<file>SettingsDialog/SettingsBaseStationSettingsPage.qml</file>
|
||||
<file>SettingsDialog/SettingsAboutPage.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 37bea9105f1c7e0c8f1a209da3d5043c61abfb44
|
||||
Subproject commit 0f269a76370d84c8d1f43a7298a59b6fac1c6980
|
|
@ -69,6 +69,9 @@ int main(int argc, char *argv[])
|
|||
|
||||
QQmlApplicationEngine engine;
|
||||
|
||||
// pass app version to qml
|
||||
engine.rootContext()->setContextProperty("APP_VERSION", APP_VERSION);
|
||||
|
||||
ScStwLibraries::init();
|
||||
ScStwLibraries::initStyling(&engine);
|
||||
|
||||
|
|
Loading…
Reference in New Issue