5 Commits

Author SHA1 Message Date
Rolando Islas 03cb4d0d71 Merge pull request #6 from rolandoislas/develop
Multiple instances and profiles
2016-09-22 22:07:22 -07:00
Rolando Islas cb69f21c5c Allow multiple instances of Light Host
- Requires argument `-multi-instance=profileName` where profileName
should be changed for each instance
2016-09-22 22:02:46 -07:00
Rolando Islas 7c5332e79e Update to Juce 4.2.4 2016-09-22 19:32:30 -07:00
Rolando Islas 49f58cd079 Missing limits header 2016-05-28 15:21:41 -07:00
Rolando Islas e0232ea370 Updated readme 2016-05-27 17:43:13 -07:00
4 changed files with 50 additions and 29 deletions
+15 -15
View File
@@ -10,7 +10,7 @@
pluginSilenceInIsSilenceOut="0" pluginTailLength="0" pluginEditorRequiresKeys="0" pluginSilenceInIsSilenceOut="0" pluginTailLength="0" pluginEditorRequiresKeys="0"
pluginAUExportPrefix="JuceProjectAU" pluginAUViewClass="JuceProjectAU_V1" pluginAUExportPrefix="JuceProjectAU" pluginAUViewClass="JuceProjectAU_V1"
pluginRTASCategory="" bundleIdentifier="com.rolandoislas.lighthost" pluginRTASCategory="" bundleIdentifier="com.rolandoislas.lighthost"
jucerVersion="4.2.1" companyName="Rolando Islas" includeBinaryInAppConfig="1" jucerVersion="4.2.4" companyName="Rolando Islas" includeBinaryInAppConfig="1"
companyWebsite="https://www.rolandoislas.com" companyEmail="admin@rolandoislas.com"> companyWebsite="https://www.rolandoislas.com" companyEmail="admin@rolandoislas.com">
<EXPORTFORMATS> <EXPORTFORMATS>
<XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="" rtasFolder="~/SDKs/PT_80_SDK" <XCODE_MAC targetFolder="Builds/MacOSX" vstFolder="" rtasFolder="~/SDKs/PT_80_SDK"
@@ -137,20 +137,20 @@
JUCE_PLUGINHOST_VST="enabled" JUCE_PLUGINHOST_AU="enabled" JUCE_WEB_BROWSER="disabled" JUCE_PLUGINHOST_VST="enabled" JUCE_PLUGINHOST_AU="enabled" JUCE_WEB_BROWSER="disabled"
JUCE_PLUGINHOST_VST3="enabled" JUCE_ASIO="enabled"/> JUCE_PLUGINHOST_VST3="enabled" JUCE_ASIO="enabled"/>
<MODULES> <MODULES>
<MODULE id="juce_audio_basics" showAllCode="1"/> <MODULE id="juce_audio_basics" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_audio_devices" showAllCode="1"/> <MODULE id="juce_audio_devices" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_audio_formats" showAllCode="1"/> <MODULE id="juce_audio_formats" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_audio_processors" showAllCode="1"/> <MODULE id="juce_audio_processors" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_audio_utils" showAllCode="1"/> <MODULE id="juce_audio_utils" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_core" showAllCode="1"/> <MODULE id="juce_core" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_cryptography" showAllCode="1"/> <MODULE id="juce_cryptography" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_data_structures" showAllCode="1"/> <MODULE id="juce_data_structures" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_events" showAllCode="1"/> <MODULE id="juce_events" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_graphics" showAllCode="1"/> <MODULE id="juce_graphics" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_gui_basics" showAllCode="1"/> <MODULE id="juce_gui_basics" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_gui_extra" showAllCode="1"/> <MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_opengl" showAllCode="1"/> <MODULE id="juce_opengl" showAllCode="1" useLocalCopy="1"/>
<MODULE id="juce_video" showAllCode="1"/> <MODULE id="juce_video" showAllCode="1" useLocalCopy="1"/>
</MODULES> </MODULES>
<LIVE_SETTINGS> <LIVE_SETTINGS>
<OSX headerPath=""/> <OSX headerPath=""/>
+31 -11
View File
@@ -7,6 +7,7 @@
class PluginHostApp : public JUCEApplication class PluginHostApp : public JUCEApplication
{ {
public: public:
PluginHostApp() {} PluginHostApp() {}
@@ -17,6 +18,8 @@ public:
options.filenameSuffix = "settings"; options.filenameSuffix = "settings";
options.osxLibrarySubFolder = "Preferences"; options.osxLibrarySubFolder = "Preferences";
checkArguments(&options);
appProperties = new ApplicationProperties(); appProperties = new ApplicationProperties();
appProperties->setStorageParameters (options); appProperties->setStorageParameters (options);
@@ -26,16 +29,6 @@ public:
#if JUCE_MAC #if JUCE_MAC
Process::setDockIconVisible(false); Process::setDockIconVisible(false);
#endif #endif
File fileToOpen;
for (int i = 0; i < getCommandLineParameterArray().size(); ++i)
{
fileToOpen = File::getCurrentWorkingDirectory().getChildFile (getCommandLineParameterArray()[i]);
if (fileToOpen.existsAsFile())
break;
}
} }
void shutdown() override void shutdown() override
@@ -52,7 +45,10 @@ public:
const String getApplicationName() override { return "Light Host"; } const String getApplicationName() override { return "Light Host"; }
const String getApplicationVersion() override { return ProjectInfo::versionString; } const String getApplicationVersion() override { return ProjectInfo::versionString; }
bool moreThanOneInstanceAllowed() override { return false; } bool moreThanOneInstanceAllowed() override {
StringArray multiInstance = getParameter("-multi-instance");
return multiInstance.size() == 2;
}
ApplicationCommandManager commandManager; ApplicationCommandManager commandManager;
ScopedPointer<ApplicationProperties> appProperties; ScopedPointer<ApplicationProperties> appProperties;
@@ -60,6 +56,30 @@ public:
private: private:
ScopedPointer<IconMenu> mainWindow; ScopedPointer<IconMenu> mainWindow;
StringArray getParameter(String lookFor) {
StringArray parameters = getCommandLineParameterArray();
StringArray found;
for (int i = 0; i < parameters.size(); ++i)
{
String param = parameters[i];
if (param.contains(lookFor))
{
found.add(lookFor);
int delimiter = param.indexOf(0, "=") + 1;
String val = param.substring(delimiter);
found.add(val);
return found;
}
}
return found;
}
void checkArguments(PropertiesFile::Options *options) {
StringArray multiInstance = getParameter("-multi-instance");
if (multiInstance.size() == 2)
options->filenameSuffix = multiInstance[1] + "." + options->filenameSuffix;
}
}; };
static PluginHostApp& getApp() { return *dynamic_cast<PluginHostApp*>(JUCEApplication::getInstance()); } static PluginHostApp& getApp() { return *dynamic_cast<PluginHostApp*>(JUCEApplication::getInstance()); }
+1
View File
@@ -10,6 +10,7 @@
#include "IconMenu.hpp" #include "IconMenu.hpp"
#include "PluginWindow.h" #include "PluginWindow.h"
#include <ctime> #include <ctime>
#include <limits.h>
#if JUCE_WINDOWS #if JUCE_WINDOWS
#include "Windows.h" #include "Windows.h"
#endif #endif
+1 -1
View File
@@ -5,7 +5,7 @@ A simple VST/AU host for OS X, Windows, and Linux that sits in the menu/task bar
### Features ### Features
See #1 See [#1](https://github.com/rolandoislas/LightHost/issues/1)
### Screenshot ### Screenshot