diff --git a/.gitignore b/.gitignore index 2e9679de0..9b08fc7b1 100644 --- a/.gitignore +++ b/.gitignore @@ -57,5 +57,7 @@ mm/libultraship/extern/StrHash64.dir/Debug/StrHash64.tlog/Lib.command.1.tlog .vs/* /x64 +_packages/ + /mm/src/boot/build.c /mm/windows/properties.h diff --git a/CMake/Packaging-2.cmake b/CMake/Packaging-2.cmake index 3525ae1e4..c7b49ae92 100644 --- a/CMake/Packaging-2.cmake +++ b/CMake/Packaging-2.cmake @@ -1,6 +1,6 @@ set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 0) -set(CPACK_COMPONENTS_ALL "ship" "extractor" "appimage") +set(CPACK_COMPONENTS_ALL "2s2h" "extractor" "appimage") if (NOT CPACK_GENERATOR STREQUAL "External") list(REMOVE_ITEM CPACK_COMPONENTS_ALL "appimage") @@ -21,10 +21,9 @@ set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/bin") endif() if (CPACK_GENERATOR MATCHES "Bundle") - set(CPACK_BUNDLE_NAME "soh") + set(CPACK_BUNDLE_NAME "2s2h") set(CPACK_BUNDLE_PLIST "macosx/Info.plist") - set(CPACK_BUNDLE_ICON "macosx/soh.icns") - set(CPACK_BUNDLE_STARTUP_COMMAND "../soh/macosx/soh-macos.sh") + set(CPACK_BUNDLE_ICON "macosx/2s2h.icns") + set(CPACK_BUNDLE_STARTUP_COMMAND "macosx/2s2h-macos.sh") set(CPACK_BUNDLE_APPLE_CERT_APP "-") endif() - diff --git a/CMake/Packaging.cmake b/CMake/Packaging.cmake index 907f8da76..c243ad066 100644 --- a/CMake/Packaging.cmake +++ b/CMake/Packaging.cmake @@ -76,9 +76,9 @@ execute_process( ${LINUXDEPLOY_EXECUTABLE} --appimage-extract-and-run --appdir=${CPACK_TEMPORARY_DIRECTORY} - --executable=$ - $<$>:--desktop-file=$> - $<$>:--icon-file=$> + --executable=$ + $<$>:--desktop-file=$> + $<$>:--icon-file=$> --output=appimage # --verbosity=2 ) @@ -87,4 +87,3 @@ execute_process( endif() include(CPack) - diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ebd540d9..f6b3dfea9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,15 +101,15 @@ add_subdirectory(OTRExporter) add_subdirectory(mm) set_property(TARGET mm PROPERTY APPIMAGE_DESKTOP_FILE_TERMINAL YES) -set_property(TARGET mm PROPERTY APPIMAGE_DESKTOP_FILE "${CMAKE_SOURCE_DIR}/scripts/linux/appimage/soh.desktop") +set_property(TARGET mm PROPERTY APPIMAGE_DESKTOP_FILE "${CMAKE_SOURCE_DIR}/scripts/linux/appimage/2s2h.desktop") set_property(TARGET mm PROPERTY APPIMAGE_ICON_FILE "${CMAKE_BINARY_DIR}/2s2hIcon.png") if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") -install(PROGRAMS "${CMAKE_BINARY_DIR}/linux/appimage/soh.sh" DESTINATION . COMPONENT appimage) +install(PROGRAMS "${CMAKE_BINARY_DIR}/linux/appimage/s2sh.sh" DESTINATION . COMPONENT appimage) install(FILES "${CMAKE_SOURCE_DIR}/soh.otr" DESTINATION . COMPONENT ship) install(TARGETS ZAPD DESTINATION ./assets/extractor COMPONENT extractor) -install(DIRECTORY "${CMAKE_SOURCE_DIR}/soh/assets/extractor/" DESTINATION ./assets/extractor COMPONENT extractor) -install(DIRECTORY "${CMAKE_SOURCE_DIR}/soh/assets/xml/" DESTINATION ./assets/extractor/xmls COMPONENT extractor) +install(DIRECTORY "${CMAKE_SOURCE_DIR}/mm/assets/extractor/" DESTINATION ./assets/extractor COMPONENT extractor) +install(DIRECTORY "${CMAKE_SOURCE_DIR}/mm/assets/xml/" DESTINATION ./assets/extractor/xmls COMPONENT extractor) install(DIRECTORY "${CMAKE_SOURCE_DIR}/OTRExporter/CFG/filelists/" DESTINATION ./assets/extractor/filelists COMPONENT extractor) install(FILES "${CMAKE_SOURCE_DIR}/OTRExporter/CFG/ActorList_MM.txt" DESTINATION ./assets/extractor/symbols COMPONENT extractor) install(FILES "${CMAKE_SOURCE_DIR}/OTRExporter/CFG/ObjectList_MM.txt" DESTINATION ./assets/extractor/symbols COMPONENT extractor) @@ -171,24 +171,24 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") endif() endif() -#if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -#add_custom_target(CreateOSXIcons -# COMMAND mkdir -p ${CMAKE_BINARY_DIR}/macosx/soh.iconset -# COMMAND sips -z 16 16 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16.png -# COMMAND sips -z 32 32 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16@2x.png -# COMMAND sips -z 32 32 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32.png -# COMMAND sips -z 64 64 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32@2x.png -# COMMAND sips -z 128 128 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128.png -# COMMAND sips -z 256 256 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128@2x.png -# COMMAND sips -z 256 256 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256.png -# COMMAND sips -z 512 512 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256@2x.png -# COMMAND sips -z 512 512 soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512.png -# COMMAND cp soh/macosx/sohIcon.png ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512@2x.png -# COMMAND iconutil -c icns -o ${CMAKE_BINARY_DIR}/macosx/soh.icns ${CMAKE_BINARY_DIR}/macosx/soh.iconset -# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} -# COMMENT "Creating OSX icons ..." -# ) -#add_dependencies(soh CreateOSXIcons) +if(CMAKE_SYSTEM_NAME MATCHES "Darwin") +add_custom_target(CreateOSXIcons + COMMAND mkdir -p ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset + COMMAND sips -z 16 16 mm/macosx/2s2hIcon.png --out ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_16x16.png + COMMAND sips -z 32 32 mm/macosx/2s2hIcon.png --out ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_16x16@2x.png + COMMAND sips -z 32 32 mm/macosx/2s2hIcon.png --out ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_32x32.png + COMMAND sips -z 64 64 mm/macosx/2s2hIcon.png --out ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_32x32@2x.png + COMMAND sips -z 128 128 mm/macosx/2s2hIcon.png --out ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_128x128.png + COMMAND sips -z 256 256 mm/macosx/2s2hIcon.png --out ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_128x128@2x.png + COMMAND sips -z 256 256 mm/macosx/2s2hIcon.png --out ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_256x256.png + COMMAND sips -z 512 512 mm/macosx/2s2hIcon.png --out ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_256x256@2x.png + COMMAND sips -z 512 512 mm/macosx/2s2hIcon.png --out ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_512x512.png + COMMAND cp mm/macosx/2s2hIcon.png ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset/icon_512x512@2x.png + COMMAND iconutil -c icns -o ${CMAKE_BINARY_DIR}/macosx/2s2h.icns ${CMAKE_BINARY_DIR}/macosx/2s2h.iconset + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMENT "Creating OSX icons ..." + ) +add_dependencies(mm CreateOSXIcons) install(TARGETS ZAPD DESTINATION ${CMAKE_BINARY_DIR}/assets/extractor) @@ -201,22 +201,22 @@ install(FILES "${CMAKE_SOURCE_DIR}/OTRExporter/CFG/ActorList_MM.txt" DESTINATION install(FILES "${CMAKE_SOURCE_DIR}/OTRExporter/CFG/ObjectList_MM.txt" DESTINATION ./assets/extractor/symbols) install(FILES "${CMAKE_SOURCE_DIR}/OTRExporter/CFG/SymbolMap_MM.txt" DESTINATION ./assets/extractor/symbols) -install(DIRECTORY ${CMAKE_BINARY_DIR}/assets - DESTINATION . - PATTERN ZAPD.out - PERMISSIONS ${PROGRAM_PERMISSIONS_EXECUTE} - ) +# install(DIRECTORY ${CMAKE_BINARY_DIR}/assets +# DESTINATION . +# PATTERN ZAPD.out +# PERMISSIONS ${PROGRAM_PERMISSIONS_EXECUTE} +# ) -#install(CODE " -# include(BundleUtilities) -# fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/soh-macos\" \"\" \"${dirs}\") -# ") +install(CODE " + include(BundleUtilities) + fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/2s2h-macos\" \"\" \"${dirs}\") + ") -#endif() +endif() -#if(CMAKE_SYSTEM_NAME MATCHES "Windows|NintendoSwitch|CafeOS") -#install(FILES ${CMAKE_SOURCE_DIR}/README.md DESTINATION . COMPONENT 2s2h RENAME readme.txt ) -#endif() +if(CMAKE_SYSTEM_NAME MATCHES "Windows|NintendoSwitch|CafeOS") +install(FILES ${CMAKE_SOURCE_DIR}/README.md DESTINATION . COMPONENT 2s2h RENAME readme.txt ) +endif() if(CMAKE_SYSTEM_NAME MATCHES "Linux") set(CPACK_GENERATOR "External") @@ -226,5 +226,5 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") set(CPACK_GENERATOR "Bundle") endif() -#set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/CMake/Packaging-2.cmake) -#include(CMake/Packaging.cmake) +set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_SOURCE_DIR}/CMake/Packaging-2.cmake) +include(CMake/Packaging.cmake) diff --git a/mm/CMakeLists.txt b/mm/CMakeLists.txt index 0fd32c57a..12d1b8eba 100644 --- a/mm/CMakeLists.txt +++ b/mm/CMakeLists.txt @@ -787,6 +787,7 @@ execute_process(COMMAND ${CURL} -sSfL https://raw.githubusercontent.com/gabomdq/ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/macosx/Info.plist.in ${CMAKE_BINARY_DIR}/macosx/Info.plist @ONLY) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/macosx/2s2h-macos.sh.in ${CMAKE_BINARY_DIR}/macosx/2s2h-macos.sh @ONLY) INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION ../MacOS COMPONENT 2s2h) INSTALL(FILES ${CMAKE_BINARY_DIR}/mm/soh.otr DESTINATION ../Resources COMPONENT 2s2h) elseif(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "NintendoSwitch|CafeOS") diff --git a/mm/macosx/2s2h-macos.sh.in b/mm/macosx/2s2h-macos.sh.in new file mode 100644 index 000000000..14cfc4449 --- /dev/null +++ b/mm/macosx/2s2h-macos.sh.in @@ -0,0 +1,21 @@ +#!/bin/bash + +SNAME="$(dirname $0)" +export SHIP_HOME="$HOME/Library/Application Support/com.2ship2harkinian.2s2h" +export SNAME +export RESPATH="${SNAME%/MacOS*}/Resources" +export LIBPATH="${SNAME%/MacOS*}/Frameworks" +export DYLD_FALLBACK_LIBRARY_PATH="$LIBPATH" + +if [ ! -e "$SHIP_HOME" ]; then + mkdir "$SHIP_HOME"; +fi + +if [ ! -e "$SHIP_HOME"/mods ]; then + mkdir -p "$SHIP_HOME"/mods + touch "$SHIP_HOME"/mods/custom_otr_files_go_here.txt +fi + +"$RESPATH"/2s2h-macos + +exit diff --git a/mm/macosx/2s2hIcon.png b/mm/macosx/2s2hIcon.png index 051bb1883..debf6f4b4 100644 Binary files a/mm/macosx/2s2hIcon.png and b/mm/macosx/2s2hIcon.png differ diff --git a/mm/macosx/Info.plist.in b/mm/macosx/Info.plist.in index 9f861c6a9..7c3e262a2 100644 --- a/mm/macosx/Info.plist.in +++ b/mm/macosx/Info.plist.in @@ -13,7 +13,7 @@ CFBundleIconFile 2s2h.icns CFBundleIdentifier - com.2ship2harkinian.2Ship2Harkinian + com.2ship2harkinian.2s2h CFBundleDocumentTypes diff --git a/mm/macosx/soh-macos.sh.in b/mm/macosx/soh-macos.sh.in deleted file mode 100644 index 0983f63b1..000000000 --- a/mm/macosx/soh-macos.sh.in +++ /dev/null @@ -1,258 +0,0 @@ -#!/bin/bash - -SNAME="$(dirname $0)" -export SHIP_HOME="$HOME/Library/Application Support/com.shipofharkinian.soh" -export SNAME -export RESPATH="${SNAME%/MacOS*}/Resources" -export LIBPATH="${SNAME%/MacOS*}/Frameworks" -export DYLD_FALLBACK_LIBRARY_PATH="$LIBPATH" - -remap_hashes () -{ - # Remap v64 and n64 hashes to their z64 hash equivalent - # ZAPD will handle converting the data into z64 format - case "$ROMHASH" in - a9059b56e761c9034fbe02fe4c24985aaa835dac) # v64 - ROMHASH=cee6bc3c2a634b41728f2af8da54d9bf8cc14099 - ;; - 24708102dc504d3f375a37f4ae4e149c167dc515) # n64 - ROMHASH=cee6bc3c2a634b41728f2af8da54d9bf8cc14099 - ;; - 580dd0bd1b6d2c51cc20a764eece84dba558964c) # v64 - ROMHASH=0227d7c0074f2d0ac935631990da8ec5914597b4 - ;; - d6342c59007e57c1194661ec6880b2f078403f4e) # n64 - ROMHASH=0227d7c0074f2d0ac935631990da8ec5914597b4 - ;; - d0bdc2eb320668b4ba6893b9aefe4040a73123ff) # v64 - ROMHASH=328a1f1beba30ce5e178f031662019eb32c5f3b5 - ;; - 4946ab250f6ac9b32d76b21f309ebb8ebc8103d2) # n64 - ROMHASH=328a1f1beba30ce5e178f031662019eb32c5f3b5 - ;; - 663c34f1b2c05a09e5beffe4d0dcd440f7d49dc7) # v64 - ROMHASH=cfbb98d392e4a9d39da8285d10cbef3974c2f012 - ;; - 24c73d378b0620a380ce5ef9f2b186c6c157a68b) # n64 - ROMHASH=cfbb98d392e4a9d39da8285d10cbef3974c2f012 - ;; - 8ebf2e29313f44f2d49e5b4191971d09919e8e48) # v64 - ROMHASH=f46239439f59a2a594ef83cf68ef65043b1bffe2 - ;; - 4264bf7b875737b8fae77d52322a5099d051fc11) # n64 - ROMHASH=f46239439f59a2a594ef83cf68ef65043b1bffe2 - ;; - 973bc6fe56010a8d646166a1182a81b4f13b8cf9) # v64 - ROMHASH=50bebedad9e0f10746a52b07239e47fa6c284d03 - ;; - d327752c46edc70ff3668b9514083dbbee08927c) # v64 - ROMHASH=50bebedad9e0f10746a52b07239e47fa6c284d03 - ;; - ecdeb1747560834e079c22243febea7f6f26ba3b) # v64 - ROMHASH=079b855b943d6ad8bd1eb026c0ed169ecbdac7da - ;; - f19f8662ec7abee29484a272a6fda53e39efe0f1) # n64 - ROMHASH=079b855b943d6ad8bd1eb026c0ed169ecbdac7da - ;; - ab519ce04a33818ce2c39b3c514a751d807a494a) # v64 - ROMHASH=cfecfdc58d650e71a200c81f033de4e6d617a9f6 - ;; - c19a34f7646305e1755249fca2071e178bd7cd00) # n64 - ROMHASH=cfecfdc58d650e71a200c81f033de4e6d617a9f6 - ;; - 25e8ae79ea0839ca5c984473f7460d8040c36f9c) # v64 - ROMHASH=517bd9714c73cb96c21e7c2ef640d7b55186102f - ;; - 166c02770d67fcc3954c443eb400a6a3573d3fc0) # n64 - ROMHASH=517bd9714c73cb96c21e7c2ef640d7b55186102f - ;; - esac -} - -if [ ! -e "$SHIP_HOME" ]; then mkdir "$SHIP_HOME"; fi - -if [ ! -e "$SHIP_HOME"/mods ]; then - mkdir -p "$SHIP_HOME"/mods - touch "$SHIP_HOME"/mods/custom_otr_files_go_here.txt -fi - -# If either OTR doesn't exist kick off the OTR gen process -if [ ! -e "$SHIP_HOME"/oot.otr ] || [ ! -e "$SHIP_HOME"/oot-mq.otr ]; then - - # If no ROMs exist kick off the file selection prompts - while [ ! -e "$SHIP_HOME"/*.*64 ] && [ ! -e "$SHIP_HOME"/oot*.otr ]; do - - SHOULD_PROMPT_FOR_ROM=1 - while [ $SHOULD_PROMPT_FOR_ROM -eq 1 ]; do - SHOULD_PROMPT_FOR_ROM=0 - # Use osascript to prompt the user to chose a file - DROPROM=`osascript <<-EOF - set romFile to choose file of type {"b64","n64","v64","z64"} with prompt "Please select your ROM:" - return POSIX path of romFile - EOF` - - # If no rom was selected, the user cancelled, so exit - if [[ -z $DROPROM ]] && [[ -z "$UPLOAD_ANOTHER_RESULT" ]]; then - echo "No ROM selected. Exiting..." - exit 1 - elif [[ -z $DROPROM ]]; then - break; - fi - - # If an invalid rom was selected, let the user know and ask to try again - ROMHASH="$(shasum "$DROPROM" | awk '{ print $1 }')" - - remap_hashes - - case "$ROMHASH" in - cee6bc3c2a634b41728f2af8da54d9bf8cc14099) - ROM_TYPE=0;; - 0227d7c0074f2d0ac935631990da8ec5914597b4) - ROM_TYPE=0;; - 328a1f1beba30ce5e178f031662019eb32c5f3b5) - ROM_TYPE=0;; - cfbb98d392e4a9d39da8285d10cbef3974c2f012) - ROM_TYPE=0;; - f46239439f59a2a594ef83cf68ef65043b1bffe2) - ROM_TYPE=1;; - 50bebedad9e0f10746a52b07239e47fa6c284d03) - ROM_TYPE=1;; - 079b855b943d6ad8bd1eb026c0ed169ecbdac7da) - ROM_TYPE=1;; - cfecfdc58d650e71a200c81f033de4e6d617a9f6) - ROM_TYPE=1;; - 517bd9714c73cb96c21e7c2ef640d7b55186102f) - ROM_TYPE=1;; - *) - TRY_AGAIN_RESULT=`osascript <<-EOF - set alertText to "Incompatible ROM hash" - set alertMessage to "Incompatible ROM provided, would you like to try again?" - return display alert alertText \ - message alertMessage \ - as critical \ - buttons {"Cancel", "Try Again"} - EOF` - if [[ "$TRY_AGAIN_RESULT" == "button returned:Try Again" ]]; then - SHOULD_PROMPT_FOR_ROM=1 - continue; - else - echo "No ROM selected. Exiting..." - exit 1 - fi - esac - - cp "$DROPROM" "$SHIP_HOME" - - # Ask user if they would also like to select the other variant (MQ/Vanilla) - if [ $ROM_TYPE -eq 0 ] && [[ -z "$UPLOAD_ANOTHER_RESULT" ]]; then - UPLOAD_ANOTHER_RESULT=`osascript <<-EOF - set alertText to "Success" - set alertMessage to "Would you also like to provide a Master Quest ROM?" - return display alert alertText \ - message alertMessage \ - buttons {"No", "Yes"} - EOF` - elif [[ -z "$UPLOAD_ANOTHER_RESULT" ]]; then - UPLOAD_ANOTHER_RESULT=`osascript <<-EOF - set alertText to "Success" - set alertMessage to "Would you also like to provide a Vanilla (Non Master Quest) ROM?" - return display alert alertText \ - message alertMessage \ - buttons {"No", "Yes"} - EOF` - fi - - if [[ "$UPLOAD_ANOTHER_RESULT" == "button returned:Yes" ]]; then - UPLOAD_ANOTHER_RESULT="button returned:No" - SHOULD_PROMPT_FOR_ROM=1 - continue; - fi - break - done - done - - # At this point we should now have 1 or more valid roms in $SHIP_HOME directory - - # Prepare tmp dir - for ROMPATH in "$SHIP_HOME"/*.*64 - do - ASSETDIR="$(mktemp -d /tmp/assets-XXXXX)" - export ASSETDIR - cp -r "$RESPATH/assets" "$ASSETDIR" - mkdir -p "$ASSETDIR"/tmp - cp "$ROMPATH" "$ASSETDIR"/tmp/rom.z64 - cd "$ASSETDIR" || return - - # If an invalid rom was detected, let the user know - ROMHASH="$(shasum "$ASSETDIR"/tmp/rom.z64 | awk '{ print $1 }')" - - remap_hashes - - case "$ROMHASH" in - cee6bc3c2a634b41728f2af8da54d9bf8cc14099) - ROM=GC_NMQ_D - OTRNAME="oot.otr";; - 0227d7c0074f2d0ac935631990da8ec5914597b4) - ROM=GC_NMQ_PAL_F - OTRNAME="oot.otr";; - 328a1f1beba30ce5e178f031662019eb32c5f3b5) - ROM=N64_PAL_10 - OTRNAME="oot.otr";; - cfbb98d392e4a9d39da8285d10cbef3974c2f012) - ROM=N64_PAL_11 - OTRNAME="oot.otr";; - f46239439f59a2a594ef83cf68ef65043b1bffe2) - ROM=GC_MQ_PAL_F - OTRNAME="oot-mq.otr";; - 50bebedad9e0f10746a52b07239e47fa6c284d03) - ROM=GC_MQ_D - OTRNAME="oot-mq.otr";; - 079b855b943d6ad8bd1eb026c0ed169ecbdac7da) - ROM=GC_MQ_D - OTRNAME="oot-mq.otr";; - cfecfdc58d650e71a200c81f033de4e6d617a9f6) - ROM=GC_MQ_D - OTRNAME="oot-mq.otr";; - 517bd9714c73cb96c21e7c2ef640d7b55186102f) - ROM=GC_MQ_D - OTRNAME="oot-mq.otr";; - *) - osascript -e 'display notification "One or more invalid ROM provided" with title "Ship Of Harkinian"' - rm -r "$ASSETDIR" - cd "$SNAME" - continue; - esac - - # Only generate OTR if we don't have on of this type yet - if [ -e "$SHIP_HOME"/"$OTRNAME" ]; then - rm -r "$ASSETDIR" - cd "$SNAME" - continue; - fi - - osascript -e 'display notification "Generating OTR..." with title "Ship Of Harkinian"' - assets/extractor/ZAPD.out ed -i assets/extractor/xmls/"${ROM}" -b tmp/rom.z64 -fl assets/extractor/filelists -o placeholder -osf placeholder -gsf 1 -rconf assets/extractor/Config_"${ROM}".xml -se OTR --portVer "@CMAKE_PROJECT_VERSION@" - if [ -e "$ASSETDIR"/oot.otr ]; then - osascript -e 'display notification "OTR successfully generated" with title "Ship Of Harkinian"' - cp "$ASSETDIR"/oot.otr "$SHIP_HOME"/"$OTRNAME" - rm -r "$ASSETDIR" - cd "$SNAME" - fi - done - - if [ ! -e "$SHIP_HOME"/oot*.otr ]; then - osascript -e 'display notification "OTR failed to generate" with title "Ship Of Harkinian"' - exit 1; - fi -fi - -cd "$SNAME" - -arch_name="$(uname -m)" -launch_arch="arm64" -if [ "${arch_name}" = "x86_64" ] && [ "$(sysctl -in sysctl.proc_translated)" != "1" ]; then - launch_arch="x86_64" -fi - -arch -${launch_arch} "$RESPATH"/soh-macos -exit