release.sh steps for easy Mac OS distribution
This commit is contained in:
parent
d1ef9d2932
commit
456863839e
|
@ -5,7 +5,7 @@
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>Project: Doodle</string>
|
<string>Project: Doodle</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>doodle</string>
|
<string>sketchymaze</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>net.kirsle.ProjectDoodle</string>
|
<string>net.kirsle.ProjectDoodle</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
VERSION=`grep -e 'Version =' ../../pkg/branding/branding.go | head -n 1 | cut -d '"' -f 2`
|
VERSION=`grep -e 'Version =' ../../pkg/branding/branding.go | head -n 1 | cut -d '"' -f 2`
|
||||||
INSTALL_ROOT="/opt/sketchy-maze"
|
INSTALL_ROOT="/opt/sketchy-maze"
|
||||||
APP_NAME="Sketchy Maze.app"
|
APP_NAME="Sketchy Maze.app"
|
||||||
APP_FOLDER="../../etc/macos/$APP_NAME"
|
APP_FOLDER="../../../../etc/macos/$APP_NAME"
|
||||||
APP_CONTENTS="$APP_NAME/Contents"
|
APP_CONTENTS="$APP_NAME/Contents"
|
||||||
|
|
||||||
if [[ ! -f "./doodle" ]]; then
|
if [[ ! -f "./sketchymaze" ]]; then
|
||||||
echo Run this script from the directory containing the Doodle binary.
|
echo Run this script from the directory containing the Doodle binary.
|
||||||
echo This is usually at /dist/doodle-VERSION/ relative to the git root.
|
echo This is usually at /dist/doodle-VERSION/ relative to the git root.
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -28,5 +28,5 @@ mkdir -p "$APP_CONTENTS/MacOS"
|
||||||
mkdir -p "$APP_CONTENTS/Resources"
|
mkdir -p "$APP_CONTENTS/Resources"
|
||||||
|
|
||||||
# Copy binaries to /MacOS
|
# Copy binaries to /MacOS
|
||||||
cp doodle doodad "$APP_CONTENTS/MacOS/"
|
cp sketchymaze doodad "$APP_CONTENTS/MacOS/"
|
||||||
rsync -av ./ --exclude doodle --exclude doodad --exclude "$APP_NAME" "$APP_CONTENTS/Resources/"
|
rsync -av ./ --exclude sketchymaze --exclude doodad --exclude "$APP_NAME" "$APP_CONTENTS/Resources/"
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
# folder into Linux and Windows versions and zip them up
|
# folder into Linux and Windows versions and zip them up
|
||||||
# for release.
|
# for release.
|
||||||
#
|
#
|
||||||
# For Mac OS releases, after `make dist` run `release-osx.sh`
|
# If run on a Mac OS system, it runs only the Mac OS code
|
||||||
# instead.
|
# path; it does not expect any Windows .exe files or .dll's,
|
||||||
|
# the dist folder should be a Mac only build of the game.
|
||||||
|
#
|
||||||
# Add the user-level "gem install fpm" to the $PATH.
|
# Add the user-level "gem install fpm" to the $PATH.
|
||||||
# Might need fixing over time.
|
# Might need fixing over time.
|
||||||
export PATH="$PATH:$HOME/.local/share/gem/ruby/3.0.0/bin"
|
export PATH="$PATH:$HOME/.local/share/gem/ruby/3.0.0/bin"
|
||||||
|
@ -77,6 +78,35 @@ windows() {
|
||||||
zip -r "${RELEASE_PATH}/windows/sketchymaze-${VERSION}-windows-64bit.zip" .
|
zip -r "${RELEASE_PATH}/windows/sketchymaze-${VERSION}-windows-64bit.zip" .
|
||||||
cd -
|
cd -
|
||||||
}
|
}
|
||||||
|
macos() {
|
||||||
|
# Check for OSX binaries in the dist folder.
|
||||||
|
if [[ ! -f "${DIST_PATH}/doodad" ]]; then
|
||||||
|
echo No binaries found, skipping Mac release.
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
linux
|
# Prepare the OSX release.
|
||||||
windows
|
mkdir -p ${STAGE_PATH} "${RELEASE_PATH}/macos"
|
||||||
|
cp -r $DIST_PATH "${STAGE_PATH}/macos"
|
||||||
|
cd "$STAGE_PATH/macos"
|
||||||
|
|
||||||
|
# Zip it.
|
||||||
|
zip -r "${RELEASE_PATH}/macos/sketchymaze-${VERSION}-macos-x64.zip" .
|
||||||
|
|
||||||
|
# Create the .app bundle.
|
||||||
|
../../../../scripts/mac-app.sh
|
||||||
|
|
||||||
|
# Remove redundant Mac binaries from stage folder.
|
||||||
|
rm ./sketchymaze ./doodad
|
||||||
|
hdiutil create "${RELEASE_PATH}/macos/sketchymaze-${VERSION}-macOS-x64.dmg" \
|
||||||
|
-ov -volname "SketchyMaze" -fs HFS+ -srcfolder $(pwd)
|
||||||
|
|
||||||
|
cd -
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ `uname` == "Darwin" ]]; then
|
||||||
|
macos
|
||||||
|
else
|
||||||
|
linux
|
||||||
|
windows
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user