Skip to content

Commit

Permalink
add mac release
Browse files Browse the repository at this point in the history
  • Loading branch information
dickreuter committed Jan 11, 2024
1 parent 3a48dc2 commit 913b990
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 8 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/release mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Binary Release for MacOS

on:
workflow_dispatch:

jobs:
build:
runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip

- name: Install dependencies
run: pip install -r requirements.txt

- name: Run PyInstaller for MacOS
run: |
cd poker
pyinstaller --noconfirm --clean --distpath dist/main main.spec
- name: Prepare distribution for MacOS
run: |
cd poker
mkdir -p dist/main/log
mkdir -p dist/main/pics
mkdir -p dist/main/log/screenshots
cp icon.ico dist/main/poker.ico
cp config_default.ini dist/main/config.ini
cp -r vboxapi dist/main/vboxapi/
- name: Install create-dmg
run: npm install -g create-dmg

- name: List contents of PyInstaller output directory
run: |
ls -l /Users/runner/work/Poker/Poker/dist/main/
- name: Create DMG
run: |
create-dmg "/Users/runner/work/Poker/Poker/dist/main/DeepMindPokerbot.dmg" "/Users/runner/work/Poker/Poker/dist/main/"
- name: Create Release for MacOS
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: DeepermindPokerbot-mac-${{ github.run_number }}
release_name: Mac Release ${{ github.run_number }}
draft: false
prerelease: false

- name: Upload DMG to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /Users/runner/work/Poker/Poker/dist/main/DeepMindPokerbot.dmg
asset_name: DeepMindPokerbot.dmg
asset_content_type: application/octet-stream

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Binary Release
name: Binary Release Windows

on:
workflow_dispatch:
Expand Down Expand Up @@ -31,7 +31,6 @@ jobs:
run: |
cd poker
pyinstaller main.spec
# Add other necessary steps here
- name: Prepare distribution
run: |
Expand All @@ -43,11 +42,6 @@ jobs:
xcopy config_default.ini dist\main\config.ini* /Y
xcopy vboxapi dist\main\vboxapi\ /E
- name: Show content
run: |
cd poker
dir dist\main
- name: Install NSIS
run: |
choco install nsis
Expand All @@ -63,7 +57,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: DeepermindPokerbot-${{ github.run_number }}
release_name: Release ${{ github.run_number }}
release_name: Windows Release ${{ github.run_number }}
draft: false
prerelease: false

Expand Down
1 change: 1 addition & 0 deletions readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ Running via python source code
------------------------------
- Download pycharm communite edition as an IDE from here: https://www.jetbrains.com/pycharm/download/#section=windows
- Install anaconda https://www.anaconda.com/products/distribution
- Download tesserocr: https://github.com/simonflueckiger/tesserocr-windows_build/releases/download/tesserocr-v2.6.0-tesseract-5.3.1/tesserocr-2.6.0-cp311-cp311-win_amd64.whl -Out tesserocr-2.6.0-cp311-cp311-win_amd64.whl and install the whleel file with pip install
- Create an environment with ``pip install -r requirements.txt`` and separately run pip install tesserocr
- You also may need to get c++ runtime distributable: https://visualstudio.microsoft.com/downloads/
- Install virtualbox from https://www.virtualbox.org/wiki/Downloads and put the poker client into the virtual box. That way it can be controlled without having to use the mouse in your main window.
Expand Down

0 comments on commit 913b990

Please sign in to comment.