1
0
mirror of https://github.com/ciromattia/kcc synced 2026-05-04 14:52:20 +00:00

Created How to build M1 (markdown)

darodi
2023-06-09 06:22:39 +00:00
parent eb450273a2
commit 8a1024b0de

62
How-to-build-M1.md Normal file

@@ -0,0 +1,62 @@
Originally posted by @celogeek in https://github.com/darodi/kcc/issues/4#issuecomment-1364553511
I figure out a way to build it on M1.
Here the result: https://static.celogeek.com/KCC/M1/KindleComicConverter_osx_5.5.3b17.dmg
So to do that:
I use pyenv.
So for the repo
```
pyenv install 3.9.16
pyenv virtualenv 3.9.16 kindle
pyenv activate kindle
brew install pyqt@5 boost-python3 cmake
export PYTHONPATH=/opt/homebrew/Cellar/pyqt@5/5.15.7_1/lib/python3.9/site-packages
pip install -r requirements.txt
```
You need a m1 compatible version of 7z:
```
git clone https://github.com/p7zip-project/p7zip.git
cd p7zip
git checkout v17.04
make -j4 7z
```
In the bin directory, you will have
```
bin
├── 7z
├── 7z.so
├── 7za
└── Codecs
└── Rar.so
```
Copy and replace those files into other/osx
```
git status
modified: other/osx/7z
modified: other/osx/7z.so
modified: other/osx/Rar.so
```
```
rm -rf dist
python setup.py build_binary
```
You should have in the dist directory the DMG that should works.
To update I think until we have a solution:
```
git stash
git pull
git stash pop
rm -rf dist
python setup.py build_binary
```
Let me know if it works for you.