add Windows on ARM

This commit is contained in:
Alex Xu
2026-09-23 17:09:01 -07:00
parent bed9382aab
commit 116078969e
2 changed files with 10 additions and 2 deletions
+3 -2
View File
@@ -25,7 +25,8 @@ jobs:
build:
strategy:
matrix:
entry: [ kcc, kcc-c2e, kcc-c2p ]
entry: [ kcc, kcc-c2e, kcc-c2p, kcc-arm ]
os: [ windows-latest, windows-11-arm ]
include:
- entry: kcc
command: build_binary
@@ -33,7 +34,7 @@ jobs:
command: build_c2e
- entry: kcc-c2p
command: build_c2p
runs-on: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Set up Python
+7
View File
@@ -47,8 +47,11 @@ class BuildBinaryCommand(setuptools.Command):
os.system(f'appdmg kcc.json dist/kcc_macos_{platform.processor()}_{VERSION}.dmg')
sys.exit(0)
elif sys.platform == 'win32':
print(platform.processor())
if os.getenv('WINDOWS_7'):
os.system('pyinstaller --hidden-import=_cffi_backend -y -F -i icons\\comic2ebook.ico -n kcc_win7_legacy_' + VERSION + ' -w --noupx kcc.py')
elif platform.machine() == 'arm64':
os.system(f'pyinstaller --hidden-import=_cffi_backend -y -F -i icons\\comic2ebook.ico -n KCC_{platform.machine()}_' + VERSION + ' -w --noupx kcc.py')
else:
os.system('pyinstaller --hidden-import=_cffi_backend -y -F -i icons\\comic2ebook.ico -n KCC_' + VERSION + ' -w --noupx kcc.py')
sys.exit(0)
@@ -80,6 +83,8 @@ class BuildC2ECommand(setuptools.Command):
elif sys.platform == 'win32':
if os.getenv('WINDOWS_7'):
os.system('pyinstaller --hidden-import=_cffi_backend -y -F -i icons\\comic2ebook.ico -n kcc_c2e_win7_legacy_' + VERSION + ' -c --noupx kcc-c2e.py')
elif platform.machine() == 'arm64':
os.system(f'pyinstaller --hidden-import=_cffi_backend -y -F -i icons\\comic2ebook.ico -n kcc_{platform.machine()}_c2e_' + VERSION + ' -c --noupx kcc-c2e.py')
else:
os.system('pyinstaller --hidden-import=_cffi_backend -y -F -i icons\\comic2ebook.ico -n kcc_c2e_' + VERSION + ' -c --noupx kcc-c2e.py')
sys.exit(0)
@@ -112,6 +117,8 @@ class BuildC2PCommand(setuptools.Command):
elif sys.platform == 'win32':
if os.getenv('WINDOWS_7'):
os.system('pyinstaller --hidden-import=_cffi_backend -y -F -i icons\\comic2ebook.ico -n kcc_c2p_win7_legacy_' + VERSION + ' -c --noupx kcc-c2p.py')
elif platform.machine() == 'arm64':
os.system(f'pyinstaller --hidden-import=_cffi_backend -y -F -i icons\\comic2ebook.ico -n kcc_{platform.machine()}_c2p_' + VERSION + ' -c --noupx kcc-c2p.py')
else:
os.system('pyinstaller --hidden-import=_cffi_backend -y -F -i icons\\comic2ebook.ico -n kcc_c2p_' + VERSION + ' -c --noupx kcc-c2p.py')
sys.exit(0)