fix paths, add icon (template)
This commit is contained in:
parent
788aa77639
commit
53ba212860
|
@ -1,12 +1,12 @@
|
|||
#!/bin/bash
|
||||
# Get the directory of the current script (works even if the script is called from another location)
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
PARENT_DIR="$(dirname "$DIR")"
|
||||
|
||||
BUNDLE_NAME="Czkawka.app"
|
||||
BUNDLE_PATH="$DIR/../target/release/$BUNDLE_NAME"
|
||||
BINARY_NAME="czkawka_gui"
|
||||
|
||||
# Get the directory of the current script (works even if the script is called from another location)
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
# Step 1: Build the project
|
||||
cargo build --release --manifest-path="$DIR/../Cargo.toml" --bin $BINARY_NAME
|
||||
|
||||
|
@ -15,11 +15,12 @@ mkdir -p "$BUNDLE_PATH/Contents/MacOS"
|
|||
mkdir -p "$BUNDLE_PATH/Contents/Resources"
|
||||
|
||||
# Step 3: Copy the binary
|
||||
cp "$DIR/../target/release/$BINARY_NAME" "$BUNDLE_PATH/Contents/MacOS/"
|
||||
cp "$PARENT_DIR/target/release/$BINARY_NAME" "$BUNDLE_PATH/Contents/MacOS/"
|
||||
|
||||
# Step 4: Copy the icon and rename as .icns (macOS icon format)
|
||||
# Note: If you have the icon in .icns format use that directly
|
||||
cp "$DIR/../data/icons/com.github.qarmin.czkawka.svg" "$BUNDLE_PATH/Contents/Resources/Czkawka.icns"
|
||||
# Replace 'myicon.icns' with the actual name of your .icns file
|
||||
ICON_NAME="Czkawka.icns"
|
||||
cp "$PARENT_DIR/data/icons/com.github.qarmin.czkawka.svg" "$BUNDLE_PATH/Contents/Resources/$ICON_NAME"
|
||||
|
||||
# Step 5: Create the Info.plist file
|
||||
cat <<EOF >"$BUNDLE_PATH/Contents/Info.plist"
|
||||
|
@ -30,7 +31,7 @@ cat <<EOF >"$BUNDLE_PATH/Contents/Info.plist"
|
|||
<key>CFBundleExecutable</key>
|
||||
<string>$BINARY_NAME</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Czkawka.icns</string>
|
||||
<string>$ICON_NAME</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.github.qarmin.czkawka</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -43,4 +44,4 @@ cat <<EOF >"$BUNDLE_PATH/Contents/Info.plist"
|
|||
</plist>
|
||||
EOF
|
||||
|
||||
echo "Application bundle created at: $BUNDLE_PATH"
|
||||
echo "Application bundle created at: $BUNDLE_PATH"
|
Loading…
Reference in a new issue