mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-04-13 06:51:05 -05:00
Use a custom variable to support test runs from IDE better
When your IDE is running as an AppImage, the $APPRUN variable is already set in the built-in terminal. Now of course you could just calculate the path of $APPRUN yourself and force-overwrite it in that script; however that's more effort and more likely to break. Therefore it's easier to just introduce and use a custom variable.
This commit is contained in:
@@ -178,18 +178,18 @@ namespace linuxdeploy {
|
||||
<< std::endl
|
||||
<< "# autogenerated by linuxdeploy" << std::endl
|
||||
<< std::endl
|
||||
<< "export APPDIR=${APPDIR:-$(readlink -f $(dirname \"$0\"))}" << std::endl
|
||||
<< "this_dir=$(readlink -f $(dirname \"$0\"))" << std::endl
|
||||
<< std::endl;
|
||||
|
||||
std::for_each(bf::directory_iterator(appRunHooksPath), bf::directory_iterator{}, [&oss](const bf::path& p) {
|
||||
if (!bf::is_regular_file(p))
|
||||
return;
|
||||
|
||||
oss << "source \"$APPDIR\"/" << APPRUN_HOOKS_DIRNAME << "/" << p.filename();
|
||||
oss << "source \"$this_dir\"/" << APPRUN_HOOKS_DIRNAME << "/" << p.filename();
|
||||
});
|
||||
|
||||
oss << std::endl
|
||||
<< "exec \"$APPDIR\"/AppRun.wrapped" << std::endl;
|
||||
<< "exec \"$this_dir\"/AppRun.wrapped" << std::endl;
|
||||
|
||||
// first we need to make sure we're not running this more than once
|
||||
// this might cause more harm than good
|
||||
|
||||
Reference in New Issue
Block a user