Skip to content

Commit c6a67b9

Browse files
WhiredPlanckBambooin
authored andcommitted
chore: update build guides
1 parent 7b30d1d commit c6a67b9

File tree

3 files changed

+142
-44
lines changed

3 files changed

+142
-44
lines changed

README.md

+43-10
Original file line numberDiff line numberDiff line change
@@ -47,49 +47,82 @@ Benefit from the [librime](https://github.com/rime/librime) project by JNI, we a
4747

4848
Your [contribution](CONTRIBUTING.md) are welcome ~ ! :tada:
4949

50-
## Getting Started
50+
## Getting Started for developer
5151

5252
### Prepare
5353

54-
Android SDK should be correctly installed and configured. If you are new to Android development, please install Android Studio.
54+
Android SDK and Android NDK should be correctly installed and configured. If you are new to Android development, please install Android Studio.
5555

5656
### Build
5757

58-
1. Clone this project, please **pay attention** that it would take a while for large-size `boost` submodule. And make sure that you have enough available disk space to hold the source code (about 1.5 GB).
58+
<details>
59+
<summary>Prerequisites for Windows</summary>
5960

60-
```bash
61-
cd $your_folder
62-
git clone --recursive https://github.com/osfans/trime.git
61+
Symbolic links will be created according to current build configurations, developers need:
62+
63+
- Enable [Developer Mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) so that symlinks can be created without administrator privilege.
64+
65+
- Enable symlink support for `git`:
66+
67+
```powershell
68+
git config --global core.symlinks true
69+
```
70+
71+
If you cannot or wouldn't like to enable anything, it doesn't matter. Copying will be used instead when error on creating symbolic links.
72+
73+
</details>
74+
75+
1. Clone this project and fetch all submodules:
76+
77+
```sh
78+
git clone [email protected]:osfans/trime.git
79+
git submodule update --init --recursive
6380
```
6481

65-
2. Debug version without sign:
82+
2. Debug version without signature:
83+
84+
On Linux or macOS, you may run:
6685

6786
```bash
6887
make debug
6988
```
7089

71-
3. Release version with sign:
90+
On Windows, run:
91+
92+
```powershell
93+
.\gradlew assembleDebug
94+
```
95+
96+
3. Release version with signture:
7297

7398
Create `keystore.properties` file which contains following contents for [signing information](https://developer.android.com/studio/publish/app-signing.html):
7499

75-
```bash
100+
```gradle.properties
76101
storePassword=myStorePassword
77102
keyPassword=mykeyPassword
78103
keyAlias=myKeyAlias
79104
storeFile=myStoreFileLocation
80105
```
81106

107+
Then, on Linux or macOS, you may run:
108+
82109
```bash
83110
make release
84111
```
85112

113+
On Windows, run:
114+
115+
```powershell
116+
.\gradlew assembleRelease
117+
```
118+
86119
### Troubleshooting
87120

88121
```
89122
Target "boost_log_setup" links to target "Boost::coroutine" but the target was not found.
90123
```
91124

92-
Run `make clean`.
125+
Run `make clean` on Linux or macOS, or run `.\gradlew clean` on Windows.
93126

94127
Other issues:
95128
1. Try `make clean`

README_sc.md

+42-10
Original file line numberDiff line numberDiff line change
@@ -41,49 +41,81 @@ TRIME 是 Tongwen RIME 或是 ThaeRvInputMEthod 的缩写:
4141

4242
现在欢迎你前来[贡献](CONTRIBUTING.md) ~!:tada:
4343

44-
## 入门
44+
## 开发入门
4545

4646
### 准备
4747

48-
Android SDK 应该已经被安装并且正确配置。如果你还不熟悉 Android 开发,建议安装 Android Studio,它会自动安装并配置 Android 开发环境。
48+
开发者应正确安装配置好 Android SDK 和 Android NDK。如果还不熟悉 Android 开发,建议安装 Android Studio,它会自动安装并配置 Android 开发环境。
4949

5050
### 构建
5151

52-
1. 克隆此项目,请注意由于 `boost` 子模块很大,这会花费一些时间。同时,请确保你的磁盘有足够空间保存源代码(约 1.5 GB);
52+
<details>
53+
<summary>Windows 上的前提条件</summary>
5354

54-
```bash
55-
cd $your_folder
56-
git clone --recursive https://github.com/osfans/trime.git
55+
当前构建配置会使构建过程中创建符号链接,开发者需要:
56+
57+
- 启用[开发者模式](https://learn.microsoft.com/zh-cn/windows/apps/get-started/enable-your-device-for-development) 以在无管理员权限的情况下创建符号链接。
58+
59+
- 启用 `git` 的符号链接支持:
60+
61+
```powershell
62+
git config --global core.symlinks true
63+
```
64+
65+
如果无法或者不想启用上述设置也没关系。构建系统会自动在符号链接创建失败时使用复制代替。
66+
67+
</details>
68+
69+
1. 克隆此项目并拉取所有子模块。
70+
71+
```sh
72+
git clone [email protected]:osfans/trime.git
73+
git submodule update --init --recursive
5774
```
5875

5976
2. 编译调试版本:
6077

78+
Linux 或 macOS 上可执行:
79+
6180
```bash
6281
make debug
6382
```
6483

84+
Windows 上执行:
85+
86+
```powershell
87+
.\gradle :app:assembleDebug
88+
```
89+
6590
3. 编译正式版本:
6691

67-
请创建一个名为 `keystore.properties` 的文件,包含以下内容,注明[签名信息](https://developer.android.com/studio/publish/app-signing.html):
92+
请创建 `keystore.properties` 文件,包含以下内容,注明[签名信息](https://developer.android.com/studio/publish/app-signing.html)
6893

69-
```bash
94+
```gradle.properties
7095
storePassword=myStorePassword
7196
keyPassword=mykeyPassword
7297
keyAlias=myKeyAlias
7398
storeFile=myStoreFileLocation
7499
```
75100

101+
之后,Linux 和 macOS 上可执行:
102+
76103
```bash
77104
make release
78105
```
79106

107+
Windows 上执行:
108+
109+
```powershell
110+
.\gradlew :app:assembleRelease
111+
```
112+
80113
### 故障排除
81114

82115
```
83116
Target "boost_log_setup" links to target "Boost::coroutine" but the target was not found.
84117
```
85-
86-
执行 `make clean`.
118+
在 Linux 或 macOS 上执行 `make clean`,Windows 上执行 `.\gradlew clean`
87119

88120
其他问题:
89121
1. 首先尝试 `make clean`

README_tc.md

+57-24
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
- 穩定版 <br>
1616
[<img alt='Get it on F-Droid' src='https://fdroid.gitlab.io/artwork/badge/get-it-on.png' height='80px'/>](https://f-droid.org/packages/com.osfans.trime)
1717
[<img alt='Google Play 立即下載' src='https://play.google.com/intl/en_us/badges/images/generic/zh-tw_badge_web_generic.png' height='80px'/>](https://play.google.com/store/apps/details?id=com.osfans.trime)
18-
[<img alt='酷安' src='https://static.coolapk.com/static/web/v8/img/icon.png' height='80px'/>](https://www.coolapk.com/apk/com.osfans.trime)
18+
[<img alt='酷安' src='https://static.coolapk.com/static/web/v8/img/icon.png' height='60px'/>](https://www.coolapk.com/apk/com.osfans.trime)
1919

20-
- 測試版 [點擊下載](https://github.com/osfans/trime/actions)
20+
- 測試版 [點選下載](https://github.com/osfans/trime/actions)
2121

2222
- 配置文件 [rimerc](https://github.com/Bambooin/rimerc)
2323

@@ -26,67 +26,100 @@
2626
- 貢獻:[boboIqiqi](https://github.com/boboIqiqi)[Bambooin](https://github.com/Bambooin)[senchi96](https://github.com/senchi96)[heiher](https://github.com/heiher)[abay](https://github.com/a342191555)[iovxw](https://github.com/iovxw)[huyz-git](https://github.com/huyz-git)[tumuyan](https://github.com/tumuyan)[WhiredPlanck](https://github.com/WhiredPlanck)......
2727
- [維基](https://github.com/osfans/trime/wiki)[xiaoqun2016](https://github.com/xiaoqun2016)[boboIqiqi](https://github.com/boboIqiqi)......
2828
- 翻譯:天真可愛的滿滿(繁體中文)、點解(英文)......
29-
- 鍵盤:天真可愛的滿滿、皛筱晓小笨鱼、吴琛11、熊貓阿Bo、默默ㄇㄛˋ......
29+
- 鍵盤:天真可愛的滿滿、皛筱曉小笨魚、吳琛11、熊貓阿Bo、默默ㄇㄛˋ......
3030
- 捐贈:[Releases](https://github.com/osfans/trime/releases) 中的“打賞”實時更新
31-
- 社區:在 [Issues](https://github.com/osfans/trime/issues)[QQ (811142286)](https://jq.qq.com/?_wv=1027&k=AXdR80HN)[QQ (458845988)](https://jq.qq.com/?_wv=1027&k=n6xT4G3q)[酷安](http://www.coolapk.com/apk/com.osfans.trime)[Google Play](https://play.google.com/store/apps/details?id=com.osfans.trime)[貼吧](http://tieba.baidu.com/f?kw=rime)中反饋意見的網友
32-
- 項目[RIME][OpenCC][注音倉頡輸入法]等開源項目
31+
- 社群:在 [Issues](https://github.com/osfans/trime/issues)[QQ (811142286)](https://jq.qq.com/?_wv=1027&k=AXdR80HN)[QQ (458845988)](https://jq.qq.com/?_wv=1027&k=n6xT4G3q)[酷安](http://www.coolapk.com/apk/com.osfans.trime)[Google Play](https://play.google.com/store/apps/details?id=com.osfans.trime)[貼吧](http://tieba.baidu.com/f?kw=rime)中反饋意見的網友
32+
- 專案[RIME][OpenCC][注音倉頡輸入法]等開源專案
3333

3434
## 沿革
35-
TRIME 是 Tongwen RIME 或是 ThaeRvInputMethod 的縮寫:
36-
- 最初,輸入法是寫給[泰如拼音](http://taerv.nguyoeh.com/ime/)(tae5 rv2)的,中文名爲“泰如輸入法”;
37-
- 然後,添加了吳語等方言碼表,做成了一個輸入法平臺,更名爲“漢字方言輸入法”;
38-
- 後來,兼容了五筆、兩筆等形碼,在太空衛士、徵羽的建議下,更名爲“[同文輸入法平臺 2.x](https://github.com/osfans/trime-legacy)”。寓意音碼形碼同臺,方言官話同文。
39-
- 之後,藉助 JNI 技術,享受了 [librime](https://github.com/rime/librime) 的成果,升級爲“同文輸入法平臺 3.x”,簡稱“同文輸入法”。
35+
TRIME 是 Tongwen RIME 或是 ThaeRvInputMEthod 的縮寫:
36+
37+
- 最初,輸入法是寫給[泰如拼音](http://taerv.nguyoeh.com/ime/)(tae5 rv2)的,中文名為“泰如輸入法”;
38+
- 然後,添加了吳語等方言碼錶,做成了一個輸入法平臺,更名為“漢字方言輸入法”;
39+
- 後來,相容了五筆、兩筆等形碼,在太空衛士、徵羽的建議下,更名為“[同文輸入法平臺 2.x](https://github.com/osfans/trime-legacy)”。寓意音碼形碼同臺,方言官話同文。
40+
- 之後,藉助 JNI 技術,享受了 [librime](https://github.com/rime/librime) 的成果,升級為“同文輸入法平臺 3.x”,簡稱“同文輸入法”。
4041

4142
現在歡迎你前來[貢獻](CONTRIBUTING.md) ~!:tada:
4243

43-
## 入門
44+
## 開發入門
4445

4546
### 準備
4647

47-
Android SDK 應該已經被安裝並且正確配置。如果你還不熟悉 Android 開發,建議安裝 Android Studio,它會自動安裝並配置 Android 開發環境。
48+
開發者應正確安裝配置好 Android SDK 和 Android NDK。如果還不熟悉 Android 開發,建議安裝 Android Studio,它會自動安裝並配置 Android 開發環境。
4849

4950
### 構建
5051

51-
1. 克隆此項目,請注意由於 `boost` 子模塊很大,這會花費一些時間。同時,請確保你的磁盤有足夠空間保存源代碼(約 1.5 GB);
52+
<details>
53+
<summary>Windows 上的前提條件</summary>
5254

53-
```bash
54-
cd $your_folder
55-
git clone --recursive https://github.com/osfans/trime.git
55+
當前構建配置會使構建過程中建立符號連結,開發者需要:
56+
57+
- 啟用[開發者模式](https://learn.microsoft.com/zh-cn/windows/apps/get-started/enable-your-device-for-development) 以在無管理員許可權的情況下建立符號連結。
58+
59+
- 啟用 `git` 的符號連結支援:
60+
61+
```powershell
62+
git config --global core.symlinks true
63+
```
64+
65+
如果無法或者不想啟用上述設定也沒關係。構建系統會自動在符號連結建立失敗時使用複製代替。
66+
67+
</details>
68+
69+
1. 克隆此專案並拉取所有子模組。
70+
71+
```sh
72+
git clone [email protected]:osfans/trime.git
73+
git submodule update --init --recursive
5674
```
5775

58-
2. 編譯調試版本:
76+
2. 編譯除錯版本:
77+
78+
Linux 或 macOS 上可執行:
5979

6080
```bash
6181
make debug
6282
```
6383

84+
Windows 上執行:
85+
86+
```powershell
87+
.\gradle :app:assembleDebug
88+
```
89+
6490
3. 編譯正式版本:
6591

66-
請創建一個名為 keystore.properties 的文件,包含以下內容,註明[簽名信息](https://developer.android.com/studio/publish/app-signing.html):
92+
請建立 `keystore.properties` 檔案,包含以下內容,註明[簽名信息](https://developer.android.com/studio/publish/app-signing.html)
6793

68-
```bash
94+
```gradle.properties
6995
storePassword=myStorePassword
7096
keyPassword=mykeyPassword
7197
keyAlias=myKeyAlias
7298
storeFile=myStoreFileLocation
7399
```
74100

101+
之後,Linux 或 macOS 上可執行:
102+
75103
```bash
76104
make release
77105
```
78106

107+
Windows 上執行:
108+
109+
```powershell
110+
.\gradlew :app:assembleRelease
111+
```
112+
79113
### 故障排除
80114

81115
```
82116
Target "boost_log_setup" links to target "Boost::coroutine" but the target was not found.
83117
```
118+
在 Linux 或 macOS 上執行 `make clean`,Windows 上執行 `.\gradlew clean`
84119

85-
執行 `make clean`.
86-
87-
其它問題:
88-
1. 首先嘗試 `make clean`
89-
2. 確保你的倉庫與最新版本一致。如果你修改了一個或更多的子模塊,請確保它們與當前倉庫版本兼容。
120+
其他問題:
121+
1. 首先嚐試 `make clean`
122+
2. 確保你的倉庫與最新版本一致。如果你修改了一個或更多的子模組,請確保它們與當前倉庫版本相容。
90123
3. 如果問題依然存在(不太可能), 嘗試進行一次新的克隆。
91124
4. 檢查是否有PR/issue與你的問題相關。 如果有的話,嘗試他們的解決方案。
92125
5. 如果以上方法都不工作,你可以提一個issue來尋求幫助(可選)。

0 commit comments

Comments
 (0)