mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-28 06:12:53 -06:00
Ide: Ide now can display information about version via -v or --version command line parameter.
git-svn-id: svn://ultimatepp.org/upp/trunk@12122 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
b0092d4185
commit
09fa778950
2 changed files with 19 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "CommandLineHandler.h"
|
||||
|
||||
#include "About.h"
|
||||
|
||||
#include <Draw/Draw.h>
|
||||
#include <ide/Common/CommandLineOptions.h>
|
||||
#include <ide/Debuggers/GdbUtils.h>
|
||||
|
|
@ -15,6 +17,8 @@ bool CommandLineHandler::Handle()
|
|||
if(HandleManipulators())
|
||||
return true;
|
||||
|
||||
if(HandleVersion())
|
||||
return true;
|
||||
if(HandleHelp())
|
||||
return true;
|
||||
|
||||
|
|
@ -39,7 +43,7 @@ bool CommandLineHandler::HandleScale()
|
|||
|
||||
int scale = StrInt(args[1]);
|
||||
if(IsNull(scale)) {
|
||||
Cout() << "Scale should be numeric value.";
|
||||
Cout() << "Scale should be numeric value.\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -50,6 +54,16 @@ bool CommandLineHandler::HandleScale()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool CommandLineHandler::HandleVersion() const
|
||||
{
|
||||
if(args.IsEmpty() || findarg(args[0], "-v", "--version") < 0)
|
||||
return false;
|
||||
|
||||
Cout() << SplashCtrl::GenerateVersionInfo(' ') << "\n";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CommandLineHandler::HandleHelp() const
|
||||
{
|
||||
if(args.IsEmpty() || findarg(args[0], "?", "--help", "-h", "-?", "/?") < 0)
|
||||
|
|
@ -59,7 +73,8 @@ bool CommandLineHandler::HandleHelp() const
|
|||
" theide [file..] // autodetection mode\n\n";
|
||||
|
||||
Cout() << "Common options:\n"
|
||||
" -h or --help - displays this site.\n\n";
|
||||
" -v or --version - displays information about version.\n"
|
||||
" -h or --help - displays this site.\n\n";
|
||||
|
||||
Cout() << "Advanced options:\n"
|
||||
" " << COMMAND_LINE_SCALE_OPTION << " $percent - scale interface by \"percent\" represented by parameter x.\n\n";
|
||||
|
|
@ -77,7 +92,7 @@ bool CommandLineHandler::HandleDebugBreakProcess() const
|
|||
|
||||
int pid = StrInt(args[1]);
|
||||
if(IsNull(pid)) {
|
||||
Cout() << "PID should be numeric value.";
|
||||
Cout() << "PID should be numeric value.\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ private:
|
|||
bool HandleManipulators();
|
||||
bool HandleScale();
|
||||
|
||||
bool HandleVersion() const;
|
||||
bool HandleHelp() const;
|
||||
|
||||
bool HandleDebugBreakProcess() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue