mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Allow multiple instances to run if environment variable is set
If the environment variable HIFI_ALLOW_MULTIPLE_INSTANCES is present, the value is ignored, then you can have multiple copies of interface running on the same machine.
This commit is contained in:
parent
1ddafa3cee
commit
f8e6bd8c6b
1 changed files with 5 additions and 0 deletions
|
@ -74,6 +74,11 @@ int main(int argc, const char* argv[]) {
|
|||
instanceMightBeRunning = !sharedMemory.create(1, QSharedMemory::ReadOnly);
|
||||
#endif
|
||||
|
||||
// allow multiple interfaces to run if this environment variable is set.
|
||||
if (QProcessEnvironment::systemEnvironment().contains("HIFI_ALLOW_MULTIPLE_INSTANCES")) {
|
||||
instanceMightBeRunning = false;
|
||||
}
|
||||
|
||||
if (instanceMightBeRunning) {
|
||||
// Try to connect and send message to existing interface instance
|
||||
QLocalSocket socket;
|
||||
|
|
Loading…
Reference in a new issue