Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 08a1bf9

Browse files
committed
Multiarch builds, mk. 1
1 parent eba0d70 commit 08a1bf9

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ addons:
66
update: true
77
packages:
88
- libmagic-dev
9+
- libmagic-dev:i386
10+
- libjpeg-dev
11+
- libjpeg-dev:i386
912
- cimg-dev
1013
- automake # required for patchelf
1114

15+
environment:
16+
- ARCH=x86_64
17+
- ARCH=i386
18+
1219
install:
1320
- git clone https://github.com/NixOS/patchelf.git
1421
- cd patchelf

travis/build.sh

+14-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,16 @@ OLD_CWD=$(readlink -f .)
2626

2727
pushd "$BUILD_DIR"
2828

29-
cmake "$REPO_ROOT"
29+
if [ "$ARCH" == "x86_64" ]; then
30+
EXTRA_CMAKE_ARGS=()
31+
elif [ "$ARCH" == "i386" ]; then
32+
EXTRA_CMAKE_ARGS=("-DCMAKE_TOOLCHAIN_FILE=$REPO_ROOT/cmake/toolchains/i386-linux-gnu.cmake")
33+
else
34+
echo "Architecture not supported: $ARCH" 1>&2
35+
exit 1
36+
fi
37+
38+
cmake "$REPO_ROOT" "${EXTRA_CMAKE_ARGS[@]}"
3039

3140
make VERBOSE=1
3241

@@ -37,12 +46,12 @@ LINUXDEPLOY_ARGS=("--init-appdir" "--appdir" "AppDir" "-e" "bin/linuxdeploy" "-i
3746
bin/linuxdeploy "${LINUXDEPLOY_ARGS[@]}"
3847

3948
# bundle AppImage plugin
40-
wget https://github.com/TheAssassin/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
41-
chmod +x linuxdeploy-plugin-appimage*.AppImage
42-
mv linuxdeploy-plugin-appimage*.AppImage AppDir/usr/bin/
49+
wget https://github.com/TheAssassin/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-"$ARCH".AppImage
50+
chmod +x linuxdeploy-plugin-appimage-"$ARCH".AppImage
51+
mv linuxdeploy-plugin-appimage-"$ARCH".AppImage AppDir/usr/bin/
4352

4453
# build AppImage using plugin
45-
AppDir/usr/bin/linuxdeploy-plugin-appimage*.AppImage --appdir AppDir/
54+
AppDir/usr/bin/linuxdeploy-plugin-appimage-"$ARCH".AppImage --appdir AppDir/
4655

4756
# rename AppImage to avoid "Text file busy" issues when using it to create another one
4857
mv ./linuxdeploy*.AppImage test.AppImage

0 commit comments

Comments
 (0)