move ancient icon source files away from the top-level
[ardour.git] / tools / linux_packaging / build
index baf4f5771f6d438b45ae41ac04245adc6ef25826..80a911dd80c936ae29edeed50e55c43cab4f73a3 100755 (executable)
@@ -33,8 +33,10 @@ EXTERNAL_JACK=
 VENDOR=Ardour ;
 EXENAME=ardour
 GCC5ABI=false
+USEWINE=false
 BUILDTYPE=""
 NOSTRIP="libsuil|libserd|libsord|liblilv|libsratom|liblrdf|libardour|libpbd|libevoral"
+: ${HARRISONCHANNELSTRIP=harrison_channelstrip}
 
 
 if [ $# -eq 0 ] ; then
@@ -65,6 +67,18 @@ while [ $# -gt 0 ] ; do
                VENDOR=Harrison ;
                EXENAME=mixbus ;
                shift ;;
+       --mixbus32c)
+               MIXBUS=1;
+               WITH_HARRISON_LV2=1 ;
+               WITH_X42_LV2=1 ;
+               WITH_NLS=1 ;
+               WITH_LADSPA=;
+               STRIP=all
+               APPNAME=Mixbus32C ;
+               VENDOR=Harrison ;
+               EXENAME=mixbus32c ;
+               major_version=""
+               shift ;;
        --public)
                WITH_NLS=1 ;
                WITH_LADSPA=;
@@ -89,6 +103,7 @@ while [ $# -gt 0 ] ; do
        --nls) WITH_NLS=1 ; shift ;;
        --harvid) WITH_HARVID=1 ; shift ;;
        --gcc5abi) GCC5ABI=true ; shift ;;
+       --chanstrip) HARRISONCHANNELSTRIP=$2 ; shift; shift ;;
 
        *)
                #catch all for unknown arguments
@@ -176,6 +191,7 @@ ExportFormats=$Shared/export
 Locale=$Shared/locale
 MidiMaps=$Shared/midi_maps
 PatchFiles=$Shared/patchfiles
+LuaScripts=$Shared/scripts
 MackieControl=$Shared/mcp
 
 if [ x$PRINT_SYSDEPS != x ] ; then
@@ -208,6 +224,7 @@ mkdir -p $Locale
 mkdir -p $Surfaces
 mkdir -p $MidiMaps
 mkdir -p $PatchFiles
+mkdir -p $LuaScripts
 mkdir -p $MackieControl
 mkdir -p $ExportFormats
 mkdir -p $Panners
@@ -239,6 +256,7 @@ echo export 'PATH=/usr/local/bin:/opt/bin:$PATH' >> $ENVIRONMENT
 # create startup helper script
 if test -d $BUILD_ROOT/vst; then
        WINEEXE=wine
+       USEWINE=true
        echo export INSTALL_DIR >> $ENVIRONMENT
 else
        WINEEXE=
