Skip to content

Commit c7f7e03

Browse files
Bump version to 1.2 and add multi-platform CI/CD support
- Update version from 1.1 to 1.2 in main.py, i18n files, and build.yml - Add Linux and macOS build jobs using Nuitka - Configure Git LFS for Content and pak resource directories - Update release workflow to package all platforms - Include resource files in release packages
1 parent ca0c64f commit c7f7e03

3,777 files changed

Lines changed: 11484 additions & 20 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Git LFS configuration for large resource files
2+
3+
# Content directory - game resources for .NET version
4+
Content/** filter=lfs diff=lfs merge=lfs -text
5+
6+
# pak directory - packed resources
7+
pak/** filter=lfs diff=lfs merge=lfs -text

.github/workflows/build.yml

Lines changed: 158 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Lint
1+
name: Build and Release
22

33
on:
44
push:
@@ -33,12 +33,14 @@ jobs:
3333
python -c "import glob, py_compile, os; [py_compile.compile(f, doraise=True) for f in glob.glob('ui/**/*.py', recursive=True)]"
3434
python -c "import glob, py_compile, os; [py_compile.compile(f, doraise=True) for f in glob.glob('SexyUIExtensions/**/*.py', recursive=True)]"
3535
36-
build:
36+
build-windows:
3737
name: Windows Build (Nuitka)
3838
runs-on: windows-latest
3939
needs: lint
4040
steps:
4141
- uses: actions/checkout@v4
42+
with:
43+
lfs: true
4244

4345
- name: Set up Python 3.11
4446
uses: actions/setup-python@v5
@@ -58,7 +60,7 @@ jobs:
5860
--company-name=StackAndPointer --product-name=SexyUIEditor^
5961
--file-description="SexyUI ^& PVZ UI Editor"^
6062
--copyright="Copyright (C) 2026 StackAndPointer"^
61-
--file-version=1.1.0.0 --product-version=1.1.0.0^
63+
--file-version=1.2.0.0 --product-version=1.2.0.0^
6264
--windows-icon-from-ico=resources\icons\icon.ico^
6365
--windows-console-mode=disable^
6466
--enable-plugin=pyqt6^
@@ -75,40 +77,182 @@ jobs:
7577
--assume-yes-for-downloads --show-progress main.py
7678
shell: cmd
7779

80+
- name: Copy resource directories
81+
run: |
82+
if (Test-Path "Content") { Copy-Item -Path "Content" -Destination "dist\main.dist\Content" -Recurse }
83+
if (Test-Path "pak") { Copy-Item -Path "pak" -Destination "dist\main.dist\pak" -Recurse }
84+
shell: pwsh
85+
7886
- name: Upload build artifact
7987
uses: actions/upload-artifact@v4
8088
with:
8189
name: SexyUIEditor-Windows
8290
path: dist/main.dist/
8391

