Allow to run Ardour without start-script on MacOS
authorRobin Gareus <robin@gareus.org>
Wed, 23 Oct 2019 20:54:19 +0000 (22:54 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 23 Oct 2019 20:54:19 +0000 (22:54 +0200)
This might break JACK, since the previous environment
is no longer re-set before calling JackConnection::open(), then
again, no Ardour does not un/set any critical env variables on MacOS.

gtk2_ardour/bundle_env_cocoa.cc

index 807f9941565846389e771b09f3becc24b23a14b1..9ba3e9311a9a2ac4f060f49a6536da96c63c5202 100644 (file)
@@ -86,11 +86,12 @@ fixup_bundle_environment (int argc, char* argv[], string & localedir)
 
        no_app_nap ();
 
-       if (!g_getenv ("ARDOUR_BUNDLED")) {
-               return;
+       if (g_getenv ("ARDOUR_SELF")) {
+               g_setenv ("ARDOUR_SELF", argv[0]);
+       }
+       if (g_getenv ("PREBUNDLE_ENV")) {
+               EnvironmentalProtectionAgency::set_global_epa (new EnvironmentalProtectionAgency (true, "PREBUNDLE_ENV"));
        }
-
-       EnvironmentalProtectionAgency::set_global_epa (new EnvironmentalProtectionAgency (true, "PREBUNDLE_ENV"));
 
        set_language_preference ();