@@ -370,6 +388,12 @@ for x in $BUILD_ROOT/../patchfiles/*.midnam ; do
     cp "$x" $PatchFiles
 done
 
+# Lua Scripts Files
+# got to be careful with names here
+for x in $BUILD_ROOT/../scripts/*.lua ; do
+    cp "$x" $LuaScripts
+done
+
 # MackieControl data
 # got to be careful with names here
 for x in $BUILD_ROOT/../mcp/*.device $BUILD_ROOT/../mcp/*.profile ; do
@@ -467,8 +491,8 @@ while [ true ] ; do
                # ignore suil/qt wrappers - the plugin will pull in QT4.
                if echo $file | grep -qs 'libsuil_.*qt4' ; then continue; fi
 
-               # do not include libjack
-               deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | awk '{print $3}'`
+               # do not include libjack, nor libwine
+               deps=`LD_LIBRARY_PATH=$OURLIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ldd $file | grep -v libwine.so | awk '{print $3}'`
 
                echo -n "."
                for dep in $deps ; do
@@ -555,23 +579,22 @@ find $APPLIB/ -name "*.so*" -print0 | xargs -0 chmod a+rx
 echo "Copying other stuff to $APPDIR  ..."
 
 # these are all generated by waf
-cp $BUILD_ROOT/gtk2_ardour/mnemonic-us.bindings  $Etc
+cp $BUILD_ROOT/gtk2_ardour/ardour.keys  $Etc
 cp $BUILD_ROOT/gtk2_ardour/ardour.menus $Etc
 cp $BUILD_ROOT/gtk2_ardour/clearlooks.rc $Etc
 cp $BUILD_ROOT/gtk2_ardour/default_ui_config $Etc
 
 # Copied directly from source tree
 
+mkdir ${Shared}/icons
+mkdir ${Shared}/resources
 cp ../../system_config $Etc/system_config
-cp ../../gtk2_ardour/dark.colors $Etc
+cp ../../gtk2_ardour/*.colors $Etc
 cp ../../instant.xml $Shared/instant.xml
-cp ../../gtk2_ardour/step_editing.bindings $Etc
-cp ../../gtk2_ardour/mixer.bindings $Etc
-cp -r ../../gtk2_ardour/icons $Shared
-cp -r ../../gtk2_ardour/pixmaps $Shared
-cp -r ../../gtk2_ardour/splash.png $Shared
-cp -r ../../gtk2_ardour/small-splash.png $Shared
-cp -r ../../gtk2_ardour/ArdourMono.ttf $Shared
+cp ../../gtk2_ardour/icons/*.png ${Shared}/icons
+cp -r ../../gtk2_ardour/icons/icons/cursor_* ${Shared}/icons/
+cp ../../gtk2_ardour/ArdourMono.ttf $Shared
+cp ../../gtk2_ardour/resources/${APPNAME}-* ${Shared}/resources/
 
 #
 # put sooper sekrit ingredients here and they will be copied
@@ -617,13 +640,13 @@ if test -n "$MIXBUS"; then
 
        mkdir -p $APPLIB/ladspa/strip/
        curl -s -S --fail -# \
-               -z "${CACHEDIR}/harrison_channelstrip.${HARCH}.so" \
-               -o "${CACHEDIR}/harrison_channelstrip.${HARCH}.so" \
-               "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/harrison_channelstrip.${HARCH}.so"
+               -z "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
+               -o "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
+               "http://www.harrisonconsoles.com/mixbus/mb3/beta/harrison-dsp/${HARRISONCHANNELSTRIP}.${HARCH}.so"
 
-       cp "${CACHEDIR}/harrison_channelstrip.${HARCH}.so" \
-               $APPLIB/ladspa/strip/harrison_channelstrip.so
-       chmod +x $APPLIB/ladspa/strip/harrison_channelstrip.so
+       cp "${CACHEDIR}/${HARRISONCHANNELSTRIP}.${HARCH}.so" \
+               $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
+       chmod +x $APPLIB/ladspa/strip/${HARRISONCHANNELSTRIP}.so
 fi
 
 if test x$WITH_X42_LV2 != x ; then
@@ -633,6 +656,12 @@ if test x$WITH_X42_LV2 != x ; then
                "${CACHEDIR}/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip"
        unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-meters-lv2-linux-${WARCH}-${METERS_VERSION}.zip"
 
+       EQ_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/x42-eq.latest.txt)
+       rsync -a -q --partial \
+               rsync://x42-plugins.com/x42/linux/x42-eq-lv2-linux-${WARCH}-${EQ_VERSION}.zip \
+               "${CACHEDIR}/x42-eq-lv2-linux-${WARCH}-${EQ_VERSION}.zip"
+       unzip -q -d "$APPLIB/LV2/" "${CACHEDIR}/x42-eq-lv2-linux-${WARCH}-${EQ_VERSION}.zip"
+
        SETBFREE_VERSION=$(curl -s -S http://x42-plugins.com/x42/linux/setBfree.latest.txt)
        rsync -a -q --partial \
                rsync://x42-plugins.com/x42/linux/setBfree-lv2-linux-${WARCH}-${SETBFREE_VERSION}.zip \
@@ -682,7 +711,7 @@ chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
 #
 # Add the stage2.run script
 #
-sed -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/;s/%REPLACE_PGM%/${APPNAME}/;s/%REPLACE_VENDOR%/${VENDOR}/;s/%REPLACE_EXE%/${EXENAME}/;s/%REPLACE_GCC5%/${GCC5ABI}/" < stage2.run.in > stage2.run
+sed -e "s/%REPLACE_MAJOR_VERSION%/${major_version}/;s/%REPLACE_PGM%/${APPNAME}/;s/%REPLACE_VENDOR%/${VENDOR}/;s/%REPLACE_EXE%/${EXENAME}/;s/%REPLACE_GCC5%/${GCC5ABI}/;s/%REPLACE_WINE%/${USEWINE}/" < stage2.run.in > stage2.run
 chmod a+x stage2.run