From 6fa25a1258284f540c0060dad7c9fb73e7100e3e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 29 Jul 2016 18:56:07 +0200 Subject: [PATCH] Don't compress linux bundle, compress installer (with xz) This halves the installer size from about 60MB to 29MB. --- tools/linux_packaging/build | 4 ++-- tools/linux_packaging/package | 16 ++++++++-------- tools/linux_packaging/stage2.run.in | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 34a16f9513..935f712206 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -741,8 +741,8 @@ fi echo "Building tarball ..." -rm -f $APPDIR.tar.bz2 -tar -cjf $APPDIR.tar.bz2 $APPDIR +rm -f $APPDIR.tar +tar -cf $APPDIR.tar $APPDIR echo "Calculating bundle size" du -sb $APPDIR/ | awk '{print $1}' > $APPDIR.size diff --git a/tools/linux_packaging/package b/tools/linux_packaging/package index a4bab829b8..a8dbe870cd 100755 --- a/tools/linux_packaging/package +++ b/tools/linux_packaging/package @@ -75,9 +75,9 @@ if [ ! -z ${BUILDTYPE} ]; then X86_64_BUNDLE="${X86_64_BUNDLE}-${BUILDTYPE}" fi -if [ ! -e ${X86_BUNDLE}.tar.bz2 ] ; then +if [ ! -e ${X86_BUNDLE}.tar ] ; then echo "" - echo "Can't locate x86 bundle file ${X86_BUNDLE}.tar.bz2" + echo "Can't locate x86 bundle file ${X86_BUNDLE}.tar" echo "" elif [ ! -e ${X86_BUNDLE}.size ] ; then echo "" @@ -87,9 +87,9 @@ else X86_BUNDLE_OK="T" fi -if [ ! -e ${X86_64_BUNDLE}.tar.bz2 ]; then +if [ ! -e ${X86_64_BUNDLE}.tar ]; then echo "" - echo "Can't locate x86_64 bundle file ${X86_64_BUNDLE}.tar.bz2" + echo "Can't locate x86_64 bundle file ${X86_64_BUNDLE}.tar" echo "" elif [ ! -e ${X86_64_BUNDLE}.size ]; then echo "" @@ -148,7 +148,7 @@ fi echo "Cleaning up any old package files for this build" #Get rid of any old packages of this same name. -rm -f ${PACKAGE}.tar.bz2 +rm -f ${PACKAGE}.tar rm -rf ${PACKAGE} @@ -156,12 +156,12 @@ echo "Creating new package dir..." mkdir ${PACKAGE} if [ "${X86_BUNDLE_OK}" = "T" ]; then - mv ${X86_BUNDLE}.tar.bz2 ${PACKAGE} + mv ${X86_BUNDLE}.tar ${PACKAGE} mv ${X86_BUNDLE}.size ${PACKAGE}/.${X86_BUNDLE}.size fi if [ "${X86_64_BUNDLE_OK}" = "T" ]; then - mv ${X86_64_BUNDLE}.tar.bz2 ${PACKAGE} + mv ${X86_64_BUNDLE}.tar ${PACKAGE} mv ${X86_64_BUNDLE}.size ${PACKAGE}/.${X86_64_BUNDLE}.size fi @@ -181,7 +181,7 @@ fi if test -n "$MAKESELF"; then echo "Creating self-extracting installer" - $MAKESELF --nocomp ${PACKAGE}/ ${PACKAGE}.run ${APPNAME} ./install.sh + $MAKESELF --xz --complevel 9 ${PACKAGE}/ ${PACKAGE}.run ${APPNAME} ./install.sh else echo "Creating tarball..." tar -cf ${PACKAGE}.tar ${PACKAGE} diff --git a/tools/linux_packaging/stage2.run.in b/tools/linux_packaging/stage2.run.in index 453c35d9b5..c59bf95c86 100755 --- a/tools/linux_packaging/stage2.run.in +++ b/tools/linux_packaging/stage2.run.in @@ -336,7 +336,7 @@ echo "Bundle is on ${FILESYSTEM_TYPE} filesystem" # untar the correct bundle for us to install echo "Unpacking bundle for $ARCH" -if [ ! -e ${PGM_NAME}_${ARCH}-*.tar.bz2 ]; then +if [ ! -e ${PGM_NAME}_${ARCH}-*.tar ]; then echo "" echo "!!! ERROR !!! Can't locate ${ARCH} bundle file." echo "" @@ -344,7 +344,7 @@ if [ ! -e ${PGM_NAME}_${ARCH}-*.tar.bz2 ]; then exit 1 fi -if ! tar -xjf ${PGM_NAME}_${ARCH}-*.tar.bz2; then +if ! tar -xf ${PGM_NAME}_${ARCH}-*.tar; then echo "" echo "!!! ERROR !!! Can't unpack ${ARCH} bundle file." echo ""