Skip to content

Commit

Permalink
fix build output and handle depricated
Browse files Browse the repository at this point in the history
  • Loading branch information
lightlike committed Aug 22, 2023
1 parent cd526a6 commit d78b32c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
id: create_release_step
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -22,6 +20,8 @@ jobs:
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Set output
run: echo "{upload_url}={${{ steps.create_release_step.outputs.upload_url }}}" >> $GITHUB_OUTPUT

build:
name: Build packages
Expand All @@ -36,14 +36,17 @@ jobs:
CMD_BUILD: >
pyinstaller -F -w -n tiled_gif_export src/tiled_gif_export.py &&
cd dist/ &&
zip -r9 tiled_gif_export tiled_gif_export.app/
OUT_FILE_NAME: tiled_gif_export.zip
zip -r9 "tiled_gif_export (mac).zip" tiled_gif_export.app/
OUT_FILE_NAME: tiled_gif_export (mac).zip
ASSET_MIME: application/zip
- os: windows-latest
TARGET: windows
CMD_BUILD: pyinstaller -F -w -n tiled_gif_export src/tiled_gif_export.py
OUT_FILE_NAME: tiled_gif_export.exe
ASSET_MIME: application/vnd.microsoft.portable-executable
CMD_BUILD: >
pyinstaller -w -n "Tiled gif export" src/tiled_gif_export.py &&
cd dist &&
tar.exe -a -c -f "tiled_gif_export (windows).zip" -C tiled_gif_export *
OUT_FILE_NAME: tiled_gif_export (windows).zip
ASSET_MIME: application/zip
- os: ubuntu-latest
TARGET: linux
CMD_BUILD: pyinstaller -F -w -n tiled_gif_export src/tiled_gif_export.py
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ optional arguments:
Frame duration in ms (has to be devisible by 10)
-n FRAMES, --frames FRAMES
Number of Frames to render
-f FILE, --file FILE Input file (Tiled file '.tmx' or '.world'
-f FILE, --file FILE Input file (Tiled file '.tmx' or '.world')
-o OUTPUT, --output OUTPUT
Output file (.gif)
```
Expand Down
5 changes: 3 additions & 2 deletions src/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from dataclasses import dataclass
import os
from os.path import exists
import sys

@dataclass
class Settings:
Expand All @@ -17,7 +18,7 @@ class Settings:

@staticmethod
def get_config_path() -> str:
return os.path.join(os.path.dirname(os.path.realpath(__file__)), "config.ini")
return os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), "config.ini")

@classmethod
def load_config(cls) -> 'Settings':
Expand Down Expand Up @@ -57,7 +58,7 @@ def generate_config(cls) -> None:
with open(cls.get_config_path(), 'w') as configfile:
config.write(configfile)

print("Config Generated. Please edit and restart this program.")
print(f"Config Generated at {cls.get_config_path()}. Please edit and restart this program.")

@classmethod
def parse_args(cls):
Expand Down

0 comments on commit d78b32c

Please sign in to comment.