Mercurial > hg > sonic-visualiser
comparison main/main.cpp @ 2058:ed3f1b5094ad
Parse this one earlier, to avoid trying to connect to a display first
author | Chris Cannam |
---|---|
date | Thu, 01 Nov 2018 10:56:58 +0000 |
parents | 943e52e03cde |
children | 0f5ff52655ec |
comparison
equal
deleted
inserted
replaced
2057:c0afaca5a029 | 2058:ed3f1b5094ad |
---|---|
228 }; | 228 }; |
229 | 229 |
230 int | 230 int |
231 main(int argc, char **argv) | 231 main(int argc, char **argv) |
232 { | 232 { |
233 if (argc == 2 && (QString(argv[1]) == "--version" || | |
234 QString(argv[1]) == "-v")) { | |
235 cerr << SV_VERSION << endl; | |
236 exit(0); | |
237 } | |
238 | |
233 svSystemSpecificInitialisation(); | 239 svSystemSpecificInitialisation(); |
234 | 240 |
235 #ifdef Q_WS_X11 | 241 #ifdef Q_WS_X11 |
236 #if QT_VERSION >= 0x040500 | 242 #if QT_VERSION >= 0x040500 |
237 // QApplication::setGraphicsSystem("raster"); | 243 // QApplication::setGraphicsSystem("raster"); |
264 cerr << QApplication::tr( | 270 cerr << QApplication::tr( |
265 "\nSonic Visualiser is a program for viewing and exploring audio data\nfor semantic music analysis and annotation.\n\nUsage:\n\n %1 [--no-audio] [--no-osc] [<file> ...]\n\n --no-audio: Do not attempt to open an audio output device\n --no-osc: Do not provide an Open Sound Control port for remote control\n <file>: One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]) << endl; | 271 "\nSonic Visualiser is a program for viewing and exploring audio data\nfor semantic music analysis and annotation.\n\nUsage:\n\n %1 [--no-audio] [--no-osc] [<file> ...]\n\n --no-audio: Do not attempt to open an audio output device\n --no-osc: Do not provide an Open Sound Control port for remote control\n <file>: One or more Sonic Visualiser (.sv) and audio files may be provided.\n").arg(argv[0]) << endl; |
266 exit(2); | 272 exit(2); |
267 } | 273 } |
268 | 274 |
269 if (args.contains("--version") || args.contains("-v")) { | |
270 cerr << SV_VERSION << endl; | |
271 exit(0); | |
272 } | |
273 | |
274 if (args.contains("--no-audio")) audioOutput = false; | 275 if (args.contains("--no-audio")) audioOutput = false; |
275 if (args.contains("--no-osc")) oscSupport = false; | 276 if (args.contains("--no-osc")) oscSupport = false; |
276 | 277 |
277 QApplication::setOrganizationName("sonic-visualiser"); | 278 QApplication::setOrganizationName("sonic-visualiser"); |
278 QApplication::setOrganizationDomain("sonicvisualiser.org"); | 279 QApplication::setOrganizationDomain("sonicvisualiser.org"); |