mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-25 22:24:16 +00:00
android: add some documentation
This commit is contained in:
parent
de5485b256
commit
088e69a577
25
README.md
25
README.md
@ -241,8 +241,31 @@ schroot --chroot jessie -- cmake --build build-in-chroot
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Android
|
## Android
|
||||||
|
1. Set up [Android Studio/Android SDK](https://developer.android.com/studio).
|
||||||
|
|
||||||
TODO
|
### Android Studio
|
||||||
|
Open the project located in the `android` folder and build.
|
||||||
|
|
||||||
|
### Command-line
|
||||||
|
```
|
||||||
|
cd android
|
||||||
|
./gradlew assembleRelease
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customizing the build
|
||||||
|
settings.gradle:
|
||||||
|
* **rootProject.name** - project name displayed in Android Studio (optional).
|
||||||
|
|
||||||
|
app/build.gradle:
|
||||||
|
* **android->namespace** and **android->defaultConfig->applicationId** - set both to desired package name.
|
||||||
|
* **getBuildNum** function - set **releaseDate** variable as desired.
|
||||||
|
|
||||||
|
app/java/su/xash/hlsdk/MainActivity.java:
|
||||||
|
* **.putExtra("gamedir", ...)** - set desired gamedir.
|
||||||
|
|
||||||
|
src/main/AndroidManifest.xml:
|
||||||
|
* **application->android:label** - set desired application name.
|
||||||
|
* **su.xash.engine.gamedir** value - set to same as above.
|
||||||
|
|
||||||
## Nintendo Switch
|
## Nintendo Switch
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ android {
|
|||||||
applicationId 'com.example.hlsdk'
|
applicationId 'com.example.hlsdk'
|
||||||
versionName '1.0'
|
versionName '1.0'
|
||||||
versionCode getBuildNum()
|
versionCode getBuildNum()
|
||||||
minSdkVersion 19
|
minSdkVersion 3
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
compileSdk 34
|
compileSdk 34
|
||||||
}
|
}
|
||||||
@ -20,6 +20,7 @@ android {
|
|||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
version '3.22.1'
|
version '3.22.1'
|
||||||
|
path file('../../CMakeLists.txt')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,12 +43,6 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
externalNativeBuild {
|
|
||||||
cmake {
|
|
||||||
path file('../../CMakeLists.txt')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lint {
|
lint {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
android:value="valve" />
|
android:value="valve" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name="su.xash.hlsdk.MainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.hlsdk;
|
package su.xash.hlsdk;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
Loading…
x
Reference in New Issue
Block a user