Skip to content

Commit 02665ca

Browse files
authored
Change github workflows to provide MacOs full release zip file (#1290)
1 parent b819e18 commit 02665ca

37 files changed

+3613
-273
lines changed

.github/workflows/buildLoadup.yml

Lines changed: 261 additions & 78 deletions
Large diffs are not rendered by default.

.github/workflows/buildReleaseInclDocker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
echo "force=false" >> $GITHUB_OUTPUT;
8585
fi
8686
87+
8788
######################################################################################
8889

8990

installers/deb/build_deb.sh

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@
1111
###############################################################################
1212
# set -x
1313

14-
# mess with file desscriptors so we get only one line on stdout
15-
# so we can communicate only what we want back to any githib runner
16-
# stash fd 1 in fd 3
17-
exec 3>&1
18-
# make fd 1 (stdout) be the same as stdout
19-
# so none of the std output from this file will be captured by
20-
# $() but it will still be written out to the tty (via stderr)
21-
exec 1>&2
22-
2314
tarball_dir=tmp/tarballs
2415

2516
# Make sure we are in the right directory
@@ -32,6 +23,13 @@ then
3223
exit 1
3324
fi
3425

26+
# template for artifacts file names should be passed down in the ENV variable: ARTIFACTS_FILENAME_TEMPLATE
27+
if [ -z "${ARTIFACTS_FILENAME_TEMPLATE}" ];
28+
then
29+
ARTIFACTS_FILENAME_TEMPLATE="medley-full-@@PLATFORM@@-@@ARCH@@-@@MEDLEY.RELEASE@@_@@MAIKO.RELEASE@@"
30+
fi
31+
32+
3533

3634
# If running as a github action or -t arg, then skip downloading the tarballs
3735
if ! [[ -n "${GITHUB_WORKSPACE}" || "$1" = "-t" ]];
@@ -69,7 +67,6 @@ fi
6967
pushd ${tarball_dir} >/dev/null 2>/dev/null
7068
medley_release=$(echo medley-*-loadups.tgz | sed "s/medley-\(.*\)-loadups.tgz/\1/")
7169
maiko_release=$(echo maiko-*-linux.x86_64.tgz | sed "s/maiko-\(.*\)-linux.x86_64.tgz/\1/")
72-
debs_filename_base="medley-full-${medley_release}_${maiko_release}"
7370
popd >/dev/null 2>/dev/null
7471

7572

@@ -136,7 +133,7 @@ do
136133
#
137134
# Create tar file for this arch
138135
#
139-
filename="${debs_filename_base}-${wslp}-${arch}"
136+
filename="$(echo ${ARTIFACTS_FILENAME_TEMPLATE} | sed -e "s#@@PLATFORM@@#${wslp}#" -e "s#@@ARCH@@#${arch}#" -e "s#@@MEDLEY.RELEASE@@#${medley_release}#" -e "s#@@MAIKO.RELEASE@@#${maiko_release}#" )"
140137
mkdir -p tars
141138
echo "Creating tar file tars/${filename}.tgz"
142139
tar -C ${il_dir} -czf tars/${filename}.tgz .
@@ -151,8 +148,5 @@ do
151148
done
152149
done
153150

154-
# send just one line back to github $() construct
155-
# do this by restoring fd 1 to what it was orginally
156-
exec 1>&3
157-
echo "${debs_filename_base}"
158-
151+
################################################################################################################
152+
################################################################################################################

installers/downloads_page/medley_downloads.html

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,46 @@
1010
<ul>
1111
<li><h4>Standard Linux</h4>
1212

13-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86_64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
13+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-linux-x86_64-@@@COMBINED.RELEASE.TAG@@@.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
1414

15-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
15+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-linux-aarch64-@@@COMBINED.RELEASE.TAG@@@.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
1616

17-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
17+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-linux-armv7l-@@@COMBINED.RELEASE.TAG@@@.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
1818
<li><h4>Windows System for Linux</h4>
1919

20-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86_64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86.64 machines</a></p>
20+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-wsl-x86_64-@@@COMBINED.RELEASE.TAG@@@.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86.64 machines</a></p>
2121

22-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
22+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-wsl-aarch64-@@@COMBINED.RELEASE.TAG@@@.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
2323
</ul></li>
2424
<li><h3>Local Installations (for any Linux distro)</h3>
2525

2626
<ul>
2727
<li><h4>Standard Linux</h4>
2828

29-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86_64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
29+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-linux-x86_64-@@@COMBINED.RELEASE.TAG@@@.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
3030

31-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
31+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-linux-aarch64-@@@COMBINED.RELEASE.TAG@@@.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
3232

33-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
33+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-linux-armv7l-@@@COMBINED.RELEASE.TAG@@@.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
3434
<li><h4>Windows System for Linux</h4>
3535

36-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86_64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
36+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-wsl-x86_64-@@@COMBINED.RELEASE.TAG@@@.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
3737

38-
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
38+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-wsl-aarch64-@@@COMBINED.RELEASE.TAG@@@.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
3939
</ul></li>
4040
</ul></li>
41-
<li><h2>WINDOWS 10/11 (Medley runs in a Docker container)</h2>
41+
<li><h2>macOS 11 (Big Sur) and later - for both Intel and Apple Silicon</h2>
4242

43-
<p><a href="@@@DOWNLOAD_URL@@@/@@@WINDOWS.INSTALLER.FILENAME@@@">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for Windows x64 machines</a></p></li>
43+
<ul>
44+
<li><h3>DMG Installer</h3>
45+
46+
<p>Not available</p></li>
47+
<li><h3>ZIP Installer</h3>
48+
49+
<p><a href="@@@DOWNLOAD_URL@@@/medley-full-macos-universal-@@@COMBINED.RELEASE.TAG@@@.zip">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@</a></p></li>
50+
</ul></li>
51+
<li><h2>WINDOWS 10/11 (Medley running within Cygwin)</h2>
52+
53+
<p>Not available</p></li>
4454
</ul></li>
4555
</ul>

installers/downloads_page/medley_downloads.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,47 @@
66

77
* #### Standard Linux
88

9-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86\_64.deb)
9+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/medley-full-linux-x86\_64-@@@COMBINED.RELEASE.TAG@@@.deb)
1010

