From 4b3cd6882a702817829160761250fa3727a8b135 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Tue, 25 Feb 2025 08:57:40 -0800 Subject: [PATCH] Revert "Build windows GUI version normally without docker" (#835) * Revert "remove GUI windows docker" This reverts commit 4fc5cc9dfbc192faeedb1ffe82807b4e75b937af. * build windows gui version with docker * cffi * bump 7.2.2 --- .../workflows/package-windows-with-docker.yml | 6 +++ kcc.spec | 39 +++++++++++++++++++ kindlecomicconverter/__init__.py | 2 +- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 kcc.spec diff --git a/.github/workflows/package-windows-with-docker.yml b/.github/workflows/package-windows-with-docker.yml index 051ff66..9c639b3 100644 --- a/.github/workflows/package-windows-with-docker.yml +++ b/.github/workflows/package-windows-with-docker.yml @@ -25,6 +25,11 @@ jobs: # - name: build binary # run: | # pyi-makespec -F -i icons\\comic2ebook.ico -n KCC_test -w --noupx kcc.py + - name: Package Application + uses: JackMcKew/pyinstaller-action-windows@main + with: + path: . + spec: ./kcc.spec - name: Package Application uses: JackMcKew/pyinstaller-action-windows@main with: @@ -38,6 +43,7 @@ jobs: - name: rename binaries run: | version_built=$(cat kindlecomicconverter/__init__.py | grep version | awk '{print $3}' | sed "s/[^.0-9b]//g") + mv dist/windows/kcc.exe dist/windows/KCC_${version_built}.exe mv dist/windows/kcc-c2e.exe dist/windows/KCC_c2e_${version_built}.exe mv dist/windows/kcc-c2p.exe dist/windows/KCC_c2p_${version_built}.exe - name: upload build diff --git a/kcc.spec b/kcc.spec new file mode 100644 index 0000000..38f6e3a --- /dev/null +++ b/kcc.spec @@ -0,0 +1,39 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['kcc.py'], + pathex=['.'], + binaries=[], + datas=[], + hiddenimports=['_cffi_backend'], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='kcc', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=False, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None , icon='icons\\comic2ebook.ico') diff --git a/kindlecomicconverter/__init__.py b/kindlecomicconverter/__init__.py index b0b7927..314678b 100644 --- a/kindlecomicconverter/__init__.py +++ b/kindlecomicconverter/__init__.py @@ -1,4 +1,4 @@ -__version__ = '7.2.1' +__version__ = '7.2.2' __license__ = 'ISC' __copyright__ = '2012-2022, Ciro Mattia Gonano , Pawel Jastrzebski , darodi' __docformat__ = 'restructuredtext en'