tried to get double click execution working for windows #23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Package Game | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - 'master' | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check-out repository | |
| uses: actions/checkout@v3 | |
| with: | |
| path: "./Game/Data" | |
| - name: install dep and finishing up | |
| run: | | |
| sudo apt-get install python3 python3-venv | |
| cd Game/Data | |
| python3 -m venv venvFolder | |
| venvFolder/bin/python3 -m pip install -r requirements.txt | |
| venvFolder/bin/python3 -m pip install pyinstaller | |
| venvFolder/bin/pyinstaller executeMe.py | |
| cd ../../ | |
| mkdir OfMiceAndMechs | |
| mkdir OfMiceAndMechs/internal/ | |
| cp -r Game/Data/dist/executeMe/* OfMiceAndMechs/internal/ | |
| cp -r Game/Data/scaled_* OfMiceAndMechs/internal/ | |
| cp -r Game/Data/data/ OfMiceAndMechs/internal/ | |
| cp -r Game/Data/config/ OfMiceAndMechs/internal/ | |
| cp -r Game/Data/README.md OfMiceAndMechs/internal/ | |
| cp -r Game/Data/sounds/ OfMiceAndMechs/internal/ | |
| echo "cd internal" > OfMiceAndMechs/internal/launch_game.sh | |
| echo "./executeMe" >> OfMiceAndMechs/internal/launch_game.sh | |
| echo "[Desktop Entry]" > OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "# The type as listed above" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "Type=Application" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "# The version of the desktop entry specification to which this file conforms" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "Version=1.0" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "# The name of the application" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "Name=OfMiceAndMechs" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "# A comment which can/will be used as a tooltip" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "Comment=An adventure game" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "# The executable of the application, possibly with arguments." >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "Exec=./internal/launch_game.sh" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "# The name of the icon that will be used to display this entry" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "Icon=./internal/pseudo_logo.png" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "# Describes whether this application needs to be run in a terminal or not" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "Terminal=false" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "# Describes the categories in which this entry should be shown" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "Categories=Game;" >> OfMiceAndMechs/OfMiceAndMechs.desktop | |
| echo "To start the game double click the OfMiceAndMechs.desktop file." > OfMiceAndMechs/README.txt | |
| echo "alternatively double click the executeMe file in the internal folder or run the launch_game.sh" >> OfMiceAndMechs/README.txt | |
| echo "if all that fails consult the instructions on https://github.com/MarxMustermann/OfMiceAndMechs/blob/master/INSTALL.md" >> OfMiceAndMechs/README.txt | |
| chmod +x OfMiceAndMechs/launch_game.sh | |
| tar -czf OfMiceAndMechs-Linux.tar.gz OfMiceAndMechs | |
| # - name: Upload Artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: OfMiceAndMechs-Linux | |
| # path: | | |
| # /Game/* | |
| # compression-level: 9 | |
| - name: Create Release | |
| run: | | |
| cp ./OfMiceAndMechs-Linux.tar.gz Game/Data/ | |
| cd Game/Data/ | |
| revision="$(git rev-parse --short HEAD)" | |
| echo $revision | |
| gh release upload Dev-$revision ./OfMiceAndMechs-Linux.tar.gz | |