Install prebuilt assets with cmake (#658)

The build process no longer relies on symlink
This commit is contained in:
rocka 2024-12-20 20:03:21 +08:00 committed by GitHub
parent b10bff30ad
commit de5bc3bb42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
56 changed files with 154 additions and 153 deletions

View File

@ -26,12 +26,6 @@ jobs:
fetch-depth: 0
submodules: recursive
- name: Regenerate symlinks pointing to submodule (Windows)
if: ${{ matrix.os == 'windows-2022' }}
run: |
Remove-Item -Recurse app/src/main/assets/usr/share, plugin/hangul/src/main/assets/usr/share/libhangul, plugin/chewing/src/main/assets/usr/share/libchewing, plugin/jyutping/src/main/assets/usr/share/libime
git checkout -- .
- name: Setup Java
uses: actions/setup-java@v4
with:

13
.gitignore vendored
View File

@ -1,21 +1,12 @@
# Module :app
# Installed data
/app/src/main/assets/usr/share/fcitx5/addon
/app/src/main/assets/usr/share/fcitx5/chttrans
/app/src/main/assets/usr/share/fcitx5/data
/app/src/main/assets/usr/share/fcitx5/default
/app/src/main/assets/usr/share/fcitx5/inputmethod
/app/src/main/assets/usr/share/fcitx5/lua
/app/src/main/assets/usr/share/fcitx5/punctuation
/app/src/main/assets/usr/share/fcitx5/unicode
/app/src/main/assets/usr/share/locale
/app/src/main/assets/usr/
# Generated asset descriptor
/app/src/main/assets/descriptor.json
# Plugins
# Installed data
/plugin/*/src/main/assets/usr/share/fcitx5
/plugin/*/src/main/assets/usr/share/locale
/plugin/*/src/main/assets/usr/
# Generated asset descriptor
/plugin/*/src/main/assets/descriptor.json

View File

@ -69,7 +69,7 @@ Discuss on Telegram: [@fcitx5_android_group](https://t.me/fcitx5_android_group)
### Dependencies
- Android SDK Platform & Build-Tools 34.
- Android SDK Platform & Build-Tools 35.
- Android NDK (Side by side) 25 & CMake 3.22.1, they can be installed using SDK Manager in Android Studio or `sdkmanager` command line.
- [KDE/extra-cmake-modules](https://github.com/KDE/extra-cmake-modules)
- GNU Gettext >= 0.20 (for `msgfmt` binary; or install `appstream` if you really have to use gettext <= 0.19.)
@ -96,29 +96,6 @@ git clone git@github.com:fcitx5-android/fcitx5-android.git
git submodule update --init --recursive
```
<details>
<summary>On Windows, you may need to regenerate symlinks to submodules.</summary>
Run in PowerShell:
```powershell
Remove-Item -Recurse app/src/main/assets/usr/share, plugin/hangul/src/main/assets/usr/share/libhangul, plugin/chewing/src/main/assets/usr/share/libchewing, plugin/jyutping/src/main/assets/usr/share/libime
```
Or Command Prompt:
```bat
RD /S /Q app\src\main\assets\usr\share plugin\hangul\src\main\assets\usr\share\libhangul plugin\chewing\src\main\assets\usr\share\libchewing plugin\jyutping\src\main\assets\usr\share\libime
```
Then let `git` regenerate symlinks:
```shell
git checkout -- .
```
</details>
Install `extra-cmake-modules` and `gettext` with your system package manager:
```shell

View File

@ -67,12 +67,8 @@ kotlin {
}
}
aboutLibraries {
configPath = "app/licenses"
}
fcitxComponent {
installLibraries = listOf(
includeLibs = listOf(
"fcitx5",
"fcitx5-lua",
"libime",
@ -82,6 +78,7 @@ fcitxComponent {
excludeFiles = listOf("cangjie", "erbi", "qxm", "wanfeng").map {
"usr/share/fcitx5/inputmethod/$it.conf"
}
installPrebuiltAssets = true
}
ksp {

View File

@ -1 +0,0 @@
../../../../../../../../lib/fcitx5/src/main/cpp/prebuilt/chinese-addons-data/pinyin/chaizi.dict

View File

@ -1 +0,0 @@
../../../../../../../../lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons/im/pinyin/symbols

View File

@ -1 +0,0 @@
../../../../../../../lib/fcitx5/src/main/cpp/prebuilt/chinese-addons-data/pinyinhelper

View File

@ -1 +0,0 @@
../../../../../../../lib/fcitx5/src/main/cpp/prebuilt/spell-dict

View File

@ -1 +0,0 @@
../../../../../../../lib/fcitx5/src/main/cpp/prebuilt/libime/table

View File

@ -1 +0,0 @@
../../../../../../lib/fcitx5/src/main/cpp/prebuilt/libime/data

View File

@ -1 +0,0 @@
../../../../../../lib/fcitx5/src/main/cpp/prebuilt/opencc/data

View File

@ -65,22 +65,30 @@ target_link_libraries(native-lib
pinyin-customphrase
)
# copy module libraries from dependency lib
add_custom_target(copy-fcitx5-modules
# fcitx5
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5::clipboard,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5::imselector,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5::quickphrase,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5::spell,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5::unicode,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
# fcitx5-lua
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5-lua::luaaddonloader,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
# fcitx5-chinese-addons
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5-chinese-addons::pinyin,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5-chinese-addons::table,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5-chinese-addons::scel2org5,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5-chinese-addons::chttrans,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5-chinese-addons::fullwidth,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5-chinese-addons::pinyinhelper,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_PROPERTY:fcitx5-chinese-addons::punctuation,IMPORTED_LOCATION> ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
$<TARGET_PROPERTY:fcitx5::clipboard,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5::imselector,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5::quickphrase,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5::spell,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5::unicode,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5-lua::luaaddonloader,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5-chinese-addons::pinyin,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5-chinese-addons::table,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5-chinese-addons::scel2org5,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5-chinese-addons::chttrans,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5-chinese-addons::fullwidth,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5-chinese-addons::pinyinhelper,IMPORTED_LOCATION>
$<TARGET_PROPERTY:fcitx5-chinese-addons::punctuation,IMPORTED_LOCATION>
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
COMMENT "Copying fcitx5 module libraries to :app"
)
# install prebuilt assets
install(FILES "${PREBUILT_DIR}/spell-dict/en_dict.fscd" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/spell" COMPONENT prebuilt-assets)
install(FILES "${PREBUILT_DIR}/chinese-addons-data/pinyin/chaizi.dict" DESTINATION "${FCITX_INSTALL_PKGDATADIR}/pinyin" COMPONENT prebuilt-assets)
install(DIRECTORY "${PREBUILT_DIR}/chinese-addons-data/pinyinhelper" DESTINATION "${FCITX_INSTALL_PKGDATADIR}" COMPONENT prebuilt-assets)
install(DIRECTORY "${PREBUILT_DIR}/libime/table" DESTINATION "${FCITX_INSTALL_PKGDATADIR}" COMPONENT prebuilt-assets)
install(DIRECTORY "${PREBUILT_DIR}/libime/data/" DESTINATION "${FCITX_INSTALL_DATADIR}/libime" COMPONENT prebuilt-assets)
install(DIRECTORY "${PREBUILT_DIR}/opencc/data/" DESTINATION "${FCITX_INSTALL_DATADIR}/opencc" COMPONENT prebuilt-assets)

View File

@ -141,6 +141,7 @@ class AndroidAppConventionPlugin : AndroidBaseConventionPlugin() {
target.pluginManager.apply(target.libs.plugins.aboutlibraries.get().pluginId)
target.configure<AboutLibrariesExtension> {
configPath = target.rootProject.relativePath(target.file("licenses"))
excludeFields = arrayOf(
"generated", "developers", "organization", "scm", "funding", "content"
)

View File

@ -12,21 +12,20 @@ import org.gradle.kotlin.dsl.task
import java.io.File
import kotlin.io.path.isSymbolicLink
/**
* Add task installFcitxConfig and installFcitxTranslation, using a random variant's cxx dir
*/
class FcitxComponentPlugin : Plugin<Project> {
abstract class FcitxComponentExtension {
var installLibraries: List<String> = emptyList()
var includeLibs: List<String> = emptyList()
var excludeFiles: List<String> = emptyList()
var modifyFiles: Map<String, (File) -> Unit> = emptyMap()
var installPrebuiltAssets: Boolean = false
}
companion object {
const val INSTALL_TASK = "installFcitxComponent"
const val DELETE_TASK = "deleteFcitxComponentExcludeFiles"
const val CLEAN_TASK = "cleanFcitxComponents"
const val EXTENSION = "fcitxComponent"
val DEPENDENT_TASKS = arrayOf(INSTALL_TASK, DELETE_TASK)
}
@ -37,10 +36,10 @@ class FcitxComponentPlugin : Plugin<Project> {
registerCMakeTask(target, "generate-desktop-file", "config")
registerCMakeTask(target, "translation-file", "translation")
registerCleanTask(target)
target.extensions.create<FcitxComponentExtension>("fcitxComponent")
target.extensions.create<FcitxComponentExtension>(EXTENSION)
target.afterEvaluate {
val ext = extensions.getByName<FcitxComponentExtension>("fcitxComponent")
ext.installLibraries.forEach {
val ext = extensions.getByName<FcitxComponentExtension>(EXTENSION)
ext.includeLibs.forEach {
val project = rootProject.project(":lib:$it")
registerCMakeTask(target, "generate-desktop-file", "config", project)
registerCMakeTask(target, "translation-file", "translation", project)
@ -55,6 +54,9 @@ class FcitxComponentPlugin : Plugin<Project> {
}
}
}
if (ext.installPrebuiltAssets) {
registerCMakeTask(target, "", "prebuilt-assets")
}
}
}
@ -67,17 +69,20 @@ class FcitxComponentPlugin : Plugin<Project> {
component: String,
sourceProject: Project = project
) {
val componentName = component.split('-').joinToString("") { it.capitalized() }
val taskName = if (project === sourceProject) {
"installProject${component.capitalized()}"
"installProject$componentName"
} else {
"installLibrary${component.capitalized()}[${sourceProject.name}]"
"installLibrary$componentName[${sourceProject.name}]"
}
val task = project.task(taskName) {
runAfterNativeConfigure(sourceProject) { abiModel ->
val cmake = abiModel.variant.module.cmake!!.cmakeExe!!
sourceProject.exec {
workingDir = abiModel.cxxBuildFolder
commandLine(cmake, "--build", ".", "--target", target)
if (target.isNotEmpty()) {
sourceProject.exec {
workingDir = abiModel.cxxBuildFolder
commandLine(cmake, "--build", ".", "--target", target)
}
}
sourceProject.exec {
workingDir = abiModel.cxxBuildFolder

View File

@ -8,32 +8,60 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.Delete
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.getByName
import org.gradle.kotlin.dsl.task
import org.gradle.kotlin.dsl.withType
import java.io.File
class FcitxHeadersPlugin : Plugin<Project> {
abstract class FcitxHeadersExtension {
var installDevelComponent: Boolean = false
}
companion object {
const val INSTALL_TASK = "installFcitxHeaders"
const val HEADERS_TASK = "installFcitxHeaders"
const val DEVEL_TASK = "installFcitxDevelComponent"
const val CLEAN_TASK = "cleanFcitxHeaders"
const val EXTENSION = "fcitxHeaders"
}
private val Project.headersInstallDir
get() = file("build/headers")
private val Project.develComponentInstallDir
get() = file("build/devel")
override fun apply(target: Project) {
registerInstallTask(target)
// mkdir for all prefab library headers
target.extensions.configure<LibraryAndroidComponentsExtension> {
finalizeDsl {
@Suppress("UnstableApiUsage")
it.prefab.forEach { library ->
library.headers?.let { path -> target.file(path).mkdirs() }
}
}
}
registerInstallTask(target, HEADERS_TASK, "header", target.headersInstallDir)
registerCleanTask(target)
target.extensions.create<FcitxHeadersExtension>(EXTENSION)
target.afterEvaluate {
val ext = extensions.getByName<FcitxHeadersExtension>(EXTENSION)
if (ext.installDevelComponent) {
registerInstallTask(target, DEVEL_TASK, "Devel", target.develComponentInstallDir)
}
}
}
private fun registerInstallTask(project: Project) {
val installHeadersTask = project.task(INSTALL_TASK) {
private fun registerInstallTask(project: Project, name: String, component: String, dest: File) {
val installHeadersTask = project.task(name) {
runAfterNativeConfigure(project) { abiModel ->
val cmake = abiModel.variant.module.cmake!!.cmakeExe!!
project.exec {
workingDir = abiModel.cxxBuildFolder
environment("DESTDIR", project.headersInstallDir.absolutePath)
commandLine(cmake, "--install", ".", "--component", "header")
environment("DESTDIR", dest.absolutePath)
commandLine(cmake, "--install", ".", "--component", component)
}
}
}
@ -42,20 +70,12 @@ class FcitxHeadersPlugin : Plugin<Project> {
project.tasks.withType<PrefabPackageConfigurationTask>().all {
dependsOn(installHeadersTask)
}
project.extensions.configure<LibraryAndroidComponentsExtension> {
finalizeDsl {
@Suppress("UnstableApiUsage")
it.prefab.forEach { library ->
library.headers?.let { path -> project.file(path).mkdirs() }
}
}
}
}
private fun registerCleanTask(project: Project) {
project.task<Delete>(CLEAN_TASK) {
delete(project.headersInstallDir)
delete(project.develComponentInstallDir)
}.also {
project.cleanTask.dependsOn(it)
}

View File

@ -4,6 +4,10 @@ plugins {
id("org.fcitx.fcitx5.android.fcitx-headers")
}
fcitxHeaders {
installDevelComponent = true
}
android {
namespace = "org.fcitx.fcitx5.android.lib.fcitx5"
@ -14,6 +18,7 @@ android {
targets(
// dummy "cmake" target
"cmake",
"devel",
// fcitx5
"Fcitx5Core",
"Fcitx5Config",
@ -35,6 +40,10 @@ android {
headerOnly = true
headers = "src/main/cpp/cmake"
}
create("devel") {
headerOnly = true
headers = "build/devel/usr/lib/cmake"
}
val headersPrefix = "build/headers/usr/include/Fcitx5"
create("Fcitx5Core") {
libraryName = "libFcitx5Core"

View File

@ -7,6 +7,8 @@ add_link_options("LINKER:--hash-style=gnu,--build-id=none")
# dummy target to export src/main/cpp/cmake
add_custom_target(cmake)
# dummy target to export build/devel/usr/lib/cmake
add_custom_target(devel)
# dummy target to export "notifications_public.h"
add_custom_target(notifications)

View File

@ -1 +0,0 @@
../../../cpp/fcitx5/cmake/Fcitx5CompilerSettings.cmake

View File

@ -1 +0,0 @@
../../../cpp/fcitx5/src/lib/fcitx-utils/Fcitx5Download.cmake.in

View File

@ -1 +0,0 @@
../../../cpp/fcitx5/src/lib/fcitx-utils/Fcitx5Macros.cmake

View File

@ -1 +0,0 @@
../../../cpp/fcitx5/src/lib/fcitx-utils/Fcitx5ModuleTemplate.cmake.in

View File

@ -2,6 +2,8 @@ set(Fcitx5Utils_FOUND TRUE)
# find prefab dependency
find_package(fcitx5 REQUIRED CONFIG)
# dummy target for fcitx5 cmake config files
get_target_property(FCITX5_DEVEL_FILES fcitx5::devel INTERFACE_INCLUDE_DIRECTORIES)
if (NOT TARGET Fcitx5::Utils)
# fix target name
@ -14,11 +16,11 @@ find_package(Gettext REQUIRED)
# dependent projects usually use
# "${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake"
# to locate Fcitx5CompilerSettings
set(FCITX_INSTALL_CMAKECONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}")
set(FCITX_INSTALL_CMAKECONFIG_DIR "${FCITX5_DEVEL_FILES}")
# mimic fcitx5/src/lib/fcitx-utils/Fcitx5UtilsConfig.cmake.in
include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5Macros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/Fcitx5AndroidInstallDirs.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/Fcitx5Utils/Fcitx5Macros.cmake")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Fcitx5Utils

View File

@ -42,8 +42,8 @@ android {
}
}
aboutLibraries {
configPath = "plugin/anthy/licenses"
fcitxComponent {
installPrebuiltAssets = true
}
dependencies {

View File

@ -1 +0,0 @@
../../../../../../../../lib/fcitx5/src/main/cpp/prebuilt/anthy-dict/anthy.dic

View File

@ -23,3 +23,10 @@ unset(BUILD_SHARED_LIBS)
set(ANTHY_TARGET anthy-unicode)
add_subdirectory(fcitx5-anthy)
install(FILES
"${PREBUILT_DIR}/anthy-dict/anthy.dic"
"${CMAKE_CURRENT_LIST_DIR}/anthy-unicode.conf"
DESTINATION "${FCITX_INSTALL_DATADIR}/anthy"
COMPONENT prebuilt-assets
)

View File

@ -42,8 +42,8 @@ android {
}
}
aboutLibraries {
configPath = "plugin/chewing/licenses"
fcitxComponent {
installPrebuiltAssets = true
}
dependencies {

View File

@ -1 +0,0 @@
../../../../../../../lib/fcitx5/src/main/cpp/prebuilt/chewing-dict

View File

@ -23,3 +23,5 @@ set_target_properties(Chewing_static PROPERTIES
set(CHEWING_TARGET Chewing_static)
option(ENABLE_TEST "" OFF)
add_subdirectory(fcitx5-chewing)
install(DIRECTORY "${PREBUILT_DIR}/chewing-dict/" DESTINATION "${FCITX_INSTALL_DATADIR}/libchewing" COMPONENT prebuilt-assets)

View File

@ -1,3 +1,6 @@
import com.android.build.gradle.tasks.MergeSourceSetFolders
import kotlinx.serialization.json.Json
plugins {
id("org.fcitx.fcitx5.android.app-convention")
id("org.fcitx.fcitx5.android.plugin-app-convention")
@ -23,12 +26,17 @@ android {
}
}
aboutLibraries {
configPath = "plugin/clipboard-filter/licenses"
}
generateDataDescriptor{
excludes.add("data.min.json")
// copy ClearURLsRules/data.min.json to apk assets
tasks.withType<MergeSourceSetFolders>().all {
// mergeDebugAssets or mergeReleaseAssets
if (name.endsWith("Assets")) {
doLast {
val inFile = file("ClearURLsRules/data.min.json")
val outFile = outputDir.asFile.get().resolve("data.min.json")
// minify json
outFile.writeText(Json.parseToJsonElement(inFile.readText()).toString())
}
}
}
dependencies {

View File

@ -1 +0,0 @@
../../../ClearURLsRules/data.min.json

View File

@ -42,8 +42,8 @@ android {
}
}
aboutLibraries {
configPath = "plugin/hangul/licenses"
fcitxComponent {
installPrebuiltAssets = true
}
dependencies {

View File

@ -1 +0,0 @@
../../../../../../../lib/fcitx5/src/main/cpp/prebuilt/libhangul/data/libhangul

View File

@ -23,3 +23,5 @@ set_target_properties(Hangul_static PROPERTIES
set(HANGUL_TARGET Hangul_static)
option(ENABLE_TEST "" OFF)
add_subdirectory(fcitx5-hangul)
install(DIRECTORY "${PREBUILT_DIR}/libhangul/data/libhangul" DESTINATION "${FCITX_INSTALL_DATADIR}" COMPONENT prebuilt-assets)

View File

@ -56,10 +56,7 @@ fcitxComponent {
)
}
)
}
aboutLibraries {
configPath = "plugin/jyutping/licenses"
installPrebuiltAssets = true
}
dependencies {

View File

@ -1 +0,0 @@
../../../../../../../lib/fcitx5/src/main/cpp/prebuilt/libime-jyutping

View File

@ -43,3 +43,5 @@ option(ENABLE_TEST "" OFF)
add_subdirectory(libime-jyutping)
# rename to include executable in apk
set_target_properties(libime_jyutpingdict PROPERTIES OUTPUT_NAME libime_jyutpingdict.so)
install(DIRECTORY "${PREBUILT_DIR}/libime-jyutping/" DESTINATION "${FCITX_INSTALL_DATADIR}/libime" COMPONENT prebuilt-assets)

View File

@ -42,12 +42,12 @@ android {
}
}
generateDataDescriptor {
symlinks.put("usr/share/rime-data/opencc", "usr/share/opencc")
fcitxComponent {
installPrebuiltAssets = true
}
aboutLibraries {
configPath = "plugin/rime/licenses"
generateDataDescriptor {
symlinks.put("usr/share/rime-data/opencc", "usr/share/opencc")
}
dependencies {

View File

@ -1 +0,0 @@
../../../../cpp/default.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-essay/essay.txt

View File

@ -1 +0,0 @@
../../../../cpp/rime-prelude/key_bindings.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-luna-pinyin/luna_pinyin.dict.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-luna-pinyin/luna_pinyin.schema.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-luna-pinyin/luna_pinyin_fluency.schema.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-luna-pinyin/luna_pinyin_simp.schema.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-luna-pinyin/luna_pinyin_tw.schema.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-luna-pinyin/luna_quanpin.schema.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-luna-pinyin/pinyin.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-prelude/punctuation.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-stroke/stroke.dict.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-stroke/stroke.schema.yaml

View File

@ -1 +0,0 @@
../../../../cpp/rime-prelude/symbols.yaml

View File

@ -39,3 +39,22 @@ set_target_properties(Rime_static PROPERTIES
set(RIME_TARGET "-Wl,--whole-archive" Rime_static "-Wl,--no-whole-archive")
set(RIME_DATA_DIR "${CMAKE_INSTALL_DATADIR}/rime-data")
add_subdirectory(fcitx5-rime)
install(FILES
"default.yaml"
"rime-essay/essay.txt"
"rime-prelude/key_bindings.yaml"
"rime-prelude/punctuation.yaml"
"rime-prelude/symbols.yaml"
"rime-luna-pinyin/luna_pinyin_fluency.schema.yaml"
"rime-luna-pinyin/luna_pinyin_simp.schema.yaml"
"rime-luna-pinyin/luna_pinyin_tw.schema.yaml"
"rime-luna-pinyin/luna_pinyin.dict.yaml"
"rime-luna-pinyin/luna_pinyin.schema.yaml"
"rime-luna-pinyin/luna_quanpin.schema.yaml"
"rime-luna-pinyin/pinyin.yaml"
"rime-stroke/stroke.dict.yaml"
"rime-stroke/stroke.schema.yaml"
DESTINATION "${FCITX_INSTALL_DATADIR}/rime-data"
COMPONENT prebuilt-assets
)

View File

@ -42,10 +42,6 @@ android {
}
}
aboutLibraries {
configPath = "plugin/sayura/licenses"
}
dependencies {
implementation(project(":lib:fcitx5"))
implementation(project(":lib:plugin-base"))

View File

@ -42,10 +42,6 @@ android {
}
}
aboutLibraries {
configPath = "plugin/thai/licenses"
}
dependencies {
implementation(project(":lib:fcitx5"))
implementation(project(":lib:plugin-base"))

View File

@ -42,10 +42,6 @@ android {
}
}
aboutLibraries {
configPath = "plugin/unikey/licenses"
}
dependencies {
implementation(project(":lib:fcitx5"))
implementation(project(":lib:plugin-base"))