Skip to content

Commit

Permalink
create dmg installer for Mac build
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwangwyx committed May 19, 2024
1 parent 5ee3da2 commit d32b39e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/mac_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,22 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Show customtkinter package details
- name: Print Machine Architecture
run: |
pip show customtkinter
uname -m
if [ "$(uname -m)" = "x86_64" ]; then
echo "Running on Intel x86_64 architecture"
elif [ "$(uname -m)" = "arm64" ]; then
echo "Running on ARM64 architecture"
else
echo "Unknown architecture"
fi
- name: Build the executable with PyInstaller
run: |
pyinstaller --noconfirm --onedir --windowed --icon "./cmdcompass/static/icon.icns" --name "CmdCompass" \
--add-data "./cmdcompass/data/man_pages:data" \
--add-data "./cmdcompass/data/man_pages_kv.db:data" \
--add-data "./cmdcompass/static:static" \
--add-data "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/customtkinter:customtkinter" \
--collect-all "tkinterweb" \
Expand All @@ -47,8 +55,17 @@ jobs:
run: |
tar -czvf dist/cmdCompass.tar.gz -C dist cmdCompass.app
- name: Create dmg Installer
run: |
mkdir /tmp/MyApp
cp -R ./dist/CmdCompass.app /tmp/MyApp/
ln -s /Applications /tmp/MyApp/Applications
hdiutil create -volname "CmdCompass" -srcfolder /tmp/MyApp -ov -format UDZO ./dist/CmdCompass.dmg
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: cmdCompass-artifacts
path: dist/cmdCompass.tar.gz
path: |
dist/CmdCompass.tar.gz
dist/CmdCompass.dmg
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## Version 0.9.0 (Beta)

### ADDED
* Create dmg installer for Mac build

### CHANGED

### DEBUGGED


## Version 0.2.0 (Initial Development)

### ADDED
Expand Down

0 comments on commit d32b39e

Please sign in to comment.