Fix macOS security policy rejection after install
After copying binaries to ~/.local/bin, macOS AppleSystemPolicy would reject them because the linker-signed code signature becomes invalid. Now re-sign binaries with ad-hoc signature after copying on macOS.
This commit is contained in:
@@ -16,6 +16,14 @@ cp target/release/g3 "$INSTALL_DIR/"
|
|||||||
cp target/release/studio "$INSTALL_DIR/g3-studio"
|
cp target/release/studio "$INSTALL_DIR/g3-studio"
|
||||||
cp target/release/libVisionBridge.dylib "$INSTALL_DIR/"
|
cp target/release/libVisionBridge.dylib "$INSTALL_DIR/"
|
||||||
|
|
||||||
|
# Re-sign binaries after copying (required on macOS to avoid security policy rejection)
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
echo "Re-signing binaries for macOS..."
|
||||||
|
codesign --force --sign - "$INSTALL_DIR/g3"
|
||||||
|
codesign --force --sign - "$INSTALL_DIR/g3-studio"
|
||||||
|
codesign --force --sign - "$INSTALL_DIR/libVisionBridge.dylib"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create symlink to override Android Studio's 'studio' command
|
# Create symlink to override Android Studio's 'studio' command
|
||||||
# Remove existing symlink if present, but don't remove if it's a different file
|
# Remove existing symlink if present, but don't remove if it's a different file
|
||||||
if [ -L "$INSTALL_DIR/studio" ]; then
|
if [ -L "$INSTALL_DIR/studio" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user