osfans / trime

同文安卓輸入法平臺3.x/Android-rime/Rime Input Method Engine for Android
http://osfans.github.io/trime/
GNU General Public License v3.0
3.09k stars 372 forks source link

Improve self-build guide #771

Closed InfinityLoop1308 closed 2 years ago

InfinityLoop1308 commented 2 years ago

Is your feature request related to a problem? Please describe. Trime is extremely hard to build for those who are not very familiar to this project. Last time I spent almost a whole week to make it worked, and after I deleted some files by mistake yesterday, it began to fail building. I spent several hours trying to fix it, but no approaches works. When a cpp dependency throw an error, it is almost IMPOSSIBLE for non-cpp-developers to find a way to fix. I have encountered errors from boost, librime, libiconv, and capnp for no reason. No guides are given. Some were solved luckily, but everything breaks once you are unfortunate.

Describe the solution you'd like I don't know if there is a way to avoid complex cmake procedure for dependencies, but at least there should be more guidance to help solving building errors.

Describe alternatives you've considered A standardized building procedure may be given.

Additional context

tumuyan commented 2 years ago

You could remove CMake and use prebuild .so file, just like https://github.com/tumuyan/trime-without-CMake

Also C file could be build by github action

InfinityLoop1308 commented 2 years ago

You could remove CMake and use prebuild .so file, just like https://github.com/tumuyan/trime-without-CMake

Also C file could be build by github action

Awesome solution. This repo should be referred in the README or a pinned issue at least.

InfinityLoop1308 commented 2 years ago

Just one more question: how to update librime-jni.so? I want to test a PR which including changes in librime, but I don't know how to apply it to librime-jni.so. I have already made librime.so.

tumuyan commented 2 years ago
  1. push your c code to github (fork from this gits, not without cmake version), then ci script will build apk with librime-jni.so.
  2. download the ci build file and do test
  3. pull request to rime/librime
InfinityLoop1308 commented 2 years ago
  1. push your c code to github (fork from this gits, not without cmake version), then ci script will build apk with librime-jni.so.

    1. download the ci build file and do test

    2. pull request to rime/librime

Sorry but I can just find APKs in Artifacts, where can I find the built .so file?

tumuyan commented 2 years ago

APK is a zip package, so you can unzip the apk file directly

InfinityLoop1308 commented 2 years ago

everything works properly now. Thanks.

This repo should be referred in the README or a pinned issue at least.

BTW I think this should be considered and discussed.