From 6c4633b0643c2f4417e58a4b26a693d8f32f57e6 Mon Sep 17 00:00:00 2001
From: Laserlicht <13953785+Laserlicht@users.noreply.github.com>
Date: Sat, 21 Dec 2024 18:28:40 +0100
Subject: [PATCH] add shortcut
---
.github/workflows/github.yml | 2 +-
CMakePresets.json | 2 +-
android/AndroidManifest.xml | 2 ++
android/vcmi-app/build.gradle | 2 ++
android/vcmi-app/src/main/res/values-de/strings.xml | 1 +
android/vcmi-app/src/main/res/values/strings.xml | 1 +
android/vcmi-app/src/main/res/xml/shortcuts.xml | 13 +++++++++++++
.../vcmi-app/src/main/res/xml/shortcutsdaily.xml | 13 +++++++++++++
.../vcmi-app/src/main/res/xml/shortcutsdebug.xml | 13 +++++++++++++
9 files changed, 47 insertions(+), 2 deletions(-)
create mode 100644 android/vcmi-app/src/main/res/xml/shortcuts.xml
create mode 100644 android/vcmi-app/src/main/res/xml/shortcutsdaily.xml
create mode 100644 android/vcmi-app/src/main/res/xml/shortcutsdebug.xml
diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml
index b4beca40b..2370777c8 100644
--- a/.github/workflows/github.yml
+++ b/.github/workflows/github.yml
@@ -248,7 +248,7 @@ jobs:
cmake -DENABLE_CCACHE:BOOL=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 --preset ${{ matrix.preset }}
elif [[ (${{matrix.preset}} == android-conan-ninja-release) && (${{github.ref}} != 'refs/heads/master') ]]
then
- cmake -DENABLE_CCACHE:BOOL=ON -DANDROID_GRADLE_PROPERTIES="applicationIdSuffix=.daily;signingConfig=dailySigning;applicationLabel=VCMI daily" --preset ${{ matrix.preset }}
+ cmake -DENABLE_CCACHE:BOOL=ON -DANDROID_GRADLE_PROPERTIES="applicationIdSuffix=.daily;signingConfig=dailySigning;applicationLabel=VCMI daily;applicationVariant=daily" --preset ${{ matrix.preset }}
elif [[ ${{startsWith(matrix.platform, 'msvc') }} ]]
then
cmake --preset ${{ matrix.preset }}
diff --git a/CMakePresets.json b/CMakePresets.json
index 1dbf2df4c..1a07ab1fb 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -317,7 +317,7 @@
"description": "VCMI Android daily build",
"inherits": "android-conan-ninja-release",
"cacheVariables": {
- "ANDROID_GRADLE_PROPERTIES": "applicationIdSuffix=.daily;signingConfig=dailySigning;applicationLabel=VCMI daily"
+ "ANDROID_GRADLE_PROPERTIES": "applicationIdSuffix=.daily;signingConfig=dailySigning;applicationLabel=VCMI daily;applicationVariant=daily"
}
}
],
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index cf5f041d0..f9dbc17c6 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -30,6 +30,8 @@
+
+
diff --git a/android/vcmi-app/build.gradle b/android/vcmi-app/build.gradle
index c8518ab92..1ce017bf4 100644
--- a/android/vcmi-app/build.gradle
+++ b/android/vcmi-app/build.gradle
@@ -57,6 +57,7 @@ android {
applicationIdSuffix '.debug'
manifestPlaceholders = [
applicationLabel: 'VCMI debug',
+ applicationVariant: 'debug',
]
ndk {
debugSymbolLevel 'full'
@@ -70,6 +71,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
manifestPlaceholders = [
applicationLabel: project.findProperty('applicationLabel') ?: 'VCMI',
+ applicationVariant: project.findProperty('applicationVariant') ?: '',
]
ndk {
debugSymbolLevel 'full'
diff --git a/android/vcmi-app/src/main/res/values-de/strings.xml b/android/vcmi-app/src/main/res/values-de/strings.xml
index 85799ef78..4f59975d1 100644
--- a/android/vcmi-app/src/main/res/values-de/strings.xml
+++ b/android/vcmi-app/src/main/res/values-de/strings.xml
@@ -1,4 +1,5 @@
VCMI-Server
+ VCMI spielen
diff --git a/android/vcmi-app/src/main/res/values/strings.xml b/android/vcmi-app/src/main/res/values/strings.xml
index ffe670cee..eee488a31 100644
--- a/android/vcmi-app/src/main/res/values/strings.xml
+++ b/android/vcmi-app/src/main/res/values/strings.xml
@@ -1,4 +1,5 @@
VCMI Server
+ Play VCMI
diff --git a/android/vcmi-app/src/main/res/xml/shortcuts.xml b/android/vcmi-app/src/main/res/xml/shortcuts.xml
new file mode 100644
index 000000000..fc0bc76f2
--- /dev/null
+++ b/android/vcmi-app/src/main/res/xml/shortcuts.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/android/vcmi-app/src/main/res/xml/shortcutsdaily.xml b/android/vcmi-app/src/main/res/xml/shortcutsdaily.xml
new file mode 100644
index 000000000..16adaf20a
--- /dev/null
+++ b/android/vcmi-app/src/main/res/xml/shortcutsdaily.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/android/vcmi-app/src/main/res/xml/shortcutsdebug.xml b/android/vcmi-app/src/main/res/xml/shortcutsdebug.xml
new file mode 100644
index 000000000..a8420c54d
--- /dev/null
+++ b/android/vcmi-app/src/main/res/xml/shortcutsdebug.xml
@@ -0,0 +1,13 @@
+
+
+
+
+