Skip to content

Commit dee3548

Browse files
authored
Merge pull request #827 from zonble/master
Updates the build script for McBopomofo.
2 parents 2efd45e + 304001c commit dee3548

File tree

9 files changed

+68
-2
lines changed

9 files changed

+68
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [main]
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
submodules: 'true'
15+
- name: Use Node.js 21.x
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 21.x
19+
- name: Use Install NSIS
20+
uses: repolevedavaj/install-nsis@v1.0.1
21+
with:
22+
nsis-version: 3.08
23+
- name: Run build.bat
24+
run: |
25+
.\build.bat
26+
- name: Build the installer
27+
run: |
28+
cmd /C "C:\Program Files (x86)\NSIS\Bin\makensis.exe" ".\installer\installer.nsi"
29+
- uses: actions/upload-artifact@v4
30+
with:
31+
name: Installer
32+
path: installer/*.exe

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.vs
2+
build
3+
build64
4+
node/input_methods/McBopomofo
5+
installer/*.exe

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
[submodule "libchewing"]
1414
path = libchewing
1515
url = https://github.com/chewing/libchewing.git
16+
[submodule "McBopomofoWeb"]
17+
path = McBopomofoWeb
18+
url = git@github.com:openvanilla/McBopomofoWeb.git

McBopomofoWeb

Submodule McBopomofoWeb added at 3b0819a

build.bat

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
cmake . -Bbuild -G"Visual Studio 14 2015"
1+
cmake . -Bbuild -G "Visual Studio 17 2022" -A Win32
22
cmake --build build --config Release
33

4-
cmake . -Bbuild64 -G"Visual Studio 14 2015 Win64"
4+
cmake . -Bbuild64 -G "Visual Studio 17 2022" -A x64
55
cmake --build build64 --config Release --target PIMETextService
6+
7+
echo "Start building McBopomofo"
8+
cd McBopomofoWeb
9+
cmd /C npm install
10+
cmd /C npm run build:pime
11+
cd ..
12+
13+
echo "Copy McBopomofo to node\input_methods\McBopomofo"
14+
cmd /C rd /s /q node\input_methods\McBopomofo
15+
cmd /C mkdir node\input_methods\McBopomofo
16+
cmd /C xcopy /s /q /y /f McBopomofoWeb\output\pime node\input_methods\McBopomofo\.

installer/installer.nsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,13 @@ SectionGroupEnd
506506

507507
SectionGroup /e $(NODE_SECTION_GROUP) node_section_group
508508
SectionGroup /e $(NODE_CHT_SECTION_GROUP) node_cht_section_group
509+
Section $(MCBOPOMOFO) McBopomofo
510+
SectionIn 2
511+
SetOutPath "$INSTDIR\node\input_methods\McBopomofo"
512+
File /r "..\node\input_methods\McBopomofo\*.*"
513+
StrCpy $INST_NODE "True"
514+
SectionEnd
515+
509516
Section $(EMOJIME) emojime
510517
SectionIn 2
511518
SetOutPath "$INSTDIR\node\input_methods\emojime"
@@ -648,6 +655,7 @@ SectionEnd
648655
!insertmacro MUI_DESCRIPTION_TEXT ${chephonetic} $(chephonetic_DESC)
649656
!insertmacro MUI_DESCRIPTION_TEXT ${cheez} $(cheez_DESC)
650657
!insertmacro MUI_DESCRIPTION_TEXT ${rime} $(rime_DESC)
658+
!insertmacro MUI_DESCRIPTION_TEXT ${mcbopomofo} $(mcbopomofo_DESC)
651659
!insertmacro MUI_DESCRIPTION_TEXT ${emojime} $(emojime_DESC)
652660
!insertmacro MUI_DESCRIPTION_TEXT ${cheeng} $(cheeng_DESC)
653661
!insertmacro MUI_DESCRIPTION_TEXT ${braille_chewing} $(braille_chewing_DESC)

installer/locale/English.nsh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
!insertmacro LANG_STRING CHEPHONETIC "Phonetic"
3838
!insertmacro LANG_STRING CHEEZ "EZ Input"
3939
!insertmacro LANG_STRING RIME "Rime"
40+
!insertmacro LANG_STRING MCBOPOMOFO "McBopomofo"
4041
!insertmacro LANG_STRING EMOJIME "emojime"
4142
!insertmacro LANG_STRING CHEENG "Eng-Num"
4243
!insertmacro LANG_STRING BRAILLE_CHEWING "Braille Chewing"
@@ -61,6 +62,7 @@
6162
!insertmacro LANG_STRING chephonetic_DESC "Install Phonetic input method module."
6263
!insertmacro LANG_STRING cheez_DESC "Install EZ Input method module."
6364
!insertmacro LANG_STRING rime_DESC "Install Rime input method engine, 内含拼音、注音、仓颉、五笔、粤拼、吴语等数种输入方案。"
65+
!insertmacro LANG_STRING mcbopomofo_DESC "Install McBopomofo input method module."
6466
!insertmacro LANG_STRING emojime_DESC "Install emojime input method module."
6567
!insertmacro LANG_STRING cheeng_DESC "Install Eng-Num input method module."
6668
!insertmacro LANG_STRING braille_chewing_DESC "Install Braille Chewing input method module."

installer/locale/SimpChinese.nsh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
!insertmacro LANG_STRING CHEPHONETIC 注音
3838
!insertmacro LANG_STRING CHEEZ 轻松
3939
!insertmacro LANG_STRING RIME 中州韵
40+
!insertmacro LANG_STRING MCBOPOMOFO 小麦注音
4041
!insertmacro LANG_STRING EMOJIME emojime
4142
!insertmacro LANG_STRING CHEENG 英数
4243
!insertmacro LANG_STRING BRAILLE_CHEWING "盲文酷音"
@@ -61,6 +62,7 @@
6162
!insertmacro LANG_STRING chephonetic_DESC "安装注音输入法模块。"
6263
!insertmacro LANG_STRING cheez_DESC "安装轻松输入法模块。"
6364
!insertmacro LANG_STRING rime_DESC "安装中州韵输入法引擎,内含拼音、注音、仓颉、五笔、粤拼、吴语等数种输入方案。"
65+
!insertmacro LANG_STRING mcbopomofo_DESC "安装小麦注音输入法模块。"
6466
!insertmacro LANG_STRING emojime_DESC "安装 emojime 输入法模块。"
6567
!insertmacro LANG_STRING cheeng_DESC "安装英数输入法模块。"
6668
!insertmacro LANG_STRING braille_chewing_DESC "安装盲文酷音输入法模块。"

installer/locale/TradChinese.nsh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
!insertmacro LANG_STRING CHEPHONETIC 注音
3838
!insertmacro LANG_STRING CHEEZ 輕鬆
3939
!insertmacro LANG_STRING RIME 中州韻
40+
!insertmacro LANG_STRING MCBOPOMOFO 小麥注音
4041
!insertmacro LANG_STRING EMOJIME emojime
4142
!insertmacro LANG_STRING CHEENG 英數
4243
!insertmacro LANG_STRING BRAILLE_CHEWING "點字酷音"
@@ -61,6 +62,7 @@
6162
!insertmacro LANG_STRING chephonetic_DESC "安裝注音輸入法模組。"
6263
!insertmacro LANG_STRING cheez_DESC "安裝輕鬆輸入法模組。"
6364
!insertmacro LANG_STRING rime_DESC "安裝中州韻輸入法引擎,內含拼音、注音、倉頡、五筆、粵拼、吳語等數種輸入方案。"
65+
!insertmacro LANG_STRING mcbopomofo_DESC "安裝小麥注音輸入法模組。"
6466
!insertmacro LANG_STRING emojime_DESC "安裝 emojime 輸入法模組。"
6567
!insertmacro LANG_STRING cheeng_DESC "安裝英數輸入法模組。"
6668
!insertmacro LANG_STRING braille_chewing_DESC "安裝點字酷音輸入法模組。"

0 commit comments

Comments
 (0)