diff --git a/.github/workflows/release mac.yml b/.github/workflows/release mac.yml new file mode 100644 index 00000000..0645c1f7 --- /dev/null +++ b/.github/workflows/release mac.yml @@ -0,0 +1,73 @@ +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 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: Create DMG + run: | + create-dmg \ + --volname "DeepMind Pokerbot" \ + --window-pos 200 120 \ + --window-size 800 400 \ + --icon-size 100 \ + --icon "DeepMind Pokerbot.app" 200 190 \ + --hide-extension "DeepMind Pokerbot.app" \ + --app-drop-link 600 185 \ + "DeepMindPokerbot.dmg" \ + "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: ./DeepMindPokerbot.dmg + asset_name: DeepMindPokerbot.dmg + asset_content_type: application/octet-stream diff --git a/.github/workflows/release.yml b/.github/workflows/release win.yml similarity index 90% rename from .github/workflows/release.yml rename to .github/workflows/release win.yml index bb68c064..cb50bd6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release win.yml @@ -1,4 +1,4 @@ -name: Binary Release +name: Binary Release Windows on: workflow_dispatch: @@ -31,7 +31,6 @@ jobs: run: | cd poker pyinstaller main.spec - # Add other necessary steps here - name: Prepare distribution run: | @@ -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 @@ -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 diff --git a/readme.rst b/readme.rst index 83be095b..c087f43f 100644 --- a/readme.rst +++ b/readme.rst @@ -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.