Main.cpp (1083B)
1 #include "Benchmarks.h" 2 #include "ScreenshotHelper.h" 3 #include "UnitTests/UnitTests.h" 4 5 String getVersion() 6 { 7 return String (ProjectInfo::projectName) + " - " + ProjectInfo::versionString; 8 } 9 10 String getHelp() 11 { 12 return "ChowTapeModel Headless Interface:"; 13 } 14 15 int main (int argc, char* argv[]) 16 { 17 std::cout << "Running ChowTapeModel in headless mode..." << std::endl; 18 19 #if JUCE_MAC 20 Process::setDockIconVisible (false); // hide dock icon 21 #endif 22 ScopedJuceInitialiser_GUI scopedJuce; // creates MessageManager 23 24 ConsoleApplication app; 25 app.addVersionCommand ("--version", getVersion()); 26 app.addHelpCommand ("--help|-h", getHelp(), true); 27 28 #if ! JUCE_LINUX // ScreenshotHelper doesn't work on Linux right now 29 ScreenshotHelper screenshooter; 30 app.addCommand (screenshooter); 31 #endif 32 33 Benchmarks benchmarks; 34 app.addCommand (benchmarks); 35 36 UnitTests unitTests; 37 app.addCommand (unitTests); 38 39 // ArgumentList args { "--unit-tests", "MixGroupsTest" }; 40 // unitTests.runUnitTests (args); 41 42 return app.findAndRunCommand (argc, argv); 43 }