Fix macOS versioning
This commit is contained in:
1
dist/CMakeLists.txt
vendored
1
dist/CMakeLists.txt
vendored
@@ -9,6 +9,7 @@ endif()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/debian/changelog.in ${CMAKE_CURRENT_SOURCE_DIR}/debian/changelog)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pacman/PKGBUILD.in ${CMAKE_CURRENT_SOURCE_DIR}/pacman/PKGBUILD @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist.in ${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/macos/create-dmg.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/macos/create-dmg.sh)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry-x86.nsi.in ${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry-x86.nsi @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry-x64.nsi.in ${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry-x64.nsi @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry-debug-x86.nsi.in ${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry-debug-x86.nsi @ONLY)
|
||||
|
||||
27
dist/macos/create-dmg.sh
vendored
27
dist/macos/create-dmg.sh
vendored
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <bundle.app>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NAME=$(basename "$1" | perl -pe 's/(.*).app/\1/')
|
||||
IN="$1"
|
||||
TMP="dmg/$NAME"
|
||||
OUT="$NAME.dmg"
|
||||
|
||||
rm -rf "$TMP"
|
||||
rm -f "$OUT"
|
||||
|
||||
mkdir -p "$TMP"
|
||||
#mkdir -p "$TMP/.background"
|
||||
#cp ../dist/macos/dmg_background.png "$TMP/.background/background.png"
|
||||
#cp ../dist/macos/DS_Store.in "$TMP/.DS_Store"
|
||||
#chmod go-rwx "$TMP/.DS_Store"
|
||||
ln -s /Applications "$TMP/Applications"
|
||||
# Copies the prepared bundle into the dir that will become the DMG
|
||||
cp -R "$IN" "$TMP"
|
||||
|
||||
# Create dmg
|
||||
hdiutil makehybrid -hfs -hfs-volume-name "$NAME" -hfs-openfolder "$TMP" "$TMP" -o tmp.dmg
|
||||
hdiutil convert -format UDZO -imagekey zlib-level=9 tmp.dmg -o "$OUT"
|
||||
29
dist/macos/create-dmg.sh.in
vendored
Executable file
29
dist/macos/create-dmg.sh.in
vendored
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
version="@STRAWBERRY_VERSION_PACKAGE@"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <bundle.app>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
name=$(basename "$1" | perl -pe 's/(.*).app/\1/')
|
||||
bundle_dir="$1"
|
||||
temp_dir="dmg/$name"
|
||||
output_file="$name-$version.dmg"
|
||||
|
||||
rm -rf "$temp_dir"
|
||||
rm -f "$output_file"
|
||||
|
||||
mkdir -p "$temp_dir"
|
||||
#mkdir -p "$temp_dir/.background"
|
||||
#cp ../dist/macos/dmg_background.png "$temp_dir/.background/background.png"
|
||||
#cp ../dist/macos/DS_Store.in "$temp_dir/.DS_Store"
|
||||
#chmod go-rwx "$temp_dir/.DS_Store"
|
||||
ln -s /Applications "$temp_dir/Applications"
|
||||
# Copies the prepared bundle into the dir that will become the DMG
|
||||
cp -R "$bundle_dir" "$temp_dir"
|
||||
|
||||
# Create dmg
|
||||
hdiutil makehybrid -hfs -hfs-volume-name "$name" -hfs-openfolder "$temp_dir" "$temp_dir" -o tmp.dmg
|
||||
hdiutil convert -format UDZO -imagekey zlib-level=9 tmp.dmg -o "$output_file"
|
||||
Reference in New Issue
Block a user