92+
build-linux:
93+
name: Linux Build (Nuitka)
94+
runs-on: ubuntu-latest
95+
needs: lint
96+
steps:
97+
- uses: actions/checkout@v4
98+
with:
99+
lfs: true
100+
101+
- name: Set up Python 3.11
102+
uses: actions/setup-python@v5
103+
with:
104+
python-version: "3.11"
105+
106+
- name: Install system dependencies
107+
run: |
108+
sudo apt-get update
109+
sudo apt-get install -y libgl1-mesa-glx libglib2.0-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libxkbcommon-x11-0 libdbus-1-3 libegl1
110+
111+
- name: Install Python dependencies
112+
run: |
113+
python -m pip install --upgrade pip
114+
pip install -r requirements.txt
115+
pip install nuitka
116+
117+
- name: Build with Nuitka
118+
run: |
119+
python -m nuitka --standalone --jobs=$(nproc) \
120+
--output-filename=SexyUIEditor --output-dir=dist \
121+
--company-name=StackAndPointer --product-name=SexyUIEditor \
122+
--file-description="SexyUI & PVZ UI Editor" \
123+
--copyright="Copyright (C) 2026 StackAndPointer" \
124+
--file-version=1.2.0.0 --product-version=1.2.0.0 \
125+
--linux-icon=resources/icons/icon.png \
126+
--enable-plugin=pyqt6 \
127+
--include-package=core --include-package=ui \
128+
--include-data-dir=i18n=i18n \
129+
--include-data-dir=resources=resources \
130+
--include-data-dir=SexyUIExtensions=SexyUIExtensions \
131+
--nofollow-import-to=tkinter --nofollow-import-to=unittest \
132+
--nofollow-import-to=test --nofollow-import-to=tests \
133+
--nofollow-import-to=numpy --nofollow-import-to=pandas \
134+
--nofollow-import-to=scipy --nofollow-import-to=matplotlib \
135+
--nofollow-import-to=PIL --nofollow-import-to=cv2 \
136+
--nofollow-import-to=venv \
137+
--assume-yes-for-downloads --show-progress main.py
138+
139+
- name: Copy resource directories
140+
run: |
141+
if [ -d "Content" ]; then cp -r Content dist/main.dist/; fi
142+
if [ -d "pak" ]; then cp -r pak dist/main.dist/; fi
143+
144+
- name: Upload build artifact
145+
uses: actions/upload-artifact@v4
146+
with:
147+
name: SexyUIEditor-Linux
148+
path: dist/main.dist/
149+
150+
build-macos:
151+
name: macOS Build (Nuitka)
152+
runs-on: macos-latest
153+
needs: lint
154+
steps:
155+
- uses: actions/checkout@v4
156+
with:
157+
lfs: true
158+
159+
- name: Set up Python 3.11
160+
uses: actions/setup-python@v5
161+
with:
162+
python-version: "3.11"
163+
164+
- name: Install Python dependencies
165+
run: |
166+
python -m pip install --upgrade pip
167+
pip install -r requirements.txt
168+
pip install nuitka
169+
170+
- name: Build with Nuitka
171+
run: |
172+
python -m nuitka --standalone --jobs=$(sysctl -n hw.ncpu) \
173+
--output-filename=SexyUIEditor --output-dir=dist \
174+
--company-name=StackAndPointer --product-name=SexyUIEditor \
175+
--file-description="SexyUI & PVZ UI Editor" \
176+
--copyright="Copyright (C) 2026 StackAndPointer" \
177+
--file-version=1.2.0.0 --product-version=1.2.0.0 \
178+
--macos-app-icon=resources/icons/icon.png \
179+
--enable-plugin=pyqt6 \
180+
--include-package=core --include-package=ui \
181+
--include-data-dir=i18n=i18n \
182+
--include-data-dir=resources=resources \
183+
--include-data-dir=SexyUIExtensions=SexyUIExtensions \
184+
--nofollow-import-to=tkinter --nofollow-import-to=unittest \
185+
--nofollow-import-to=test --nofollow-import-to=tests \
186+
--nofollow-import-to=numpy --nofollow-import-to=pandas \
187+
--nofollow-import-to=scipy --nofollow-import-to=matplotlib \
188+
--nofollow-import-to=PIL --nofollow-import-to=cv2 \
189+
--nofollow-import-to=venv \
190+
--assume-yes-for-downloads --show-progress main.py
191+
192+
- name: Copy resource directories
193+
run: |
194+
if [ -d "Content" ]; then cp -r Content dist/main.dist/; fi
195+
if [ -d "pak" ]; then cp -r pak dist/main.dist/; fi
196+
197+
- name: Upload build artifact
198+
uses: actions/upload-artifact@v4
199+
with:
200+
name: SexyUIEditor-macOS
201+
path: dist/main.dist/
202+
84203
release:
85204
name: Create Release on Tag
86205
if: startsWith(github.ref, 'refs/tags/v')
87-
runs-on: windows-latest
88-
needs: build
206+
runs-on: ubuntu-latest
207+
needs: [build-windows, build-linux, build-macos]
89208
steps:
90209
- uses: actions/checkout@v4
91210

92-
- name: Download build artifact
211+
- name: Download Windows artifact
93212
uses: actions/download-artifact@v4
94213
with:
95214
name: SexyUIEditor-Windows
96215
path: SexyUIEditor-Windows
97216

