Include Linux native libraries for all supported platforms in the portable *.tar.xz package

This commit is contained in:
Reinhard Pointner 2017-02-01 23:44:26 +08:00
parent f0321ef694
commit fc1c1226fe
2 changed files with 12 additions and 3 deletions

View File

@ -677,6 +677,12 @@
<cmp:tarfileset file="${path.fatjar}" fullpath="FileBot.jar" /> <cmp:tarfileset file="${path.fatjar}" fullpath="FileBot.jar" />
<cmp:tarfileset dir="${dir.installer}/portable" includes="*.exe, *.ini, *.cmd" /> <cmp:tarfileset dir="${dir.installer}/portable" includes="*.exe, *.ini, *.cmd" />
<cmp:tarfileset dir="${dir.installer}/portable" includes="*.sh" filemode="755" /> <cmp:tarfileset dir="${dir.installer}/portable" includes="*.sh" filemode="755" />
<!-- include native libraries for all supported platforms -->
<cmp:tarfileset prefix="lib/armv7l" dir="${dir.lib}/native/linux-armv7l" includes="*.so" />
<cmp:tarfileset prefix="lib/armv8" dir="${dir.lib}/native/linux-armv8" includes="*.so" />
<cmp:tarfileset prefix="lib/i686" dir="${dir.lib}/native/linux-i686" includes="*.so" />
<cmp:tarfileset prefix="lib/x86_64" dir="${dir.lib}/native/linux-amd64" includes="*.so" />
</cmp:tar> </cmp:tar>
</cmp:xz> </cmp:xz>
</target> </target>

View File

@ -17,6 +17,9 @@ WORKING_DIR=`pwd`
PRG_DIR=`dirname "$PRG"` PRG_DIR=`dirname "$PRG"`
APP_ROOT=`cd "$PRG_DIR" && pwd` APP_ROOT=`cd "$PRG_DIR" && pwd`
# add package lib folder to library path
PACKAGE_LIBRARY_PATH="$APP_ROOT/lib/$(uname -m)"
# restore original working dir # restore original working dir
cd "$WORKING_DIR" cd "$WORKING_DIR"
@ -29,11 +32,11 @@ fi
export LANG="en_US.UTF-8" export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8" export LC_ALL="en_US.UTF-8"
# add APP_ROOT to LD_LIBRARY_PATH # add APP_ROOT and PACKAGE_LIBRARY_PATH to LD_LIBRARY_PATH
if [ ! -z "$LD_LIBRARY_PATH" ]; then if [ ! -z "$LD_LIBRARY_PATH" ]; then
export LD_LIBRARY_PATH="$APP_ROOT:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$APP_ROOT:$PACKAGE_LIBRARY_PATH:$LD_LIBRARY_PATH"
else else
export LD_LIBRARY_PATH="$APP_ROOT" export LD_LIBRARY_PATH="$APP_ROOT:$PACKAGE_LIBRARY_PATH"
fi fi
# choose extractor # choose extractor