Commit 28cb4e13 authored by Roman Haefeli's avatar Roman Haefeli
Browse files

add build script for creating a window bundle

parent bef7eff6
#!/bin/bash
app_name="netpd"
app_version="2.2"
package_version=$(date +%Y-%m-%d)
# Pd
pd_archive_file=~/Downloads/pd-0.51-0.msw.zip
# Libraries
ext_urls=()
ext_urls+=("http://puredata.info/Members/rdz/software/binfile/0.1~git20181006/binfile%5Bv0.1~git20181006%5D(Windows-amd64-32).dek")
ext_urls+=("https://netpd.org/~roman/else%5Bv1.0beta27%5D(Windows-amd64-32).dek")
ext_urls+=("http://puredata.info/Members/musil/software/iemlib/1.22/iemlib%5Bv1.22%5D(Darwin-amd64-32)(Darwin-i386-32)(Linux-amd64-32)(Windows-amd64-32)(Windows-i386-32)(Sources).dek")
ext_urls+=("http://puredata.info/Members/zmoelnigbot/software/iemnet/0.2.3/iemnet%5Bv0.2.3%5D(Windows-amd64-32).dek")
ext_urls+=("http://puredata.info/Members/rdz/software/osc/0.2~git20181006/osc%5Bv0.2~git20181006%5D(Windows-amd64-32).dek")
ext_urls+=("http://puredata.info/Members/rdz/software/slip/0.1~git20181006/slip%5Bv0.1~git20181006%5D(Windows-amd64-32).dek")
ext_urls+=("http://puredata.info/Members/zmoelnigbot/software/zexy/2.3.1/zexy%5Bv2.3.1%5D(Darwin-amd64-32)(Linux-amd64-32)(Linux-arm64-32)(Linux-armv7-32)(Linux-i386-32)(Windows-amd64-32)(Windows-i386-32).dek")
# netpd bundle
netpd_bundle_url="https://www.netpd.org/~roman/netpd-plus-instruments.zip"
# workdir
work_dir="${app_name}-${app_version}"
function fail {
echo "abort due some error"
exit 1
}
# do stuff
(
cd "$(dirname "$0")"
(
mkdir -p "${work_dir}"
cd "${work_dir}"
# install pd
unzip -q "${pd_archive_file}" || fail
mv pd-0.*-* pd-netpd || fail
# install externals
(
cd pd-netpd/extra
for url in ${ext_urls[@]}
do
curl -s -o file "${url}" || fail
if file file | grep ' Zip archive data' > /dev/null
then
unzip -q file || fail
fi
if file file | grep 'gzip compressed data' > /dev/null
then
tar xf file || fail
fi
rm file || fail
done
) || fail
# install netpd
(
cd pd-netpd
curl -s -o file "${netpd_bundle_url}" || fail
unzip -q file && rm file || fail
mv netpd/instruments .. || fail
) || fail
) || fail
# apply patch to load netpd at start
patch -s ${work_dir}/pd-netpd/tcl/pd-gui.tcl < files/pd-gui.tcl.patch || fail
# fix instruments path in preferences
patch -s ${work_dir}/pd-netpd/netpd/includes/netpd-preferences.cnf < files/netpd-preferences.cnf.patch || fail
# copy launcher exe
cp files/netpd.exe "${work_dir}" || fail
# copy README
cp files/README.txt.win "${work_dir}/README.txt" || fail
# create version file
echo "${app_version} (${package_version})" > "${work_dir}/VERSION.txt"
# create archive
zip -q -r "${app_name}-${app_version}_windows_${package_version}.zip" "${app_name}-${app_version}"
# upload bundle
scp -q "${app_name}-${app_version}_windows_${package_version}.zip" all@netpd.org:public_html/software/
# clean up
rm -rf "${work_dir}" ""${app_name}-${app_version}_windows_${package_version}.zip""
)
Markdown is supported
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