@@ -20,10 +20,10 @@ | |||||
<string>Rack</string> | <string>Rack</string> | ||||
<key>CFBundleIconFile</key> | <key>CFBundleIconFile</key> | ||||
<string>icon</string> | <string>icon</string> | ||||
<key>CFBundleLongVersionString</key> | |||||
<string></string> | |||||
<key>CFBundleShortVersionString</key> | <key>CFBundleShortVersionString</key> | ||||
<string></string> | |||||
<string>{VERSION}</string> | |||||
<key>NSHumanReadableCopyright</key> | |||||
<string>Copyright © VCV</string> | |||||
<key>NSPrincipalClass</key> | <key>NSPrincipalClass</key> | ||||
<string>NSApplication</string> | <string>NSApplication</string> | ||||
<key>NSHighResolutionCapable</key> | <key>NSHighResolutionCapable</key> | ||||
@@ -8,6 +8,8 @@ FLAGS += \ | |||||
include arch.mk | include arch.mk | ||||
STRIP ?= strip | STRIP ?= strip | ||||
SED := perl -p -i -e | |||||
# SED := sed -i | |||||
# Sources and build flags | # Sources and build flags | ||||
@@ -100,6 +102,7 @@ ifdef ARCH_MAC | |||||
mkdir -p $(BUNDLE)/Contents | mkdir -p $(BUNDLE)/Contents | ||||
mkdir -p $(BUNDLE)/Contents/Resources | mkdir -p $(BUNDLE)/Contents/Resources | ||||
cp Info.plist $(BUNDLE)/Contents/ | cp Info.plist $(BUNDLE)/Contents/ | ||||
$(SED) 's/{VERSION}/$(VERSION)/g' $(BUNDLE)/Contents/Info.plist | |||||
cp -R LICENSE* icon.icns res $(BUNDLE)/Contents/Resources | cp -R LICENSE* icon.icns res $(BUNDLE)/Contents/Resources | ||||
mkdir -p $(BUNDLE)/Contents/MacOS | mkdir -p $(BUNDLE)/Contents/MacOS | ||||
@@ -257,10 +257,6 @@ struct QuadMIDIToCVInterface : Module { | |||||
} | } | ||||
void processMessage(MidiMessage msg) { | void processMessage(MidiMessage msg) { | ||||
// filter MIDI channel | |||||
if ((midiInput.channel > -1) && (midiInput.channel != msg.channel())) | |||||
return; | |||||
switch (msg.status()) { | switch (msg.status()) { | ||||
// note off | // note off | ||||
case 0x8: { | case 0x8: { | ||||
@@ -15,6 +15,9 @@ | |||||
#include "osdialog.h" | #include "osdialog.h" | ||||
#include <unistd.h> | #include <unistd.h> | ||||
#ifdef ARCH_WIN | |||||
#include <Windows.h> | |||||
#endif | |||||
using namespace rack; | using namespace rack; | ||||
@@ -44,6 +47,17 @@ int main(int argc, char* argv[]) { | |||||
patchFile = argv[optind]; | patchFile = argv[optind]; | ||||
} | } | ||||
#ifdef ARCH_WIN | |||||
// Windows global mutex to prevent multiple instances | |||||
// Handle will be closed by Windows when the process ends | |||||
HANDLE instanceMutex = CreateMutex(NULL, true, gApplicationName.c_str()); | |||||
if (GetLastError() == ERROR_ALREADY_EXISTS) { | |||||
osdialog_message(OSDIALOG_ERROR, OSDIALOG_OK, "Rack is already running. Multiple Rack instances are not supported."); | |||||
exit(1); | |||||
} | |||||
(void) instanceMutex; | |||||
#endif | |||||
// Initialize environment | // Initialize environment | ||||
randomInit(); | randomInit(); | ||||
assetInit(devMode); | assetInit(devMode); | ||||
@@ -86,6 +100,7 @@ int main(int argc, char* argv[]) { | |||||
else { | else { | ||||
// Load patch | // Load patch | ||||
gRackWidget->load(patchFile); | gRackWidget->load(patchFile); | ||||
gRackWidget->lastPath = patchFile; | |||||
} | } | ||||
engineStart(); | engineStart(); | ||||