Skip to content

Commit c8f7713

Browse files
committed
complete build
1 parent 5a183bc commit c8f7713

File tree

10 files changed

+38
-11
lines changed

10 files changed

+38
-11
lines changed

.DS_Store

-4 KB
Binary file not shown.

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
build:
1111
name: Build wxPython
12-
runs-on: macos-15
12+
runs-on: self-hosted
1313
if: github.repository_owner == 'pyquick'
1414
permissions:
1515
contents: write
@@ -28,6 +28,8 @@ jobs:
2828
run: |
2929
./build_nk.command
3030
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3 patch.py
31+
/Library/Frameworks/Python.framework/Versions/3.13/bin/python3
32+
3133
- name: Create (Pre-)Release on Push
3234
if: github.event_name == 'push'
3335
uses: softprops/action-gh-release@v2
@@ -37,7 +39,7 @@ jobs:
3739
body: ${{ github.event.head_commit.message }}
3840
prerelease: true
3941
files: |
40-
./dist/gui_converter.app
42+
./dist/gui_converter.zip
4143
4244
4345
0 Bytes
Binary file not shown.

__pycache__/patch.cpython-313.pyc

2.22 KB
Binary file not shown.

build_nk.command

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ python3.13 -m nuitka \
8181
--standalone \
8282
--enable-plugin=no-qt \
8383
--macos-create-app-bundle \
84+
--macos-app-version=1.0 \
8485
--macos-app-icon="$PROJECT_DIR/support/Success.icns" \
8586
--include-data-dir="$PROJECT_DIR/support=support" \
8687
--output-dir="$DIST_DIR" \
@@ -96,6 +97,7 @@ if [ $BUILD_SUCCESS -eq 0 ]; then
9697
--standalone \
9798
--macos-create-app-bundle \
9899
--enable-plugin=no-qt \
100+
--macos-app-version=1.0 \
99101
--macos-app-icon="$PROJECT_DIR/support/Success.icns" \
100102
--include-data-dir="$PROJECT_DIR/support=support" \
101103
--output-dir="$DIST_DIR" \
@@ -112,6 +114,7 @@ if [ $BUILD_SUCCESS -eq 0 ]; then
112114
--enable-plugin=no-qt \
113115
--include-data-dir="$PROJECT_DIR/support=support" \
114116
--output-dir="$DIST_DIR" \
117+
--macos-app-version=1.0 \
115118
"$PROJECT_DIR/gui_converter.py" && BUILD_SUCCESS=1
116119
fi
117120

build.py renamed to build_nk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
shutil.rmtree("dist")
99
except:
1010
pass
11-
print(subprocess.run("pyinstaller convert.spec",shell=True,capture_output=True,text=True))
11+
subprocess.run("./build_nk.command",shell=True,capture_output=True,text=True,stdout=True)
1212
import patch

build_pyi.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import subprocess,shutil
2+
3+
try:
4+
shutil.rmtree("build")
5+
except :
6+
pass
7+
try:
8+
shutil.rmtree("dist")
9+
except:
10+
pass
11+
subprocess.run("pyinstaller convert.spec",shell=True,capture_output=True,text=True,stdout=True)
12+
import patch

buildzip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import convertzip
2+
print("Building Zip")
3+
convertzip.create_zip("./dist/gui_converter.zip",["./dist/gui_converter.app"])

setup_ccache.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ def setup_ccache():
1818

1919
# Define paths
2020
ccache_version = "v4.2.1"
21-
ccache_url = f"https://nuitka.net/ccache/{ccache_version}/ccache-{ccache_version}.zip"
21+
version="4.2.1"
22+
ccache_url = f"https://nuitka.net/ccache/{ccache_version}/ccache-{version}.zip"
2223
cache_dir = f"/Users/{username}/Library/Caches/Nuitka/downloads/ccache/{ccache_version}"
2324
zip_path = os.path.join(cache_dir, f"ccache-{ccache_version}.zip")
2425

zip_gui.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ZipGUI:
3838
def __init__(self, root):
3939
self.root = root
4040
self.root.title("ZIP File Processing Tool")
41-
self.root.geometry("600x500")
41+
# self.root.geometry("600x500")
4242
self.root.resizable(True, True)
4343

4444
# Variables
@@ -223,13 +223,19 @@ def create_list_tab(self):
223223

224224
# Browse methods for Create tab
225225
def browse_create_output(self):
226-
filename = filedialog.asksaveasfilename(
227-
title="Save ZIP file",
228-
defaultextension=".zip",
229-
filetypes=[("ZIP files", "*.zip"), ("All files", "*.*")]
226+
folder = filedialog.askdirectory(
227+
title="Select output folder for ZIP file"
230228
)
231-
if filename:
232-
self.create_output_path.set(filename)
229+
if folder:
230+
# 询问用户输入ZIP文件名
231+
filename = filedialog.asksaveasfilename(
232+
title="Save ZIP file as",
233+
initialdir=folder,
234+
defaultextension=".zip",
235+
filetypes=[("ZIP files", "*.zip"), ("All files", "*.*")]
236+
)
237+
if filename:
238+
self.create_output_path.set(filename)
233239

234240
def add_source_files(self):
235241
filenames = filedialog.askopenfilenames(

0 commit comments

Comments
 (0)