Fix macOS versioning
This commit is contained in:
@@ -26,7 +26,7 @@ before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export Qt5_DIR=/usr/local/opt/qt5/lib/cmake ; fi
|
||||
before_script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build cmake -Hstrawberry -Bbuild -DENABLE_STREAM_DEEZER=ON ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir build; cd build; cmake .. -DFORCE_GIT_REVISION="0.0.0-0-g0000000" -DUSE_BUNDLE=ON; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir build; cd build; cmake .. -DUSE_BUNDLE=ON -DENABLE_STREAM_DEEZER=ON ; fi
|
||||
script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker exec build make -C build -j8 ; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make -j8 ; fi
|
||||
@@ -36,7 +36,7 @@ script:
|
||||
after_success:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ls -lh strawberry.dmg; fi
|
||||
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash ../dist/scripts/upload.sh strawberry.dmg; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rsync strawberry.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rsync -va strawberry*.dmg travis@echoes.jkvinge.net:/home/travis/builds/macos; fi
|
||||
|
||||
branches:
|
||||
except:
|
||||
|
||||
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