Skip to content

Commit

Permalink
Merge branch 'release/2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
ktekinay committed Nov 15, 2018
2 parents 41c4f67 + 7037ebd commit 31f3143
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
24 changes: 22 additions & 2 deletions CLI Harness/App.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,27 @@ Inherits ConsoleApplication
print "======================================================================"
end if

Parser.Parse args
try
Parser.Parse args
catch err as OptionParserException
if Parser.OptionValue( kOptionVersion ).WasSet then
//
// Do nothing
//
else
raise err
end if
end try

if Parser.HelpRequested then
Parser.ShowHelp
return 0
end if

if parser.OptionValue( kOptionVersion ).WasSet then
print "v." + kVersion
return 0
end if

select case Parser.StringValue( kOptionExecute, "" ).Left( 1 )
case kActionEncrypt.Left( 1 )
Expand Down Expand Up @@ -659,6 +673,9 @@ Inherits ConsoleApplication
o = new Option( "", kOptionDebug, "Print the given arguments", Option.OptionType.Boolean )
parser.AddOption o

o = new Option( "v", kOptionVersion, "The current version", Option.OptionType.Boolean )
parser.AddOption o

parser.AppDescription = "Encrypt/Decrypt/Bcrypt/Scrypt utilty v." + kVersion + _
" (" + if(Target32Bit, "32-bit", "64-bit") + ")"
parser.AdditionalHelpNotes = kHelpNotes
Expand Down Expand Up @@ -777,6 +794,9 @@ Inherits ConsoleApplication
#tag Constant, Name = kOptionVerifyAgainstHash, Type = String, Dynamic = False, Default = \"against-hash", Scope = Private
#tag EndConstant

#tag Constant, Name = kOptionVersion, Type = String, Dynamic = False, Default = \"version", Scope = Private
#tag EndConstant

#tag Constant, Name = kPaddingNullsOnly, Type = String, Dynamic = False, Default = \"Nulls-Only", Scope = Private
#tag EndConstant

Expand All @@ -786,7 +806,7 @@ Inherits ConsoleApplication
#tag Constant, Name = kPaddingPKCS, Type = String, Dynamic = False, Default = \"PKCS", Scope = Private
#tag EndConstant

#tag Constant, Name = kVersion, Type = String, Dynamic = False, Default = \"1.2", Scope = Private
#tag Constant, Name = kVersion, Type = String, Dynamic = False, Default = \"2.5", Scope = Private
#tag EndConstant


Expand Down
2 changes: 1 addition & 1 deletion CLI Harness/M_Crypto CLI Harness.xojo_project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Type=Console
RBProjectVersion=2018.011
RBProjectVersion=2018.03
MinIDEVersion=20070100
Class=App;App.xojo_code;&h000000007908E7FF;&h0000000000000000;false
Module=M_ANSI;M_ANSI.xojo_code;&h0000000010F3A7FF;&h0000000000000000;false
Expand Down

0 comments on commit 31f3143

Please sign in to comment.