File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ main() {
2020 if [[ $OS == " linux" ]]; then
2121 bundle_dynamic_lib libstdc++
2222 bundle_dynamic_lib libgcc_s
23+ elif [[ $OS == " macos" ]]; then
24+ bundle_dynamic_lib libicui18n
25+ bundle_dynamic_lib libicuuc
26+ bundle_dynamic_lib libicudata
2327 fi
2428
2529 ln -s " ./bin/code-server" " $RELEASE_PATH /code-server"
@@ -31,9 +35,14 @@ main() {
3135
3236bundle_dynamic_lib () {
3337 lib_name=" $1 "
34- lib_path=" $( ldd " $RELEASE_PATH /lib/node" | grep " $lib_name " | awk ' {print $3 }' ) "
3538
36- cp " $lib_path " " $RELEASE_PATH /lib/"
39+ if [[ $OS == " linux" ]]; then
40+ lib_path=" $( ldd " $RELEASE_PATH /lib/node" | grep " $lib_name " | awk ' {print $3 }' ) "
41+ elif [[ $OS == " macos" ]]; then
42+ lib_path=" $( otool -L " $RELEASE_PATH /lib/node" | grep " $lib_name " | awk ' {print $1 }' ) "
43+ fi
44+
45+ cp " $lib_path " " $RELEASE_PATH /lib"
3746}
3847
3948main " $@ "
Original file line number Diff line number Diff line change 1- #! /usr/ bin/env sh
1+ #! /bin/sh
22
33# This script is intended to be bundled into the static releases.
44# Runs code-server with the bundled Node binary.
@@ -17,5 +17,9 @@ bin_dir() {
1717}
1818
1919BIN_DIR=$( bin_dir)
20- export LD_LIBRARY_PATH=" $BIN_DIR /../lib${LD_LIBRARY_PATH+: $LD_LIBRARY_PATH } "
20+ if [ " $( uname) " = " Linux" ]; then
21+ export LD_LIBRARY_PATH=" $BIN_DIR /../lib${LD_LIBRARY_PATH+: $LD_LIBRARY_PATH } "
22+ else
23+ export DYLD_LIBRARY_PATH=" $BIN_DIR /../lib${LD_LIBRARY_PATH+: $LD_LIBRARY_PATH } "
24+ fi
2125exec " $BIN_DIR /../lib/node" " $BIN_DIR /.." " $@ "
You can’t perform that action at this time.
0 commit comments