コード例 #1
0
void VisualCreatePatch::OnInitCmdLine(wxCmdLineParser& parser)
{
	parser.SetDesc(g_cmdLineDesc);

	// must refuse '/' as parameter starter or cannot use "/path" style paths
	parser.SetSwitchChars(wxT("-"));
}
コード例 #2
0
ファイル: main.cpp プロジェクト: N0U/springlobby
void Springsettings::OnInitCmdLine(wxCmdLineParser& parser)
{
	#ifndef HAVE_WX29
		#define STR _T
	#else
		#define STR
	#endif

	#ifndef HAVE_WX29
		#define CSTR
	#else
		#define CSTR .c_str()
	#endif

	static const wxCmdLineEntryDesc cmdLineDesc[] =
	{
		{ wxCMD_LINE_SWITCH, STR("h"), STR("help"), wxString(_("show this help message"))CSTR, wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
		{ wxCMD_LINE_SWITCH, STR("nc"), STR("no-crash-handler"), wxString(_("don't use the crash handler (useful for debugging)"))CSTR, wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
		{ wxCMD_LINE_SWITCH, STR("cl"), STR("console-logging"),  wxString(_("shows application log to the console(if available)"))CSTR, wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
		{ wxCMD_LINE_OPTION, STR("fl"), STR("file-logging"),  wxString(_("dumps application log to a file ( enter path )"))CSTR, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
		{ wxCMD_LINE_SWITCH, STR("gl"), STR("gui-logging"),  wxString(_("enables application log window"))CSTR, wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
		{ wxCMD_LINE_OPTION, STR("f"), STR("config-file"),  wxString(_("override default choice for config-file"))CSTR, wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
		{ wxCMD_LINE_OPTION, STR("l"), STR("log-verbosity"),  wxString(_("overrides default logging verbosity, can be:\n                                0: no log\n                                1: critical errors\n                                2: errors\n                                3: warnings (default)\n                                4: messages\n                                5: function trace"))CSTR, wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL },
		{ wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL } //this is mandatory according to http://docs.wxwidgets.org/stable/wx_wxcmdlineparser.html
	};

    parser.SetDesc( cmdLineDesc );
	parser.SetSwitchChars (_T("-"));

	#undef STR
    #undef CSTR
}
コード例 #3
0
ファイル: springlobbyapp.cpp プロジェクト: slogic/springlobby
void SpringLobbyApp::OnInitCmdLine(wxCmdLineParser& parser)
{
#ifndef HAVE_WX29
#define STR _T
#else
#define STR
#endif

    wxCmdLineEntryDesc cmdLineDesc[] =
    {
        { wxCMD_LINE_SWITCH, STR("h"), STR("help"), _("show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
        { wxCMD_LINE_SWITCH, STR("nc"), STR("no-crash-handler"), _("don't use the crash handler (useful for debugging)"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
        { wxCMD_LINE_OPTION, STR("fl"), STR("file-logging"),  _("dumps application log to a file ( enter path )"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
        { wxCMD_LINE_SWITCH, STR("cl"), STR("console-logging"),  _("shows application log to the console(if available)"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
        { wxCMD_LINE_SWITCH, STR("gl"), STR("gui-logging"),  _("enables application log window"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
        { wxCMD_LINE_OPTION, STR("f"), STR("config-file"),  _("override default choice for config-file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR },
        { wxCMD_LINE_OPTION, STR("l"), STR("log-verbosity"),  _("overrides default logging verbosity, can be:\n                                0: no log\n                                1: critical errors\n                                2: errors\n                                3: warnings (default)\n                                4: messages\n                                5: function trace"), wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL },
        { wxCMD_LINE_OPTION, STR("c"), STR("customize"),  _("Load lobby customizations from game archive. Expects the long name."), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
        { wxCMD_LINE_OPTION, STR("n"), STR("name"),  _("overrides default application name"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
        { wxCMD_LINE_SWITCH, STR("s"), STR("simple"),  _("Start with the simple interface."), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL },
        { wxCMD_LINE_NONE, STR(""), STR(""),  _T(""), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }//this is mandatory according to http://docs.wxwidgets.org/stable/wx_wxcmdlineparser.html
    };

    parser.SetDesc( cmdLineDesc );
    parser.SetSwitchChars (_T("-"));

#undef STR
}
コード例 #4
0
void DolphinApp::OnInitCmdLine(wxCmdLineParser& parser)
{
  static const wxCmdLineEntryDesc desc[] = {
      {wxCMD_LINE_SWITCH, "h", "help", "Show this help message", wxCMD_LINE_VAL_NONE,
       wxCMD_LINE_OPTION_HELP},
      {wxCMD_LINE_SWITCH, "d", "debugger", "Opens the debugger", wxCMD_LINE_VAL_NONE,
       wxCMD_LINE_PARAM_OPTIONAL},
      {wxCMD_LINE_SWITCH, "l", "logger", "Opens the logger", wxCMD_LINE_VAL_NONE,
       wxCMD_LINE_PARAM_OPTIONAL},
      {wxCMD_LINE_OPTION, "e", "exec",
       "Loads the specified file (ELF, DOL, GCM, ISO, TGC, WBFS, CISO, GCZ, WAD)",
       wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL},
      {wxCMD_LINE_SWITCH, "b", "batch", "Exit Dolphin with emulator", wxCMD_LINE_VAL_NONE,
       wxCMD_LINE_PARAM_OPTIONAL},
      {wxCMD_LINE_OPTION, "c", "confirm", "Set Confirm on Stop", wxCMD_LINE_VAL_STRING,
       wxCMD_LINE_PARAM_OPTIONAL},
      {wxCMD_LINE_OPTION, "v", "video_backend", "Specify a video backend", wxCMD_LINE_VAL_STRING,
       wxCMD_LINE_PARAM_OPTIONAL},
      {wxCMD_LINE_OPTION, "a", "audio_emulation", "Low level (LLE) or high level (HLE) audio",
       wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL},
      {wxCMD_LINE_OPTION, "m", "movie", "Play a movie file", wxCMD_LINE_VAL_STRING,
       wxCMD_LINE_PARAM_OPTIONAL},
      {wxCMD_LINE_OPTION, "u", "user", "User folder path", wxCMD_LINE_VAL_STRING,
       wxCMD_LINE_PARAM_OPTIONAL},
      {wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0}};

  parser.SetDesc(desc);
}
コード例 #5
0
ファイル: test.cpp プロジェクト: gdos/wxWidgets
// The table of command line options
//
void TestApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    TestAppBase::OnInitCmdLine(parser);

    static const wxCmdLineEntryDesc cmdLineDesc[] = {
        { wxCMD_LINE_SWITCH, "l", "list",
            "list the test suites, do not run them",
            wxCMD_LINE_VAL_NONE, 0 },
        { wxCMD_LINE_SWITCH, "L", "longlist",
            "list the test cases, do not run them",
            wxCMD_LINE_VAL_NONE, 0 },
        { wxCMD_LINE_SWITCH, "d", "detail",
            "print the test case names, run them",
            wxCMD_LINE_VAL_NONE, 0 },
        { wxCMD_LINE_SWITCH, "t", "timing",
            "print names and measure running time of individual test, run them",
            wxCMD_LINE_VAL_NONE, 0 },
        { wxCMD_LINE_OPTION, "", "locale",
            "locale to use when running the program",
            wxCMD_LINE_VAL_STRING, 0 },
        { wxCMD_LINE_PARAM, NULL, NULL, "REGISTRY", wxCMD_LINE_VAL_STRING,
            wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },
        wxCMD_LINE_DESC_END
    };

    parser.SetDesc(cmdLineDesc);
}
コード例 #6
0
ファイル: appbase.cpp プロジェクト: jonntd/dynamica
void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
{
    // the standard command line options
    static const wxCmdLineEntryDesc cmdLineDesc[] =
    {
        {
            wxCMD_LINE_SWITCH,
            "h",
            "help",
            gettext_noop("show this help message"),
            wxCMD_LINE_VAL_NONE,
            wxCMD_LINE_OPTION_HELP
        },

#if wxUSE_LOG
        {
            wxCMD_LINE_SWITCH,
            NULL,
            OPTION_VERBOSE,
            gettext_noop("generate verbose log messages"),
            wxCMD_LINE_VAL_NONE,
            0x0
        },
#endif // wxUSE_LOG

        // terminator
        wxCMD_LINE_DESC_END
    };

    parser.SetDesc(cmdLineDesc);
}
コード例 #7
0
ファイル: graphics.cpp プロジェクト: CodeTickler/wxWidgets
    virtual void OnInitCmdLine(wxCmdLineParser& parser)
    {
        static const wxCmdLineEntryDesc desc[] =
        {
            { wxCMD_LINE_SWITCH, "",  "bitmaps" },
            { wxCMD_LINE_SWITCH, "",  "images" },
            { wxCMD_LINE_SWITCH, "",  "lines" },
            { wxCMD_LINE_SWITCH, "",  "rawbmp" },
            { wxCMD_LINE_SWITCH, "",  "rectangles" },
            { wxCMD_LINE_SWITCH, "",  "circles" },
            { wxCMD_LINE_SWITCH, "",  "ellipses" },
            { wxCMD_LINE_SWITCH, "",  "paint" },
            { wxCMD_LINE_SWITCH, "",  "client" },
            { wxCMD_LINE_SWITCH, "",  "memory" },
            { wxCMD_LINE_SWITCH, "",  "dc" },
            { wxCMD_LINE_SWITCH, "",  "gc" },
#if wxUSE_GLCANVAS
            { wxCMD_LINE_SWITCH, "",  "gl" },
#endif // wxUSE_GLCANVAS
            { wxCMD_LINE_OPTION, "m", "map-mode", "", wxCMD_LINE_VAL_NUMBER },
            { wxCMD_LINE_OPTION, "p", "pen-width", "", wxCMD_LINE_VAL_NUMBER },
            { wxCMD_LINE_OPTION, "w", "width", "", wxCMD_LINE_VAL_NUMBER },
            { wxCMD_LINE_OPTION, "h", "height", "", wxCMD_LINE_VAL_NUMBER },
            { wxCMD_LINE_OPTION, "I", "images", "", wxCMD_LINE_VAL_NUMBER },
            { wxCMD_LINE_OPTION, "N", "number-of-iterations", "", wxCMD_LINE_VAL_NUMBER },
#ifdef __WXMSW__
            { wxCMD_LINE_OPTION, "r", "renderer", "gdiplus | direct2d | cairo", wxCMD_LINE_VAL_STRING },
#endif // __WXMSW__
            { wxCMD_LINE_NONE },
        };

        parser.SetDesc(desc);
    }
コード例 #8
0
ファイル: Lancer.cpp プロジェクト: romw/boincsentinels
///
/// Pass the command line parameters and descriptions to wxWidgets for displaying.
///
void CBOINCGUIApp::OnInitCmdLine(wxCmdLineParser &parser)
{
    wxApp::OnInitCmdLine(parser);
    static const wxCmdLineEntryDesc cmdLineDesc[] =
    {
    { wxCMD_LINE_NONE } //DON'T forget this line!!
    };
    parser.SetDesc(cmdLineDesc);
}
コード例 #9
0
ファイル: updaterapp.cpp プロジェクト: jgleesawn/springlobby
void UpdaterApp::OnInitCmdLine(wxCmdLineParser& parser)
{
	wxCmdLineEntryDesc cmdLineDesc[] = {
		{ wxCMD_LINE_SWITCH, _("h"), _("help"), _("show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
		{ wxCMD_LINE_PARAM,  NULL, NULL, _("<parent pid> <springlobby.exe> <updater.exe> <source dir> <destination dir>"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE },
		{ wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0 }//while this throws warnings, it is mandatory according to http://docs.wxwidgets.org/stable/wx_wxcmdlineparser.html
	};

	parser.SetDesc( cmdLineDesc );
	parser.SetSwitchChars (_T("-"));
}
コード例 #10
0
ファイル: sound-killer.cpp プロジェクト: galik/sound-killer
	void OnInitCmdLine(wxCmdLineParser& parser) override
	{
		bug_fun();
		static const wxCmdLineEntryDesc g_cmdLineDesc[] =
		{
			{wxCMD_LINE_PARAM, nullptr, nullptr, nullptr,
				wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE|wxCMD_LINE_PARAM_OPTIONAL},
			{wxCMD_LINE_NONE}
		};
		parser.SetDesc(g_cmdLineDesc);
		parser.SetSwitchChars(wxT("-"));
	}
コード例 #11
0
ファイル: graphics.cpp プロジェクト: czxxjtu/wxPython-1
    virtual void OnInitCmdLine(wxCmdLineParser& parser)
    {
        static const wxCmdLineEntryDesc desc[] =
        {
            { wxCMD_LINE_OPTION, "m", "map-mode", "", wxCMD_LINE_VAL_NUMBER },
            { wxCMD_LINE_OPTION, "p", "pen-width", "", wxCMD_LINE_VAL_NUMBER },
            { wxCMD_LINE_OPTION, "w", "width", "", wxCMD_LINE_VAL_NUMBER },
            { wxCMD_LINE_OPTION, "h", "height", "", wxCMD_LINE_VAL_NUMBER },
            { wxCMD_LINE_OPTION, "L", "lines", "", wxCMD_LINE_VAL_NUMBER },
        };

        parser.SetDesc(desc);
    }
コード例 #12
0
ファイル: mainApp.cpp プロジェクト: HelloWilliam/osiris
void mainApp::OnInitCmdLine (wxCmdLineParser &parser) 
{
  static const wxCmdLineEntryDesc cmdLineDesc[] =
  {    
    { wxCMD_LINE_PARAM,  NULL, NULL, "input-file", 
      wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
    { wxCMD_LINE_OPTION,  "verbose" ,"verbose",NULL,
      wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
    { wxCMD_LINE_NONE }
  };
  parser.SetDesc(cmdLineDesc);
  return;
}
コード例 #13
0
ファイル: svgfilterui.cpp プロジェクト: UIKit0/xara-xtreme
void MyApp::OnInitCmdLine(wxCmdLineParser& parser)
{
	static const wxCmdLineEntryDesc cmdLineDesc[] =
	{
		{ wxCMD_LINE_SWITCH, _T("h"), _T("help"),	 _T("show this help message"),
			wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
		{ wxCMD_LINE_SWITCH, _T("v"), _T("verbose"), _T("be verbose") },
		{ wxCMD_LINE_OPTION, _T("f"), _T("file"),	 _T("output filename") },
		{ wxCMD_LINE_OPTION, _T("x"), _T("xmlfile"), _T("xml configuration filename") },
		{ wxCMD_LINE_SWITCH, _T("i"), _T("import"),	 _T("specify import action") },
		{ wxCMD_LINE_SWITCH, _T("e"), _T("export"),  _T("specify export action") },
		{ wxCMD_LINE_NONE }
	};

	parser.SetDesc(cmdLineDesc);
}
コード例 #14
0
ファイル: MutApp.cpp プロジェクト: BackupTheBerlios/mutabor
	void MutApp::OnInitCmdLine(wxCmdLineParser&  parser) {
		const wxCmdLineEntryDesc cmdLineDesc[] = {
			{ wxCMD_LINE_PARAM,  NULL, NULL, _("logic file"), 
			  wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE|wxCMD_LINE_PARAM_OPTIONAL },
			{ wxCMD_LINE_NONE }
		};

		wxApp::OnInitCmdLine(parser);
		parser.SetDesc(cmdLineDesc);

#ifdef DEBUG
		debugFlags::InitCommandLine(parser);
#endif

	
	}
コード例 #15
0
ファイル: appcmn.cpp プロジェクト: madnessw/thesnow
void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
{
    // first add the standard non GUI options
    wxAppConsole::OnInitCmdLine(parser);

    // the standard command line options
    static const wxCmdLineEntryDesc cmdLineGUIDesc[] =
    {
#ifdef __WXUNIVERSAL__
        {
            wxCMD_LINE_OPTION,
            wxEmptyString,
            OPTION_THEME,
            gettext_noop("specify the theme to use"),
            wxCMD_LINE_VAL_STRING,
            0x0
        },
#endif // __WXUNIVERSAL__

#if defined(__WXMGL__)
        // VS: this is not specific to wxMGL, all fullscreen (framebuffer) ports
        //     should provide this option. That's why it is in common/appcmn.cpp
        //     and not mgl/app.cpp
        {
            wxCMD_LINE_OPTION,
            wxEmptyString,
            OPTION_MODE,
            gettext_noop("specify display mode to use (e.g. 640x480-16)"),
            wxCMD_LINE_VAL_STRING,
            0x0
        },
#endif // __WXMGL__

        // terminator
        {
            wxCMD_LINE_NONE,
            wxEmptyString,
            wxEmptyString,
            wxEmptyString,
            wxCMD_LINE_VAL_NONE,
            0x0
        }
    };

    parser.SetDesc(cmdLineGUIDesc);
}
コード例 #16
0
ファイル: MainApp.cpp プロジェクト: AlexHayton/decoda
void MainApp::OnInitCmdLine(wxCmdLineParser& parser)
{

    // Command line options:
    //  [project file] [files...] [/debugexe imagename]

    const wxCmdLineEntryDesc cmdLineDesc[] =
        {
            { wxCMD_LINE_PARAM,  NULL,          NULL,       "input file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL },
#ifndef DEDICATED_PRODUCT_VERSION
            { wxCMD_LINE_OPTION, "debugexe",    "debugexe", "executable", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
#endif
            { wxCMD_LINE_NONE }
        };
    
    parser.SetDesc(cmdLineDesc);

}
コード例 #17
0
void SpringLobbyApp::OnInitCmdLine(wxCmdLineParser& parser)
{
	static const wxCmdLineEntryDesc cmdLineDesc[] =
	    {
	     {wxCMD_LINE_SWITCH, "h", "help", wxTRANSLATE("show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP},
	     {wxCMD_LINE_SWITCH, "nc", "no-crash-handler", wxTRANSLATE("don't use the crash handler (useful for debugging)"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL},
	     {wxCMD_LINE_SWITCH, "cl", "console-logging", wxTRANSLATE("shows application log to the console(if available)"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL},
	     {wxCMD_LINE_SWITCH, "gl", "gui-logging", wxTRANSLATE("enables application log window"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL},
	     {wxCMD_LINE_OPTION, "f", "config-file", wxTRANSLATE("override default choice for config-file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_NEEDS_SEPARATOR},
	     {wxCMD_LINE_OPTION, "l", "log-verbosity", wxTRANSLATE("overrides default logging verbosity, can be:\n                                1: critical errors\n                                2: errors\n                                3: warnings (default)\n                                4: messages\n                                5: function trace"), wxCMD_LINE_VAL_NUMBER, wxCMD_LINE_PARAM_OPTIONAL},
	     {wxCMD_LINE_SWITCH, "ve", "version", wxTRANSLATE("print version"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL},
	     {wxCMD_LINE_OPTION, "n", "name", wxTRANSLATE("overrides default application name"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL},
	     {wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL} //this is mandatory according to http://docs.wxwidgets.org/stable/wx_wxcmdlineparser.html

	    };

	parser.SetDesc(cmdLineDesc);
	parser.SetSwitchChars(_T("-"));
}
コード例 #18
0
ファイル: test_cmdline.hpp プロジェクト: gittiver/wxUnivDiff
   void testIsCmdLineSwitch()
   {
     parser->SetDesc(getCmdlineEntryDesc());
     wxString cmdLine("test -v");
     parser->SetCmdLine(cmdLine);
     parser->Parse();

     TS_ASSERT_EQUALS(parser->FoundSwitch("v"),wxCMD_SWITCH_ON);

#if defined WIN32

     cmdLine = "test /v";
     parser->SetCmdLine(cmdLine);
     parser->Parse();

     TS_ASSERT_EQUALS(parser->FoundSwitch("v"),wxCMD_SWITCH_ON);
#endif

     cmdLine = "test v";
     parser->SetCmdLine(cmdLine);
     parser->Parse();

     TS_ASSERT_EQUALS(parser->FoundSwitch("v"),wxCMD_SWITCH_NOT_FOUND);
     TS_ASSERT_EQUALS(parser->GetParam(1),"v");
     
     //TS_ASSERT_EQUALS(isCmdLineSwitch("-v"),true);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("-i"),true);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("-l"),true);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("-a"),true);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("-del"),true);

     //TS_ASSERT_EQUALS(isCmdLineSwitch("--verbose"),true);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("--interactive"),true);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("--list"),true);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("--add"),true);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("--del"),true);

     //TS_ASSERT_EQUALS(isCmdLineSwitch(""),false);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("/a"),false);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("-z"),false);
     //TS_ASSERT_EQUALS(isCmdLineSwitch("--z"),false);
   }
コード例 #19
0
ファイル: updaterapp.cpp プロジェクト: Mailaender/springlobby
void UpdaterApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    #ifndef HAVE_WX29
        #define STR _T
    #else
        #define STR
    #endif

    wxCmdLineEntryDesc cmdLineDesc[] =
    {
		{ wxCMD_LINE_SWITCH, STR("h"), STR("help"), _("show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
		{ wxCMD_LINE_OPTION, STR("f"), STR("target-exe"),  _("the SpringLobby executeable to be updated"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY | wxCMD_LINE_NEEDS_SEPARATOR },
		{ wxCMD_LINE_OPTION, STR("r"), STR("target-rev"),  _("the SpringLobby revision to update to"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY | wxCMD_LINE_NEEDS_SEPARATOR },
		{ wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0 }//while this throws warnings, it is mandatory according to http://docs.wxwidgets.org/stable/wx_wxcmdlineparser.html
    };

    parser.SetDesc( cmdLineDesc );
    parser.SetSwitchChars (_T("-"));

    #undef STR
}
コード例 #20
0
ファイル: BOINCGUIApp.cpp プロジェクト: xiaobozi/boinc
///
/// Pass the command line parameters and discriptions to wxWidgets for displaying.
///
void CBOINCGUIApp::OnInitCmdLine(wxCmdLineParser &parser) {
    wxApp::OnInitCmdLine(parser);
    static const wxCmdLineEntryDesc cmdLineDesc[] = {
        { wxCMD_LINE_SWITCH, "a", "autostart", _("BOINC Manager was started by the operating system automatically")},
#if defined(__WXMSW__) || defined(__WXMAC__)
        { wxCMD_LINE_SWITCH, "s", "systray", _("Startup BOINC so only the system tray icon is visible")},
#else
        { wxCMD_LINE_OPTION, "e", "clientdir", _("Directory containing the BOINC Client executable")},
        { wxCMD_LINE_OPTION, "d", "datadir", _("BOINC data directory")},
#endif
        { wxCMD_LINE_OPTION, "n", "namehost", _("Host name or IP address")},
        { wxCMD_LINE_OPTION, "g", "gui_rpc_port", _("GUI RPC port number")},
        { wxCMD_LINE_OPTION, "p", "password", _("Password")},
        { wxCMD_LINE_OPTION, "b", "boincargs", _("Startup BOINC with these optional arguments")},
        { wxCMD_LINE_SWITCH, "i","insecure", _("disable BOINC security users and permissions")},
        { wxCMD_LINE_SWITCH, "c", "checkskins", _("set skin debugging mode to enable skin manager error messages")},
        { wxCMD_LINE_SWITCH, "m", "multiple", _("multiple instances of BOINC Manager allowed")},
#if (defined(__WXMAC__) && defined(_DEBUG))
        { wxCMD_LINE_OPTION, "NSDocumentRevisionsDebugMode", NULL, _("Not used: workaround for bug in XCode 4.2")},
#endif
        { wxCMD_LINE_NONE}  //DON'T forget this line!!
    };
    parser.SetDesc(cmdLineDesc);
}
コード例 #21
0
ファイル: mmex.cpp プロジェクト: mek-x/moneymanagerex
void mmGUIApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    parser.SetDesc (g_cmdLineDesc);
}
コード例 #22
0
ファイル: AnsiConvApp.cpp プロジェクト: cwahbong/wxAnsiConv
void
AnsiConvApp::OnInitCmdLine(wxCmdLineParser &parser)
{
  parser.SetDesc(cmdLineDesc);
  wxAppConsole::OnInitCmdLine(parser);
}
コード例 #23
0
ファイル: phd.cpp プロジェクト: goodwink/phd2
void PhdApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    parser.SetDesc(cmdLineDesc);
    parser.SetSwitchChars(wxT("-"));
}
コード例 #24
0
/**
 * コマンドライン読み取りを初期化する
 */
void MyApp::OnInitCmdLine(wxCmdLineParser& parser) {
     // オプションの始まりはハイフン
     parser.SetDesc(gCmdLineDesc);
     parser.SetSwitchChars(wxT("-"));
}
コード例 #25
0
ファイル: app.cpp プロジェクト: Abyss116/luaplus51-all
void App::OnInitCmdLine(wxCmdLineParser& parser)
{
   parser.SetDesc(cmdLineDesc);
   wxApp::OnInitCmdLine(parser);
}
コード例 #26
0
ファイル: CubicSDR.cpp プロジェクト: hightemp/CubicSDR
void CubicSDR::OnInitCmdLine(wxCmdLineParser& parser) {
    parser.SetDesc (commandLineInfo);
    parser.SetSwitchChars (wxT("-"));
}
コード例 #27
0
void wxOsgApp::OnInitCmdLine( wxCmdLineParser& parser )
{
    parser.SetDesc( cmdlinedesc );
    parser.SetSwitchChars ( wxT("-") );
}
コード例 #28
0
void wxUnivDiffApp::OnInitCmdLine(wxCmdLineParser& parser)
{
  parser.SetDesc(getCmdlineEntryDesc());
}
コード例 #29
0
void Nin10EditApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    parser.SetLogo(wxString::Format(_("Nin10Edit GUI")));
    parser.SetDesc(cmd_descriptions);
    parser.SetSwitchChars (_("-"));
}
コード例 #30
0
ファイル: DecisionLogic.cpp プロジェクト: e1d1s1/Logician
void DecisionLogicApp::OnInitCmdLine(wxCmdLineParser& parser)
{
    parser.SetDesc (g_cmdLineDesc);
    // must refuse '/' as parameter starter or cannot use "/path" style paths
    parser.SetSwitchChars (_("-"));
}