Skip to content

Commit 9afe33b

Browse files
committed
Make *nix symbols less of a PITA to use
1 parent ce1b095 commit 9afe33b

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

compile.sh

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,28 +1377,6 @@ if [[ "$HAVE_XDEBUG" == "yes" ]]; then
13771377
write_out INFO "Xdebug is included, but disabled by default. To enable it, change 'xdebug.mode' in your php.ini file."
13781378
fi
13791379

1380-
function separate_symbols {
1381-
local libname="$1"
1382-
local output_dirname
1383-
1384-
output_dirname="$SYMBOLS_DIR/$(dirname $libname)"
1385-
mkdir -p "$output_dirname" >> "$DIR/install.log" 2>&1
1386-
cp "$libname" "$SYMBOLS_DIR/$libname.debug" >> "$DIR/install.log" 2>&1
1387-
"$STRIP" -S "$libname" >> "$DIR/install.log" 2>&1 || rm "$SYMBOLS_DIR/$libname.debug" #if this fails, this probably isn't an executable binary
1388-
}
1389-
1390-
if [ "$SEPARATE_SYMBOLS" != "no" ]; then
1391-
echo -n "[INFO] Separating debugging symbols into $SYMBOLS_DIR..."
1392-
cd "$INSTALL_DIR"
1393-
find "lib" \( -name '*.so' -o -name '*.so.*' -o -name '*.dylib' -o -name '*.dylib.*' \) -print0 | while IFS= read -r -d '' file; do
1394-
separate_symbols "$file"
1395-
done
1396-
for file in "bin/"*; do
1397-
separate_symbols "$file"
1398-
done
1399-
cd "$DIR"
1400-
write_done
1401-
fi
14021380

14031381
cd "$DIR"
14041382
if [ "$DO_CLEANUP" == "yes" ]; then
@@ -1417,6 +1395,22 @@ if [ "$DO_CLEANUP" == "yes" ]; then
14171395
rm -r -f "$INSTALL_DIR/include" >> "$DIR/install.log" 2>&1
14181396
fi
14191397

1398+
if [ "$SEPARATE_SYMBOLS" != "no" ]; then
1399+
echo -n "[INFO] Separating debugging symbols into $SYMBOLS_DIR..."
1400+
rm -rf "$SYMBOLS_DIR" || true 2>&1
1401+
mkdir -p "$SYMBOLS_DIR" || true 2>&1
1402+
cp -r "$INSTALL_DIR"/* "$SYMBOLS_DIR"
1403+
cd "$INSTALL_DIR"
1404+
find "lib" \( -name '*.so' -o -name '*.so.*' -o -name '*.dylib' -o -name '*.dylib.*' \) -print0 | while IFS= read -r -d '' file; do
1405+
"$STRIP" -S "$file" >> "$DIR/install.log" 2>&1 || true #if this fails, this probably isn't an executable binary
1406+
done
1407+
for file in "bin/"*; do
1408+
"$STRIP" -S "$file" >> "$DIR/install.log" 2>&1 || true #if this fails, this probably isn't an executable binary
1409+
done
1410+
cd "$DIR"
1411+
write_done
1412+
fi
1413+
14201414
date >> "$DIR/install.log" 2>&1
14211415
write_out "PocketMine" "You should start the server now using \"./start.sh\"."
14221416
write_out "PocketMine" "If it doesn't work, please send the \"install.log\" file to the Bug Tracker."

0 commit comments

Comments
 (0)