fix windows build

This commit is contained in:
2024-11-17 21:22:55 +08:00
parent 458bc261f3
commit a1d1f504bd
3 changed files with 14 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
import subprocess
import os
import httpx
file = open('pubspec.yaml', 'r')
content = file.read()
@@ -26,6 +27,13 @@ file = open('windows/build.iss', 'w')
file.write(newContent)
file.close()
if not os.path.exists("windows/ChineseSimplified.isl"):
# download ChineseSimplified.isl
url = "https://raw.githubusercontent.com/kira-96/Inno-Setup-Chinese-Simplified-Translation/refs/heads/main/ChineseSimplified.isl"
response = httpx.get(url)
with open('windows/ChineseSimplified.isl', 'wb') as file:
file.write(response.content)
subprocess.run(["iscc", "windows/build.iss"], shell=True)
with open('windows/build.iss', 'w') as file: