Don't compress linux bundle, compress installer (with xz)
authorRobin Gareus <robin@gareus.org>
Fri, 29 Jul 2016 16:56:07 +0000 (18:56 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 29 Jul 2016 16:56:07 +0000 (18:56 +0200)
This halves the installer size from about 60MB to 29MB.

tools/linux_packaging/build
tools/linux_packaging/package
tools/linux_packaging/stage2.run.in

index 34a16f95139475f9e101c2868421b2c80f4405e0..935f712206ffdb495915c5b32ee6848c904e4a8f 100755 (executable)
@@ -741,8 +741,8 @@ fi
 
 echo "Building tarball ..."
 
 
 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
 
 echo "Calculating bundle size"
 du -sb $APPDIR/  | awk '{print $1}' > $APPDIR.size
index a4bab829b84a80f3c5d414a24d6740b737c69afe..a8dbe870cd00b939511937ee3241a79b4162636a 100755 (executable)
@@ -75,9 +75,9 @@ if [ ! -z ${BUILDTYPE} ]; then
        X86_64_BUNDLE="${X86_64_BUNDLE}-${BUILDTYPE}"
 fi 
 
        X86_64_BUNDLE="${X86_64_BUNDLE}-${BUILDTYPE}"
 fi 
 
-if [ ! -e ${X86_BUNDLE}.tar.bz2 ] ; then
+if [ ! -e ${X86_BUNDLE}.tar ] ; then
        echo ""
        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 ""
        echo ""
 elif [ ! -e ${X86_BUNDLE}.size ] ; then
        echo ""
@@ -87,9 +87,9 @@ else
        X86_BUNDLE_OK="T"
 fi
 
        X86_BUNDLE_OK="T"
 fi
 
-if [ ! -e ${X86_64_BUNDLE}.tar.bz2 ]; then
+if [ ! -e ${X86_64_BUNDLE}.tar ]; then
        echo ""
        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 ""
        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.
 
 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}
 
 
 rm -rf ${PACKAGE}
 
 
@@ -156,12 +156,12 @@ echo "Creating new package dir..."
 mkdir ${PACKAGE}
 
 if [ "${X86_BUNDLE_OK}" = "T" ]; then
 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_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
 
        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"
 
 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}
 else
        echo "Creating tarball..."
        tar -cf ${PACKAGE}.tar ${PACKAGE}
index 453c35d9b5a224bbaf12caaf333ea4b0a25da2a1..c59bf95c86993d07689a1e51358970e94f7af803 100755 (executable)
@@ -336,7 +336,7 @@ echo "Bundle is on ${FILESYSTEM_TYPE} filesystem"
 # untar the correct bundle for us to install
 echo "Unpacking bundle for $ARCH"
 
 # 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 ""
        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
 
        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 ""
        echo ""
        echo "!!! ERROR !!! Can't unpack ${ARCH} bundle file."
        echo ""