Enable macOS adhoc signing. (#2569)

* Do not break Python package making it unsignable
* Manaully add one of breakpad libs for codesigning. It doesn't get signed automatically by codesign --deep.
* Enable macOS adhoc signing.
This commit is contained in:
karliss 2021-01-24 11:11:26 +02:00 committed by GitHub
parent 3c8f0d905b
commit 753d4a7bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 2 deletions

View File

@ -185,6 +185,7 @@ jobs:
-DCUTTER_ENABLE_DEPENDENCY_DOWNLOADS=ON \ -DCUTTER_ENABLE_DEPENDENCY_DOWNLOADS=ON \
-DCUTTER_PACKAGE_RZ_GHIDRA=ON \ -DCUTTER_PACKAGE_RZ_GHIDRA=ON \
-DCMAKE_FRAMEWORK_PATH="$BREAKPAD_FRAMEWORK_DIR" \ -DCMAKE_FRAMEWORK_PATH="$BREAKPAD_FRAMEWORK_DIR" \
-DCPACK_BUNDLE_APPLE_CERT_APP="-" \
.. && \ .. && \
make -j4; make -j4;
make package make package

5
dist/CMakeLists.txt vendored
View File

@ -47,6 +47,11 @@ if(APPLE)
set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/macos/cutter.icns") set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/macos/cutter.icns")
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/macos/cutter_mac_app.png") set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/macos/cutter_mac_app.png")
set(CPACK_DMG_DS_STORE "${CMAKE_CURRENT_SOURCE_DIR}/macos/DS_Store_ForDMGBackground") set(CPACK_DMG_DS_STORE "${CMAKE_CURRENT_SOURCE_DIR}/macos/DS_Store_ForDMGBackground")
set(CPACK_BUNDLE_APPLE_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/macos/Entitlements.plist")
set(CPACK_APPLE_BUNDLE_ID "re.rizin.cutter")
if (CUTTER_ENABLE_CRASH_REPORTS)
list(APPEND CPACK_BUNDLE_APPLE_CODESIGN_FILES "/Contents/Frameworks/Breakpad.framework/Versions/Current/Resources/breakpadUtilities.dylib")
endif()
find_program(MACDEPLOYQT_PATH macdeployqt HINTS "${Qt5_DIR}/../../../bin") find_program(MACDEPLOYQT_PATH macdeployqt HINTS "${Qt5_DIR}/../../../bin")

View File

@ -21,7 +21,7 @@ then
echo "Cleaning up embedded Python Framework" echo "Cleaning up embedded Python Framework"
cd "$appbundle/Contents/Frameworks/Python.framework" cd "$appbundle/Contents/Frameworks/Python.framework"
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
rm -r Versions/Current/Resources/* "Versions/Current/lib/$python_version/test" "Versions/Current/lib/$python_version/idlelib" "Versions/Current/lib/$python_version/curses" "Versions/Current/lib/$python_version/lib2to3" || echo "Couldn't remove something" rm -r Versions/Current/Resources/Python.app "Versions/Current/lib/$python_version/test" "Versions/Current/lib/$python_version/idlelib" "Versions/Current/lib/$python_version/curses" "Versions/Current/lib/$python_version/lib2to3" || echo "Couldn't remove something"
else else
echo "Python.framework already exists, skipping copying" echo "Python.framework already exists, skipping copying"
cd "$appbundle/Contents/Frameworks/Python.framework" cd "$appbundle/Contents/Frameworks/Python.framework"
@ -48,4 +48,3 @@ then
else else
echo "site-packages/Pyside2 exists, skipping copying" echo "site-packages/Pyside2 exists, skipping copying"
fi fi

8
dist/macos/Entitlements.plist vendored Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.debugger</key>
<true/>
</dict>
</plist>