mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
fix windows build
This commit is contained in:
17
.github/workflows/main.yml
vendored
17
.github/workflows/main.yml
vendored
@@ -93,25 +93,18 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: install yq
|
- name: install dependencies
|
||||||
run: choco install yq -y
|
run: |
|
||||||
- name: install wget
|
choco install yq -y
|
||||||
run: choco install wget -y
|
pip install httpx
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: "stable"
|
channel: "stable"
|
||||||
flutter-version-file: pubspec.yaml
|
flutter-version-file: pubspec.yaml
|
||||||
architecture: x64
|
architecture: x64
|
||||||
- name: install inno setup
|
|
||||||
run: |
|
|
||||||
choco install innosetup -y
|
|
||||||
$inno_path = "C:\Program Files (x86)\Inno Setup 6"
|
|
||||||
wget "https://raw.githubusercontent.com/kira-96/Inno-Setup-Chinese-Simplified-Translation/refs/heads/main/ChineseSimplified.isl" -OutFile "$inno_path\Languages\ChineseSimplified.isl"
|
|
||||||
- run: flutter pub get
|
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
$inno_path = "C:\Program Files (x86)\Inno Setup 6\"
|
flutter pub get
|
||||||
$env:PATH += ";$inno_path"
|
|
||||||
python windows/build.py
|
python windows/build.py
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
@@ -33,7 +33,7 @@ WizardStyle=modern
|
|||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
|
Name: "chinesesimplified"; MessagesFile: "{#RootPath}\windows\ChineseSimplified.isl"
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
|
import httpx
|
||||||
|
|
||||||
file = open('pubspec.yaml', 'r')
|
file = open('pubspec.yaml', 'r')
|
||||||
content = file.read()
|
content = file.read()
|
||||||
@@ -26,6 +27,13 @@ file = open('windows/build.iss', 'w')
|
|||||||
file.write(newContent)
|
file.write(newContent)
|
||||||
file.close()
|
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)
|
subprocess.run(["iscc", "windows/build.iss"], shell=True)
|
||||||
|
|
||||||
with open('windows/build.iss', 'w') as file:
|
with open('windows/build.iss', 'w') as file:
|
||||||
|
Reference in New Issue
Block a user