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

Skip to content

Commit b38612d

Browse files
committed
Ship 32-bit strip binary, mk. 2
1 parent 9cddf75 commit b38612d

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ matrix:
2626
- automake # required for patchelf
2727
- libfuse2:i386
2828
- libcairo2:i386
29-
- strip:i386 # will be bundled, needs to be 32-bit binary
29+
- binutils-i686-gnu # to be able to bundle 32-bit strip binary
3030
- env: ARCH=x86_64 BUILD_TYPE=coverage
3131
addons:
3232
apt:

travis/build.sh

+18-1
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,25 @@ make -j$(nproc)
4242
## Run Unit Tests
4343
ctest -V
4444

45+
# look for suitable strip binary to bundle
46+
# https://github.com/linuxdeploy/linuxdeploy/issues/59
47+
# first, try to find architecture aware
48+
strip_path=/usr/"$ARCH"*/bin/strip
49+
50+
# another possible path
51+
if [[ ! -f "$strip_path" ]]; then
52+
strip_path=/usr/bin/"$ARCH"*-strip
53+
fi
54+
55+
# fall back to using "default" distro strip
56+
if [[ ! -f "$strip_path" ]]; then
57+
strip_path=/usr/bin/strip
58+
fi
59+
60+
# TODO: make sure strip binary's architecture matches the one we want, e.g., using file, readelf...
61+
4562
# args are used more than once
46-
LINUXDEPLOY_ARGS=("--appdir" "AppDir" "-e" "bin/linuxdeploy" "-i" "$REPO_ROOT/resources/linuxdeploy.png" "--create-desktop-file" "-e" "/usr/bin/patchelf" "-e" "/usr/bin/strip")
63+
LINUXDEPLOY_ARGS=("--appdir" "AppDir" "-e" "bin/linuxdeploy" "-i" "$REPO_ROOT/resources/linuxdeploy.png" "--create-desktop-file" "-e" "/usr/bin/patchelf" "-e" "$strip_path")
4764

4865
# deploy patchelf which is a dependency of linuxdeploy
4966
bin/linuxdeploy "${LINUXDEPLOY_ARGS[@]}"

0 commit comments

Comments
 (0)