98-
- name: Create ZIP archive
217+
- name: Download Linux artifact
218+
uses: actions/download-artifact@v4
219+
with:
220+
name: SexyUIEditor-Linux
221+
path: SexyUIEditor-Linux
222+
223+
- name: Download macOS artifact
224+
uses: actions/download-artifact@v4
225+
with:
226+
name: SexyUIEditor-macOS
227+
path: SexyUIEditor-macOS
228+
229+
- name: Create ZIP archives
99230
run: |
100-
powershell Compress-Archive -Path SexyUIEditor-Windows\* -DestinationPath SexyUIEditor-${{ github.ref_name }}.zip
231+
cd SexyUIEditor-Windows && zip -r ../SexyUIEditor-${{ github.ref_name }}-Windows.zip . && cd ..
232+
cd SexyUIEditor-Linux && zip -r ../SexyUIEditor-${{ github.ref_name }}-Linux.zip . && cd ..
233+
cd SexyUIEditor-macOS && zip -r ../SexyUIEditor-${{ github.ref_name }}-macOS.zip . && cd ..
101234
102235
- name: Create GitHub Release
103236
uses: softprops/action-gh-release@v2
104237
with:
105-
files: SexyUIEditor-${{ github.ref_name }}.zip
238+
files: |
239+
SexyUIEditor-${{ github.ref_name }}-Windows.zip
240+
SexyUIEditor-${{ github.ref_name }}-Linux.zip
241+
SexyUIEditor-${{ github.ref_name }}-macOS.zip
106242
body: |
107243
SexyUI Editor ${{ github.ref_name }}
108244
109-
### 使用说明
110-
1. 下载 ZIP 并解压
111-
2. 运行 SexyUIEditor.exe
112-
3. 如果需要使用 .NET 版本的资源预览,请手动将 `Content` 和 `pak` 文件夹复制到解压目录
245+
### Downloads
246+
| Platform | File |
247+
|----------|------|
248+
| Windows | SexyUIEditor-${{ github.ref_name }}-Windows.zip |
249+
| Linux | SexyUIEditor-${{ github.ref_name }}-Linux.zip |
250+
| macOS | SexyUIEditor-${{ github.ref_name }}-macOS.zip |
251+
252+
### Usage
253+
1. Download the ZIP for your platform and extract
254+
2. Windows: Run SexyUIEditor.exe
255+
3. Linux/macOS: Run SexyUIEditor (may need `chmod +x SexyUIEditor`)
256+
4. Resource files (Content and pak directories) are included in the package
113257
draft: false
114-
prerelease: false
258+
prerelease: false

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ cython_debug/
126126
# Example files
127127
examples/
128128

129-
# Resource files (too large)
130-
pak/
131-
Content/
129+
# Resource files (managed by Git LFS)
130+
# pak/ and Content/ are now tracked via Git LFS
131+
# Remove from gitignore to allow LFS tracking
132132

133133
# OS files
134134
.DS_Store

Content/Font.xnb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:10101bd46fc8a2f3bd63b489ead0f5527aa41b0ec1cf31789fc0c17d221a4fce
3+
size 21678

Content/LawnStrings_de.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:7fbb34f7943c953804fd19dc7f9e95b8f5e37334b1da7368adf9b3a1646b9cfb
3+
size 101845

Content/LawnStrings_en.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:ef4409a570e7cf401c792351fe96f9e5e4eb83c6d67e468ebf014c76b942f5d5
3+
size 96523

Content/LawnStrings_es.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:19a894324e1d383c358598052c92696fccef12a0913de0396a69343103e3c828
3+
size 98512

Content/LawnStrings_fr.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:d395ee60f09d0e9c052ba216ed5297dff8a593639dd1790a6e2dedd4109d880b
3+
size 101859

Content/LawnStrings_it.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:b2ec4c5344b43f922df21325098539084807f874ea7972d9fc784ddda97c89eb
3+
size 104213

Content/atlas_definitions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:3d1800979041b633109f4267b07bfec615dbdba1dfecf0d1ed07cd591659a9e0
3+
size 240406

0 commit comments

Comments
 (0)