From dc58894ff772d2d5c05bc26c447deecc4cd71cc5 Mon Sep 17 00:00:00 2001 From: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Date: Mon, 16 Oct 2023 17:35:23 -0700 Subject: [PATCH 1/3] Update launcher.pyw Update to include the changes for smw_assets.dat --- launcher.pyw | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/launcher.pyw b/launcher.pyw index a5d0339..adc5350 100644 --- a/launcher.pyw +++ b/launcher.pyw @@ -1422,6 +1422,8 @@ def build_game(return_values): if not os.path.exists(os.path.join(smw_dir, ".git")): git_clone("https://github.com/snesrev/smw.git", os.path.join(smw_dir)) + for file_name in ["smw.sfc"]: + shutil.copy2(os.path.join(install_dir, file_name), os.path.join(smw_dir, file_name)) for file_name in ["smb1.zst", "smbll.zst"]: #user provides their own smas.sfc and smw.sfc files. shutil.copy2(os.path.join(smw_dir, "other", file_name), os.path.join(install_dir, file_name)) @@ -1454,6 +1456,9 @@ def build_game(return_values): for file_name in ["smas.sfc"]: if os.path.exists(os.path.join(install_dir, file_name)): shutil.move(os.path.join(install_dir, file_name),os.path.join(launcher_dir, file_name)) + for file_name in ["smw_assets.dat"]: + if os.path.exists(os.path.join(smw_dir, file_name)): + shutil.move(os.path.join(smw_dir, file_name),os.path.join(install_dir, file_name)) except Exception as e: # Handle exceptions and log the error error_message = f"!!!!!!!!!!!!!!!!!!!!!!!!!vvvvvvvvvv!!!!!!!!!!!!!!!!!!!!!!!!!\nAn error occurred in thread \"build_thread\": \n{str(e)}\n!!!!!!!!!!!!!!!!!!!!!!!!!^^^^^^^^^^!!!!!!!!!!!!!!!!!!!!!!!!!" From fbe4ef760bba5d92d965e88c1d498d39b24df4d6 Mon Sep 17 00:00:00 2001 From: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:29:29 -0700 Subject: [PATCH 2/3] Update create-exe.sh --- create-exe.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/create-exe.sh b/create-exe.sh index 3c26d10..5b5d912 100644 --- a/create-exe.sh +++ b/create-exe.sh @@ -3,9 +3,9 @@ # Install dependencies python3 -m venv venv source venv/bin/activate -pip install -r pipinstaller -pyinstaller --onefile --add-data "assets;assets" --icon=assets/icon.icns --clean launcher.pyw +pip install pyinstaller +pyinstaller --onefile --add-data="assets:assets" --icon=assets/icon.icns --clean launcher.pyw # Prompt for continuation read -rsp "Finished. Press any key to continue." -n1 key -echo \ No newline at end of file +echo From 0469770fce024a6bc0fd7116033e03460e71d398 Mon Sep 17 00:00:00 2001 From: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Date: Thu, 19 Oct 2023 10:48:14 -0700 Subject: [PATCH 3/3] Update launcher.pyw --- launcher.pyw | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher.pyw b/launcher.pyw index adc5350..6ffa329 100644 --- a/launcher.pyw +++ b/launcher.pyw @@ -121,7 +121,7 @@ def asspat(): #assets path since i keep asking "Wtf is asspat?" only to remember if sysenv == 1: ass_pat = os.path.join(sys._MEIPASS, "assets")#asspat windows elif sysenv == 2 or sysenv == 3: - ass_pat = os.path.join(sys._MEIPASSBASE, "assets")#asspat mac+linux + ass_pat = os.path.join(sys._MEIPASS, "assets")#asspat mac+linux elif os.path.exists(os.path.join(".", "assets")): ass_pat = os.path.join(".", "assets")#asspat script else: @@ -2088,7 +2088,7 @@ def main(): sys.stdout = sys.__stdout__ sys.stderr = sys.__stderr__ tee_logger.close() # Close the log file - quit() + sys.exit(1) if __name__ == "__main__": main()