Skip to content

WIndow Orientation

WIndow Orientation #69

Workflow file for this run

name: Build Application with PyInstaller on Mac
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
name: Check out the repository code
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Print Machine Architecture
run: |
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" \
--distpath "./dist" \
"./cmdcompass/main.py"
- name: Delay for filesystem
run: sleep 15
- name: Clean dist
run: |
rm -rf dist/cmdCompass/
- name: Create tar.gz Archive
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
dist/CmdCompass.dmg