diff --git a/.travis.yml b/.travis.yml index 1795449..b0a933a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ script: - ./linuxdeployqt-continuous-x86_64.AppImage AppDir/Insight.desktop -bundle-non-qt-libs - bash scripts/copy_libs.sh - bash scripts/apply_patches.sh + - bash scripts/purge_unwanted.sh - wget -O AppDir/AppRun https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64 - chmod +x AppDir/AppRun - wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage diff --git a/scripts/copy_libs.sh b/scripts/copy_libs.sh index 11a26d8..5881d7f 100755 --- a/scripts/copy_libs.sh +++ b/scripts/copy_libs.sh @@ -8,23 +8,7 @@ # Required libraries. cp /usr/share/tcltk/* -p -r AppDir/usr/lib/ -cp /usr/bin/tclsh8.5 -p -r AppDir/usr/bin/ -cp /usr/include/tcl8.5 -p -r AppDir/usr/include/ -cp /usr/lib/tcl8.5 -p -r AppDir/usr/lib/ -cp /usr/lib/tk8.5 -p -r AppDir/usr/lib/ cp /usr/lib/tcltk -p -r AppDir/usr/lib/ -mkdir AppDir/usr/lib/x86_64-linux-gnu -cp /usr/lib/x86_64-linux-gnu/libtcl8.5.a -p AppDir/usr/lib/x86_64-linux-gnu/ -cp /usr/lib/x86_64-linux-gnu/libtclstub8.5.a -p AppDir/usr/lib/x86_64-linux-gnu/ -cp /usr/lib/x86_64-linux-gnu/tcl8.5 -p -r AppDir/usr/lib/x86_64-linux-gnu/ -cp /usr/lib/x86_64-linux-gnu/tk8.5 -p -r AppDir/usr/lib/x86_64-linux-gnu/ -cp /usr/lib/x86_64-linux-gnu/libtk8.5.a -p AppDir/usr/lib/x86_64-linux-gnu/ -cp /usr/lib/x86_64-linux-gnu/libtkstub8.5.a -p AppDir/usr/lib/x86_64-linux-gnu/ -cp /usr/lib/x86_64-linux-gnu/libtk8.5.so -p AppDir/usr/lib/x86_64-linux-gnu/ -cp /usr/lib/x86_64-linux-gnu/libtk8.5.so.0 -p AppDir/usr/lib/x86_64-linux-gnu/ -cp /usr/share/lintian -p -r AppDir/usr/share/ -mkdir AppDir/usr/share/aclocal -cp /usr/share/aclocal/tcl8.5.m4 -p AppDir/usr/share/aclocal/ cp /usr/lib/libitcl3.4.so.1 -p AppDir/usr/lib/ cp /usr/lib/libitcl3.4.so -p AppDir/usr/lib/ cp /usr/lib/libitclstub3.4.a -p AppDir/usr/lib/ diff --git a/scripts/purge_unwanted.sh b/scripts/purge_unwanted.sh new file mode 100755 index 0000000..f19a9f5 --- /dev/null +++ b/scripts/purge_unwanted.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# The MIT License. +# Copyright (C) 2018 Antony Jr. +# ------------------------------- +# Purges unwanted files from +# the AppDir to reduce size. +# ------------------------------- + +# We already compiled so no dev-packages. +rm -rf AppDir/usr/include + +# Remove unwanted binaries. +rm -rf AppDir/usr/bin/addr2line \ + AppDir/usr/bin/c++filt \ + AppDir/usr/bin/gdb \ + AppDir/usr/bin/gprof \ + AppDir/usr/bin/ld \ + AppDir/usr/bin/objcopy \ + AppDir/usr/bin/readelf \ + AppDir/usr/bin/strip \ + AppDir/usr/bin/ar \ + AppDir/usr/bin/elfedit \ + AppDir/usr/bin/gdb-add-index \ + AppDir/usr/bin/ld.bfd \ + AppDir/usr/bin/objdump \ + AppDir/usr/bin/size \ + AppDir/usr/bin/as \ + AppDir/usr/bin/gcore \ + AppDir/usr/bin/gdbserver \ + AppDir/usr/bin/nm \ + AppDir/usr/bin/ranlib \ + AppDir/usr/bin/strings + +# Remove ubuntu specific files +# Just in case +rm -rf AppDir/usr/x86_64-pc-linux-gnu \ + AppDir/usr/lib/x86_64-linux-gnu + +# Remove unwanted doc files and locales +rm -rf AppDir/usr/share/doc \ + AppDir/usr/share/man \ + AppDir/usr/share/info \ + AppDir/usr/share/locale +