1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

add shortcut

This commit is contained in:
Laserlicht 2024-12-21 18:28:40 +01:00
parent 2272707175
commit 6c4633b064
9 changed files with 47 additions and 2 deletions

View File

@ -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 }}

View File

@ -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"
}
}
],

View File

@ -30,6 +30,8 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts${applicationVariant}" />
<meta-data android:name="android.app.lib_name" android:value="-- %%INSERT_APP_LIB_NAME%% --"/>
<meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
<meta-data android:name="android.app.repository" android:value="default"/>

View File

@ -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'

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="server_name">VCMI-Server</string>
<string name="shortcut_play">VCMI spielen</string>
</resources>

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="server_name">VCMI Server</string>
<string name="shortcut_play">Play VCMI</string>
</resources>

View File

@ -0,0 +1,13 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="play"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:shortcutShortLabel="@string/shortcut_play"
android:shortcutLongLabel="@string/shortcut_play">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="is.xyz.vcmi"
android:targetClass="eu.vcmi.vcmi.VcmiSDLActivity" />
</shortcut>
</shortcuts>

View File

@ -0,0 +1,13 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="play"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:shortcutShortLabel="@string/shortcut_play"
android:shortcutLongLabel="@string/shortcut_play">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="is.xyz.vcmi.daily"
android:targetClass="eu.vcmi.vcmi.VcmiSDLActivity" />
</shortcut>
</shortcuts>

View File

@ -0,0 +1,13 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="play"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:shortcutShortLabel="@string/shortcut_play"
android:shortcutLongLabel="@string/shortcut_play">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="is.xyz.vcmi.debug"
android:targetClass="eu.vcmi.vcmi.VcmiSDLActivity" />
</shortcut>
</shortcuts>