#!/bin/bash
+# Build Cinelerra-GG as AppImage.
+# This follows four steps:
+# - Build static version of Cinelerra-GG.
+# - If desired and needed, build the manual for context-sensitive help.
+# - Organize code and manual in a AppImage specific format AppDir. Do
+# this with tool makeappimage, which is built if needed.
+# - Call an external tool to make the AppDuir into an AppImage
+
# We don't do cross-compiling, so the system we're running on
# is the target too. Some extra options have to be passed to
# the configure script depending on the target. The configure.ac
fi
echo configure script options are $CONFIG_OPTIONS
-# this should basically be the same as a static build, but the
-# "make install" is followed by the appimage creation. After the
-# install does its work, the bin directory and subdirectories
-# contain the whole application.
-
# Build Cinelerra itself.
( ./autogen.sh
./configure $CONFIG_OPTIONS
make && make install ) 2>&1 | tee log
mv Makefile Makefile.cfg
cp Makefile.devel Makefile
-
+
+# To include the context-sensitive help, specify the directory
+# where the manual source is. This script will then call the "translate"
+# script there to build the manual, and copy it to the proper place
+# before the AppImage is built.
+
+CINGG_DIRECTORY=$(pwd)
+MANUAL_DIRECTORY=$(pwd)/../../cin-manual-latex
+
+# Build the manual if the directory is specified and exists, and copy it
+# to CinGG
+if [ -d "$MANUAL_DIRECTORY" ]; then
+ pushd $MANUAL_DIRECTORY
+ # run the build in a subshell so if some error causes an exit
+ # the popd will still work.
+ (./translate_manual) 2>&1 | tee $CINGG_DIRECTORY/manual.log
+ popd
+ rm -rf bin/doc/CinelerraGG_Manual
+ cp -r $MANUAL_DIRECTORY/CinelerraGG_Manual bin/doc/
+fi
+
rm -rf AppDir # remove old in case a file gets deleted from the distribution
mkdir AppDir # create lowest level
mkdir AppDir/usr
cp -r bin AppDir/usr/ # copy whole of bin directory
-# Use own version of linuxdeploy, makeappimage, plus plugin makeappimageplugin.
-# They should be in the subdirectory tools, if not, go to tools/makeappimagetool
-# and do bld.sh there. That will place the two needed executables in tools, and
-# then delete all other generated files (except the small log).
+# Use own version of linuxdeploy, makeappimage. This should be in
+# subdirectory tools, if not, go to tools/makeappimagetool and do bld.sh
+# there. That will place the makeappimage executable in tools, and
+# then delete all other generated files (except the small log). The tools
+# directory is not cleared with "make clean" or "autogen.sh clean"
if [ ! -f tools/makeappimage ]; then
export cingg=`pwd`
# - appimagetool-i686.AppImage
# - appimagetool-x86_64.AppImage
# Get the appropriate appimagetool from https://github.com/AppImage/AppImageKit/releases
-# and put it in your path. Only install the version for your platform.
+# and put it in your path. Only install the version for your platform
+# and mark it executable. The file name must start with "appimagetool".
tools/makeappimage --appdir=AppDir -d image/cin.desktop -i image/cin.svg -e bin/cin -e bin/mpeg2enc -e bin/mplex -e bin/hveg2enc -e bin/lv2ui -e bin/bdwrite -e bin/zmpeg3toc -e bin/zmpeg3show -e bin/zmpeg3cat -e bin/zmpeg3ifochk -e bin/zmpeg3cc2txt -e bin/mplexlo 2>&1 | tee appimage.log
ctags patch gcc-c++ perl-XML-XPath libtiff-devel python dvdauthor \
gettext-devel inkscape udftools autoconf automake numactl-devel \
jbigkit-devel libvdpau-devel libva-devel gtk2-devel mesa-vdpau-drivers \
- pulseaudio-libs-devel libtool
+ pulseaudio-libs-devel libtool patchelf boost-devel
;;
"suse" | "leap" | "tumbleweed")
zypper -n install nasm gcc gcc-c++ zlib-devel texinfo libpng16-devel \
ilmbase-devel fftw3-devel libsndfile-devel libtheora-devel flac-devel \
libtiff-devel inkscape cmake patch libnuma-devel lzma-devel udftools git \
yasm autoconf automake rpm-build libjbig-devel libvdpau-devel libva-devel \
- gtk2-devel libusb-1_0-devel libpulse-devel libtool python
- if [ ! -f /usr/lib64/libtermcap.so ]; then
+ gtk2-devel libusb-1_0-devel libpulse-devel libtool python patchelf \
+ libboost_regex-devel libboost_filesystem-devel
+ if [ ! -f /usr/lib64/libtermcap.so && ! -L /usr/lib64/libtermcap.so ]; then
ln -s libtermcap.so.2 /usr/lib64/libtermcap.so
fi
;;
fonts-dejavu libopenexr-dev festival libfftw3-dev gdb libusb-1.0-0-dev \
libdc1394-22-dev libflac-dev libjbig-dev libvdpau-dev libva-dev \
inkscape libsndfile1-dev libtheora-dev cmake udftools libxml2-utils git \
- autoconf automake debhelper libgtk2.0-dev libpulse-dev python
+ autoconf automake debhelper libgtk2.0-dev libpulse-dev python \
+ patchelf libboost-filesystem-dev libboost-regex-dev fuse
;;
#"ub16-10")
# apt-get -y install libx264-dev libx265-dev libvpx-dev libmjpegtools-dev
libdc1394-22-dev libiec61883-dev libflac-dev libjbig-dev libusb-1.0-0-dev \
libvdpau-dev libva-dev libsndfile1-dev libtheora-dev cmake udftools \
libxml2-utils git inkscape autoconf automake debhelper libgtk2.0-dev \
- libpulse-dev libtool python
+ libpulse-dev libtool python \
+ patchelf libboost-filesystem-dev libboost-regex-dev
;;
*)
echo "unknown os: $dir"
AC_PREREQ([2.69])
+
+# Put autogenerated stuff in subdir m4, which must be created
+# externally. This macro must be set before calling AC_INIT_AUTOMAKE
+AC_CONFIG_AUX_DIR(m4)
AM_INIT_AUTOMAKE([foreign])
AM_PROG_AS
-AC_LANG_CPLUSPLUS
-AC_LANG_C
+AC_LANG([C++])
+AC_LANG([C])
AC_PROG_CXX
CFG_CFLAGS+=" -fno-omit-frame-pointer -fno-math-errno -fno-signed-zeros"
AC_DEFUN([CHECK_WITH], [
AC_ARG_WITH([$1],
- AC_HELP_STRING([--with-[$1]], [$2 ($4)]),
+ AS_HELP_STRING([--with-[$1]],[$2 ($4)]),
[WANT_$3=$withval], [WANT_$3='$4'])
AC_SUBST([WANT_$3])
])
AC_DEFUN([PKG_3RD],[
AC_ARG_ENABLE([$1],
- AC_HELP_STRING([--enable-$1],[build $1 ($2)]),
+ AS_HELP_STRING([--enable-$1],[build $1 ($2)]),
[PKG_$1=$enableval], [PKG_$1=$2])
PKG_DEF([$1],[$3],[$4],[$5])
])
AC_DEFUN([CHECK_ENABLE], [
AC_ARG_ENABLE([$1],
- AC_HELP_STRING([--enable-[$1]], [$3 ([$4])]),
+ AS_HELP_STRING([--enable-[$1]],[$3 ([$4])]),
[WANT_$2=$enableval], [WANT_$2=[$4]])
])
RESULT=yes
# WANT_$1
AC_ARG_WITH(m4_tolower([$1]),
- AC_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))], [$3] (auto)),
+ AS_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))],[$3 (auto)]),
[WANT_$1=$withval],[WANT_$1=$2])
m4_quote($4)
if test "x$WANT_$1" = "xauto" ; then
OBJDIR=`uname -m`
AC_SUBST(OBJDIR)
-echo "AC_HELP_STRING([Reason],[Package])"
-echo "AC_HELP_STRING([------],[-------])"
+echo "AS_HELP_STRING([Reason],[Package])"
+echo "AS_HELP_STRING([------],[-------])"
AC_DEFUN([PKG_DISABLED],[
PKG_$1="no"
BUILD_$1=0
AC_SUBST(BUILD_$1)
- echo "AC_HELP_STRING([disabled],[$1])"
+ echo "AS_HELP_STRING([disabled],[$1])"
])
AC_DEFUN([PKG_SHARED],[
PKG_$1="shared"
BUILD_$1=1
AC_SUBST(BUILD_$1)
STATIC_BLDS+=" [$1]"
- echo "AC_HELP_STRING([$2],[$1])"
+ echo "AS_HELP_STRING([$2],[$1])"
fi
])
AC_SUBST(STATIC_BLDS)
for f in $SHARED_LIBS; do
- echo "AC_HELP_STRING([shared],[$f])"
+ echo "AS_HELP_STRING([shared],[$f])"
done
AC_SUBST(SHARED_LIBS)
for f in $SYSTEM_LIBS; do
- echo "AC_HELP_STRING([system],[$f])"
+ echo "AS_HELP_STRING([system],[$f])"
done
AC_SUBST(SYSTEM_LIBS)