Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLastBreath committed Aug 18, 2024
2 parents 2508060 + d48a5e7 commit 63b8792
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-multiplatform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
os: ubuntu-20.04
artifactsPath: ./src/dist/*.AppImage
- name: MacOS Intel
os: macos-latest-large
os: macos-13
artifactsPath: ./src/dist/*.zip
- name: MacOS Silicon
os: macos-latest
Expand Down
11 changes: 8 additions & 3 deletions src/compile_onedir.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def delete_directory(folder):
"--icon", "GUI/LOGO.ico"
]
subprocess.run(command, shell=True)
create_zip(f'dist/TOTK Optimizer {latest_version}', f'dist/TOTK_Optimizer_{latest_version}_Windows.zip')

elif platform.system() == "Linux":
command = [
"pyinstaller",
Expand Down Expand Up @@ -85,6 +87,9 @@ def delete_directory(folder):
os.rename('dist/TOTK Optimizer.app', 'dist/archive/TOTK Optimizer.app')
create_zip('dist/archive', f'dist/TOTK_Optimizer_{latest_version}_MacOS_{processor}.zip')

# Remove unnecessary files
if os.path.exists("dist/TOTK Optimizer"): os.remove("dist/TOTK Optimizer")
if os.path.exists("dist/archive"): delete_directory("dist/archive")
# Remove unnecessary files
if os.path.exists("dist/TOTK Optimizer"):
if os.path.isdir("dist/TOTK Optimizer"): delete_directory("dist/TOTK Optimizer")
else: os.remove("dist/TOTK Optimizer")
if os.path.exists(f'dist/TOTK Optimizer {latest_version}'): delete_directory(f'dist/TOTK Optimizer {latest_version}')
if os.path.exists("dist/archive"): delete_directory("dist/archive")
2 changes: 1 addition & 1 deletion src/configuration/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tkinter import messagebox
import configparser

Version = "manager-2.0.9"
Version = "manager-2.0.10"
repo_url_raw = 'https://github.com/MaxLastBreath/TOTK-mods'
repo_url = 'https://api.github.com/repos/MaxLastBreath/TOTK-mods'
localconfig = "TOTKOptimizer.ini"
Expand Down
9 changes: 9 additions & 0 deletions src/modules/checkpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def checkpath(self, mode):
flatpak = os.path.join(home_directory, ".var", "app", "org.yuzu_emu.yuzu", "config", "yuzu")
flatpak_torzu = os.path.join(home_directory, ".var", "app", "onion.torzu_emu.torzu", "config", "yuzu")
steamdeckdir = os.path.join(home_directory, ".config", "yuzu", "qt-config.ini")
sudachi = os.path.join(home_directory, ".local", "share", "sudachi")

self.Globaldir = os.path.join(home_directory, ".local", "share", "yuzu")
self.configdir = os.path.join(self.Globaldir, "config", "qt-config.ini")
Expand All @@ -46,6 +47,14 @@ def checkpath(self, mode):
new_path = os.path.dirname(os.path.dirname(flatpak))
self.Globaldir = os.path.join(new_path, "data", "yuzu")

# Check for sudachi version
if os.path.exists(sudachi):
log.info("Detected a Sudachi version!")
self.configdir = os.path.join(sudachi, "qt-config.ini")
self.TOTKconfig = os.path.join(sudachi, "custom")
new_path = os.path.dirname(os.path.dirname(sudachi))
self.Globaldir = os.path.join(new_path, "data", "yuzu")

# Check for flatpack version of Torzu
if os.path.exists(flatpak_torzu):
log.info("Detected a Legacy flatpack of Torzu!")
Expand Down

0 comments on commit 63b8792

Please sign in to comment.