| @@ -8,4 +8,4 @@ fi | |||||
| INSTALL_PREFIX="X-PREFIX-X" | INSTALL_PREFIX="X-PREFIX-X" | ||||
| export PATH="$INSTALL_PREFIX"/lib/carla:$PATH | export PATH="$INSTALL_PREFIX"/lib/carla:$PATH | ||||
| exec $PYTHON $INSTALL_PREFIX/share/carla/carla.py --with-libprefix="$INSTALL_PREFIX" "$@" | |||||
| exec $PYTHON $INSTALL_PREFIX/share/carla/carla.py --with-appname="$0" --with-libprefix="$INSTALL_PREFIX" "$@" | |||||
| @@ -8,4 +8,4 @@ fi | |||||
| INSTALL_PREFIX="X-PREFIX-X" | INSTALL_PREFIX="X-PREFIX-X" | ||||
| export PATH="$INSTALL_PREFIX"/lib/carla:$PATH | export PATH="$INSTALL_PREFIX"/lib/carla:$PATH | ||||
| exec $PYTHON $INSTALL_PREFIX/share/carla/carla_control.py --with-libprefix="$INSTALL_PREFIX" "$@" | |||||
| exec $PYTHON $INSTALL_PREFIX/share/carla/carla_control.py --with-appname="$0" --with-libprefix="$INSTALL_PREFIX" "$@" | |||||
| @@ -681,7 +681,7 @@ CARLA_EXPORT const char* carla_get_host_osc_url(); | |||||
| /*! | /*! | ||||
| * Send NSM announce message. | * Send NSM announce message. | ||||
| */ | */ | ||||
| CARLA_EXPORT void carla_nsm_announce(const char* url, int pid); | |||||
| CARLA_EXPORT void carla_nsm_announce(const char* url, const char* appName, int pid); | |||||
| /*! | /*! | ||||
| * Reply to NSM open message. | * Reply to NSM open message. | ||||
| @@ -2092,7 +2092,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| void announce(const char* const url, const int pid) | |||||
| void announce(const char* const url, const char* appName, const int pid) | |||||
| { | { | ||||
| lo_address const addr = lo_address_new_from_url(url); | lo_address const addr = lo_address_new_from_url(url); | ||||
| @@ -2114,7 +2114,7 @@ public: | |||||
| } | } | ||||
| lo_send_from(addr, lo_server_thread_get_server(fServerThread), LO_TT_IMMEDIATE, "/nsm/server/announce", "sssiii", | lo_send_from(addr, lo_server_thread_get_server(fServerThread), LO_TT_IMMEDIATE, "/nsm/server/announce", "sssiii", | ||||
| "Carla", ":switch:", "carla", NSM_API_VERSION_MAJOR, NSM_API_VERSION_MINOR, pid); | |||||
| "Carla", ":switch:", appName, NSM_API_VERSION_MAJOR, NSM_API_VERSION_MINOR, pid); | |||||
| lo_address_free(addr); | lo_address_free(addr); | ||||
| } | } | ||||
| @@ -2263,9 +2263,9 @@ private: | |||||
| static CarlaNSM gCarlaNSM; | static CarlaNSM gCarlaNSM; | ||||
| void carla_nsm_announce(const char* url, int pid) | |||||
| void carla_nsm_announce(const char* url, const char* appName, int pid) | |||||
| { | { | ||||
| gCarlaNSM.announce(url, pid); | |||||
| gCarlaNSM.announce(url, appName, pid); | |||||
| } | } | ||||
| void carla_nsm_reply_open() | void carla_nsm_reply_open() | ||||
| @@ -73,6 +73,13 @@ CARLA_DEFAULT_DISABLE_CHECKS = False | |||||
| CANVAS_ANTIALIASING_SMALL = 1 | CANVAS_ANTIALIASING_SMALL = 1 | ||||
| CANVAS_EYECANDY_SMALL = 1 | CANVAS_EYECANDY_SMALL = 1 | ||||
| # ------------------------------------------------------------------------------------------------------------ | |||||
| # Global Variables | |||||
| appName = sys.argv[0] | |||||
| libPrefix = None | |||||
| projectFilename = None | |||||
| # ------------------------------------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------------------------------------ | ||||
| # Log Syntax Highlighter | # Log Syntax Highlighter | ||||
| @@ -743,7 +750,7 @@ class CarlaMainW(QMainWindow): | |||||
| NSM_URL = os.getenv("NSM_URL") | NSM_URL = os.getenv("NSM_URL") | ||||
| if NSM_URL: | if NSM_URL: | ||||
| Carla.host.nsm_announce(NSM_URL, os.getpid()) | |||||
| Carla.host.nsm_announce(NSM_URL, appName, os.getpid()) | |||||
| else: | else: | ||||
| QTimer.singleShot(0, self, SLOT("slot_engineStart()")) | QTimer.singleShot(0, self, SLOT("slot_engineStart()")) | ||||
| @@ -1201,7 +1208,6 @@ class CarlaMainW(QMainWindow): | |||||
| self.ui.act_file_open.setEnabled(check) | self.ui.act_file_open.setEnabled(check) | ||||
| self.ui.act_engine_start.setEnabled(not check) | self.ui.act_engine_start.setEnabled(not check) | ||||
| self.ui.act_engine_stop.setEnabled(check) | self.ui.act_engine_stop.setEnabled(check) | ||||
| self.ui.act_engine_configure.setEnabled(not check) | |||||
| if check: | if check: | ||||
| self.fInfoText = "Engine running | SampleRate: %g | BufferSize: %i" % (self.fSampleRate, self.fBufferSize) | self.fInfoText = "Engine running | SampleRate: %g | BufferSize: %i" % (self.fSampleRate, self.fBufferSize) | ||||
| @@ -1964,14 +1970,14 @@ if __name__ == '__main__': | |||||
| app.setOrganizationName("falkTX") | app.setOrganizationName("falkTX") | ||||
| app.setWindowIcon(QIcon(":/scalable/carla.svg")) | app.setWindowIcon(QIcon(":/scalable/carla.svg")) | ||||
| libPrefix = None | |||||
| projectFilename = None | |||||
| for i in range(len(app.arguments())): | for i in range(len(app.arguments())): | ||||
| if i == 0: continue | if i == 0: continue | ||||
| argument = app.arguments()[i] | argument = app.arguments()[i] | ||||
| if argument.startswith("--with-libprefix="): | |||||
| if argument.startswith("--with-appname="): | |||||
| appName = argument.replace("--with-appname=", "") | |||||
| elif argument.startswith("--with-libprefix="): | |||||
| libPrefix = argument.replace("--with-libprefix=", "") | libPrefix = argument.replace("--with-libprefix=", "") | ||||
| elif os.path.exists(argument): | elif os.path.exists(argument): | ||||
| @@ -866,8 +866,8 @@ class Host(object): | |||||
| def get_sample_rate(self): | def get_sample_rate(self): | ||||
| return self.lib.carla_get_sample_rate() | return self.lib.carla_get_sample_rate() | ||||
| def nsm_announce(self, url, pid): | |||||
| self.lib.carla_nsm_announce(url.encode("utf-8"), pid) | |||||
| def nsm_announce(self, url, appName, pid): | |||||
| self.lib.carla_nsm_announce(url.encode("utf-8"), appName.encode("utf-8"), pid) | |||||
| def nsm_reply_open(self): | def nsm_reply_open(self): | ||||
| self.lib.carla_nsm_reply_open() | self.lib.carla_nsm_reply_open() | ||||