Skip to content

Commit ba9742f

Browse files
authored
emscripten 4.0.13; selectively enable languages for size !windows (#42)
1 parent 1fb758a commit ba9742f

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

.github/workflows/js.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313
runs-on: ubuntu-24.04
1414
env:
15-
EMSCRIPTEN_VERSION: '4.0.12'
15+
EMSCRIPTEN_VERSION: '4.0.13'
1616
steps:
1717
- uses: actions/checkout@v5
1818
with:
@@ -25,6 +25,11 @@ jobs:
2525
path: libmozc/mozc
2626
ref: ${{ inputs.mozc_sha }}
2727

28+
- uses: actions/checkout@v5
29+
with:
30+
repository: emscripten-core/emsdk
31+
path: emsdk
32+
2833
- uses: actions/setup-python@v5
2934
with:
3035
python-version: '3.13'
@@ -36,9 +41,8 @@ jobs:
3641
pip install -r requirements.txt
3742
3843
- name: Install emsdk
44+
working-directory: emsdk
3945
run: |
40-
git clone https://github.com/emscripten-core/emsdk
41-
cd emsdk
4246
./emsdk install ${{ env.EMSCRIPTEN_VERSION }}
4347
./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}
4448

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
url = https://github.com/PCRE2Project/pcre2
100100
[submodule "xkeyboard-config"]
101101
path = xkeyboard-config
102-
url = https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config.git
102+
url = https://github.com/fcitx-contrib/xkeyboard-config
103103
[submodule "yaml-cpp"]
104104
path = yaml-cpp
105105
url = https://github.com/jbeder/yaml-cpp

scripts/common.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848

4949
HARMONY_NATIVE = '/tmp/command-line-tools/sdk/default/openharmony/native'
5050

51+
ENABLED_LANGUAGES = ['ca', 'da', 'de', 'es', 'fr', 'he', 'ja', 'ko', 'ru', 'vi', 'zh_CN', 'zh_TW']
52+
5153
ar = 'emar' if PLATFORM == 'js' else 'ar'
5254
tar = {
5355
'Linux': 'tar',
@@ -173,8 +175,12 @@ def pre_package(self):
173175

174176
def package(self):
175177
os.chdir(f'{self.dest_dir}{INSTALL_PREFIX}')
176-
# We will see if other packages also need locale be packaged.
177-
if self.name not in ('iso-codes', 'xkeyboard-config'):
178+
# We will see if other packages also need locale be packaged, or enable more languages.
179+
if self.name in ('iso-codes', 'xkeyboard-config'):
180+
for code in os.listdir('share/locale'):
181+
if code not in ENABLED_LANGUAGES:
182+
ensure('rm', ['-rf', f'share/locale/{code}'])
183+
else:
178184
ensure('rm', ['-rf', 'share/locale'])
179185
ensure(tar, ['cj',
180186
'--sort=name', '--mtime=@0',

0 commit comments

Comments
 (0)