Skip to content

Commit 2823ddc

Browse files
authored
emscripten 5.0.1 !windows (#317)
1 parent ef870b3 commit 2823ddc

File tree

4 files changed

+34
-10
lines changed

4 files changed

+34
-10
lines changed

.emscripten-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.0
1+
5.0.1

.github/workflows/js.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ jobs:
2020
with:
2121
python-version: '3.14'
2222

23+
- name: Check prebuilder js-testing release and fcitx5-js testing release
24+
if: ${{ github.ref != 'refs/heads/master' }}
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
if gh api repos/fcitx-contrib/fcitx5-prebuilder/releases/tags/js-testing > /dev/null 2>&1; then
29+
echo "PREBUILDER_TAG=js-testing" >> $GITHUB_ENV
30+
fi
31+
if gh api repos/fcitx-contrib/fcitx5-js/releases/tags/testing > /dev/null 2>&1; then
32+
echo "JS_TAG=testing" >> $GITHUB_ENV
33+
fi
34+
2335
- name: Install dependencies
2436
run: |
2537
sudo apt install -y ninja-build \
@@ -30,7 +42,7 @@ jobs:
3042
3143
- name: Install Fcitx5 dev package
3244
run: |
33-
wget https://github.com/fcitx-contrib/fcitx5-js/releases/download/latest/fcitx5-js-dev.tar.bz2
45+
wget https://github.com/fcitx-contrib/fcitx5-js/releases/download/${{ env.JS_TAG || 'latest' }}/fcitx5-js-dev.tar.bz2
3446
tar xjf fcitx5-js-dev.tar.bz2 -C build/js/usr
3547
3648
- name: Get emscripten version
@@ -101,9 +113,19 @@ jobs:
101113
name: artifact-js
102114
path: build/js
103115

116+
- name: Check fcitx5-online testing release
117+
if: ${{ github.ref != 'refs/heads/master' }}
118+
shell: bash
119+
env:
120+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
121+
run: |
122+
if gh api repos/fcitx/fcitx5-online/releases/tags/testing > /dev/null 2>&1; then
123+
echo "ONLINE_TAG=testing" >> $GITHUB_ENV
124+
fi
125+
104126
- name: Install dependencies
105127
run: |
106-
curl -LO --output-dir cache https://github.com/fcitx/fcitx5-online/releases/download/latest/fcitx5-online.zip
128+
curl -LO --output-dir cache https://github.com/fcitx/fcitx5-online/releases/download/${{ env.ONLINE_TAG || 'latest' }}/fcitx5-online.zip
107129
curl -LO --output-dir tests/rime https://github.com/rime/librime-predict/releases/download/data-1.0/predict.db
108130
unzip cache/fcitx5-online.zip
109131
npm i -g pnpm

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ elseif (EMSCRIPTEN)
6666
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${SHARED_FLAGS}")
6767
set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${SHARED_FLAGS}")
6868
set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "${SHARED_FLAGS}")
69-
add_compile_options(-fPIC -fexceptions)
69+
add_compile_options(-fPIC -fwasm-exceptions)
7070
list(PREPEND CMAKE_FIND_ROOT_PATH "${FIND_ROOT_PATH}")
7171
option(ENABLE_DATA "" OFF)
7272
option(ENABLE_TOOLS "" OFF)
@@ -118,11 +118,11 @@ target_link_libraries(chttrans "${PREBUILDER_LIB_DIR}/libmarisa.a")
118118
if (EMSCRIPTEN)
119119
target_sources(pinyin PRIVATE libime/tools/libime_pinyindict.cpp)
120120
# Wherever exception is caught there must be explicit link option.
121-
target_link_libraries(pinyin -fexceptions)
122-
target_link_libraries(table -fexceptions)
123-
target_link_libraries(chttrans -fexceptions)
124-
target_link_libraries(pinyinhelper -fexceptions)
125-
target_link_libraries(punctuation -fexceptions)
121+
target_link_libraries(pinyin -fwasm-exceptions)
122+
target_link_libraries(table -fwasm-exceptions)
123+
target_link_libraries(chttrans -fwasm-exceptions)
124+
target_link_libraries(pinyinhelper -fwasm-exceptions)
125+
target_link_libraries(punctuation -fwasm-exceptions)
126126
endif()
127127
endif()
128128

scripts/install-deps.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ EXTRACT_DIR=build/$TARGET/usr
6868
CACHE_DIR=cache/$PLATFORM
6969
mkdir -p $EXTRACT_DIR $CACHE_DIR
7070

71+
PREBUILDER_TAG=${PREBUILDER_TAG:-$PLATFORM}
72+
7173
for dep in "${deps[@]}"; do
7274
file=$dep$POSTFIX.tar.bz2
73-
[[ -f $CACHE_DIR/$file ]] || wget -P $CACHE_DIR https://github.com/fcitx-contrib/fcitx5-prebuilder/releases/download/$PLATFORM/$file
75+
[[ -f $CACHE_DIR/$file ]] || wget -P $CACHE_DIR https://github.com/fcitx-contrib/fcitx5-prebuilder/releases/download/$PREBUILDER_TAG/$file
7476
tar xf $CACHE_DIR/$file -C $EXTRACT_DIR
7577
done
7678

0 commit comments

Comments
 (0)