Skip to content

Commit

Permalink
Macos release
Browse files Browse the repository at this point in the history
  • Loading branch information
Agent-Hellboy committed May 24, 2024
1 parent d107d5c commit 6da6dcf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 31 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,32 @@ jobs:
python-version: '3.x'

- name: Create virtual environment
run: python -m venv venv
run: python3 -m venv .venv

- name: Activate virtual environment
run: source venv/bin/activate
run: source .venv/bin/activate

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install py2app
python3 -m pip install pillow pyinstaller python-dotenv
- name: Replace import statement
- name: Replace import statement (if necessary)
run: |
sed -i '' 's/from pkg_resources import packaging/import packaging/g' $(python -c "import py2app, os; print(os.path.dirname(py2app.__file__))")/recipes/matplotlib.py
- name: Build py2app application
run: python setup.py py2app
- name: Build PyInstaller application
run: |
pyinstaller --name RstEyeApp --windowed --onefile --add-data "med.gif:." --hidden-import=PIL.ImageTk --additional-hooks-dir=hooks app.py
- name: Zip the application
run: zip -r RstEyeApp.zip dist/app.app
run: |
zip -r RstEyeApp.zip dist/RstEyeApp.app
- name: Upload files to a GitHub release
uses: svenstaro/upload-[email protected]
- name: Upload ZIP file to GitHub release
uses: actions/upload-artifact@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: RstEyeApp.zip
asset_name: RstEyeApp.zip
tag: ${{ github.ref }}
name: RstEyeApp
path: RstEyeApp.zip

publish-ubuntu:
name: Publish for Ubuntu
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,12 @@
- Create Virtual Environment and Install Dependencies
- python3 -m venv .venv
- source .venv/bin/activate
- python3 -m pip install -r requirements.txt
- python3 -m pip install py2app
- python3 -m pip install pillow pyinstaller python-dotenv

- Then run
- sed -i '' 's/from pkg_resources import packaging/import packaging/g' $(python -c "import py2app, os; print(os.path.dirname(py2app.__file__))")/recipes/matplotlib.py

- Build zip folder with app.app
- python3 setup.py py2app
- zip -r RstEyeApp.zip dist/app.app
- run
`pyinstaller --name RstEyeApp --windowed --onefile --add-data "med.gif:." --hidden-import=PIL.ImageTk --additional-hooks-dir=hooks app.py`

- create zip file using `zip -r RstEyeApp.zip dist/RstEyeApp.app`


- Windows
Expand Down
9 changes: 0 additions & 9 deletions requirements.txt

This file was deleted.

0 comments on commit 6da6dcf

Please sign in to comment.