11-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.deb)
11+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/medley-full-linux-aarch64-@@@COMBINED.RELEASE.TAG@@@.deb)
1212

13-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.deb)
13+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](@@@DOWNLOAD_URL@@@/medley-full-linux-armv7l-@@@COMBINED.RELEASE.TAG@@@.deb)
1414

1515
* #### Windows System for Linux
1616

17-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\.64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86\_64.deb)
17+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\.64 machines](@@@DOWNLOAD_URL@@@/medley-full-wsl-x86\_64-@@@COMBINED.RELEASE.TAG@@@.deb)
1818

19-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.deb)
19+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/medley-full-wsl-aarch64-@@@COMBINED.RELEASE.TAG@@@.deb)
2020

2121
* ### Local Installations (for any Linux distro)
2222

2323
* #### Standard Linux
2424

25-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86\_64.tgz)
25+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/medley-full-linux-x86\_64-@@@COMBINED.RELEASE.TAG@@@.tgz)
2626

27-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.tgz)
27+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/medley-full-linux-aarch64-@@@COMBINED.RELEASE.TAG@@@.tgz)
2828

29-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.tgz)
29+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](@@@DOWNLOAD_URL@@@/medley-full-linux-armv7l-@@@COMBINED.RELEASE.TAG@@@.tgz)
3030

3131
* #### Windows System for Linux
3232

33-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86\_64.tgz)
33+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/medley-full-wsl-x86\_64-@@@COMBINED.RELEASE.TAG@@@.tgz)
3434

35-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.tgz)
35+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/medley-full-wsl-aarch64-@@@COMBINED.RELEASE.TAG@@@.tgz)
3636

37-
* ## WINDOWS 10/11 (Medley runs in a Docker container)
37+
* ## macOS 11 (Big Sur) and later - for both Intel and Apple Silicon
3838

39-
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for Windows x64 machines](@@@DOWNLOAD_URL@@@/@@@WINDOWS.INSTALLER.FILENAME@@@)
39+
* ### DMG Installer
4040

41+
Not available
42+
43+
* ### ZIP Installer
44+
45+
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@](@@@DOWNLOAD_URL@@@/medley-full-macos-universal-@@@COMBINED.RELEASE.TAG@@@.zip)
46+
47+
* ## WINDOWS 10/11 (Medley running within Cygwin)
48+
49+
Not available
4150

4251

4352

installers/macos/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
tmp
2+
devtmp
3+
pkg/*.pkg
4+
artifacts
5+
6+
7+

installers/macos/app/Info.plist

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleExecutable</key>
8+
<string>medley/medley</string>
9+
<key>CFBundleGetInfoString</key>
10+
<string>Medley Interlisp, Copyright 2023 Interlisp.org</string>
11+
<key>CFBundleIconFile</key>
12+
<string>Medley.icns</string>
13+
<key>CFBundleIdentifier</key>
14+
<string>org.interlisp.Medley</string>
15+
<key>CFBundleDocumentTypes</key>
16+
<array>
17+
</array>
18+
<key>CFBundleInfoDictionaryVersion</key>
19+
<string>3.51</string>
20+
<key>CFBundlePackageType</key>
21+
<string>APPL</string>
22+
<key>CFBundleShortVersionString</key>
23+
<string>--VERSION_TAG--</string>
24+
<key>CFBundleSignature</key>
25+
<string>Medley</string>
26+
<key>CFBundleVersion</key>
27+
<string>--VERSION_TAG--</string>
28+
<key>NSHumanReadableCopyright</key>
29+
<string>Copyright 2023 Interlisp.org</string>
30+
<key>LSMinimumSystemVersion</key>
31+
<string>11.0</string>
32+
</dict>
33+
</plist>

installers/macos/app/PkgInfo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APPLMedley

installers/macos/build_app.sh

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
#!/bin/bash
2+
###############################################################################
3+
#
4+
# build_app.sh: build app bundle for installing Medley Interlisp on MacOS
5+
#
6+
# 2023-02-23 Frank Halasz
7+
#
8+
# Copyright 2023 by Interlisp.org
9+
#
10+
###############################################################################
11+
12+
APPNAME=Medley
13+
14+
# 2023-07-19 Temorary selector to allow us to create .zip asset before app/dmg work is finished
15+
INCLUDE_APP="no" # "yes" or "no"
16+
17+
# Make sure we are in the right directory
18+
if [ ! -f ./app/Info.plist ];
19+
then
20+
echo "Can't find ./app/Info.plist file."
21+
echo "Incorrect cwd?"
22+
echo "Should be in medley/installers/macos"
23+
echo "Exiting"
24+
exit 1
25+
fi
26+
27+
# template for artifacts file names should be passed down in the ENV variable: ARTIFACTS_FILENAME_TEMPLATE
28+
if [ -z "${ARTIFACTS_FILENAME_TEMPLATE}" ];
29+
then
30+
ARTIFACTS_FILENAME_TEMPLATE="medley-full-@@PLATFORM@@-@@ARCH@@-@@MEDLEY.RELEASE@@_@@MAIKO.RELEASE@@"
31+
fi
32+
33+
#
34+
# Setup directories
35+
#
36+
CWD=$(pwd)
37+
RESULTS_DIR=${CWD}/artifacts
38+
APPBUNDLE=${RESULTS_DIR}/${APPNAME}.app
39+
APPBUNDLECONTENTS=${APPBUNDLE}/Contents
40+
APPBUNDLEEXE=${APPBUNDLECONTENTS}/MacOS
41+
APPBUNDLERESOURCES=${APPBUNDLECONTENTS}/Resources
42+
APPBUNDLEICON=${APPBUNDLECONTENTS}/Resources
43+
tmp_dir=${CWD}/tmp
44+
tarball_dir=${tmp_dir}/tarballs
45+
46+
# If running as a github action or -t arg, then skip downloading the tarballs
47+
if ! [[ -n "${GITHUB_WORKSPACE}" || "$1" = "-t" ]];
48+
then
49+
# First, make sure gh is available and we are logged in to github
50+
if [ -z "$(which gh)" ];
51+
then
52+
echo "Can't find gh"
53+
echo "Exiting."
54+
exit 2
55+
fi
56+
gh auth status 2>&1 | grep --quiet --no-messages "Logged in to github.com"
57+
if [ $? -ne 0 ];
58+
then
59+
echo "Not logged into github."
60+
echo "Exiting."
61+
exit 3
62+
fi
63+
# then clear out the ./tmp directory
64+
rm -rf ${tmp_dir}
65+
mkdir -p ${tmp_dir}
66+
# then download the maiko and medley tarballs
67+
mkdir -p ${tarball_dir}
68+
echo "Fetching maiko and medley release tarballs"
69+
TAG=$(gh release list --repo interlisp/maiko | head -n 1 | awk "{print \$1 }")
70+
gh release download ${TAG} \
71+
--repo interlisp/maiko \
72+
--dir ${tarball_dir} \
73+
--pattern "*darwin*.tgz"
74+
TAG=$(gh release list --repo interlisp/medley | head -n 1 | awk "{print \$1 }")
75+
gh release download ${TAG} \
76+
--repo interlisp/medley \
77+
--dir ${tarball_dir} \
78+
--pattern "*-loadups.tgz" \
79+
--pattern "*-runtime.tgz"
80+
gh repo clone interlisp/notecards notecards -- --depth 1
81+
(cd notecards; git archive --format=tgz --output=../notecards.tgz --prefix=notecards/ main)
82+
mv notecards.tgz ${tarball_dir}
83+
rm -rf notecards
84+
fi
85+
86+
# Figure out release tags from tarball names
87+
pushd ${tarball_dir} >/dev/null 2>/dev/null
88+
medley_release=$(echo medley-*-loadups.tgz | sed "s/medley-\(.*\)-loadups.tgz/\1/")
89+
maiko_release=$(echo maiko-*-darwin.x86_64.tgz | sed "s/maiko-\(.*\)-darwin.x86_64.tgz/\1/")
90+
popd >/dev/null 2>/dev/null
91+
92+
if [ "${INCLUDE_APP}" = "yes" ]; then
93+
#
94+
# Create bundle dirs
95+
#
96+
rm -rf ${RESULTS_DIR}
97+
mkdir -p ${RESULTS_DIR}
98+
rm -rf ${APPBUNDLE}
99+
mkdir -p ${APPBUNDLE}
100+
mkdir ${APPBUNDLE}/Contents
101+
mkdir ${APPBUNDLE}/Contents/MacOS
102+
mkdir ${APPBUNDLE}/Contents/Resources
103+
#
104+
# Create icons and put in bundle
105+
#
106+
iconset_dir=${tmp_dir}/${APPNAME}.iconset
107+
rm -rf ${iconset_dir}
108+
mkdir -p ${iconset_dir}
109+
image_dir=${CWD}/images
110+
sips -z 16 16 ${image_dir}/App_icon1024.png --out ${iconset_dir}/icon_16x16.png >/dev/null 2>&1
111+
sips -z 32 32 ${image_dir}/App_icon1024.png --out ${iconset_dir}/[email protected] >/dev/null 2>&1
112+
sips -z 32 32 ${image_dir}/App_icon1024.png --out ${iconset_dir}/icon_32x32.png >/dev/null 2>&1
113+
sips -z 64 64 ${image_dir}/App_icon1024.png --out ${iconset_dir}/[email protected] >/dev/null 2>&1
114+
sips -z 128 128 ${image_dir}/App_icon1024.png --out ${iconset_dir}/icon_128x128.png >/dev/null 2>&1
115+
sips -z 256 256 ${image_dir}/App_icon1024.png --out ${iconset_dir}/[email protected] >/dev/null 2>&1
116+
sips -z 256 256 ${image_dir}/App_icon1024.png --out ${iconset_dir}/icon_256x256.png >/dev/null 2>&1
117+
sips -z 512 512 ${image_dir}/App_icon1024.png --out ${iconset_dir}/[email protected] >/dev/null 2>&1
118+
sips -z 512 512 ${image_dir}/App_icon1024.png --out ${iconset_dir}/icon_512x512.png >/dev/null 2>&1
119+
cp ${image_dir}/App_icon1024.png ${iconset_dir}/[email protected]
120+
iconutil -c icns -o ${tmp_dir}/${APPNAME}.icns ${iconset_dir}
121+
cp ${tmp_dir}/${APPNAME}.icns ${APPBUNDLEICON}/
122+
rm -r ${iconset_dir}
123+
rm ${tmp_dir}/${APPNAME}.icns
124+
#
125+
# Update and copy in "control" files
126+
#
127+
sed -e "s/--VERSION_TAG--/${medley_release}.${maiko_release}.0/g" \
128+
< app/Info.plist \
129+
> ${APPBUNDLECONTENTS}/Info.plist
130+
cp app/PkgInfo ${APPBUNDLECONTENTS}/
131+
fi #INCLUDE_APP
132+
133+
#
134+
# Untar the maiko and medley releases into the bundle
135+
#
136+
il_dir=${APPBUNDLE}/Contents/MacOS
137+
mkdir -p ${il_dir}
138+
tar -x -z -C ${il_dir} \
139+
-f "${tarball_dir}/maiko-${maiko_release}-darwin.universal.tgz"
140+
tar -x -z -C ${il_dir} \
141+
-f "${tarball_dir}/medley-${medley_release}-runtime.tgz"
142+
tar -x -z -C ${il_dir} \
143+
-f "${tarball_dir}/medley-${medley_release}-loadups.tgz"
144+
tar -x -z -C ${il_dir} \
145+
-f "${tarball_dir}/notecards.tgz"
146+
#
147+
# Handle run_medley needing separate directories for each arch
148+
#
149+
pushd ${il_dir}/maiko >/dev/null 2>&1
150+
ln -s darwin.universal darwin.aarch64
151+
ln -s darwin.universal darwin.x86_64
152+
popd >/dev/null 2>&1
153+
#
154+
# Add file icon to medley.command
155+
#
156+
if [ -z "$(which fileicon)" ];
157+
then
158+
brew install fileicon
159+
fi
160+
fileicon set ${il_dir}/medley/scripts/medley/medley.command ${image_dir}/Command_icon128.png
161+
#
162+
# Also create the zip file of il_dir for distribution
163+
#
164+
pushd ${il_dir} >/dev/null 2>&1
165+
filename="$(echo ${ARTIFACTS_FILENAME_TEMPLATE} | sed -e "s#@@PLATFORM@@#macos#" -e "s#@@ARCH@@#universal#" -e "s#@@MEDLEY.RELEASE@@#${medley_release}#" -e "s#@@MAIKO.RELEASE@@#${maiko_release}#" )"
166+
zip -r -6 -y -q ${RESULTS_DIR}/${filename}.zip .
167+
popd >/dev/null 2>&1
168+
169+
######################################################################################################
170+
######################################################################################################

0 commit comments

Comments
 (0)