mirror of
https://gitlab.com/samplehive/sample-hive.git
synced 2026-10-23 13:15:00 +02:00
Add command line option to SampleHive version.
This commit is contained in:
+22
@@ -63,3 +63,25 @@ bool App::OnInit()
|
||||
m_Frame->Show(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
void App::OnInitCmdLine(wxCmdLineParser& parser)
|
||||
{
|
||||
wxApp::OnInitCmdLine(parser);
|
||||
|
||||
parser.AddSwitch("v", "version", "Shows the application version", 0);
|
||||
parser.Parse(true);
|
||||
}
|
||||
|
||||
bool App::OnCmdLineParsed(wxCmdLineParser& parser)
|
||||
{
|
||||
if (!wxApp::OnCmdLineParsed(parser))
|
||||
return false;
|
||||
|
||||
if (parser.Found("version"))
|
||||
{
|
||||
std::cout << "SampleHive v0.8.4_alpha.1" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user