commit
a7c3157345
496 files changed
+171644
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?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>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>flameshot</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>LSUIElement</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Executable
+96
@@ -0,0 +1,96 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to create and optionally sign a DMG file
|
||||
# Usage: create_dmg.sh <app_path> <dmg_path> <app_sign_identity> <dmg_sign_identity>
|
||||
# If signing identities are empty, DMG will be created unsigned
|
||||
|
||||
APP_PATH="$1"
|
||||
DMG_PATH="$2"
|
||||
APP_SIGN_IDENTITY="$3"
|
||||
DMG_SIGN_IDENTITY="$4"
|
||||
|
||||
if [ $# -ne 4 ]; then
|
||||
echo "Usage: create_dmg.sh <app_path> <dmg_path> <app_sign_identity> <dmg_sign_identity>"
|
||||
echo "Note: Leave signing identities empty to create unsigned DMG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Creating DMG from: $APP_PATH"
|
||||
echo "Output DMG: $DMG_PATH"
|
||||
|
||||
rm -f "$DMG_PATH"
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
echo "Using temp directory: $TEMP_DIR"
|
||||
|
||||
cp -R "$APP_PATH" "$TEMP_DIR/"
|
||||
|
||||
# Create Applications symlink
|
||||
ln -s /Applications "$TEMP_DIR/Applications"
|
||||
|
||||
# Calculate size needed for DMG (in KB)
|
||||
SIZE=$(du -sk "$TEMP_DIR" | cut -f1)
|
||||
SIZE=$((SIZE + 1000)) # Add some padding
|
||||
|
||||
echo "Creating DMG with size: ${SIZE}k"
|
||||
|
||||
# Create DMG
|
||||
hdiutil create -srcfolder "$TEMP_DIR" \
|
||||
-volname "Flameshot" \
|
||||
-fs HFS+ \
|
||||
-fsargs "-c c=64,a=16,e=16" \
|
||||
-format UDZO \
|
||||
-size ${SIZE}k \
|
||||
"$DMG_PATH"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to create DMG"
|
||||
rm -rf "$TEMP_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "DMG created successfully"
|
||||
|
||||
# Sign the DMG (either with identity or ad hoc)
|
||||
if [ -n "$DMG_SIGN_IDENTITY" ] && [ "$DMG_SIGN_IDENTITY" != "" ]; then
|
||||
echo "Signing DMG with identity: $DMG_SIGN_IDENTITY"
|
||||
codesign --force --sign "$DMG_SIGN_IDENTITY" --timestamp "$DMG_PATH"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "DMG signed with Developer ID"
|
||||
# Verify signature
|
||||
echo "Verifying DMG signature..."
|
||||
codesign --verify --verbose "$DMG_PATH"
|
||||
else
|
||||
echo "Failed to sign DMG with identity"
|
||||
rm -rf "$TEMP_DIR"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Signing DMG with ad hoc signature (no identity required)"
|
||||
codesign --force --sign - "$DMG_PATH"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "DMG signed with ad hoc signature"
|
||||
else
|
||||
echo "Failed to ad hoc sign DMG"
|
||||
rm -rf "$TEMP_DIR"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
rm -rf "$TEMP_DIR"
|
||||
|
||||
echo "DMG creation complete: $DMG_PATH"
|
||||
|
||||
if [ -z "$DMG_SIGN_IDENTITY" ] || [ "$DMG_SIGN_IDENTITY" = "" ]; then
|
||||
echo ""
|
||||
echo "NOTE: This DMG uses ad hoc signing (no Developer ID required)."
|
||||
echo "Users will see a security warning but can still run the app by:"
|
||||
echo "1. Right-clicking the app and selecting 'Open'"
|
||||
echo "2. Or going to System Preferences > Security & Privacy and clicking 'Open Anyway'"
|
||||
echo "3. The warning only appears on first launch"
|
||||
echo ""
|
||||
echo "The app and DMG are properly signed for Apple Silicon requirements."
|
||||
fi
|
||||
Binary file not shown.
Reference in new issue
Block a user