From 51d23de5d386ff9b0f2919c7654091ddd01559cc Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 13:11:25 +0800 Subject: [PATCH 01/30] ci macos-x86_64: Upgrade to the macos-14-large image --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af57999e2..09c99d323 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -408,7 +408,7 @@ jobs: python-version: 3.12.x output-id: artifact_windows - name: macos-x86_64 - os: macos-12 + os: macos-14-large arch: x86_64 package: true - name: macos-arm64 @@ -644,4 +644,4 @@ jobs: cd sample-cpp mkdir build cmake -B build -DCMAKE_PREFIX_PATH="%CD%/../cutter;%CD%/../cutter-deps/qt" - cmake --build build \ No newline at end of file + cmake --build build From 1e69dddbad0865e5994469cc1e69ab343c38e92d Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 14:11:29 +0800 Subject: [PATCH 02/30] Revert "ci macos-x86_64: Upgrade to the macos-14-large image" This reverts commit 51d23de5d386ff9b0f2919c7654091ddd01559cc. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09c99d323..af57999e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -408,7 +408,7 @@ jobs: python-version: 3.12.x output-id: artifact_windows - name: macos-x86_64 - os: macos-14-large + os: macos-12 arch: x86_64 package: true - name: macos-arm64 @@ -644,4 +644,4 @@ jobs: cd sample-cpp mkdir build cmake -B build -DCMAKE_PREFIX_PATH="%CD%/../cutter;%CD%/../cutter-deps/qt" - cmake --build build + cmake --build build \ No newline at end of file From 78a99984d2976f37131c8eb8fedcd239d7ea2972 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 14:12:10 +0800 Subject: [PATCH 03/30] ci macos-x86_64: Upgrade to the macos-13 image --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af57999e2..9fdc26914 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -408,7 +408,7 @@ jobs: python-version: 3.12.x output-id: artifact_windows - name: macos-x86_64 - os: macos-12 + os: macos-13 arch: x86_64 package: true - name: macos-arm64 @@ -644,4 +644,4 @@ jobs: cd sample-cpp mkdir build cmake -B build -DCMAKE_PREFIX_PATH="%CD%/../cutter;%CD%/../cutter-deps/qt" - cmake --build build \ No newline at end of file + cmake --build build From 29931e74637d5d0bc6e6db426ba4cd5887736e86 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 15:25:50 +0800 Subject: [PATCH 04/30] mac ci: Kill XProtectBehaviorService before making package --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fdc26914..3b014f1ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -480,6 +480,8 @@ jobs: -DCPACK_BUNDLE_APPLE_CERT_APP="-" \ .. && \ make -j4; + echo killing XProtectBehaviorService; sudo pkill -9 XProtect >/dev/null || true; + echo waiting for XProtectBehaviorService kill; while pgrep XProtect; do sleep 3; done; make package export CUTTER_VERSION=$(python3 ../scripts/get_version.py) echo PACKAGE_NAME=${PACKAGE_NAME}.dmg >> $GITHUB_ENV From 4b33f8236266c2e9eb0f0b31324e841fe6ad7c27 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 16:58:49 +0800 Subject: [PATCH 05/30] Try adding -debug to hdiutil --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 41cd6845c..07e6b8296 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.5) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() +set(CPACK_COMMAND_HDIUTIL "/usr/bin/hdiutil -debug") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) From d6c6552e7dfbc79bac8f10441943d918d8afcc69 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 17:25:06 +0800 Subject: [PATCH 06/30] Add hdiutil-debug.sh --- CMakeLists.txt | 2 +- hdiutil-debug.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 hdiutil-debug.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 07e6b8296..ef6dc0f95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -set(CPACK_COMMAND_HDIUTIL "/usr/bin/hdiutil -debug") +set(CPACK_COMMAND_HDIUTIL "/usr/bin/zsh ../hdiutil-debug.sh") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) diff --git a/hdiutil-debug.sh b/hdiutil-debug.sh new file mode 100644 index 000000000..91fea71e0 --- /dev/null +++ b/hdiutil-debug.sh @@ -0,0 +1 @@ +/usr/bin/hdiutil "$@" -debug From bb66970a039d04fd5953118a9f24d1c890433d16 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 18:00:26 +0800 Subject: [PATCH 07/30] Use absolute path for hdiutil-debug.sh --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef6dc0f95..9b73aa110 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -set(CPACK_COMMAND_HDIUTIL "/usr/bin/zsh ../hdiutil-debug.sh") +set(CPACK_COMMAND_HDIUTIL "/usr/bin/zsh /Users/runner/work/cutter/cutter/hdiutil-debug.sh") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) From bc45892dedae2a5f69606b6d063370fb4a06ed32 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 18:23:34 +0800 Subject: [PATCH 08/30] Use /bin/bash --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b73aa110..a59c690ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -set(CPACK_COMMAND_HDIUTIL "/usr/bin/zsh /Users/runner/work/cutter/cutter/hdiutil-debug.sh") +set(CPACK_COMMAND_HDIUTIL "/bin/bash /Users/runner/work/cutter/cutter/hdiutil-debug.sh") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) From 77563ba43755e234581c55846b3d8b59a35cfb54 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 18:59:05 +0800 Subject: [PATCH 09/30] Revert "Use /bin/bash" This reverts commit bc45892dedae2a5f69606b6d063370fb4a06ed32. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a59c690ed..9b73aa110 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -set(CPACK_COMMAND_HDIUTIL "/bin/bash /Users/runner/work/cutter/cutter/hdiutil-debug.sh") +set(CPACK_COMMAND_HDIUTIL "/usr/bin/zsh /Users/runner/work/cutter/cutter/hdiutil-debug.sh") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) From 064d10ccb60892ede3f9383b34557124beb24c6e Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 18:59:10 +0800 Subject: [PATCH 10/30] Revert "Use absolute path for hdiutil-debug.sh" This reverts commit bb66970a039d04fd5953118a9f24d1c890433d16. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b73aa110..ef6dc0f95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -set(CPACK_COMMAND_HDIUTIL "/usr/bin/zsh /Users/runner/work/cutter/cutter/hdiutil-debug.sh") +set(CPACK_COMMAND_HDIUTIL "/usr/bin/zsh ../hdiutil-debug.sh") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) From c20f01533b0235ead4f77a994f97f46279c3cd0a Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 18:59:11 +0800 Subject: [PATCH 11/30] Revert "Add hdiutil-debug.sh" This reverts commit d6c6552e7dfbc79bac8f10441943d918d8afcc69. --- CMakeLists.txt | 2 +- hdiutil-debug.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 hdiutil-debug.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index ef6dc0f95..07e6b8296 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -set(CPACK_COMMAND_HDIUTIL "/usr/bin/zsh ../hdiutil-debug.sh") +set(CPACK_COMMAND_HDIUTIL "/usr/bin/hdiutil -debug") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) diff --git a/hdiutil-debug.sh b/hdiutil-debug.sh deleted file mode 100644 index 91fea71e0..000000000 --- a/hdiutil-debug.sh +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/hdiutil "$@" -debug From 6a4aeaf15e6a0b62e4c5999fd87217fae042d871 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 18:59:12 +0800 Subject: [PATCH 12/30] Revert "Try adding -debug to hdiutil" This reverts commit 4b33f8236266c2e9eb0f0b31324e841fe6ad7c27. --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07e6b8296..41cd6845c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.5) if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() -set(CPACK_COMMAND_HDIUTIL "/usr/bin/hdiutil -debug") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) From e3746674696fbcb1d01618371a5a7f522db0975b Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 19:01:26 +0800 Subject: [PATCH 13/30] Retry `make package` until it works --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b014f1ad..0b43c5da5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -482,7 +482,8 @@ jobs: make -j4; echo killing XProtectBehaviorService; sudo pkill -9 XProtect >/dev/null || true; echo waiting for XProtectBehaviorService kill; while pgrep XProtect; do sleep 3; done; - make package + brew install kadwanev/brew/retry + retry make package export CUTTER_VERSION=$(python3 ../scripts/get_version.py) echo PACKAGE_NAME=${PACKAGE_NAME}.dmg >> $GITHUB_ENV echo PACKAGE_PATH=build/${PACKAGE_NAME}.dmg >> $GITHUB_ENV From 0dda13b8ef150c260ca5b64499aa1bcf909e4384 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 19:34:13 +0800 Subject: [PATCH 14/30] Revert "mac ci: Kill XProtectBehaviorService before making package" This reverts commit 29931e74637d5d0bc6e6db426ba4cd5887736e86. --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b43c5da5..daa000e02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -480,8 +480,6 @@ jobs: -DCPACK_BUNDLE_APPLE_CERT_APP="-" \ .. && \ make -j4; - echo killing XProtectBehaviorService; sudo pkill -9 XProtect >/dev/null || true; - echo waiting for XProtectBehaviorService kill; while pgrep XProtect; do sleep 3; done; brew install kadwanev/brew/retry retry make package export CUTTER_VERSION=$(python3 ../scripts/get_version.py) From a66bb3b1daba6bfac75ffb3e7972f694de77872c Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 20:56:30 +0800 Subject: [PATCH 15/30] Do `rm -rf` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index daa000e02..08dc0458e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -481,7 +481,7 @@ jobs: .. && \ make -j4; brew install kadwanev/brew/retry - retry make package + retry 'rm -rf ../jsdec ../libswift ../rz_libyara ../rz-silhouette; make package' export CUTTER_VERSION=$(python3 ../scripts/get_version.py) echo PACKAGE_NAME=${PACKAGE_NAME}.dmg >> $GITHUB_ENV echo PACKAGE_PATH=build/${PACKAGE_NAME}.dmg >> $GITHUB_ENV From 0212980c3895aeba4ea46adb7af720ac4f3458e6 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 22:03:15 +0800 Subject: [PATCH 16/30] Revert "Revert "mac ci: Kill XProtectBehaviorService before making package"" This reverts commit 0dda13b8ef150c260ca5b64499aa1bcf909e4384. --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08dc0458e..063771412 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -480,6 +480,8 @@ jobs: -DCPACK_BUNDLE_APPLE_CERT_APP="-" \ .. && \ make -j4; + echo killing XProtectBehaviorService; sudo pkill -9 XProtect >/dev/null || true; + echo waiting for XProtectBehaviorService kill; while pgrep XProtect; do sleep 3; done; brew install kadwanev/brew/retry retry 'rm -rf ../jsdec ../libswift ../rz_libyara ../rz-silhouette; make package' export CUTTER_VERSION=$(python3 ../scripts/get_version.py) From 0fe73a12c760bbd2fb6c8661c4e58441450e5b19 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 22:16:04 +0800 Subject: [PATCH 17/30] Set exclusive upper bound for Python version --- CMakeLists.txt | 8 ++++---- dist/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 41cd6845c..0e321b017 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) include(Utils) -set(CUTTER_PYTHON_MIN 3.5) +set(CUTTER_PYTHON_MIN_MAX 3.5...<3.13) option(CUTTER_USE_BUNDLED_RIZIN "Use rizin from ./rizin submodule instead of searching for it on the system" ON) option(CUTTER_USE_ADDITIONAL_RIZIN_PATHS "Search rizin in additional paths which are not part of default system library paths.\ Disable this option if you are linking against rizin pacakged as proper system library or in a custom path and additional are paths causing problems." ON) -option(CUTTER_ENABLE_PYTHON "Enable Python integration. Requires Python >= ${CUTTER_PYTHON_MIN}." OFF) +option(CUTTER_ENABLE_PYTHON "Enable Python integration. Requires Python at version ${CUTTER_PYTHON_MIN_MAX}." OFF) option(CUTTER_ENABLE_PYTHON_BINDINGS "Enable generating Python bindings with Shiboken. Unused if CUTTER_ENABLE_PYTHON=OFF." OFF) option(CUTTER_APPIMAGE_BUILD "Enable Appimage specific changes. Doesn't cause building of Appimage itself." OFF) tri_option(CUTTER_ENABLE_KSYNTAXHIGHLIGHTING "Use KSyntaxHighlighting" AUTO) @@ -94,10 +94,10 @@ find_package(${QT_PREFIX} REQUIRED COMPONENTS ${QT_COMPONENTS}) if(CUTTER_ENABLE_PYTHON) if(CMAKE_VERSION VERSION_LESS "3.12.0") find_package(PythonInterp REQUIRED) - find_package(PythonLibs ${CUTTER_PYTHON_MIN} REQUIRED) + find_package(PythonLibs ${CUTTER_PYTHON_MIN_MAX} REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) else() - find_package (Python3 ${CUTTER_PYTHON_MIN} REQUIRED COMPONENTS Interpreter Development) + find_package (Python3 ${CUTTER_PYTHON_MIN_MAX} REQUIRED COMPONENTS Interpreter Development) set (PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) endif() diff --git a/dist/CMakeLists.txt b/dist/CMakeLists.txt index 60b4dd959..2642c328a 100644 --- a/dist/CMakeLists.txt +++ b/dist/CMakeLists.txt @@ -18,7 +18,7 @@ if(WIN32) find_package(PythonInterp REQUIRED) install(DIRECTORY ${CUTTER_DEPS}/pyside/lib/site-packages DESTINATION "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}") else() - find_package (Python3 ${CUTTER_PYTHON_MIN} REQUIRED COMPONENTS) + find_package (Python3 ${CUTTER_PYTHON_MIN_MAX} REQUIRED COMPONENTS) install(DIRECTORY ${CUTTER_DEPS}/pyside/lib/site-packages DESTINATION "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}") endif() install(FILES ${CUTTER_DEPS}/pyside/bin/shiboken6.abi3.dll ${CUTTER_DEPS}/pyside/bin/pyside6.abi3.dll DESTINATION .) From 8229db4fcce6850c0c756fa371531c01ef5a3326 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 22:31:22 +0800 Subject: [PATCH 18/30] Revert "Set exclusive upper bound for Python version" This reverts commit 0fe73a12c760bbd2fb6c8661c4e58441450e5b19. --- CMakeLists.txt | 8 ++++---- dist/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e321b017..41cd6845c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,12 +8,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(DisallowInSource) include(Utils) -set(CUTTER_PYTHON_MIN_MAX 3.5...<3.13) +set(CUTTER_PYTHON_MIN 3.5) option(CUTTER_USE_BUNDLED_RIZIN "Use rizin from ./rizin submodule instead of searching for it on the system" ON) option(CUTTER_USE_ADDITIONAL_RIZIN_PATHS "Search rizin in additional paths which are not part of default system library paths.\ Disable this option if you are linking against rizin pacakged as proper system library or in a custom path and additional are paths causing problems." ON) -option(CUTTER_ENABLE_PYTHON "Enable Python integration. Requires Python at version ${CUTTER_PYTHON_MIN_MAX}." OFF) +option(CUTTER_ENABLE_PYTHON "Enable Python integration. Requires Python >= ${CUTTER_PYTHON_MIN}." OFF) option(CUTTER_ENABLE_PYTHON_BINDINGS "Enable generating Python bindings with Shiboken. Unused if CUTTER_ENABLE_PYTHON=OFF." OFF) option(CUTTER_APPIMAGE_BUILD "Enable Appimage specific changes. Doesn't cause building of Appimage itself." OFF) tri_option(CUTTER_ENABLE_KSYNTAXHIGHLIGHTING "Use KSyntaxHighlighting" AUTO) @@ -94,10 +94,10 @@ find_package(${QT_PREFIX} REQUIRED COMPONENTS ${QT_COMPONENTS}) if(CUTTER_ENABLE_PYTHON) if(CMAKE_VERSION VERSION_LESS "3.12.0") find_package(PythonInterp REQUIRED) - find_package(PythonLibs ${CUTTER_PYTHON_MIN_MAX} REQUIRED) + find_package(PythonLibs ${CUTTER_PYTHON_MIN} REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) else() - find_package (Python3 ${CUTTER_PYTHON_MIN_MAX} REQUIRED COMPONENTS Interpreter Development) + find_package (Python3 ${CUTTER_PYTHON_MIN} REQUIRED COMPONENTS Interpreter Development) set (PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) endif() diff --git a/dist/CMakeLists.txt b/dist/CMakeLists.txt index 2642c328a..60b4dd959 100644 --- a/dist/CMakeLists.txt +++ b/dist/CMakeLists.txt @@ -18,7 +18,7 @@ if(WIN32) find_package(PythonInterp REQUIRED) install(DIRECTORY ${CUTTER_DEPS}/pyside/lib/site-packages DESTINATION "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}") else() - find_package (Python3 ${CUTTER_PYTHON_MIN_MAX} REQUIRED COMPONENTS) + find_package (Python3 ${CUTTER_PYTHON_MIN} REQUIRED COMPONENTS) install(DIRECTORY ${CUTTER_DEPS}/pyside/lib/site-packages DESTINATION "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}") endif() install(FILES ${CUTTER_DEPS}/pyside/bin/shiboken6.abi3.dll ${CUTTER_DEPS}/pyside/bin/pyside6.abi3.dll DESTINATION .) From 3f7ee23f0918974971f873fa2602152a7b8d3520 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 22:31:39 +0800 Subject: [PATCH 19/30] Uninstall Python 3.13 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 063771412..6211fd4e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -452,6 +452,7 @@ jobs: shell: bash if: contains(matrix.os, 'macos') run: | + brew uninstall python@3.13 export MACOSX_DEPLOYMENT_TARGET=10.15 scripts/fetch_deps.sh source cutter-deps/env.sh From bfc60525cfb0990b8353d354480334166d799a60 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 20 Oct 2024 22:51:24 +0800 Subject: [PATCH 20/30] Revert "Uninstall Python 3.13" This reverts commit 3f7ee23f0918974971f873fa2602152a7b8d3520. --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6211fd4e4..063771412 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -452,7 +452,6 @@ jobs: shell: bash if: contains(matrix.os, 'macos') run: | - brew uninstall python@3.13 export MACOSX_DEPLOYMENT_TARGET=10.15 scripts/fetch_deps.sh source cutter-deps/env.sh From e78c29cb7d8a8ddea09777627fc858945fe25068 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 00:20:27 +0800 Subject: [PATCH 21/30] Add comment regarding XProtectBehaviorService kill --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 063771412..c7762a407 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -480,6 +480,8 @@ jobs: -DCPACK_BUNDLE_APPLE_CERT_APP="-" \ .. && \ make -j4; + # Reduce chance for random hdiutil "Resource busy" error when creating the dmg + # https://github.com/actions/runner-images/issues/7522#issuecomment-1556766641 echo killing XProtectBehaviorService; sudo pkill -9 XProtect >/dev/null || true; echo waiting for XProtectBehaviorService kill; while pgrep XProtect; do sleep 3; done; brew install kadwanev/brew/retry From 0d5b7db42c2a5e236eb309bd8d17a7c11e561ed2 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 17:42:44 +0800 Subject: [PATCH 22/30] Move `kadwanev/brew/retry` install to "homebrew dependencies" section --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7762a407..24fe3eab7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -432,6 +432,7 @@ jobs: cd scripts rm /usr/local/bin/2to3* # symlink to some kind of existing python2.7 installation conflicts with brew python3 which gets installed as indirect dependency brew bundle + brew install kadwanev/brew/retry - name: py dependencies run: | #python3 -m pip install -U pip==21.3.1 @@ -484,7 +485,6 @@ jobs: # https://github.com/actions/runner-images/issues/7522#issuecomment-1556766641 echo killing XProtectBehaviorService; sudo pkill -9 XProtect >/dev/null || true; echo waiting for XProtectBehaviorService kill; while pgrep XProtect; do sleep 3; done; - brew install kadwanev/brew/retry retry 'rm -rf ../jsdec ../libswift ../rz_libyara ../rz-silhouette; make package' export CUTTER_VERSION=$(python3 ../scripts/get_version.py) echo PACKAGE_NAME=${PACKAGE_NAME}.dmg >> $GITHUB_ENV From 97b93a51cfd138e28335459cf734c13621bda9e2 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 17:45:10 +0800 Subject: [PATCH 23/30] Add rimraf comment --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24fe3eab7..e34b1045d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -485,6 +485,7 @@ jobs: # https://github.com/actions/runner-images/issues/7522#issuecomment-1556766641 echo killing XProtectBehaviorService; sudo pkill -9 XProtect >/dev/null || true; echo waiting for XProtectBehaviorService kill; while pgrep XProtect; do sleep 3; done; + # Rimraf plugins built by `make package` because jsdec cannot be built twice retry 'rm -rf ../jsdec ../libswift ../rz_libyara ../rz-silhouette; make package' export CUTTER_VERSION=$(python3 ../scripts/get_version.py) echo PACKAGE_NAME=${PACKAGE_NAME}.dmg >> $GITHUB_ENV From 84e12d62d38c384ced02ada272850afb25a57e12 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 18:17:57 +0800 Subject: [PATCH 24/30] Try using a Python venv --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e34b1045d..a1fc7cf5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -435,6 +435,10 @@ jobs: brew install kadwanev/brew/retry - name: py dependencies run: | + if [ "$RUNNER_OS" == "macOS" ]; then + python3.12 -m venv .venv + source .venv/bin/activate + fi #python3 -m pip install -U pip==21.3.1 pip install meson # ==0.61.5 # https://github.com/rizinorg/cutter/runs/7170222817?check_suite_focus=true pip install setuptools @@ -453,6 +457,7 @@ jobs: shell: bash if: contains(matrix.os, 'macos') run: | + source .venv/bin/activate export MACOSX_DEPLOYMENT_TARGET=10.15 scripts/fetch_deps.sh source cutter-deps/env.sh From ee2fa7952b71a60abfa220a939eed6f49cdd3984 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 18:35:54 +0800 Subject: [PATCH 25/30] Have separate macos "py dependencies" section --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1fc7cf5e..58a041b75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -433,12 +433,15 @@ jobs: rm /usr/local/bin/2to3* # symlink to some kind of existing python2.7 installation conflicts with brew python3 which gets installed as indirect dependency brew bundle brew install kadwanev/brew/retry + - name: py dependencies (macos) + if: contains(matrix.os, 'macos') + run: | + python3.12 -m venv .venv + source .venv/bin/activate + pip install meson setuptools - name: py dependencies + if: contains(matrix.os, 'macos') != true run: | - if [ "$RUNNER_OS" == "macOS" ]; then - python3.12 -m venv .venv - source .venv/bin/activate - fi #python3 -m pip install -U pip==21.3.1 pip install meson # ==0.61.5 # https://github.com/rizinorg/cutter/runs/7170222817?check_suite_focus=true pip install setuptools From 26044c7e15d50408aeb32d9436d413d7e21930a9 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 18:37:24 +0800 Subject: [PATCH 26/30] Use Python_FIND_VIRTUALENV=ONLY --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58a041b75..f1cd7ace1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -473,6 +473,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DPython3_ROOT_DIR="${CUTTER_DEPS_PYTHON_PREFIX}" \ -DPython_ROOT_DIR="${CUTTER_DEPS_PYTHON_PREFIX}" \ + -DPython_FIND_VIRTUALENV=ONLY \ -DCUTTER_ENABLE_PYTHON=ON \ -DCUTTER_ENABLE_PYTHON_BINDINGS=ON \ -DCUTTER_USE_BUNDLED_RIZIN=ON \ From 0885d9b57a3c0ba1fcae8a13b558b6a287218e81 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 19:19:28 +0800 Subject: [PATCH 27/30] Use Python3_FIND_VIRTUALENV=ONLY --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1cd7ace1..21bdf47f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -473,6 +473,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DPython3_ROOT_DIR="${CUTTER_DEPS_PYTHON_PREFIX}" \ -DPython_ROOT_DIR="${CUTTER_DEPS_PYTHON_PREFIX}" \ + -DPython3_FIND_VIRTUALENV=ONLY \ -DPython_FIND_VIRTUALENV=ONLY \ -DCUTTER_ENABLE_PYTHON=ON \ -DCUTTER_ENABLE_PYTHON_BINDINGS=ON \ From 3a1ff3af1e7da2b1558f994db654677feba3e0cb Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 21:12:10 +0800 Subject: [PATCH 28/30] Use Python3_FIND_STRATEGY="LOCATION" instead --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21bdf47f8..76e14ce4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -473,8 +473,8 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DPython3_ROOT_DIR="${CUTTER_DEPS_PYTHON_PREFIX}" \ -DPython_ROOT_DIR="${CUTTER_DEPS_PYTHON_PREFIX}" \ - -DPython3_FIND_VIRTUALENV=ONLY \ - -DPython_FIND_VIRTUALENV=ONLY \ + -DPython3_FIND_STRATEGY="LOCATION" \ + -DPython_FIND_STRATEGY="LOCATION" \ -DCUTTER_ENABLE_PYTHON=ON \ -DCUTTER_ENABLE_PYTHON_BINDINGS=ON \ -DCUTTER_USE_BUNDLED_RIZIN=ON \ From 7cf9e2a85c5edfbe5ded37c2b63c4bf7e9247ee4 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 21:35:06 +0800 Subject: [PATCH 29/30] Revert "Have separate macos "py dependencies" section" This reverts commit ee2fa7952b71a60abfa220a939eed6f49cdd3984. --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76e14ce4d..bd167faf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -433,15 +433,12 @@ jobs: rm /usr/local/bin/2to3* # symlink to some kind of existing python2.7 installation conflicts with brew python3 which gets installed as indirect dependency brew bundle brew install kadwanev/brew/retry - - name: py dependencies (macos) - if: contains(matrix.os, 'macos') - run: | - python3.12 -m venv .venv - source .venv/bin/activate - pip install meson setuptools - name: py dependencies - if: contains(matrix.os, 'macos') != true run: | + if [ "$RUNNER_OS" == "macOS" ]; then + python3.12 -m venv .venv + source .venv/bin/activate + fi #python3 -m pip install -U pip==21.3.1 pip install meson # ==0.61.5 # https://github.com/rizinorg/cutter/runs/7170222817?check_suite_focus=true pip install setuptools From 8f4f89f357ce90c42652a677ef900f7b1d7bd4ae Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Mon, 21 Oct 2024 21:35:09 +0800 Subject: [PATCH 30/30] Revert "Try using a Python venv" This reverts commit 84e12d62d38c384ced02ada272850afb25a57e12. --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd167faf2..1248065a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -435,10 +435,6 @@ jobs: brew install kadwanev/brew/retry - name: py dependencies run: | - if [ "$RUNNER_OS" == "macOS" ]; then - python3.12 -m venv .venv - source .venv/bin/activate - fi #python3 -m pip install -U pip==21.3.1 pip install meson # ==0.61.5 # https://github.com/rizinorg/cutter/runs/7170222817?check_suite_focus=true pip install setuptools @@ -457,7 +453,6 @@ jobs: shell: bash if: contains(matrix.os, 'macos') run: | - source .venv/bin/activate export MACOSX_DEPLOYMENT_TARGET=10.15 scripts/fetch_deps.sh source cutter-deps/env.sh