parent
ac9b57c07e
commit
e55d3e49e1
|
@ -20,6 +20,10 @@ main() {
|
||||||
if [[ $OS == "linux" ]]; then
|
if [[ $OS == "linux" ]]; then
|
||||||
bundle_dynamic_lib libstdc++
|
bundle_dynamic_lib libstdc++
|
||||||
bundle_dynamic_lib libgcc_s
|
bundle_dynamic_lib libgcc_s
|
||||||
|
elif [[ $OS == "macos" ]]; then
|
||||||
|
bundle_dynamic_lib libicui18n
|
||||||
|
bundle_dynamic_lib libicuuc
|
||||||
|
bundle_dynamic_lib libicudata
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -s "./bin/code-server" "$RELEASE_PATH/code-server"
|
ln -s "./bin/code-server" "$RELEASE_PATH/code-server"
|
||||||
|
@ -31,9 +35,14 @@ main() {
|
||||||
|
|
||||||
bundle_dynamic_lib() {
|
bundle_dynamic_lib() {
|
||||||
lib_name="$1"
|
lib_name="$1"
|
||||||
lib_path="$(ldd "$RELEASE_PATH/lib/node" | grep "$lib_name" | awk '{print $3 }')"
|
|
||||||
|
|
||||||
cp "$lib_path" "$RELEASE_PATH/lib/"
|
if [[ $OS == "linux" ]]; then
|
||||||
|
lib_path="$(ldd "$RELEASE_PATH/lib/node" | grep "$lib_name" | awk '{print $3 }')"
|
||||||
|
elif [[ $OS == "macos" ]]; then
|
||||||
|
lib_path="$(otool -L "$RELEASE_PATH/lib/node" | grep "$lib_name" | awk '{print $1 }')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp "$lib_path" "$RELEASE_PATH/lib"
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env sh
|
#!/bin/sh
|
||||||
|
|
||||||
# This script is intended to be bundled into the static releases.
|
# This script is intended to be bundled into the static releases.
|
||||||
# Runs code-server with the bundled Node binary.
|
# Runs code-server with the bundled Node binary.
|
||||||
|
@ -17,5 +17,9 @@ bin_dir() {
|
||||||
}
|
}
|
||||||
|
|
||||||
BIN_DIR=$(bin_dir)
|
BIN_DIR=$(bin_dir)
|
||||||
|
if [ "$(uname)" = "Linux"]; then
|
||||||
export LD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
|
export LD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
|
||||||
|
else
|
||||||
|
export DYLD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
|
||||||
|
fi
|
||||||
exec "$BIN_DIR/../lib/node" "$BIN_DIR/.." "$@"
|
exec "$BIN_DIR/../lib/node" "$BIN_DIR/.." "$@"
|
||||||
|
|
Loading…
Reference in New Issue