mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 09:46:25 +00:00
prepare m1 build pipeline (#669)
This commit is contained in:
7
.github/workflows/package-macos.yml
vendored
7
.github/workflows/package-macos.yml
vendored
@@ -23,7 +23,10 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macos-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ macos-latest, macos-14 ]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
@@ -77,7 +80,7 @@ jobs:
|
|||||||
- name: upload build
|
- name: upload build
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: mac-os-build
|
name: mac-os-build-${{ runner.arch }}
|
||||||
path: dist/*.dmg
|
path: dist/*.dmg
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ jobs:
|
|||||||
- name: rename binaries
|
- name: rename binaries
|
||||||
run: |
|
run: |
|
||||||
version_built=$(cat kindlecomicconverter/__init__.py | grep version | awk '{print $3}' | sed "s/[^.0-9b]//g")
|
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.exe dist/windows/KCC_${version_built}.exe
|
||||||
mv dist/windows/kcc-c2e.exe dist/windows/kcc_c2e_${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
|
mv dist/windows/kcc-c2p.exe dist/windows/KCC_c2p_${version_built}.exe
|
||||||
- name: upload build
|
- name: upload build
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -39,8 +39,9 @@ If you find **KCC** valuable you can consider donating to the authors:
|
|||||||
Click on **Assets** of the latest release.
|
Click on **Assets** of the latest release.
|
||||||
|
|
||||||
You probably want either
|
You probably want either
|
||||||
- `kcc_*.*.*.exe` (Windows)
|
- `KCC_*.*.*.exe` (Windows)
|
||||||
- `KindleComicConverter_osx_*.*.*.dmg` (Mac)
|
- `kcc_macos_arm_*.*.*.dmg` (recent Mac with Apple Silicon M1 chip or later)
|
||||||
|
- `kcc_macos_i386_*.*.*.dmg` (older Mac with Intel chip)
|
||||||
|
|
||||||
The `c2e` and `c2p` versions are command line tools for power users.
|
The `c2e` and `c2p` versions are command line tools for power users.
|
||||||
|
|
||||||
|
|||||||
3
setup.py
3
setup.py
@@ -11,6 +11,7 @@ Create EXE/APP:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
import sys
|
import sys
|
||||||
import setuptools
|
import setuptools
|
||||||
import distutils.cmd
|
import distutils.cmd
|
||||||
@@ -38,7 +39,7 @@ class BuildBinaryCommand(distutils.cmd.Command):
|
|||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
os.system('pyinstaller -y -D -i icons/comic2ebook.icns -n "Kindle Comic Converter" -w -s kcc.py')
|
os.system('pyinstaller -y -D -i icons/comic2ebook.icns -n "Kindle Comic Converter" -w -s kcc.py')
|
||||||
# TODO /usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime dist/Applications/Kindle\ Comic\ Converter.app -v
|
# TODO /usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" --options runtime dist/Applications/Kindle\ Comic\ Converter.app -v
|
||||||
os.system('appdmg kcc.json dist/KindleComicConverter_osx_' + VERSION + '.dmg')
|
os.system(f'appdmg kcc.json dist/kcc_macos_{platform.processor()}_{VERSION}.dmg')
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
elif sys.platform == 'win32':
|
elif sys.platform == 'win32':
|
||||||
os.system('pyinstaller -y -F -i icons\\comic2ebook.ico -n KCC_' + VERSION + ' -w --noupx kcc.py')
|
os.system('pyinstaller -y -F -i icons\\comic2ebook.ico -n KCC_' + VERSION + ' -w --noupx kcc.py')
|
||||||
|
|||||||
Reference in New Issue
Block a user