Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Roman Haefeli
netpd-app-builder
Commits
28cb4e13
Commit
28cb4e13
authored
Jun 07, 2020
by
Roman Haefeli
Browse files
add build script for creating a window bundle
parent
bef7eff6
Changes
1
Hide whitespace changes
Inline
Side-by-side
build_windows.sh
0 → 100755
View file @
28cb4e13
#!/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
""
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment