NSM preparation for OSX and windows
authorRobin Gareus <robin@gareus.org>
Mon, 4 May 2015 22:25:06 +0000 (00:25 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 4 May 2015 22:25:06 +0000 (00:25 +0200)
Note that on those platforms the application name
is a full path. This is permitted by the specs:

“executable_name MUST be the executable name that the program was launched with. For C programs, this is simply the value of argv[0]” [http://non.tuxfamily.org/nsm/API.html#n:1.2.1.1.]

but the current implementation of nsm expects the basename
only and searched $PATH.

gtk2_ardour/bundle_env_mingw.cc
tools/osx_packaging/startup_script

index f53c461299f8fc878310f1ee2f53fdc633b32981..0d977cabbaa2d07efd7d2a4dfee13c27dd06d9a5 100644 (file)
@@ -123,6 +123,15 @@ fixup_bundle_environment (int, char* [], string & localedir)
        Glib::setenv ("VAMP_PATH", path, true);
 
        Glib::setenv ("SUIL_MODULE_DIR", Glib::build_filename(ardour_dll_directory(), "suil"), true);
+
+       /* XXX this should really be PRODUCT_EXE see tools/x-win/package.sh
+        * ardour on windows does not have a startup wrapper script.
+        *
+        * then again, there's probably nobody using NSM on windows.
+        * because neither nsmd nor the GUI is currently available for windows.
+        * furthermore it'll be even less common for derived products.
+        */
+       Glib::setenv ("ARDOUR_SELF", Glib::build_filename(ardour_dll_directory(), "ardour.exe"), true);
 }
 
 static __cdecl void
index 75ed7200d129f310d8ec3e18c887c70d4be6dd51..ba9cf18e474d836fec34d930dacafd4c296a64d5 100644 (file)
@@ -19,6 +19,8 @@ end tell'
    exit 1
 fi
 
+export ARDOUR_SELF="$0"
+
 # this needs to be set so that we can restore the environment when we want to find JACK (or similar)
 export PREBUNDLE_ENV="$(env)"