{
// prevent multiple application instances launch
-#if defined (WIN32)
+#if defined (PLATFORM_WINDOWS)
HANDLE appInstanceGuardMutex;
appInstanceGuardMutex = CreateMutex(
dlgReportParseError.set_title (_("An error was encountered while launching Ardour"));
dlgReportParseError.run ();
#endif
+
+#if defined (PLATFORM_WINDOWS)
ReleaseMutex(appInstanceGuardMutex);
CloseHandle(appInstanceGuardMutex);
+#endif
exit (1);
}
<< endl;
if (just_version) {
+#if defined (PLATFORM_WINDOWS)
ReleaseMutex(appInstanceGuardMutex);
CloseHandle(appInstanceGuardMutex);
+#endif
exit (0);
}
if (!ARDOUR::init (ARDOUR_COMMAND_LINE::use_vst, ARDOUR_COMMAND_LINE::try_hw_optimization, localedir)) {
error << string_compose (_("could not initialize %1."), PROGRAM_NAME) << endmsg;
-
+#if defined (PLATFORM_WINDOWS)
ReleaseMutex(appInstanceGuardMutex);
CloseHandle(appInstanceGuardMutex);
+#endif
exit (1);
}
if (curvetest_file) {
-
+#if defined (PLATFORM_WINDOWS)
ReleaseMutex(appInstanceGuardMutex);
CloseHandle(appInstanceGuardMutex);
+#endif
return curvetest (curvetest_file);
}
} catch (failed_constructor& err) {
error << string_compose (_("could not create %1 GUI"), PROGRAM_NAME) << endmsg;
+#if defined (PLATFORM_WINDOWS)
ReleaseMutex(appInstanceGuardMutex);
CloseHandle(appInstanceGuardMutex);
+#endif
exit (1);
}
ARDOUR::cleanup ();
pthread_cancel_all ();
- ReleaseMutex(appInstanceGuardMutex);
- CloseHandle(appInstanceGuardMutex);
+#if defined (PLATFORM_WINDOWS)
+ ReleaseMutex(appInstanceGuardMutex);
+ CloseHandle(appInstanceGuardMutex);
+#endif
return 0;
}
#if (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)