Skip to content

Commit fd97c8b

Browse files
author
movte
committed
Change for Zalith
1 parent 43837f0 commit fd97c8b

29 files changed

Lines changed: 91 additions & 34 deletions

File tree

.github/workflows/android.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Android CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
Build:
10+
runs-on: ubuntu-22.04
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'temurin'
20+
java-version: '17'
21+
22+
- name: Build Plugin ${{matrix.arch}}
23+
run: |
24+
chmod +x gradlew
25+
./gradlew app:assemblerelease
26+
27+
- name: Upload Plugin ${{matrix.arch}}
28+
continue-on-error: true
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: ZalithRendererPlugin
32+
path: app/build/outputs/apk/release/*

app/build.gradle.kts

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,22 @@ plugins {
44
}
55

66
android {
7-
namespace = "com.mio.plugin.renderer"
7+
val nameId = "com.movtery.zalithplugin.renderer"
8+
9+
namespace = nameId
810
compileSdk = 34
911

12+
signingConfigs {
13+
create("release") {
14+
keyAlias = "key0"
15+
keyPassword = "ZALITH_RENDERER_PLUGIN"
16+
storeFile = file("plugin-key.jks")
17+
storePassword = "ZALITH_RENDERER_PLUGIN"
18+
}
19+
}
20+
1021
defaultConfig {
11-
applicationId = "com.mio.plugin.renderer"
22+
applicationId = nameId
1223
minSdk = 26
1324
targetSdk = 34
1425
versionCode = 1
@@ -30,8 +41,8 @@ android {
3041
//渲染器在启动器内显示的名称
3142
//The name displayed by the renderer in the launcher
3243
manifestPlaceholders["des"] = ""
33-
//渲染器的具体定义 格式为 名称:渲染器库名:EGL库名 例如 LTW:libltw.so:libltw.so
34-
//The specific definition format of a renderer is ${name}:${renderer library name}:${EGL library name}, for example: LTW:libltw.so:libltw.so
44+
//渲染器的具体定义 格式为 名称:渲染器库名:EGL库名 例如 Some Renderer:libSome_renderer.so:libSome_renderer.so
45+
//The specific definition format of a renderer is ${name}:${renderer library name}:${EGL library name}, for example: Some Renderer:libSome_renderer.so:libSome_renderer.so
3546
manifestPlaceholders["renderer"] = ""
3647

3748
//特殊Env
@@ -40,8 +51,9 @@ android {
4051
//DLOPEN=libxxx.so used to load external library
4152
//如果有多个库,可以使用","隔开,例如 DLOPEN=libxxx.so,libyyy.so
4253
//If there are multiple libraries, you can use "," to separate them, for example DLOPEN=libxxx.so,libyyy.so
43-
manifestPlaceholders["boatEnv"] = mutableMapOf<String,String>().apply {
44-
54+
manifestPlaceholders["pojavEnv"] = mutableMapOf<String,String>().apply {
55+
//put("POJAV_RENDERER", "renderer_id")
56+
//put("ENV_KEY", "env_value")
4557
}.run {
4658
var env = ""
4759
forEach { (key, value) ->
@@ -50,15 +62,19 @@ android {
5062
env.dropLast(1)
5163
}
5264

53-
manifestPlaceholders["pojavEnv"] = mutableMapOf<String,String>().apply {
65+
//FCL可以额外使用Boat启动方式,但ZalithLauncher只能使用Pojav这一种启动方式,所以移除了boatEnv环境变量的配置项,因此,这个渲染器插件就不能为FCL提供支持!
66+
//FCL can additionally use the Boat launch method, but ZalithLauncher can only use the Pojav launch method.
67+
//As a result, the boatEnv environment variable configuration option was removed. Therefore, this renderer plugin cannot provide support for FCL!
5468

55-
}.run {
56-
var env = ""
57-
forEach { (key, value) ->
58-
env += "$key=$value:"
59-
}
60-
env.dropLast(1)
61-
}
69+
//manifestPlaceholders["boatEnv"] = mutableMapOf<String,String>().apply {
70+
71+
//}.run {
72+
// var env = ""
73+
// forEach { (key, value) ->
74+
// env += "$key=$value:"
75+
// }
76+
// env.dropLast(1)
77+
//}
6278
}
6379
}
6480
compileOptions {

app/plugin-key.jks

2.55 KB
Binary file not shown.

app/src/main/AndroidManifest.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<application
55
android:allowBackup="true"
66
android:extractNativeLibs="true"
7-
android:icon="@drawable/img_app"
7+
android:icon="@mipmap/icon"
8+
android:roundIcon="@mipmap/icon_round"
89
android:label="@string/app_name"
910
android:supportsRtl="true">
1011

@@ -18,17 +19,20 @@
1819
</activity>
1920

2021
<meta-data
21-
android:name="fclPlugin"
22+
android:name="zalithRendererPlugin"
2223
android:value="true" />
2324
<meta-data
2425
android:name="des"
2526
android:value="${des}" />
2627
<meta-data
2728
android:name="renderer"
2829
android:value="${renderer}" />
29-
<meta-data
30-
android:name="boatEnv"
31-
android:value="${boatEnv}" />
30+
<!-- FCL可以额外使用Boat启动方式,但ZalithLauncher只能使用Pojav这一种启动方式,所以移除了boatEnv环境变量的配置项,因此,这个渲染器插件就不能为FCL提供支持! -->
31+
<!-- FCL can additionally use the Boat launch method, but ZalithLauncher can only use the Pojav launch method.
32+
As a result, the boatEnv environment variable configuration option was removed. Therefore, this renderer plugin cannot provide support for FCL! -->
33+
<!-- <meta-data-->
34+
<!-- android:name="boatEnv"-->
35+
<!-- android:value="${boatEnv}" />-->
3236
<meta-data
3337
android:name="pojavEnv"
3438
android:value="${pojavEnv}" />

app/src/main/java/com/mio/plugin/renderer/MainActivity.kt

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.movtery.zalithplugin.renderer
2+
3+
import android.app.Activity
4+
5+
class MainActivity : Activity()

app/src/main/jniLibs/armeabi-v7a/libxx.so

Whitespace-only changes.

app/src/main/jniLibs/x86/libxx.so

Whitespace-only changes.

app/src/main/jniLibs/x86_64/libxx.so

Whitespace-only changes.
-334 KB
Binary file not shown.

0 commit comments

Comments
 (0)