You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -181,18 +175,37 @@ int main(int argc, char** argv)
181
175
Option & userDataOption = parser.add<Option> ('u', "userdata", "Overwrite user data path, defaults to home directory of current user (%1)", QDir::homePath() + "/.hyperion");
182
176
BooleanOption & resetPassword = parser.add<BooleanOption> (0x0, "resetPassword", "Lost your password? Reset it with this option back to 'hyperion'");
183
177
BooleanOption & deleteDB = parser.add<BooleanOption> (0x0, "deleteDatabase", "Start all over? This Option will delete the database");
184
-
BooleanOption & silentOption = parser.add<BooleanOption> ('s', "silent", "do not print any outputs");
178
+
BooleanOption & silentOption = parser.add<BooleanOption> ('s', "silent", "Do not print any outputs");
BooleanOption & consoleOption = parser.add<BooleanOption> ('c', "console", "Open a console window to view log output");
189
183
#endif
190
-
parser.add<BooleanOption> (0x0, "desktop", "show systray on desktop");
191
-
parser.add<BooleanOption> (0x0, "service", "force hyperion to start as console service");
192
-
Option & exportEfxOption = parser.add<Option> (0x0, "export-effects", "export effects to given path");
184
+
parser.add<BooleanOption> (0x0, "desktop", "Show systray on desktop");
185
+
parser.add<BooleanOption> (0x0, "service", "Force hyperion to start as console service");
186
+
Option & exportEfxOption = parser.add<Option> (0x0, "export-effects", "Export effects to given path");
187
+
188
+
/* Internal options, invisible to help */
189
+
BooleanOption & waitOption = parser.addHidden<BooleanOption> (0x0, "wait-hyperion", "Do not exit if other Hyperion instances are running, wait them to finish");
193
190
194
191
parser.process(*qApp);
195
192
193
+
if (!parser.isSet(waitOption))
194
+
{
195
+
if (getProcessIdsByProcessName(processName).size() > 1)
196
+
{
197
+
Error(log, "The Hyperion Daemon is already running, abort start");
198
+
return0;
199
+
}
200
+
}
201
+
else
202
+
{
203
+
while (getProcessIdsByProcessName(processName).size() > 1)
0 commit comments