Commit 2ed11af8 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

accommodate Windows builds in tar_em_up.sh

parent 040b845d
...@@ -19,6 +19,8 @@ then ...@@ -19,6 +19,8 @@ then
echo " -R build a Raspberry Pi deb (complete recompile)" echo " -R build a Raspberry Pi deb (complete recompile)"
echo " -r build a Raspberry Pi deb (incremental)" echo " -r build a Raspberry Pi deb (incremental)"
echo " -w install custom version of cwiid system-wide" echo " -w install custom version of cwiid system-wide"
echo " -z build a Windows installer (incremental)"
echo " -Z build a Windows installer (complete recompile)"
echo echo
echo " For custom install locations do the following before" echo " For custom install locations do the following before"
echo " running this script:" echo " running this script:"
...@@ -36,24 +38,39 @@ full=0 ...@@ -36,24 +38,39 @@ full=0
sys_cwiid=0 sys_cwiid=0
rpi=0 rpi=0
pkg=1 pkg=1
inno=0
inst_dir=${inst_dir:-/usr/local} inst_dir=${inst_dir:-/usr/local}
# Get the OS we're running under, normalized to names that can be used
# to fetch the nwjs binaries below
os=`uname | tr '[:upper:]' '[:lower:]'`
if [[ $os == *"mingw32"* ]]; then
os=win
fi
# Fetch the nw.js binary if we haven't already. We want to fetch it even # Fetch the nw.js binary if we haven't already. We want to fetch it even
# for building with no libs, so we do it before all options # for building with no libs, so we do it before all options
echo nwjs-sdk-v0.16.0-`uname | tr '[:upper:]' '[:lower:]'` echo nwjs-sdk-v0.16.0-`uname | tr '[:upper:]' '[:lower:]'`
if [ ! -d "../pd/nw/nw" ]; then if [ ! -d "../pd/nw/nw" ]; then
# fetch the nw.js binary (unfortunately over http...)
os=`uname | tr '[:upper:]' '[:lower:]'`
arch=""
if [ `getconf LONG_BIT` -eq 32 ]; then if [ `getconf LONG_BIT` -eq 32 ]; then
arch="ia32" arch="ia32"
else else
arch="x64" arch="x64"
fi fi
ext="tar.gz"
if [[ $os == "win" ]]; then
ext="zip"
# We need the lts version to be able to run on XP. For
# simplicity we use that same version for 64 bit Windows, too
nwjs_version="v0.14.7"
else
ext="tar.gz"
nwjs_version="v0.16.1"
fi
nwjs="nwjs-sdk" nwjs="nwjs-sdk"
nwjs_version="v0.16.0"
nwjs_dirname=${nwjs}-${nwjs_version}-${os}-${arch} nwjs_dirname=${nwjs}-${nwjs_version}-${os}-${arch}
nwjs_filename=${nwjs_dirname}.${ext} nwjs_filename=${nwjs_dirname}.${ext}
nwjs_url=https://git.purrdata.net/jwilkes/nwjs-binaries/raw/master nwjs_url=https://git.purrdata.net/jwilkes/nwjs-binaries/raw/master
...@@ -61,12 +78,27 @@ if [ ! -d "../pd/nw/nw" ]; then ...@@ -61,12 +78,27 @@ if [ ! -d "../pd/nw/nw" ]; then
echo "Fetching the nwjs binary from" echo "Fetching the nwjs binary from"
echo "$nwjs_url" echo "$nwjs_url"
wget $nwjs_url wget $nwjs_url
tar -xf $nwjs_filename if [[ $os == "win" ]]; then
unzip $nwjs_filename
else
tar -xf $nwjs_filename
fi
mv $nwjs_dirname ../pd/nw/nw mv $nwjs_dirname ../pd/nw/nw
rm $nwjs_filename rm $nwjs_filename
fi fi
while getopts ":abBcdefFnRruw" Option # For Windows, fetch the ASIO SDK if we don't have it already
if [[ $os == "win" ]]; then
if [ ! -d "../pd/lib" ]; then
mkdir ../pd/lib
wget http://www.steinberg.net/sdk_downloads/asiosdk2.3.zip
unzip asiosdk2.3.zip
mv ASIOSDK2.3 ../pd/lib
fi
fi
while getopts ":abBcdefFnRruwzZ" Option
do case $Option in do case $Option in
a) addon=1;; a) addon=1;;
...@@ -102,6 +134,12 @@ do case $Option in ...@@ -102,6 +134,12 @@ do case $Option in
w) sys_cwiid=1 w) sys_cwiid=1
;; ;;
z) inno=1
inst_dir=/usr;;
Z) inno=2
inst_dir=/usr;;
*) echo "Error: unknown option";; *) echo "Error: unknown option";;
esac esac
done done
...@@ -152,7 +190,7 @@ then ...@@ -152,7 +190,7 @@ then
cd $gitfolder cd $gitfolder
fi fi
if [ $full -gt 0 -o $deb -gt 0 ] if [ $full -gt 0 -o $deb -gt 0 -o $inno -gt 0 ]
then then
echo "Pd-L2Ork full installer... IMPORTANT! To ensure you have the most up-to-date submodules, this process requires internet connection to pull sources from various repositories..." echo "Pd-L2Ork full installer... IMPORTANT! To ensure you have the most up-to-date submodules, this process requires internet connection to pull sources from various repositories..."
...@@ -169,42 +207,8 @@ then ...@@ -169,42 +207,8 @@ then
fi fi
fi fi
# update the include files to be safe
#if [ ! -d "/usr/local/include/pdl2ork" ]; then
# sudo mkdir /usr/local/include/pdl2ork
#fi
#if [ $full -eq 3 ]
#then
# echo "IMPORTANT! If you are already running vanilla Pd or Pd-extended, or have a custom installation of Pd-l2ork at a location other than /usr/local/lib/pd-l2ork, you will want to EITHER uninstall all older versions of Pd-l2ork and/or other versions of pd OR manually pre-install Pd-l2ork includes in order to ensure that any third-party externals that rely on the global Pd-l2ork includes reference the right versions of the said files. Failing to do so may result in incorrectly compiled externals that will definitely crash Pd-l2ork. You can install the includes into their default dir /usr/local/include by typing following commands:"
# echo
# echo "sudo cp -f -v pd/src/g_all_guis.h /usr/local/include/pdl2ork/"
# echo "sudo cp -f -v pd/src/g_canvas.h /usr/local/include/pdl2ork/"
# echo "sudo cp -f -v pd/src/m_imp.h /usr/local/include/pdl2ork/"
# echo "sudo cp -f -v pd/src/m_pd.h /usr/local/include/pdl2ork/"
# echo "sudo cp -f -v pd/src/s_stuff.h /usr/local/include/pdl2ork/"
# echo
# echo "If you don't have sudo enabled, replace sudo commands with the appropraite alternative before pasting aforesaid lines in the terminal.
#
#PLEASE NOTE that because both Pd and Pd-l2ork use the includes with the same name, depending on your system's setup, skipping this step may result in a failed build. Press any key to continue or CTRL+C to cancel install and manually copy the said files first (or use -f or -F options to have these steps performed automatically)..."
# read dummy
#else
# echo "First we will copy updated includes... You may have to enter your sudo password..."
# sudo mkdir $inst_dir/include/pdl2ork/
# sudo cp -f -v pd/src/g_all_guis.h $inst_dir/include/pdl2ork/
# sudo cp -f -v pd/src/g_canvas.h $inst_dir/include/pdl2ork/
# sudo cp -f -v pd/src/m_imp.h $inst_dir/include/pdl2ork/
# sudo cp -f -v pd/src/m_pd.h $inst_dir/include/pdl2ork/
# sudo cp -f -v pd/src/s_stuff.h $inst_dir/include/pdl2ork/
#fi
# update docs
#cd doc/
#svn checkout https://pure-data.svn.sourceforge.net/svnroot/pure-data/trunk/doc .
#cp -f ../l2ork_addons/doc/Makefile .
#cd ..
if [ $full -eq 2 -o $deb -eq 2 ] if [ $full -eq 2 -o $deb -eq 2 -o $inno -eq 2 ]
then then
# echo "Since we are doing a complete recompile we are assuming we will need to install l2ork version of the cwiid library. You will need to remove any existing cwiid libraries manually as they will clash with this one. L2Ork version is fully backwards compatible while also offering unique features like full extension support including the passthrough mode. YOU SHOULD REMOVE EXISTING CWIID LIBRARIES PRIOR TO RUNNING THIS INSTALL... You will also have to enter sudo password to install these... Press any key to continue or CTRL+C to cancel install..." # echo "Since we are doing a complete recompile we are assuming we will need to install l2ork version of the cwiid library. You will need to remove any existing cwiid libraries manually as they will clash with this one. L2Ork version is fully backwards compatible while also offering unique features like full extension support including the passthrough mode. YOU SHOULD REMOVE EXISTING CWIID LIBRARIES PRIOR TO RUNNING THIS INSTALL... You will also have to enter sudo password to install these... Press any key to continue or CTRL+C to cancel install..."
# read dummy # read dummy
...@@ -224,36 +228,17 @@ then ...@@ -224,36 +228,17 @@ then
aclocal aclocal
./autogen.sh ./autogen.sh
export INCREMENTAL="" export INCREMENTAL=""
#elif [ $full -eq 3 ]
#then
# echo "Since pd-l2ork relies on a unique version of cwiid library, we will need to install it to make disis_wiimote external work properly. YOU SHOULD REMOVE EXISTING CWIID LIBRARIES PRIOR TO RUNNING THIS INSTALL... No worries though, L2Ork version is fully backwards compatible while also offering unique features like full extension support including the passthrough mode. To install cwiid library go to <pd-l2ork-root-git-folder>/l2ork-addons/cwiid/ folder and install it using the usual:"
# echo
# echo "./configure"
# echo "make"
# echo "sudo make install"
# echo
# echo "As an alternative, you can also use the -f or -F options instead of an -u option to have this performed automatically. Please note that options -f and -F require that your system has sudo enabled. Press any key to continue or CTRL+C to cancel install..."
# read dummy
# clean files that may remain stuck even after doing global make clean (if any)
# cd externals/miXed
# make clean
# cd ../../Gem/src/
# make distclean
# rm -rf ./.libs
# rm -rf ./*/.libs
# cd ../
# make distclean
# rm gemglutwindow.pd_linux
# rm Gem.pd_linux
# aclocal
# ./autogen.sh
else else
cd Gem/ cd Gem/
export INCREMENTAL="yes" export INCREMENTAL="yes"
fi fi
cd ../pd/src && aclocal && autoconf cd ../pd/src && aclocal && autoconf
cd ../../packages/linux_make if [[ $os == "win" ]]; then
if [ $full -gt 1 -o $deb -eq 2 ] cd ../../packages/win32_inno
else
cd ../../packages/linux_make
fi
if [ $full -gt 1 -o $deb -eq 2 -o $inno -eq 2 ]
then then
make distclean make distclean
cp ../../pd/src/g_all_guis.h ../../externals/build/include cp ../../pd/src/g_all_guis.h ../../externals/build/include
...@@ -276,63 +261,71 @@ then ...@@ -276,63 +261,71 @@ then
cp -f ../../l2ork_addons/flext/config-lnx-pd-gcc.txt.rpi ../../externals/grill/trunk/flext/buildsys/config-lnx-pd-gcc.txt cp -f ../../l2ork_addons/flext/config-lnx-pd-gcc.txt.rpi ../../externals/grill/trunk/flext/buildsys/config-lnx-pd-gcc.txt
cat ../../externals/OSCx/src/Makefile | sed -e s/-lpd//g > ../../externals/OSCx/src/Makefile cat ../../externals/OSCx/src/Makefile | sed -e s/-lpd//g > ../../externals/OSCx/src/Makefile
fi fi
make install prefix=$inst_dir if [[ $os == "win" ]]; then
echo "Making Windows package..."
echo `pwd`
make install && make package
else
make install prefix=$inst_dir
fi
echo "copying pd-l2ork-specific externals..." echo "copying pd-l2ork-specific externals..."
# create images folder # create images folder
mkdir -p ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra/images mkdir -p ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra/images
# patch_name # patch_name
cd ../../l2ork_addons/patch_name
cp -f patch_name.pd ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra
cp -f patch_name-help.pd ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra
# spectdelay # spectdelay
cd ../spectdelay/spectdelay~ if [[ $os == "win" ]]; then
./linux-install.sh cd ../../l2ork_addons
cp -f spectdelay~.pd_linux ../../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra else
cp -f spectdelay~-help.pd ../../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra cd ../../l2ork_addons/spectdelay/spectdelay~
cp -f array* ../../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra ./linux-install.sh
# return to l2ork_addons folder cp -f spectdelay~.pd_linux ../../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra
cd ../../ cp -f spectdelay~-help.pd ../../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra
cp -f array* ../../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra
# return to l2ork_addons folder
cd ../../
fi
# install raspberry pi externals (if applicable) # install raspberry pi externals (if applicable)
#if [ $rpi -eq 1 ] if [ $inno -eq 0]; then
#then cd raspberry_pi
cd raspberry_pi ./makeall.sh
./makeall.sh cp -f disis_gpio/disis_gpio.pd_linux ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra
cp -f disis_gpio/disis_gpio.pd_linux ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra cp -f disis_gpio/disis_gpio-help.pd ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra
cp -f disis_gpio/disis_gpio-help.pd ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra cp -f disis_spi/disis_spi.pd_linux ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra
cp -f disis_spi/disis_spi.pd_linux ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra cp -f disis_spi/disis_spi-help.pd ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra
cp -f disis_spi/disis_spi-help.pd ../../packages/linux_make/build$inst_dir/lib/pd-l2ork/extra cd ../
cd ../ fi
#fi
echo "done with l2ork addons." echo "done with l2ork addons."
cd ../ cd ../
# finish install # finish install for deb
cd packages/linux_make if [ $inno -eq 0 ]; then
rm -f build/usr/local/lib/pd cd packages/linux_make
if [ $pkg -gt 0 ]; then rm -f build/usr/local/lib/pd
echo "tar full installer..." if [ $pkg -gt 0 ]; then
if [ $deb -gt 0 ] echo "tar full installer..."
then if [ $deb -gt 0 ]
cd build/ then
rm -rf DEBIAN/ etc/ cd build/
cd ../ rm -rf DEBIAN/ etc/
make deb prefix=$inst_dir cd ../
else make deb prefix=$inst_dir
make tarbz2 prefix=$inst_dir else
fi make tarbz2 prefix=$inst_dir
echo "move full installer..." fi
if [ $deb -gt 0 ] echo "move full installer..."
then if [ $deb -gt 0 ]
mv *.deb ../../../ then
else mv *.deb ../../../
#rm -f ../../../Pd-l2ork-full-`uname -m`-`date +%Y%m%d`.tar.bz2 2> /dev/null else
#mv build/Pd*bz2 ../../../Pd-l2ork-full-`uname -m`-`date +%Y%m%d`.tar.bz2 #rm -f ../../../Pd-l2ork-full-`uname -m`-`date +%Y%m%d`.tar.bz2 2> /dev/null
mv -f build/pd*bz2 ../../.. #mv build/Pd*bz2 ../../../Pd-l2ork-full-`uname -m`-`date +%Y%m%d`.tar.bz2
fi mv -f build/pd*bz2 ../../..
elif [ $deb -gt 0 ]; then fi
make debstage prefix=$inst_dir elif [ $deb -gt 0 ]; then
make debstage prefix=$inst_dir
fi
cd ../../
fi fi
cd ../../
fi fi
if [ $addon -eq 1 ] if [ $addon -eq 1 ]
......
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