Skip to content

Commit

Permalink
MacOS Executable fixes (#19)
Browse files Browse the repository at this point in the history
* Attempt at fixing MacOS executable not starting

* CI Changes

* CI Changes

* CI Changes

* CI Changes

* CI Changes

* CI Changes

* Revert previous commit

* Changing asset path stuff

* Changing asset path stuff

* More path stuff

* Update ci.yml

another commit in my quest to get the macos executable working

* Updating path for Darwin

taken from a stackoverflow question, hopefully this works

* Version bump
bumping version in hopes this fixes the macos issues
  • Loading branch information
Vhou-Atroph authored Aug 7, 2024
1 parent fd78a44 commit 82bb9fc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:


macos-exe:
runs-on: macos-latest
runs-on: macos-12
strategy:
fail-fast: false
matrix:
Expand All @@ -145,7 +145,7 @@ jobs:
pip install pyinstaller
cargo rustc --release -- -C link-arg=-undefined -C link-arg=dynamic_lookup
mv ./target/release/libtt_damage_calculator.dylib ./src/tt_damage_calculator/tt_damage_calculator.so
pyinstaller "Toontown Damage Calculator.spec"
pyinstaller "src/tt_damage_calculator/Toontown Damage Calculator.py" --onefile --windowed
cp -R ./src/tt_damage_calculator/assets ./dist/assets
cp -R ./LICENSE ./dist
- name: Upload executable
Expand All @@ -159,7 +159,7 @@ jobs:
strategy:
matrix:
platform:
- runner: macos-latest
- runner: macos-12
target: x86_64
- runner: macos-14
target: aarch64
Expand Down
4 changes: 4 additions & 0 deletions change.log
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@
- Executable files for Linux are now also supplied in releases. These should work for any Linux distribution that uses glibc, but Ubuntu is the distribution that is specifcally targeted.
- Keybinds now have a hardcoded default, if an error happens when setting a keybind it will fall back on this default.
- Removed the menu bar's update checker, this change is tentative and there may be a new iteration of the update checker in the future.

--V4.3.1--
- Changes to how the MacOS executable finds resources. This hopefully allows it to actually run.
- Compatibility has been moved from macos-latest to macos-12.
2 changes: 1 addition & 1 deletion src/tt_damage_calculator/assets/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0
4.3.1
7 changes: 5 additions & 2 deletions src/tt_damage_calculator/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,11 @@ def get_asset_path(self):
"""Gets the asset path for the program."""

self.asset_path = str(pathlib.Path(__file__).parent.resolve())
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
self.asset_path = os.getcwd()
if platform.system() == "Darwin":
self.asset_path = pathlib.Path(os.path.dirname(os.path.abspath(__file__)))

if getattr(sys, 'frozen', False):
self.asset_path = str(pathlib.Path("./").parent.resolve())

def reset_tracks(self):
"""Empties the track lists and sets nogroup to 0 for the next calculation."""
Expand Down

0 comments on commit 82bb9fc

Please sign in to comment.