Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
yamahubuki committed Aug 21, 2024
1 parent 55b7241 commit 01cf0a3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/testAndBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
run: |
python -m pip install -r requirements.txt
- name: download gettext tools
run: python tools\download_gettext\download_gettext.py

- name: Test
run: |
echo no tests
Expand Down
32 changes: 32 additions & 0 deletions tools/download_gettext.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import urllib.request
import glob
import os
import shutil
import zipfile

def downloadGettext():
remoteFile = "gettext0.21-iconv1.16-static-64.zip"
url = "https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/%s" % remoteFile
print("Downloading gettext tools from %s" % url)
urllib.request.urlretrieve(url, "gettext.zip")
print("Extracting gettext...")
with zipfile.ZipFile("gettext.zip", "r") as zip:
lst = zip.namelist()
for item in lst:
if item.startswith("bin/"):
print("extracting %s" % item)
zip.extract(item)
# end extract
# end for
# end with
print("moving tools to current directory...")
for item in glob.glob("bin/*"):
print("moving %s" % item)
shutil.move(item, ".")
# end for
print("removing temporary files...")
shutil.rmtree("bin")
os.remove("gettext.zip")
print("got gettext tools!")

downloadGettext()

0 comments on commit 01cf0a3

Please sign in to comment.