From b3322514106d71e07a1a60a979fb2578183a65bd Mon Sep 17 00:00:00 2001 From: Lorenzooone Date: Thu, 27 Jun 2024 03:24:54 +0200 Subject: [PATCH] Sign bundle with - --- .github/workflows/cd_main.yml | 10 ++++++++++ CMakeLists.txt | 12 ++---------- README.md | 6 +----- setup_scripts/macos_bundle_setup.sh | 3 +-- setup_scripts/macos_bundle_signature.sh | 5 +++++ setup_scripts/un_quarantine_macos.sh | 1 - 6 files changed, 19 insertions(+), 18 deletions(-) create mode 100755 setup_scripts/macos_bundle_signature.sh delete mode 100755 setup_scripts/un_quarantine_macos.sh diff --git a/.github/workflows/cd_main.yml b/.github/workflows/cd_main.yml index ff6ddc9..a4b0b84 100644 --- a/.github/workflows/cd_main.yml +++ b/.github/workflows/cd_main.yml @@ -43,6 +43,16 @@ jobs: shell: bash run: cd build && cpack -G ZIP + - name: Unpack Codesign Repack x64 + if: (runner.os == 'macOS') && (runner.arch == 'x64') + shell: bash + run: setup_scripts/macos_bundle_signature.sh cc3dsfs_macos_x86_64 + + - name: Unpack Codesign Repack Arm64 + if: (runner.os == 'macOS') && (runner.arch == 'ARM64') + shell: bash + run: setup_scripts/macos_bundle_signature.sh cc3dsfs_macos_arm64 + - name: Archive resulting artifact uses: actions/upload-artifact@v3 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index c96bfd8..20fbaf7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -285,7 +285,6 @@ add_custom_command( if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") install(TARGETS ${OUTPUT_NAME} DESTINATION .) -install(FILES ${SETUP_SCRIPTS_DIR}/un_quarantine_macos.sh DESTINATION .) else() install(FILES ${CMAKE_SOURCE_DIR}/${OUTPUT_NAME}${FINAL_EXTENSION} DESTINATION .) endif() @@ -307,15 +306,8 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") add_custom_command( TARGET ${OUTPUT_NAME} - COMMENT "Copy Frameworks in bundle" - POST_BUILD COMMAND cp -R ${FW_DIRS} ${FW_APP}/Contents/Frameworks - VERBATIM - ) - - add_custom_command( - TARGET ${OUTPUT_NAME} - COMMENT "Set bundle path for Frameworks" - POST_BUILD COMMAND ${SETUP_SCRIPTS_DIR}/macos_bundle_setup.sh ${FW_APP}/Contents/MacOS/${OUTPUT_NAME} + COMMENT "Prepare bundle" + POST_BUILD COMMAND ${SETUP_SCRIPTS_DIR}/macos_bundle_setup.sh ${FW_APP}/Contents/MacOS/${OUTPUT_NAME} ${FW_DIRS} ${FW_APP}/Contents/Frameworks VERBATIM ) diff --git a/README.md b/README.md index 9aef3b2..3c5692a 100755 --- a/README.md +++ b/README.md @@ -135,11 +135,7 @@ On Windows, the profiles can be found in the ".config/cc3dsfs" folder inside the - USB Hubs can be the cause of connection issues. If you're having problems, try checking whether the 3DS/DS connects fine or not without any other devices connected. - Current font in use: OFL Sorts Mill Goudy TT - Enabling Slow Poll may slightly boost the FPS of the software, at the cost of an extremely slight decrease in frame latency, and slower reaction times of the software to key presses. Disabled by default (as when the FPS are greater than the CC's, it's not reccomended). -- On MacOS, you may get a notice about the app being damaged. It's Apple quarantining the app. To make it work, either use the included script "un\_quarantine\_macos.sh" (though you may need to make it executable with chmod +x), or open a terminal and run the following: -``` -xattr -c ./cc3dsfs.app -``` -- It can also be achieved by opening a terminal, typing "xattr -c ", dragging the application to the terminal, and finally pressing Enter. +- On MacOS, you may get a notice about Apple being unable to check for malware, or the developer being unknown. To open the program regardless of that, while holding the Command key, right click the application, then select the "Open" option. - Certain TVs/Monitors may add some audio delay for the purpose of video/lip syncing. If you're experiencing too much audio delay when using this software, try checking in the TV/Monitor settings whether you can reduce that added delay. One of the names used for that setting is "Lip Sync", or something along that line. - For the best audio latency and quality, it may be needed to change OpenAL's sound settings. Their location is OS-specific. On linux, you may use the "alsoft-config" command. In particular, the following parameters may help: ``` diff --git a/setup_scripts/macos_bundle_setup.sh b/setup_scripts/macos_bundle_setup.sh index b9658a2..6808d9a 100755 --- a/setup_scripts/macos_bundle_setup.sh +++ b/setup_scripts/macos_bundle_setup.sh @@ -1,7 +1,7 @@ framework_change_pos() { install_name_tool -change @rpath/../Frameworks/${2}.framework/Versions/A/${2} @executable_path/../Frameworks/${2}.framework/${2} ${1} } - +cp -R ${2} ${3} framework_change_pos ${1} 'freetype' framework_change_pos ${1} 'OpenAL' framework_change_pos ${1} 'vorbisenc' @@ -9,4 +9,3 @@ framework_change_pos ${1} 'vorbisfile' framework_change_pos ${1} 'FLAC' framework_change_pos ${1} 'vorbis' framework_change_pos ${1} 'ogg' - diff --git a/setup_scripts/macos_bundle_signature.sh b/setup_scripts/macos_bundle_signature.sh new file mode 100755 index 0000000..cfd14cc --- /dev/null +++ b/setup_scripts/macos_bundle_signature.sh @@ -0,0 +1,5 @@ +cd build +unzip ${1}.zip +codesign --deep -v -f -s "-" ${1}/cc3dsfs.app +rm -f ${1}.zip +zip --symlinks -r ${1}.zip ${1} diff --git a/setup_scripts/un_quarantine_macos.sh b/setup_scripts/un_quarantine_macos.sh deleted file mode 100755 index 5ad5d05..0000000 --- a/setup_scripts/un_quarantine_macos.sh +++ /dev/null @@ -1 +0,0 @@ -xattr -d com.apple.quarantine cc3dsfs.app