diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e624327b..81820d03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: macos-exe: - runs-on: macos-latest + runs-on: macos-12 strategy: fail-fast: false matrix: @@ -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 @@ -159,7 +159,7 @@ jobs: strategy: matrix: platform: - - runner: macos-latest + - runner: macos-12 target: x86_64 - runner: macos-14 target: aarch64 diff --git a/change.log b/change.log index 146b4778..0e2e870e 100644 --- a/change.log +++ b/change.log @@ -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. diff --git a/src/tt_damage_calculator/assets/version.txt b/src/tt_damage_calculator/assets/version.txt index 81911389..f77856a6 100644 --- a/src/tt_damage_calculator/assets/version.txt +++ b/src/tt_damage_calculator/assets/version.txt @@ -1 +1 @@ -4.3.0 \ No newline at end of file +4.3.1 diff --git a/src/tt_damage_calculator/widgets.py b/src/tt_damage_calculator/widgets.py index 91d71634..0a425a65 100644 --- a/src/tt_damage_calculator/widgets.py +++ b/src/tt_damage_calculator/widgets.py @@ -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."""