File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,15 +58,19 @@ echo "Copying source files"
5858cp --recursive $verbose " $LINUXDEPLOY_PLUGIN_GDB_SRC " " $appdir /usr/"
5959
6060echo " Installing new AppRun wrapper"
61- exe=" $( readlink -f " $appdir /AppRun.wrapped" ) "
62- rm $verbose " $appdir /AppRun.wrapped"
63- cat > " $appdir /AppRun.wrapped" << EOF
61+ # AppRun script does: exec "$this_dir"/AppRun.wrapped "$@"
62+ # AppRun.wrapped (this script) is a wrapper on AppRun.wrapped.orig
63+ # AppRun.wrapped.orig is the real application
64+ old_exe=" $( readlink -f " $appdir /AppRun.wrapped" ) "
65+ new_exe=" $old_exe .orig"
66+ mv $verbose " $old_exe " " $new_exe "
67+ cat > " $old_exe " << EOF
6468#! /bin/bash
6569
6670if [[ -n "\$ APPIMAGE_USE_GDB" ]]; then
67- gdb --cd "\$ APPDIR/usr/$( basename " $LINUXDEPLOY_PLUGIN_GDB_SRC " ) " --args "\$ APPDIR/${exe # $appdir } " "\$ @"
71+ gdb --cd "\$ APPDIR/usr/$( basename " $LINUXDEPLOY_PLUGIN_GDB_SRC " ) " --args "\$ APPDIR/${new_exe # $appdir } " "\$ @"
6872else
69- exec "\$ APPDIR/${exe # $appdir } " "\$ @"
73+ exec "\$ APPDIR/${new_exe # $appdir } " "\$ @"
7074fi
7175EOF
72- chmod $verbose 755 " $appdir /AppRun.wrapped "
76+ chmod $verbose 755 " $old_exe "
You can’t perform that action at this time.
0 commit comments