Simplify the process of building the universal bundle on the macOS
This commit is contained in:
parent
c1b2811bbf
commit
e26c2873db
6 changed files with 28 additions and 8 deletions
2
Makefile
2
Makefile
|
|
@ -162,7 +162,7 @@ LIBMINGW:=$($(OS)_LIBMINGW)
|
||||||
windows_EXE_EXT:=.exe
|
windows_EXE_EXT:=.exe
|
||||||
EXE_EXT:=$($(OS)_EXE_EXT)
|
EXE_EXT:=$($(OS)_EXE_EXT)
|
||||||
|
|
||||||
macos_BUNDLE:=./TuxPaint.app
|
macos_BUNDLE:=./TuxPaint-$(ARCHS).app
|
||||||
ios_BUNDLE:=./TuxPaint-$(SDK).app
|
ios_BUNDLE:=./TuxPaint-$(SDK).app
|
||||||
BUNDLE:=$($(OS)_BUNDLE)
|
BUNDLE:=$($(OS)_BUNDLE)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,11 @@ https://tuxpaint.org/
|
||||||
* Make screen refresh more snappy on macOS.
|
* Make screen refresh more snappy on macOS.
|
||||||
Mark Kim <markuskimius@gmail.com>
|
Mark Kim <markuskimius@gmail.com>
|
||||||
|
|
||||||
|
* Simplify the process of building the universal bundle on the macOS by
|
||||||
|
automatically adding the machine suffix (-arm64 or -x86_64) when building
|
||||||
|
the macOS bundle. Previously this renaming step was required to be done
|
||||||
|
manually to build the universal bundle.
|
||||||
|
|
||||||
2024.January.29 (0.9.32)
|
2024.January.29 (0.9.32)
|
||||||
* Improvements to Magic tools:
|
* Improvements to Magic tools:
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
BUNDLE=TuxPaint.app
|
BUNDLE=TuxPaint-$(uname -m).app
|
||||||
BINARY="$BUNDLE/Contents/MacOS/tuxpaint"
|
BINARY="$BUNDLE/Contents/MacOS/tuxpaint"
|
||||||
LIBS=`find $BUNDLE/Contents/Resources/lib -type f`
|
LIBS=`find $BUNDLE/Contents/Resources/lib -type f`
|
||||||
LIBDIR="$BUNDLE/Contents/lib"
|
LIBDIR="$BUNDLE/Contents/lib"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,20 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
BUNDLE=TuxPaint.app
|
BUNDLE=TuxPaint.app
|
||||||
|
|
||||||
|
if [[ ! -d "$BUNDLE" ]]; then
|
||||||
|
ARCHBUNDLE=TuxPaint-$(uname -m).app
|
||||||
|
|
||||||
|
if [[ -d "$ARCHBUNDLE" ]]; then
|
||||||
|
echo " $BUNDLE missing. Did you forget to either run 'macos/build-universal.sh' first,"
|
||||||
|
echo " or rename $ARCHBUNDLE to $BUNDLE first?"
|
||||||
|
else
|
||||||
|
echo " Did you forget to 'make' $ARCHBUNDLE first?"
|
||||||
|
fi 1>&2
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
TEMP_DMG=temp.dmg
|
TEMP_DMG=temp.dmg
|
||||||
TEMP_DMG_SIZE=`expr \`du -sm "$BUNDLE" | cut -f1\` \* 15 / 10`m
|
TEMP_DMG_SIZE=`expr \`du -sm "$BUNDLE" | cut -f1\` \* 15 / 10`m
|
||||||
FINAL_DMG=TuxPaint.dmg
|
FINAL_DMG=TuxPaint.dmg
|
||||||
|
|
@ -16,7 +30,6 @@ VOLNAME="Tux Paint"
|
||||||
ICON="macos/tuxpaint.icns"
|
ICON="macos/tuxpaint.icns"
|
||||||
BACKGROUND="macos/background.png"
|
BACKGROUND="macos/background.png"
|
||||||
|
|
||||||
|
|
||||||
echo " * Creating the temporary image..."
|
echo " * Creating the temporary image..."
|
||||||
hdiutil create "$TEMP_DMG" -ov -fs HFS+ -size "$TEMP_DMG_SIZE" -volname "$VOLNAME" \
|
hdiutil create "$TEMP_DMG" -ov -fs HFS+ -size "$TEMP_DMG_SIZE" -volname "$VOLNAME" \
|
||||||
&& VOLUME=`hdiutil attach "$TEMP_DMG" -nobrowse -noverify -noautoopen | grep Apple_HFS | sed 's/^.*Apple_HFS[[:blank:]]*//'` \
|
&& VOLUME=`hdiutil attach "$TEMP_DMG" -nobrowse -noverify -noautoopen | grep Apple_HFS | sed 's/^.*Apple_HFS[[:blank:]]*//'` \
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ function build-universal() {
|
||||||
&& find "$OUTBUNDLE" -name '*.dylib' -print0 | xargs -0 rm -f \
|
&& find "$OUTBUNDLE" -name '*.dylib' -print0 | xargs -0 rm -f \
|
||||||
|| return 1
|
|| return 1
|
||||||
|
|
||||||
# Create the universal binary for each binary and library
|
# Create the universal version of each binary and library
|
||||||
for (( i=0; i < ${#BUNDLES[@]}; i++ )); do
|
for (( i=0; i < ${#BUNDLES[@]}; i++ )); do
|
||||||
local filelist=()
|
local filelist=()
|
||||||
local file
|
local file
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ -d TuxPaint.app ]]; then
|
BUNDLE=TuxPaint-$(uname -m).app
|
||||||
cd TuxPaint.app/Contents && FONTCONFIG_PATH=Resources/etc fc-list
|
|
||||||
|
if [[ -d "${BUNDLE}" ]]; then
|
||||||
|
cd "${BUNDLE}/Contents" && FONTCONFIG_PATH=Resources/etc fc-list
|
||||||
else
|
else
|
||||||
echo "./TuxPaint.app: No such folder" 1>&2
|
echo "./${BUNDLE}: No such folder" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue