Commit e4808867 authored by Roman Haefeli's avatar Roman Haefeli
Browse files

attempt to construct a Info.plist file

parent 3015862d
#!/bin/bash
version="2.2"
app_name="netpd-${version}.app"
app_name="netpd"
app_version="2.2"
app_bundle_name="${app_name}-${app_version}.app"
package_version=$(date +%Y-%m-%d)
# Pd
pd_archive_file=~/Downloads/pd-0.51-0test3.mac.tar.gz
......@@ -22,6 +24,16 @@ netpd_bundle_url="https://www.netpd.org/~roman/netpd-plus-instruments.zip"
# workdir
work_dir=workdir
info_plist_replacements="
s/{DISPLAY_NAME}/${app_name}/
s/{EXECUTBALE}/${app_name}/
s/{ICON_FILES}/netpd.icns/
s/{BUNDLE_NAME}/${app_name}/
s/{BUNDLE_SHORT_VERSION}/${netpd_version} (${package_version})/
s/{SPOKEN_NAME}/${app_name}/
s/{BUNDLE_VERSION}/${netpd_version}/
"
function fail {
echo "abort due some error"
exit 1
......@@ -34,11 +46,11 @@ function fail {
# install pd
tar xvf "${pd_archive_file}" || fail
mv Pd-*.app "${app_name}" || fail
mv Pd-*.app "${app_bundle_name}" || fail
# install externals
(
cd ${app_name}/Contents/Resources/extra
cd ${app_bundle_name}/Contents/Resources/extra
for url in ${ext_urls[@]}
do
echo "downloading $url"
......@@ -57,7 +69,7 @@ function fail {
# install netpd
(
cd ${app_name}/Contents/Resources
cd ${app_bundle_name}/Contents/Resources
curl -o file "${netpd_bundle_url}" || fail
unzip file && rm file || fail
)
......@@ -65,6 +77,9 @@ function fail {
)
# apply patch to load netpd at start
patch ${work_dir}/${app_name}/Contents/Resources/tcl/pd-gui.tcl < files/pd-gui.tcl.patch
patch ${work_dir}/${app_bundle_name}/Contents/Resources/tcl/pd-gui.tcl < files/pd-gui.tcl.patch || fail
cp files/netpd.icns ${work_dir}/${app_bundle_name}/Contents/Resources/ || fail
sed -f <(echo "${info_plist_replacements}") files/Info.plist > ${work_dir}/${app_bundle_name}/Contents/Info.plist
echo "Done!"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ATSApplicationFontsPath</key>
<string>font</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>{DISPLAY_NAME}</string>
<key>CFBundleExecutable</key>
<string>{EXECUTBALE}</string>
<key>CFBundleIconFile</key>
<string>{ICON_FILES}</string>
<key>CFBundleIdentifier</key>
<string>org.netpd.pd-gui</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>{BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>{BUNDLE_SHORT_VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSpokenName</key>
<string>{SPOKEN_NAME}</string>
<key>CFBundleVersion</key>
<string>{BUNDLE_VERSION}</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment