Update AppImage scripts for upcoming changes in base image, using Qt 5.12 anf KF 5.61

parent 32ee6257
Pipeline #6786 passed with stage
in 13 minutes and 18 seconds
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
# Halt on errors
set -e
# Be verbose
set -x
# Now we are inside CentOS 6
grep -r "CentOS release 6" /etc/redhat-release || exit 1
# Get helper functions
wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
. ./functions.sh
rm -f functions.sh
. /opt/rh/devtoolset-3/enable
#necessary ?
#pulseaudio-libs
QTVERSION=5.9.4
QVERSION_SHORT=5.9
QTDIR=/usr/local/Qt-${QTVERSION}/
# qjsonparser, used to add metadata to the plugins needs to work in a en_US.UTF-8 environment. That's
# not always set correctly in CentOS 6.7
export LC_ALL=en_US.UTF-8
export LANG=en_us.UTF-8
# Determine which architecture should be built
if [[ "$(arch)" = "i686" || "$(arch)" = "x86_64" ]] ; then
ARCH=$(arch)
else
echo "Architecture could not be determined"
exit 1
fi
# Make sure we build from the /, parts of this script depends on that. We also need to run as root...
cd /
# TO-DO ask about this.
export CMAKE_PREFIX_PATH=$QTDIR:/app/share/llvm/
# if the library path doesn't point to our usr/lib, linking will be broken and we won't find all deps either
export LD_LIBRARY_PATH=/usr/lib64/:/usr/lib:/app/usr/lib:$QTDIR/lib/:/opt/python3.5/lib/:$LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=/usr/lib64/:/usr/lib:/app/usr/lib:$QTDIR/lib/:$LD_LIBRARY_PATH
# Workaround for: On CentOS 6, .pc files in /usr/lib/pkgconfig are not recognized
# However, this is where .pc files get installed when building libraries... (FIXME)
# I found this by comparing the output of librevenge's "make install" command
# between Ubuntu and CentOS 6
#ln -sf /usr/share/pkgconfig /usr/lib/pkgconfig
#update ruby
yum -y remove ruby ruby-devel
if ( test -d /external/ruby-2.1.2 )
then
echo "RUBY already cloned"
else
cd /external
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
tar xvfvz ruby-2.1.2.tar.gz
fi
cd /external/ruby-2.1.2
./configure
make
make install
gem update --system
# Get project
if [ ! -d /kdenlive ] ; then
git clone --depth 1 http://anongit.kde.org/kdenlive.git /kdenlive
cd /kdenlive/
# git checkout -b timeline2 origin/refactoring_timeline
else
cd /kdenlive/
if [ $# -eq 0 ]; then
git pull
fi
fi
cd /kdenlive/
#git_pull_rebase_helper
# Prepare the install location
#rm -rf /app/ || true
#mkdir -p /app/usr
# export LLVM_ROOT=/opt/llvm/
# make sure lib and lib64 are the same thing
mkdir -p /app/usr/lib
cd /app/usr
#ln -s lib lib64
# start building the deps
function build_external
{ (
# errors fatal
echo "Compiler version:" $(g++ --version)
set -e
SRC=/external
BUILD=/external/build
PREFIX=/app/usr/
# framework
EXTERNAL=$1
# clone if not there
mkdir -p $SRC
cd $SRC
if ( test -d $EXTERNAL )
then
echo "$EXTERNAL already cloned"
if [ $# -eq 0 ]; then
cd $EXTERNAL
git reset --hard
git pull --rebase
cd ..
fi
else
git clone $EXTERNAL_ADDRESS
fi
# create build dir
mkdir -p $BUILD/$EXTERNAL
# go there
cd $BUILD/$EXTERNAL
# cmake it
if ( $EXTERNAL_CMAKE )
then
cmake3 -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX $2 $SRC/$EXTERNAL
else
$EXTERNAL_CONFIGURE
fi
# make
make -j8
# install
make install
) }
export WLD=/app/usr/ # change this to another location if you prefer
export LD_LIBRARY_PATH=$WLD/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/:/usr/lib/pkgconfig/:$PKG_CONFIG_PATH
export PATH=$WLD/bin:$PATH
export ACLOCAL_PATH=$WLD/share/aclocal
export ACLOCAL="aclocal -I $ACLOCAL_PATH"
IN=frei0r,https://github.com/dyne/frei0r.git,true,""
IFS=',' read -a external_options <<< $IN
EXTERNAL="${external_options[0]}"
EXTERNAL_ADDRESS="${external_options[1]}"
EXTERNAL_CMAKE="${external_options[2]}"
EXTERNAL_CMAKE_OPTIONS="-DWITHOUT_OPENCV:BOOL=ON"
EXTERNAL_CONFIGURE="${external_options[3]}"
build_external $EXTERNAL $EXTERNAL_CMAKE_OPTIONS
#TODO: dependencies for MLT modules (xml, sdl, etc).
#movit - - Requires some adjustments to build with older automake
#cd /external
#if ( test -d /external/movit )
#then
# echo "movit already cloned"
#if [ $# -eq 0 ]; then
# cd movit
# git pull
# git reset --hard
# git pull --rebase
# cd ..
#fi
#else
# git clone https://git.sesse.net/movit
#fi
#cd movit
#./autogen.sh
#./configure --prefix=/app/usr
#make -j5
#make install
#mlt
cd /external
if ( test -d /external/mlt )
then
echo "mlt already cloned"
if [ $# -eq 0 ]; then
cd mlt
git reset --hard
git pull --rebase
#current git master incompatible (crashes Kdenlive on keyframes)
git checkout 15105c4
cd ..
fi
else
git clone https://github.com/mltframework/mlt.git
fi
cd mlt
# patch MLT
cat > mlt_fix.patch << 'EOF'
diff --git a/src/modules/vid.stab/configure b/src/modules/vid.stab/configure
index e501888..55f0307 100755
--- a/src/modules/vid.stab/configure
+++ b/src/modules/vid.stab/configure
@@ -19,7 +19,8 @@ then
exit 0
fi
- echo > config.mak
+ echo "CFLAGS += $(pkg-config --cflags vidstab)" > config.mak
+ echo "LDFLAGS += $(pkg-config --libs vidstab)" >> config.mak
case $targetos in
Darwin)
;;
EOF
cat mlt_fix.patch |patch -p1
export CXXFLAGS="-std=c++11"
./configure --enable-gpl --prefix=/app/usr --disable-rtaudio
make -j5
make install
# Build kdenlive
mkdir -p /kdenlive_build
mkdir -p /kdenlive_build/po
if [ ! -d /kdenlive/po ] ; then
ln -s /kdenlive_build/po /kdenlive/po
fi
cd /kdenlive_build
cmake3 ../kdenlive \
-DCMAKE_INSTALL_PREFIX:PATH=/app/usr/ \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPACKAGERS_BUILD=1 \
-DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=ON \
-DKDE_L10N_AUTO_TRANSLATIONS:BOOL=ON \
-DBUILD_TESTING=FALSE
make -j8
make install
echo "++++++++++++++++++\nBUILD FINSHED \n+++++++++++++++++";
###############################################################
# Build complete, AppImage bundling begins here
###############################################################
This diff is collapsed.
#!/bin/bash
# Halt on errors
set -e
# Be verbose
set -x
echo "++ building dependencies and frameworks..."
. /kdenlive/packaging/appimage/01-dependencies.sh
echo "++ building dependencies and frameworks DONE"
echo "++ building AV libraries (ffmpeg, OpenCV) ..."
. /kdenlive/packaging/appimage/02-avlibs.sh
echo "++ building AV libraries (ffmpeg, OpenCV) DONE"
echo "++ building MLT and Kdenlive ..."
. /kdenlive/packaging/appimage/03-kdenlive.sh
echo "++ building MLT and Kdenlive DONE"
echo "++ Preparing AppImage folder ..."
. /kdenlive/packaging/appimage/04-create-app.sh
echo "++ Preparing AppImage folder DONE"
......@@ -8,5 +8,5 @@ ExternalProject_Add(
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
DEPENDS ext_iconv ext_xml ext_ncurses
DEPENDS ext_xml ext_ncurses
)
......@@ -19,6 +19,6 @@ ExternalProject_Add(
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://github.com/opencv/opencv/archive/4.1.0.tar.gz
URL_MD5 b80c59c7e4feee6a00608315e02b0b73
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE} -DOPENCV_EXTRA_MODULES_PATH=${EXT_BUILD_DIR}/deps-build/ext_opencv/ext_opencv_contrib-prefix/src/ext_opencv_contrib/modules -DOPENCV_GENERATE_PKGCONFIG=ON -DBUILD_opencv_freetype=OFF
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE} -DOPENCV_EXTRA_MODULES_PATH=${EXT_BUILD_DIR}/deps-build/ext_opencv/ext_opencv_contrib-prefix/src/ext_opencv_contrib/modules -DOPENCV_GENERATE_PKGCONFIG=ON -DBUILD_opencv_freetype=OFF -DCPU_BASELINE=SSE4_2 -DCPU_DISPATCH=SSE4_2
DEPENDS ext_opencv_contrib
)
......@@ -5,14 +5,14 @@
ExternalProject_Add(
ext_qt
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://download.qt.io/official_releases/qt/5.11/5.11.2/single/qt-everywhere-src-5.11.2.tar.xz
URL_MD5 152a8ade9c11fe33ff5bc95310a1bb64
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qsql_mysql.diff
CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix ${EXT_INSTALL_DIR} -opensource -confirm-license -verbose -nomake examples -nomake tests -nomake tools ICU_LIBDIR="${EXT_INSTALL_DIR}/lib" ICU_INCDIR="${EXT_INSTALL_DIR}/include" OPENSSL_LIBDIR="${EXT_INSTALL_DIR}/openssl/lib" OPENSSL_INCDIR="${EXT_INSTALL_DIR}/openssl/include" -openssl-linked -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtenginio -skip qtlocation -skip qtwayland -skip qtandroidextras -skip qtserialport -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtspeech -skip qtsensors -skip qtgamepad -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtcharts -skip qtpurchasing -skip qtserialbus -skip qtdoc -skip qtmacextras -skip qtwinextras -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtnetworkauth -system-webengine-icu
URL https://download.qt.io/official_releases/qt/5.12/5.12.4/single/qt-everywhere-src-5.12.4.tar.xz
URL_MD5 dda95b0239d13c5276834177af3a8588
CMAKE_ARGS -DOPENSSL_LIBS='-L${EXTPREFIX_qt}/lib -lssl -lcrypto'
BUILD_IN_SOURCE 1
#PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qsql_mysql.diff
CONFIGURE_COMMAND <SOURCE_DIR>/configure -prefix ${EXT_INSTALL_DIR} -opensource -confirm-license -openssl-linked -verbose -nomake examples -nomake tests -nomake tools -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtandroidextras -skip qtserialport -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtspeech -skip qtsensors -skip qtgamepad -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtcharts -skip qtpurchasing -skip qtserialbus -skip qtdoc -skip qtmacextras -skip qtwinextras -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtnetworkauth
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
DEPENDS ext_xslt ext_mysql ext_sqlite ext_postgresql ext_pcre2
DEPENDS ext_xslt ext_sqlite ext_pcre2
)
......@@ -10,5 +10,5 @@ ExternalProject_Add(
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} ${AT_HOST} --without-python --with-icu --without-catalog --with-lzma=${EXT_INSTALL_DIR}/lib CPPFLAGS=${AT_CPP_FLAGS} LDFLAGS=${AT_LD_FLAGS}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
DEPENDS ext_lzma ext_readline ext_icu
DEPENDS ext_lzma ext_readline
)
......@@ -67,7 +67,6 @@ cmake $KDENLIVE_SOURCES/packaging/appimage/3rdparty -DCMAKE_INSTALL_PREFIX=$DEPS
# Now start building everything we need, in the appropriate order
cmake --build . --target ext_iconv
cmake --build . --target ext_lzma
cmake --build . --target ext_xml
cmake --build . --target ext_gettext
......@@ -76,6 +75,9 @@ cmake --build . --target ext_png
# cmake --build . --target ext_jpeg #this causes build failures in Qt 5.10
export CC=/usr/bin/gcc-6
export CXX=/usr/bin/g++-6
cmake --build . --target ext_qt
cmake --build . --target ext_boost
cmake --build . --target ext_gpgme
......@@ -134,4 +136,3 @@ cmake --build . --target ext_breezeicons
cmake --build . --target ext_kcrash
cmake --build . --target ext_breeze
cmake --build . --target ext_ruby
#cmake --build . --target ext_mlt
......@@ -60,7 +60,7 @@ if [ -d $DEPS_INSTALL_PREFIX/share/icons/breeze ] ; then
fi
cp -r $DEPS_INSTALL_PREFIX/translations $APPDIR/usr/
cp -r $DEPS_INSTALL_PREFIX/openssl/lib/* $APPDIR/usr/lib
#cp -r $DEPS_INSTALL_PREFIX/openssl/lib/* $APPDIR/usr/lib
cp -r $DEPS_INSTALL_PREFIX/share/mlt $APPDIR/usr/share
cp -r $DEPS_INSTALL_PREFIX/lib/mlt $APPDIR/usr/lib
cp -r $DEPS_INSTALL_PREFIX/lib/libmlt* $APPDIR/usr/lib
......@@ -116,20 +116,20 @@ done
### GSTREAMER
# Requires gstreamer1.0-plugins-good
#GST_PLUGIN_SRC_DIR=/usr/lib/x86_64-linux-gnu/
#mkdir -p $APPDIR/usr/lib/x86_64-linux-gnu
#GST_LIB_DEST_DIR=$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer1.0
#mkdir -p $GST_LIB_DEST_DIR
#GST_PLUGIN_DEST_DIR=$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0
#mkdir -p $GST_PLUGIN_DEST_DIR
#cp $GST_PLUGIN_SRC_DIR/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner $GST_PLUGIN_DEST_DIR
#cp $GST_PLUGIN_SRC_DIR/gstreamer-1.0/* $GST_LIB_DEST_DIR
#rm $GST_LIB_DEST_DIR/libgstegl* || true
#for p in $GST_LIB_DEST_DIR/libgst*.so*; do
# patchelf --set-rpath '$ORIGIN/../..' $p;
#done
GST_PLUGIN_SRC_DIR=/usr/lib/x86_64-linux-gnu/
mkdir -p $APPDIR/usr/lib/x86_64-linux-gnu
GST_LIB_DEST_DIR=$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer1.0
mkdir -p $GST_LIB_DEST_DIR
GST_PLUGIN_DEST_DIR=$APPDIR/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0
mkdir -p $GST_PLUGIN_DEST_DIR
cp $GST_PLUGIN_SRC_DIR/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner $GST_PLUGIN_DEST_DIR
cp $GST_PLUGIN_SRC_DIR/gstreamer-1.0/* $GST_LIB_DEST_DIR
rm $GST_LIB_DEST_DIR/libgstegl* || true
for p in $GST_LIB_DEST_DIR/libgst*.so*; do
patchelf --set-rpath '$ORIGIN/../..' $p;
done
### end of GSTREAMER STUFF
......@@ -162,7 +162,7 @@ linuxdeployqt $APPDIR/usr/share/applications/org.kde.kdenlive.desktop \
# -appimage \
rm $APPDIR/usr/lib/libGL.so.1 || true
rm $APPDIR/usr/lib/libasound.so.2 || true
# rm $APPDIR/usr/lib/libasound.so.2 || true
# libxcb should be removed
......
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