├── .gitignore ├── LICENSE ├── README.md ├── Samples ├── Command │ ├── CommandSample.dpr │ ├── CommandSample.dproj │ ├── uCommandSampleConfig.pas │ └── uCommandSampleOptions.pas └── Simple │ ├── Sample.dpr │ ├── Sample.dproj │ ├── uSampleConfig.pas │ └── uSampleOptions.pas ├── Src ├── VSoft.CommandLine.CommandDef.pas ├── VSoft.CommandLine.OptionDef.pas ├── VSoft.CommandLine.Options.pas ├── VSoft.CommandLine.Parser.pas └── VSoft.CommandLine.Utils.pas ├── Tests ├── CommandParserTests.dpr ├── CommandParserTests_XE2.dproj └── TestCommandLineParser.pas ├── VSoft.CommandLine.dspec ├── VSoftCommandLine.groupproj └── packages ├── Rad Studio 10.0 Seattle ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio 10.1 Berlin ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio 10.2 Tokyo ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio 10.3 Rio ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio 10.4 Sydney ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio 11.0 Alexandria ├── VSoft.CommandLineR.dpk ├── VSoft.CommandLineR.dproj └── VSoft.CommandLineR.prjmgc ├── Rad Studio 12.0 ├── VSoft.CommandLineR.dpk ├── VSoft.CommandLineR.dproj └── VSoft.CommandLineR.prjmgc ├── Rad Studio XE2 ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio XE3 ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio XE4 ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio XE5 ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio XE6 ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj ├── Rad Studio XE7 ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj └── Rad Studio XE8 ├── VSoft.CommandLineR.dpk └── VSoft.CommandLineR.dproj /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | **/*.dcu 4 | *.obj 5 | *.exe 6 | *.bpl 7 | *.bpi 8 | *.dcp 9 | *.rsm 10 | *.stat 11 | *.map 12 | 13 | # Backup files # 14 | ################### 15 | *.~* 16 | 17 | # IDE Files # 18 | ################### 19 | *.dproj.local 20 | *.groupproj.local 21 | *.identcache 22 | *.dsk 23 | *.tvsconfig 24 | *.otares 25 | *.drc 26 | *.rc 27 | *.res 28 | *.mes 29 | 30 | # Output Folders # 31 | ################### 32 | /Win32 33 | /Win64 34 | /__history 35 | /Tests/Win32 36 | /Tests/Win64 37 | /Test/__history 38 | Sample/__history 39 | Sample/Win32/ 40 | Sample/Win64/ 41 | 42 | 43 | # Testing Output # 44 | ################### 45 | Tests/dunit-report.xml 46 | Tests/dunitx-results.xml 47 | Examples/dunitx-results.xml 48 | *.fb7lck 49 | *.fbl7 50 | *.fbpInf 51 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | VSoft.CommandLineParser 2 | ======================== 3 | 4 | Simple Command Line Options Parser - spawned from the DUnitX Project. 5 | 6 | For more information check out these blog posts : 7 | 8 | [Introducing VSoft.CommandLineParser for Delphi](https://www.finalbuilder.com/resources/blogs/introducing-vsoftcommandline-for-delphi) 9 | 10 | [VSoft.CommandLineParser for Delphi - Updated]( https://www.finalbuilder.com/resources/blogs/vsoftcommandlineparser-for-delphi-updated) 11 | -------------------------------------------------------------------------------- /Samples/Command/CommandSample.dpr: -------------------------------------------------------------------------------- 1 | program CommandSample; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | SysUtils, 9 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 10 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 11 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 12 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 13 | uCommandSampleConfig in 'uCommandSampleConfig.pas', 14 | uCommandSampleOptions in 'uCommandSampleOptions.pas', 15 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 16 | 17 | { 18 | Note : The Options are registered in uSampleOptions 19 | } 20 | 21 | var 22 | parseresult : ICommandLineParseResult; 23 | 24 | 25 | 26 | procedure PrintUsage(const command : string); 27 | begin 28 | if command = 'help' then 29 | begin 30 | if THelpOptions.HelpCommand = '' then 31 | THelpOptions.HelpCommand := 'help'; 32 | end 33 | else 34 | THelpOptions.HelpCommand := command; 35 | TOptionsRegistry.PrintUsage(THelpOptions.HelpCommand, 36 | procedure (const value : string) 37 | begin 38 | WriteLn(value); 39 | end); 40 | end; 41 | 42 | begin 43 | try 44 | //parse the command line options 45 | TOptionsRegistry.DescriptionTab := 35; 46 | parseresult := TOptionsRegistry.Parse; 47 | if parseresult.HasErrors then 48 | begin 49 | Writeln; 50 | Writeln(parseresult.ErrorText); 51 | PrintUsage(parseresult.Command); 52 | end 53 | else 54 | begin 55 | if (parseresult.Command = '') or (parseresult.Command = 'help') then 56 | PrintUsage(parseresult.Command) 57 | else 58 | //run your command handler here! 59 | writeLn('Will execute command : ' + parseResult.Command + ''); 60 | end; 61 | ReadLn; 62 | except 63 | on E: Exception do 64 | Writeln(E.ClassName, ': ', E.Message); 65 | end; 66 | end. 67 | -------------------------------------------------------------------------------- /Samples/Command/uCommandSampleConfig.pas: -------------------------------------------------------------------------------- 1 | unit uCommandSampleConfig; 2 | 3 | interface 4 | 5 | implementation 6 | 7 | 8 | uses 9 | VSoft.CommandLine.Options, 10 | uCommandSampleOptions; 11 | 12 | procedure ConfigureOptions; 13 | var 14 | cmd : TCommandDefinition; 15 | option : IOptionDefinition; 16 | begin 17 | option := TOptionsRegistry.RegisterOption('verbose','v','verbose output', 18 | procedure(const value : boolean) 19 | begin 20 | TGlobalOptions.Verbose := value; 21 | end); 22 | option.HasValue := false; 23 | 24 | 25 | cmd := TOptionsRegistry.RegisterCommand('help','h','get some help','','help [command]'); 26 | option := cmd.RegisterUnNamedOption('The command you need help for, a long description so that it probably wraps on the console', 'command', 27 | procedure(const value : string) 28 | begin 29 | THelpOptions.HelpCommand := value; 30 | end); 31 | 32 | cmd := TOptionsRegistry.RegisterCommand('install','','install something', '', 'install [options]'); 33 | option := cmd.RegisterOption('installpath','i','The path to the exe to install', 34 | procedure(const value : string) 35 | begin 36 | TInstallOptions.InstallPath := value; 37 | end); 38 | option.Required := true; 39 | 40 | cmd.Examples.Add('install -installpath="c:\program files"'); 41 | cmd.Examples.Add('install -i="c:\temp"'); 42 | end; 43 | 44 | 45 | 46 | initialization 47 | ConfigureOptions; 48 | 49 | end. 50 | -------------------------------------------------------------------------------- /Samples/Command/uCommandSampleOptions.pas: -------------------------------------------------------------------------------- 1 | unit uCommandSampleOptions; 2 | 3 | interface 4 | 5 | type 6 | TGlobalOptions = class 7 | public 8 | class var 9 | Verbose : boolean; 10 | end; 11 | 12 | TInstallOptions = class 13 | public 14 | class var 15 | InstallPath : string; 16 | end; 17 | 18 | TUninstallOptions = class 19 | public 20 | class var 21 | KeepSettings : boolean; 22 | end; 23 | 24 | TInstallLicense = class 25 | public 26 | class var 27 | LicenseFile : string; 28 | end; 29 | 30 | 31 | THelpOptions = class 32 | public 33 | class var 34 | HelpCommand : string; 35 | end; 36 | 37 | 38 | 39 | 40 | implementation 41 | 42 | end. 43 | -------------------------------------------------------------------------------- /Samples/Simple/Sample.dpr: -------------------------------------------------------------------------------- 1 | {***************************************************************************} 2 | { } 3 | { VSoft.CommandLine } 4 | { } 5 | { Copyright (C) 2014 Vincent Parrett } 6 | { } 7 | { vincent@finalbuilder.com } 8 | { http://www.finalbuilder.com } 9 | { } 10 | { } 11 | {***************************************************************************} 12 | { } 13 | { Licensed under the Apache License, Version 2.0 (the "License"); } 14 | { you may not use this file except in compliance with the License. } 15 | { You may obtain a copy of the License at } 16 | { } 17 | { http://www.apache.org/licenses/LICENSE-2.0 } 18 | { } 19 | { Unless required by applicable law or agreed to in writing, software } 20 | { distributed under the License is distributed on an "AS IS" BASIS, } 21 | { WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. } 22 | { See the License for the specific language governing permissions and } 23 | { limitations under the License. } 24 | { } 25 | {***************************************************************************} 26 | 27 | program Sample; 28 | 29 | {$APPTYPE CONSOLE} 30 | 31 | {$R *.res} 32 | 33 | uses 34 | SysUtils, 35 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 36 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 37 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 38 | uSampleConfig in 'uSampleConfig.pas', 39 | uSampleOptions in 'uSampleOptions.pas', 40 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 41 | 42 | { 43 | Note : The Options are registered in uSampleOptions 44 | } 45 | 46 | var 47 | parseresult : ICommandLineParseResult; 48 | begin 49 | try 50 | //parse the command line options 51 | // TOptionsRegistry.NameValueSeparator := ':'; 52 | parseresult := TOptionsRegistry.Parse; 53 | if parseresult.HasErrors then 54 | begin 55 | Writeln('Invalid command line :'); 56 | Writeln(parseresult.ErrorText); 57 | TOptionsRegistry.DescriptionTab := 35; 58 | TOptionsRegistry.PrintUsage( 59 | procedure(const value : string) 60 | begin 61 | Writeln(value); 62 | end); 63 | end 64 | else 65 | begin 66 | Writeln('Input : ' + TSampleOptions.InputFile ); 67 | Writeln('Output : ' + TSampleOptions.OutputFile ); 68 | Writeln('Mangle : ' + BoolToStr(TSampleOptions.MangleFile,true)); 69 | end; 70 | ReadLn; 71 | except 72 | on E: Exception do 73 | Writeln(E.ClassName, ': ', E.Message); 74 | end; 75 | end. 76 | -------------------------------------------------------------------------------- /Samples/Simple/Sample.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {110ED799-A4DA-4682-A704-D181D4C292E6} 4 | 16.1 5 | None 6 | Sample.dpr 7 | True 8 | Debug 9 | Win32 10 | 1 11 | Console 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | ..\..\Src;$(DCC_UnitSearchPath) 44 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 45 | 3081 46 | None 47 | Sample 48 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 49 | bindcompfmx;fmx;rtl;dbrtl;DbxClientDriver;bindcomp;inetdb;DBXInterBaseDriver;xmlrtl;DbxCommonDriver;bindengine;soaprtl;CustomIPTransport;dsnap;fmxase;CloudService;inet;fmxobj;inetdbxpress;fmxdae;dbexpress;$(DCC_UsePackage) 50 | .\$(Platform)\$(Config) 51 | .\$(Platform)\$(Config) 52 | 53 | 54 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 55 | 1033 56 | madBasic_;FBMiscComponents;IndyCore160;RaizeComponentsVclDb;dwWin7Controls;IndyProtocols160;FrameViewerXE2;RaizeComponentsVcl;inetdbbde;FBDreamRuntime;madDisAsm_;svnui;SynEdit_RXE2;vclimg;fmi;NxCommonRun;vclactnband;vcldb;VSPageR;FBFormDesigner;bindcompvcl;addict4_d16;vclie;madExcept_;vcltouch;websnap;DCEF_XE2;vclribbon;VclSmp;vcl;NxCommonDsgn;NxGridDsgn;IndySystem160;dsnapcon;KWizardR;FBSynEditHighlighters;vclx;NxGridRun;webdsnap;svn;lmdrtdocking;tb2k;VirtualTreesR;SpTBXLib_d16;adortl;lmdrtl;$(DCC_UsePackage) 57 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 58 | 59 | 60 | RaizeComponentsVclDb;RaizeComponentsVcl;vclimg;vclactnband;vcldb;bindcompvcl;addict4_d16;vclie;vcltouch;websnap;vclribbon;VclSmp;vcl;NxCommonDsgn;NxGridDsgn;dsnapcon;vclx;NxGridRun;webdsnap;lmdrtdocking;adortl;lmdrtl;$(DCC_UsePackage) 61 | 62 | 63 | DEBUG;$(DCC_Define) 64 | false 65 | true 66 | true 67 | true 68 | 69 | 70 | install 71 | None 72 | 1033 73 | 3 74 | false 75 | 76 | 77 | false 78 | RELEASE;$(DCC_Define) 79 | 0 80 | 0 81 | 82 | 83 | 84 | MainSource 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | Cfg_2 94 | Base 95 | 96 | 97 | Base 98 | 99 | 100 | Cfg_1 101 | Base 102 | 103 | 104 | 105 | Delphi.Personality.12 106 | 107 | 108 | 109 | 110 | False 111 | False 112 | 1 113 | 0 114 | 0 115 | 0 116 | False 117 | False 118 | False 119 | False 120 | False 121 | 3081 122 | 1252 123 | 124 | 125 | 126 | 127 | 1.0.0.0 128 | 129 | 130 | 131 | 132 | 133 | 1.0.0.0 134 | 135 | 136 | 137 | Sample.dpr 138 | 139 | 140 | 141 | 142 | 143 | true 144 | 145 | 146 | 147 | 148 | true 149 | 150 | 151 | true 152 | 153 | 154 | 155 | 156 | Sample.exe 157 | true 158 | 159 | 160 | 161 | 162 | 1 163 | .dylib 164 | 165 | 166 | 0 167 | .bpl 168 | 169 | 170 | 1 171 | .dylib 172 | 173 | 174 | 1 175 | .dylib 176 | 177 | 178 | 179 | 180 | 1 181 | .dylib 182 | 183 | 184 | 0 185 | .dll;.bpl 186 | 187 | 188 | 189 | 190 | 191 | 1 192 | 193 | 194 | 1 195 | 196 | 197 | 198 | 199 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 200 | 1 201 | 202 | 203 | 204 | 205 | res\drawable-normal 206 | 1 207 | 208 | 209 | 210 | 211 | library\lib\x86 212 | 1 213 | 214 | 215 | 216 | 217 | 1 218 | 219 | 220 | 1 221 | 222 | 223 | 224 | 225 | 226 | library\lib\armeabi-v7a 227 | 1 228 | 229 | 230 | 231 | 232 | 1 233 | 234 | 235 | 1 236 | 237 | 238 | 239 | 240 | res\drawable-xlarge 241 | 1 242 | 243 | 244 | 245 | 246 | res\drawable-xhdpi 247 | 1 248 | 249 | 250 | 251 | 252 | 1 253 | 254 | 255 | 1 256 | 257 | 258 | 259 | 260 | res\drawable-xxhdpi 261 | 1 262 | 263 | 264 | 265 | 266 | library\lib\mips 267 | 1 268 | 269 | 270 | 271 | 272 | res\drawable 273 | 1 274 | 275 | 276 | 277 | 278 | 1 279 | 280 | 281 | 1 282 | 283 | 284 | 0 285 | 286 | 287 | 288 | 289 | 1 290 | .framework 291 | 292 | 293 | 0 294 | 295 | 296 | 297 | 298 | res\drawable-small 299 | 1 300 | 301 | 302 | 303 | 304 | 305 | 1 306 | 307 | 308 | Contents\MacOS 309 | 0 310 | 311 | 312 | 313 | 314 | classes 315 | 1 316 | 317 | 318 | 319 | 320 | 321 | 1 322 | 323 | 324 | 1 325 | 326 | 327 | 328 | 329 | res\drawable 330 | 1 331 | 332 | 333 | 334 | 335 | Contents\Resources 336 | 1 337 | 338 | 339 | 340 | 341 | 342 | 1 343 | 344 | 345 | 1 346 | 347 | 348 | 349 | 350 | 1 351 | 352 | 353 | library\lib\armeabi-v7a 354 | 1 355 | 356 | 357 | 0 358 | 359 | 360 | 1 361 | 362 | 363 | 1 364 | 365 | 366 | 367 | 368 | library\lib\armeabi 369 | 1 370 | 371 | 372 | 373 | 374 | res\drawable-large 375 | 1 376 | 377 | 378 | 379 | 380 | 0 381 | 382 | 383 | 0 384 | 385 | 386 | 0 387 | 388 | 389 | 0 390 | 391 | 392 | 0 393 | 394 | 395 | 396 | 397 | 1 398 | 399 | 400 | 1 401 | 402 | 403 | 404 | 405 | res\drawable-ldpi 406 | 1 407 | 408 | 409 | 410 | 411 | res\values 412 | 1 413 | 414 | 415 | 416 | 417 | 1 418 | 419 | 420 | 1 421 | 422 | 423 | 424 | 425 | res\drawable-mdpi 426 | 1 427 | 428 | 429 | 430 | 431 | res\drawable-hdpi 432 | 1 433 | 434 | 435 | 436 | 437 | 1 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | False 449 | True 450 | False 451 | 452 | 453 | 12 454 | 455 | 456 | 457 | 458 | 459 | -------------------------------------------------------------------------------- /Samples/Simple/uSampleConfig.pas: -------------------------------------------------------------------------------- 1 | {***************************************************************************} 2 | { } 3 | { VSoft.CommandLine } 4 | { } 5 | { Copyright (C) 2014 Vincent Parrett } 6 | { } 7 | { vincent@finalbuilder.com } 8 | { http://www.finalbuilder.com } 9 | { } 10 | { } 11 | {***************************************************************************} 12 | { } 13 | { Licensed under the Apache License, Version 2.0 (the "License"); } 14 | { you may not use this file except in compliance with the License. } 15 | { You may obtain a copy of the License at } 16 | { } 17 | { http://www.apache.org/licenses/LICENSE-2.0 } 18 | { } 19 | { Unless required by applicable law or agreed to in writing, software } 20 | { distributed under the License is distributed on an "AS IS" BASIS, } 21 | { WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. } 22 | { See the License for the specific language governing permissions and } 23 | { limitations under the License. } 24 | { } 25 | {***************************************************************************} 26 | 27 | unit uSampleConfig; 28 | 29 | interface 30 | 31 | 32 | implementation 33 | 34 | uses 35 | VSoft.CommandLine.Options, 36 | uSampleOptions; 37 | 38 | procedure ConfigureOptions; 39 | var 40 | option : IOptionDefinition; 41 | begin 42 | option := TOptionsRegistry.RegisterOption('inputfile','i','The file to be processed' + sLineBreak + 'if you dare!', 43 | procedure(const value : string) 44 | begin 45 | TSampleOptions.InputFile := value; 46 | end); 47 | option.Required := true; 48 | 49 | option := TOptionsRegistry.RegisterOption('outputfile','out','The processed output file', 50 | procedure(const value : string) 51 | begin 52 | TSampleOptions.OutputFile := value; 53 | end); 54 | option.Required := true; 55 | 56 | option := TOptionsRegistry.RegisterOption('mangle','m','Mangle the file!', 57 | procedure(const value : boolean) 58 | begin 59 | TSampleOptions.MangleFile := value; 60 | end); 61 | option.HasValue := False; 62 | 63 | option := TOptionsRegistry.RegisterOption('options','','Options file',nil); 64 | option.IsOptionFile := true; 65 | 66 | 67 | end; 68 | 69 | 70 | initialization 71 | ConfigureOptions; 72 | 73 | end. 74 | -------------------------------------------------------------------------------- /Samples/Simple/uSampleOptions.pas: -------------------------------------------------------------------------------- 1 | unit uSampleOptions; 2 | {***************************************************************************} 3 | { } 4 | { VSoft.CommandLine } 5 | { } 6 | { Copyright (C) 2014 Vincent Parrett } 7 | { } 8 | { vincent@finalbuilder.com } 9 | { http://www.finalbuilder.com } 10 | { } 11 | { } 12 | {***************************************************************************} 13 | { } 14 | { Licensed under the Apache License, Version 2.0 (the "License"); } 15 | { you may not use this file except in compliance with the License. } 16 | { You may obtain a copy of the License at } 17 | { } 18 | { http://www.apache.org/licenses/LICENSE-2.0 } 19 | { } 20 | { Unless required by applicable law or agreed to in writing, software } 21 | { distributed under the License is distributed on an "AS IS" BASIS, } 22 | { WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. } 23 | { See the License for the specific language governing permissions and } 24 | { limitations under the License. } 25 | { } 26 | {***************************************************************************} 27 | 28 | interface 29 | 30 | type 31 | TSampleOptions = class 32 | public 33 | class var 34 | InputFile : string; 35 | OutputFile : string; 36 | MangleFile : boolean; 37 | end; 38 | 39 | implementation 40 | 41 | end. 42 | -------------------------------------------------------------------------------- /Src/VSoft.CommandLine.CommandDef.pas: -------------------------------------------------------------------------------- 1 | unit VSoft.CommandLine.CommandDef; 2 | 3 | interface 4 | 5 | uses 6 | Generics.Collections, 7 | VSoft.CommandLine.Options; 8 | 9 | type 10 | TCommandDefImpl = class(TInterfacedObject, ICommandDefinition) 11 | private 12 | FName : string; 13 | FAlias : string; 14 | FDescription : string; 15 | FHelpText : string; 16 | FUsage : string; 17 | FVisible : boolean; 18 | FIsDefault : boolean; 19 | FOptionsLookup : TDictionary; 20 | //can't put unnamed options in dictionary, so we keep a list 21 | FUnnamedOptions : TList; 22 | //all registered options. 23 | FRegisteredOptions : TList; 24 | FExamples : TList; 25 | protected 26 | procedure AddOption(const value: IOptionDefinition); 27 | function HasOption(const name : string) : boolean; 28 | function GetRegisteredOptions : TList; 29 | function GetUnNamedOptions : TList; 30 | function GetName : string; 31 | function GetAlias : string; 32 | function GetDescription : string; 33 | function GetHelpText : string; 34 | function GetIsDefault : boolean; 35 | function GetUsage : string; 36 | function GetVisible : boolean; 37 | function GetExamples: TList; 38 | function TryGetOption(const name : string; var option : IOptionDefinition) : boolean; 39 | procedure Clear; 40 | procedure GetAllRegisteredOptions(const list : TList); 41 | procedure EnumerateCommandOptions(const proc : TConstProc);overload; 42 | procedure EnumerateCommandOptions(const proc : TConstProc);overload; 43 | 44 | public 45 | constructor Create(const name : string; const alias : string; const usage : string; const description : string; const helpText : string; const visible : boolean; const isDefault : boolean = false); 46 | destructor Destroy;override; 47 | end; 48 | 49 | implementation 50 | 51 | uses 52 | Generics.Defaults, 53 | System.SysUtils; 54 | 55 | { TCommandDef } 56 | 57 | procedure TCommandDefImpl.AddOption(const value: IOptionDefinition); 58 | begin 59 | if value.IsUnnamed then 60 | FUnNamedOptions.Add(value) 61 | else 62 | begin 63 | FRegisteredOptions.Add(value); 64 | FOptionsLookup.AddOrSetValue(LowerCase(value.LongName),value); 65 | if value.ShortName <> '' then 66 | FOptionsLookup.AddOrSetValue(LowerCase(value.ShortName),value); 67 | end; 68 | 69 | end; 70 | 71 | procedure TCommandDefImpl.Clear; 72 | begin 73 | FOptionsLookup.Clear; 74 | FRegisteredOptions.Clear; 75 | FUnnamedOptions.Clear; 76 | end; 77 | 78 | constructor TCommandDefImpl.Create(const name: string; const alias : string; const usage : string; const description : string; const helpText : string; const visible : boolean; const isDefault : boolean = false); 79 | begin 80 | FName := name; 81 | FUsage := usage; 82 | FDescription := description; 83 | FHelpText := helpText; 84 | FAlias := alias; 85 | FVisible := visible; 86 | FIsDefault := isDefault; 87 | 88 | FOptionsLookup := TDictionary.Create; 89 | FUnnamedOptions := TList.Create; 90 | FRegisteredOptions := TList.Create; 91 | FExamples := TList.Create; 92 | end; 93 | 94 | destructor TCommandDefImpl.Destroy; 95 | begin 96 | FExamples.Free; 97 | FOptionsLookup.Free; 98 | FUnnamedOptions.Free; 99 | FRegisteredOptions.Free; 100 | inherited; 101 | end; 102 | 103 | procedure TCommandDefImpl.EnumerateCommandOptions(const proc: TConstProc); 104 | var 105 | optionList : TList; 106 | opt : IOptionDefinition; 107 | begin 108 | optionList := TList.Create; 109 | try 110 | optionList.AddRange(FUnnamedOptions); 111 | optionList.AddRange(FRegisteredOptions); 112 | 113 | optionList.Sort(TComparer.Construct( 114 | function (const L, R: IOptionDefinition): integer 115 | begin 116 | Result := CompareText(L.LongName,R.LongName); 117 | end)); 118 | 119 | for opt in optionList do 120 | begin 121 | if not opt.Hidden then 122 | proc(opt); 123 | end; 124 | finally 125 | optionList.Free; 126 | end; 127 | end; 128 | 129 | procedure TCommandDefImpl.EnumerateCommandOptions(const proc: TConstProc); 130 | var 131 | optionList : TList; 132 | opt : IOptionDefinition; 133 | begin 134 | optionList := TList.Create; 135 | try 136 | optionList.AddRange(FUnnamedOptions); 137 | optionList.AddRange(FRegisteredOptions); 138 | 139 | optionList.Sort(TComparer.Construct( 140 | function (const L, R: IOptionDefinition): integer 141 | begin 142 | Result := CompareText(L.LongName,R.LongName); 143 | end)); 144 | 145 | for opt in optionList do 146 | begin 147 | if not opt.Hidden then 148 | proc(opt.LongName,opt.ShortName, opt.HelpText); 149 | end; 150 | finally 151 | optionList.Free; 152 | end; 153 | 154 | end; 155 | 156 | function TCommandDefImpl.GetAlias: string; 157 | begin 158 | result := FAlias; 159 | end; 160 | 161 | procedure TCommandDefImpl.GetAllRegisteredOptions(const list: TList); 162 | begin 163 | list.AddRange(FUnnamedOptions); 164 | list.AddRange(FRegisteredOptions); 165 | end; 166 | 167 | function TCommandDefImpl.GetDescription: string; 168 | begin 169 | result := FDescription; 170 | end; 171 | 172 | function TCommandDefImpl.GetExamples: TList; 173 | begin 174 | result := FExamples; 175 | end; 176 | 177 | function TCommandDefImpl.GetHelpText: string; 178 | begin 179 | result := FHelpText; 180 | end; 181 | 182 | function TCommandDefImpl.GetIsDefault: boolean; 183 | begin 184 | result := FIsDefault; 185 | end; 186 | 187 | function TCommandDefImpl.GetName: string; 188 | begin 189 | result := FName; 190 | end; 191 | 192 | function TCommandDefImpl.GetRegisteredOptions: TList; 193 | begin 194 | result := FRegisteredOptions; 195 | end; 196 | 197 | function TCommandDefImpl.GetUnNamedOptions: TList; 198 | begin 199 | result := FUnNamedOptions; 200 | end; 201 | 202 | function TCommandDefImpl.GetUsage: string; 203 | begin 204 | result := FUsage; 205 | end; 206 | 207 | function TCommandDefImpl.GetVisible: boolean; 208 | begin 209 | result := FVisible; 210 | end; 211 | 212 | function TCommandDefImpl.HasOption(const name: string): boolean; 213 | begin 214 | result := FOptionsLookup.ContainsKey(LowerCase(name)); 215 | end; 216 | 217 | function TCommandDefImpl.TryGetOption(const name: string; var option: IOptionDefinition): boolean; 218 | begin 219 | result := FOptionsLookup.TryGetValue(LowerCase(name),option); 220 | end; 221 | 222 | end. 223 | -------------------------------------------------------------------------------- /Src/VSoft.CommandLine.OptionDef.pas: -------------------------------------------------------------------------------- 1 | {***************************************************************************} 2 | { } 3 | { VSoft.CommandLine } 4 | { } 5 | { Copyright (C) 2014 Vincent Parrett } 6 | { } 7 | { vincent@finalbuilder.com } 8 | { http://www.finalbuilder.com } 9 | { } 10 | { } 11 | {***************************************************************************} 12 | { } 13 | { Licensed under the Apache License, Version 2.0 (the "License"); } 14 | { you may not use this file except in compliance with the License. } 15 | { You may obtain a copy of the License at } 16 | { } 17 | { http://www.apache.org/licenses/LICENSE-2.0 } 18 | { } 19 | { Unless required by applicable law or agreed to in writing, software } 20 | { distributed under the License is distributed on an "AS IS" BASIS, } 21 | { WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. } 22 | { See the License for the specific language governing permissions and } 23 | { limitations under the License. } 24 | { } 25 | {***************************************************************************} 26 | 27 | unit VSoft.CommandLine.OptionDef; 28 | 29 | interface 30 | 31 | uses 32 | Classes, 33 | SysUtils, 34 | Rtti, 35 | TypInfo, 36 | Generics.Collections, 37 | VSoft.CommandLine.Options; 38 | 39 | type 40 | IOptionDefInvoke = interface 41 | ['{580B5B40-CD7B-41B8-AE53-2C6890141FF0}'] 42 | procedure Invoke(const value : string); 43 | function WasFound : boolean; 44 | function GetTypeInfo : PTypeInfo; 45 | end; 46 | 47 | TOptionDefinition = class(TInterfacedObject,IOptionDefinition,IOptionDefInvoke) 48 | private 49 | FLongName : string; 50 | FShortName : string; 51 | FHelpText : string; 52 | FHasValue : boolean; 53 | FRequired : boolean; 54 | FValueRequired : boolean; 55 | FIsOptionFile : boolean; 56 | FAllowMultiple : boolean; 57 | FProc : TConstProc; 58 | FWasFound : boolean; 59 | FTypeInfo : PTypeInfo; 60 | FDefault : T; 61 | FHidden : boolean; 62 | protected 63 | function GetAllowMultiple: Boolean; 64 | function GetHasValue: Boolean; 65 | function GetHelpText: string; 66 | function GetLongName: string; 67 | function GetRequired: Boolean; 68 | function GetShortName: string; 69 | function GetValueRequired: Boolean; 70 | function GetIsOptionFile: Boolean; 71 | function GetIsUnnamed: Boolean; 72 | function GetIsHidden: Boolean; 73 | 74 | procedure SetIsHidden(const value: Boolean); 75 | procedure SetIsOptionFile(const value: Boolean); 76 | procedure SetAllowMultiple(const value: Boolean); 77 | procedure SetHasValue(const value: Boolean); 78 | procedure SetHelpText(const value: string); 79 | procedure SetLongName(const value: string); 80 | procedure SetRequired(const value: Boolean); 81 | procedure SetShortName(const value: string); 82 | procedure SetValueRequired(const value: Boolean); 83 | procedure Invoke(const value : string); 84 | function WasFound : boolean; 85 | function GetTypeInfo : PTypeInfo; 86 | procedure InitDefault; 87 | public 88 | constructor Create(const longName : string; const shortName : string; const proc : TConstProc);overload; 89 | constructor Create(const longName : string; const shortName : string; const helpText : string; const proc : TConstProc);overload; 90 | 91 | end; 92 | 93 | //in interface so we can unit test them 94 | const 95 | trueStrings: array[0..10] of string = ('True' ,'T','+','Yes','Y','On' ,'Enable', 'Enabled' , '1','-1', ''); 96 | falseStrings: array[0..8] of string = ('False','F','-','No' ,'N','Off','Disable','Disabled', '0'); 97 | 98 | function StringToBoolean(const value: string): boolean; 99 | 100 | implementation 101 | 102 | uses 103 | StrUtils; 104 | 105 | { TOptionDefinition } 106 | 107 | 108 | 109 | function StringToBoolean(const value: string): boolean; 110 | begin 111 | if MatchText(value, trueStrings) then 112 | result := true 113 | else if MatchText(value,falseStrings) then 114 | result := false 115 | else 116 | raise Exception.Create('Invalid value, not boolean'); 117 | 118 | end; 119 | 120 | 121 | 122 | constructor TOptionDefinition.Create(const longName, shortName: string; const proc: TConstProc); 123 | begin 124 | FTypeInfo := TypeInfo(T); 125 | if not (FTypeInfo.Kind in [tkInteger,tkEnumeration,tkFloat,tkString,tkSet,tkLString,tkWString,tkInt64,tkUString]) then 126 | raise Exception.Create('Invalid Option type - only string, integer, float, boolean, enum and sets are supported'); 127 | 128 | FLongName := longName; 129 | FShortName := shortName; 130 | FHasValue := true; 131 | FProc := proc; 132 | InitDefault; 133 | end; 134 | 135 | constructor TOptionDefinition.Create(const longName, shortName, helpText: string; const proc: TConstProc); 136 | begin 137 | Self.Create(longName,shortName,proc); 138 | FHelpText := helpText; 139 | end; 140 | 141 | function TOptionDefinition.GetAllowMultiple: Boolean; 142 | begin 143 | result := FAllowMultiple; 144 | end; 145 | 146 | function TOptionDefinition.GetHasValue: Boolean; 147 | begin 148 | result := FHasValue; 149 | end; 150 | 151 | function TOptionDefinition.GetHelpText: string; 152 | begin 153 | result := FHelpText; 154 | end; 155 | 156 | function TOptionDefinition.GetIsHidden: Boolean; 157 | begin 158 | result := FHidden; 159 | end; 160 | 161 | function TOptionDefinition.GetIsOptionFile: Boolean; 162 | begin 163 | Result := FIsOptionFile; 164 | end; 165 | 166 | function TOptionDefinition.GetIsUnnamed: Boolean; 167 | begin 168 | result := FLongName = ''; 169 | end; 170 | 171 | function TOptionDefinition.GetLongName: string; 172 | begin 173 | result := FLongName; 174 | end; 175 | 176 | function TOptionDefinition.GetRequired: Boolean; 177 | begin 178 | result := FRequired; 179 | end; 180 | 181 | function TOptionDefinition.GetShortName: string; 182 | begin 183 | result := FShortName; 184 | end; 185 | 186 | function TOptionDefinition.GetTypeInfo: PTypeInfo; 187 | begin 188 | result := FTypeInfo; 189 | end; 190 | 191 | function TOptionDefinition.GetValueRequired: Boolean; 192 | begin 193 | result := FValueRequired; 194 | end; 195 | 196 | function TOptionDefinition.WasFound: boolean; 197 | begin 198 | result := FWasFound; 199 | end; 200 | 201 | procedure TOptionDefinition.InitDefault; 202 | begin 203 | FDefault := Default(T); 204 | if not FHasValue and (FTypeInfo.Name = 'Boolean') then 205 | FDefault := TValue.FromVariant(true).AsType; 206 | 207 | end; 208 | 209 | 210 | //Note : Using TValue.FromVariant as TValue.From 211 | procedure TOptionDefinition.Invoke(const value: string); 212 | var 213 | v : TValue; 214 | intVal : integer; 215 | int64Val : Int64; 216 | floatVal : Double; 217 | PTemp: Pointer; 218 | begin 219 | FWasFound := True; 220 | if Assigned(FProc) then 221 | begin 222 | if value <> '' then 223 | begin 224 | //there must be a cleaner way to do this, TValue still fails at the most basic conversions. 225 | case FTypeInfo.Kind of 226 | tkInteger : 227 | begin 228 | intVal := StrToInt(value); 229 | v := TValue.From(intVal) ; 230 | end; 231 | tkInt64 : 232 | begin 233 | int64Val := StrToInt64(value); 234 | v := TValue.From(int64Val) ; 235 | end; 236 | tkString, tkLString,tkWString,tkUString : 237 | begin 238 | v := TValue.From(value); 239 | end; 240 | tkSet : 241 | begin 242 | intVal := StringToSet(FTypeInfo, value); 243 | PTemp := @intVal; 244 | v := TValue.From(T(PTemp^)); 245 | end; 246 | tkEnumeration : 247 | begin 248 | if FTypeInfo.Name = 'Boolean' then 249 | begin 250 | v := TValue.From(StringToBoolean(value)); 251 | end 252 | else 253 | begin 254 | intVal := GetEnumValue(FTypeInfo,value); 255 | if intVal < 0 then 256 | raise Exception.Create('Invalid Enum Value : ' + value); 257 | 258 | v := TValue.FromOrdinal(FTypeInfo,intVal); 259 | end; 260 | end; 261 | tkFloat : 262 | begin 263 | floatVal := StrToFloat(value); 264 | v := TValue.From(floatVal); 265 | end; 266 | else 267 | raise Exception.Create('invalid option type'); 268 | //what? 269 | end; 270 | FProc(v.AsType); 271 | end 272 | else 273 | begin 274 | FProc(FDefault); 275 | end; 276 | end; 277 | end; 278 | 279 | procedure TOptionDefinition.SetAllowMultiple(const value: Boolean); 280 | begin 281 | FAllowMultiple := value; 282 | end; 283 | 284 | procedure TOptionDefinition.SetHasValue(const value: Boolean); 285 | begin 286 | FHasValue := value; 287 | InitDefault; 288 | end; 289 | 290 | procedure TOptionDefinition.SetHelpText(const value: string); 291 | begin 292 | FHelpText := value; 293 | end; 294 | 295 | procedure TOptionDefinition.SetIsHidden(const value: Boolean); 296 | begin 297 | FHidden := value; 298 | end; 299 | 300 | procedure TOptionDefinition.SetIsOptionFile(const value: Boolean); 301 | begin 302 | FIsOptionFile := value; 303 | end; 304 | 305 | procedure TOptionDefinition.SetLongName(const value: string); 306 | begin 307 | FLongName := value; 308 | end; 309 | 310 | procedure TOptionDefinition.SetRequired(const value: Boolean); 311 | begin 312 | FRequired := value; 313 | end; 314 | 315 | procedure TOptionDefinition.SetShortName(const value: string); 316 | begin 317 | FShortName := value; 318 | end; 319 | 320 | procedure TOptionDefinition.SetValueRequired(const value: Boolean); 321 | begin 322 | FValueRequired := value; 323 | end; 324 | 325 | end. 326 | -------------------------------------------------------------------------------- /Src/VSoft.CommandLine.Parser.pas: -------------------------------------------------------------------------------- 1 | {***************************************************************************} 2 | { } 3 | { VSoft.CommandLine } 4 | { } 5 | { Copyright (C) 2014 Vincent Parrett } 6 | { } 7 | { vincent@finalbuilder.com } 8 | { http://www.finalbuilder.com } 9 | { } 10 | { } 11 | {***************************************************************************} 12 | { } 13 | { Licensed under the Apache License, Version 2.0 (the "License"); } 14 | { you may not use this file except in compliance with the License. } 15 | { You may obtain a copy of the License at } 16 | { } 17 | { http://www.apache.org/licenses/LICENSE-2.0 } 18 | { } 19 | { Unless required by applicable law or agreed to in writing, software } 20 | { distributed under the License is distributed on an "AS IS" BASIS, } 21 | { WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. } 22 | { See the License for the specific language governing permissions and } 23 | { limitations under the License. } 24 | { } 25 | {***************************************************************************} 26 | 27 | unit VSoft.CommandLine.Parser; 28 | 29 | interface 30 | 31 | uses 32 | Classes, 33 | VSoft.CommandLine.Options, 34 | VSoft.CommandLine.OptionDef; 35 | 36 | type 37 | IInternalParseResult = interface 38 | ['{9EADABED-511B-4095-9ACA-A5E431AB653D}'] 39 | procedure AddError(const value : string); 40 | procedure SetCommand(const command : ICommandDefinition); 41 | function GetCommand : ICommandDefinition; 42 | property Command : ICommandDefinition read GetCommand; 43 | end; 44 | 45 | TCommandLineParseResult = class(TInterfacedObject,ICommandLineParseResult,IInternalParseResult) 46 | private 47 | FErrors : TStringList; 48 | FCommand : ICommandDefinition; 49 | protected 50 | function GetErrorText: string; 51 | function GetHasErrors: Boolean; 52 | procedure AddError(const value: string); 53 | function GetCommandName : string; 54 | procedure SetCommand(const command : ICommandDefinition); 55 | function GetCommand : ICommandDefinition; 56 | public 57 | constructor Create; 58 | destructor Destroy;override; 59 | end; 60 | 61 | 62 | TCommandLineParser = class(TInterfacedObject,ICommandLineParser) 63 | private 64 | FUnamedIndex : integer; 65 | FNameValueSeparator: string; 66 | FCurrentCommand : ICommandDefinition; 67 | protected 68 | procedure InternalValidate(const parseResult: IInternalParseResult); 69 | 70 | procedure InternalParseFile(const fileName : string; const parseResult : IInternalParseResult); 71 | procedure InternalParse(const values : TStrings; const parseResult : IInternalParseResult); 72 | 73 | function Parse: ICommandLineParseResult;overload; 74 | function Parse(const values : TStrings) : ICommandLineParseResult;overload; 75 | public 76 | constructor Create(const ANameValueSeparator: string); 77 | destructor Destroy;override; 78 | end; 79 | 80 | implementation 81 | 82 | uses 83 | Generics.Collections, 84 | StrUtils, 85 | SysUtils; 86 | 87 | procedure StripQuotes(var value : string); 88 | var 89 | l : integer; 90 | begin 91 | l := Length(value); 92 | if l < 2 then 93 | exit; 94 | 95 | if CharInSet(value[1],['''','"']) and CharInSet(value[l],['''','"']) then 96 | begin 97 | Delete(value,l,1); 98 | Delete(value,1,1); 99 | end; 100 | end; 101 | 102 | { TCommandLineParser } 103 | 104 | constructor TCommandLineParser.Create(const ANameValueSeparator: string); 105 | begin 106 | inherited Create; 107 | FUnamedIndex := 0; 108 | FNameValueSeparator := ANameValueSeparator; 109 | end; 110 | 111 | destructor TCommandLineParser.Destroy; 112 | begin 113 | 114 | inherited; 115 | end; 116 | 117 | procedure TCommandLineParser.InternalParse(const values: TStrings; const parseResult: IInternalParseResult); 118 | var 119 | i : integer; 120 | j : integer; 121 | lookAhead : integer; 122 | value : string; 123 | key : string; 124 | option : IOptionDefinition; 125 | newCommand : ICommandDefinition; 126 | bTryValue : boolean; 127 | bUseKey : boolean; 128 | 129 | function IsOption(const value : string) : boolean; 130 | begin 131 | result := StartsStr('-',value) or StartsStr('/',value) or StartsStr('@',value); 132 | end; 133 | 134 | begin 135 | 136 | 137 | i := 0; 138 | while i < values.Count do 139 | begin 140 | option := nil; 141 | bTryValue := true; 142 | bUseKey := false; 143 | value := values.Strings[i]; 144 | if value = '' then 145 | begin 146 | Inc(i); 147 | continue; 148 | end; 149 | if StartsStr('--',value) then 150 | Delete(value,1,2) 151 | else if StartsStr('-',value) then 152 | Delete(value,1,1) 153 | else if StartsStr('/',value) then 154 | Delete(value,1,1) 155 | else if StartsStr('@',value) then 156 | Delete(value,1,1) 157 | //if command name = '' then it's the default; 158 | else if (FCurrentCommand.Name = '') and TOptionsRegistry.RegisteredCommands.TryGetValue(LowerCase(value),newCommand) then 159 | begin 160 | FCurrentCommand := newCommand; 161 | newCommand := nil; 162 | //switching commands 163 | parseResult.SetCommand(FCurrentCommand); 164 | FUnamedIndex := 0; 165 | Inc(i); 166 | continue; 167 | end 168 | else if FUnamedIndex < FCurrentCommand.RegisteredUnamedOptions.Count then 169 | begin 170 | option := FCurrentCommand.RegisteredUnamedOptions.Items[FUnamedIndex]; 171 | Inc(FUnamedIndex); 172 | bTryValue := false; 173 | bUseKey := True; 174 | end 175 | else 176 | begin 177 | //don't recognise the start so report it and continue. 178 | parseResult.AddError('Unknown option : ' + values.Strings[i]); 179 | Inc(i); 180 | continue; 181 | end; 182 | 183 | if bTryValue then 184 | begin 185 | //with a space as the separator things are a bit more complicated. 186 | //we need to look ahead to the next string. 187 | if FNameValueSeparator = ' ' then 188 | begin 189 | lookAhead := i + 1; 190 | if lookAhead < values.Count then 191 | begin 192 | key := value; 193 | value := values.Strings[lookAhead]; 194 | if IsOption(value) then 195 | value := '' 196 | else 197 | Inc(i); 198 | end 199 | else 200 | begin 201 | //the last option with no value just a key 202 | key := value; 203 | value := ''; 204 | end; 205 | end 206 | else 207 | begin 208 | j := Pos(FNameValueSeparator,value); 209 | if j > 0 then 210 | begin 211 | //separate out into key and value 212 | key := Copy(value,1,j-1); 213 | Delete(value,1,j + Length(FNameValueSeparator) - 1); 214 | //it should already come in here without quotes when parsing paramstr(x). 215 | //but it might have quotes if it came in from a parameter file; 216 | StripQuotes(value); 217 | end 218 | else 219 | begin 220 | //no value just a key 221 | key := value; 222 | value := ''; 223 | end; 224 | 225 | end; 226 | 227 | 228 | end 229 | else 230 | begin 231 | //no value just a key 232 | key := value; 233 | value := ''; 234 | end; 235 | 236 | if option = nil then 237 | begin 238 | 239 | if not FCurrentCommand.TryGetOption(LowerCase(key), option) then 240 | begin 241 | if FCurrentCommand <> TOptionsRegistry.DefaultCommand then 242 | begin 243 | //last resort to find an option. 244 | TOptionsRegistry.DefaultCommand.TryGetOption(LowerCase(key), option) 245 | end; 246 | end; 247 | end; 248 | 249 | if option <> nil then 250 | begin 251 | if option.HasValue and (value = '') then 252 | begin 253 | parseResult.AddError('Option [' + key +'] expected a following ' +FNameValueSeparator+' but none was found'); 254 | Inc(i); 255 | continue; 256 | end; 257 | if option.IsOptionFile then 258 | begin 259 | if not option.HasValue then 260 | value := key; 261 | 262 | //TODO : should options file override other options or vica versa? 263 | if not FileExists(value) then 264 | begin 265 | parseResult.AddError('Parameter File [' + value +'] does not exist'); 266 | Inc(i); 267 | continue; 268 | end; 269 | try 270 | InternalParseFile(value,parseResult); 271 | except 272 | on e : Exception do 273 | begin 274 | parseResult.AddError('Error parsing Parameter File [' + value +'] : ' + e.Message); 275 | end; 276 | end; 277 | end 278 | else 279 | begin 280 | try 281 | if bUseKey then 282 | (option as IOptionDefInvoke).Invoke(key) 283 | else 284 | (option as IOptionDefInvoke).Invoke(value); 285 | except 286 | on e : Exception do 287 | begin 288 | parseResult.AddError('Error setting option : ' + key + ' to ' + value + ' : ' + e.Message ); 289 | end; 290 | end; 291 | end; 292 | end 293 | else 294 | begin 295 | parseResult.AddError('Unknown command line option : ' + values.Strings[i]); 296 | Inc(i); 297 | continue; 298 | end; 299 | 300 | Inc(i); 301 | end; 302 | end; 303 | 304 | procedure TCommandLineParser.InternalParseFile(const fileName: string; const parseResult: IInternalParseResult); 305 | var 306 | sList : TStringList; 307 | begin 308 | sList := TStringList.Create; 309 | try 310 | sList.LoadFromFile(fileName); 311 | InternalParse(sList,parseResult); 312 | finally 313 | sList.Free; 314 | end; 315 | end; 316 | 317 | procedure TCommandLineParser.InternalValidate(const parseResult: IInternalParseResult); 318 | var 319 | option : IOptionDefinition; 320 | begin 321 | for option in TOptionsRegistry.DefaultCommand.RegisteredOptions do 322 | begin 323 | if option.Required then 324 | begin 325 | if not (option as IOptionDefInvoke).WasFound then 326 | begin 327 | parseResult.AddError('Required option [' + option.LongName + '] was not specified'); 328 | end; 329 | end; 330 | end; 331 | 332 | for option in TOptionsRegistry.DefaultCommand.RegisteredUnamedOptions do 333 | begin 334 | if option.Required then 335 | begin 336 | if not (option as IOptionDefInvoke).WasFound then 337 | begin 338 | parseResult.AddError('Required parameter <' + option.ShortName + '> was not specified'); 339 | Break; 340 | end; 341 | end; 342 | end; 343 | 344 | if parseResult.command <> nil then 345 | begin 346 | for option in parseResult.command.RegisteredUnamedOptions do 347 | begin 348 | if option.Required then 349 | begin 350 | if not (option as IOptionDefInvoke).WasFound then 351 | begin 352 | parseResult.AddError('Required parameter <' + option.ShortName + '> was not specified'); 353 | Break; 354 | end; 355 | end; 356 | end; 357 | 358 | for option in parseResult.command.RegisteredOptions do 359 | begin 360 | if option.Required then 361 | begin 362 | if not (option as IOptionDefInvoke).WasFound then 363 | begin 364 | parseResult.AddError('Required option [' + option.LongName + '] was not specified'); 365 | end; 366 | end; 367 | end; 368 | end; 369 | 370 | end; 371 | 372 | function TCommandLineParser.Parse(const values: TStrings): ICommandLineParseResult; 373 | begin 374 | FCurrentCommand := TOptionsRegistry.DefaultCommand; 375 | result := TCommandLineParseResult.Create; 376 | InternalParse(values,result as IInternalParseResult); 377 | InternalValidate(result as IInternalParseResult); 378 | end; 379 | 380 | function TCommandLineParser.Parse: ICommandLineParseResult; 381 | var 382 | sList : TStringList; 383 | i : integer; 384 | begin 385 | FCurrentCommand := TOptionsRegistry.DefaultCommand; 386 | sList := TStringList.Create; 387 | try 388 | if ParamCount > 0 then 389 | begin 390 | for i := 1 to ParamCount do 391 | sList.Add(ParamStr(i)); 392 | end; 393 | result := Self.Parse(sList); 394 | 395 | finally 396 | sList.Free; 397 | end; 398 | end; 399 | 400 | { TCommandLineParseResult } 401 | 402 | procedure TCommandLineParseResult.AddError(const value: string); 403 | begin 404 | FErrors.Add(value) 405 | end; 406 | 407 | constructor TCommandLineParseResult.Create; 408 | begin 409 | FErrors := TStringList.Create; 410 | FCommand := nil; 411 | end; 412 | 413 | destructor TCommandLineParseResult.Destroy; 414 | begin 415 | FErrors.Free; 416 | inherited; 417 | end; 418 | 419 | function TCommandLineParseResult.GetCommand: ICommandDefinition; 420 | begin 421 | result := FCommand; 422 | end; 423 | 424 | function TCommandLineParseResult.GetCommandName: string; 425 | begin 426 | if FCommand <> nil then 427 | result := FCommand.Name 428 | else 429 | result := ''; 430 | end; 431 | 432 | function TCommandLineParseResult.GetErrorText: string; 433 | begin 434 | result := FErrors.Text; 435 | end; 436 | 437 | function TCommandLineParseResult.GetHasErrors: Boolean; 438 | begin 439 | result := FErrors.Count > 0; 440 | end; 441 | 442 | procedure TCommandLineParseResult.SetCommand(const command: ICommandDefinition); 443 | begin 444 | FCommand := command; 445 | end; 446 | 447 | 448 | end. 449 | -------------------------------------------------------------------------------- /Src/VSoft.CommandLine.Utils.pas: -------------------------------------------------------------------------------- 1 | unit VSoft.CommandLine.Utils; 2 | 3 | interface 4 | 5 | 6 | function GetConsoleWidth : integer; 7 | 8 | type 9 | TStringUtils = class 10 | class function Split(const theString : string; const separator : string): TArray; 11 | end; 12 | 13 | implementation 14 | 15 | uses 16 | {$IFDEF MSWINDOWS} 17 | Windows, 18 | {$ENDIF} 19 | System.SysUtils, 20 | System.StrUtils; 21 | 22 | function IndexOf(const theString : string; const value : string; const startIndex : integer) : integer; 23 | begin 24 | Result := PosEx(Value, theString, StartIndex + 1) - 1; 25 | end; 26 | 27 | class function TStringUtils.Split(const theString : string; const separator : string): TArray; 28 | const 29 | DeltaGrow = 32; 30 | var 31 | NextSeparator, LastIndex: Integer; 32 | Total: Integer; 33 | CurrentLength: Integer; 34 | S: string; 35 | begin 36 | Total := 0; 37 | LastIndex := 0; 38 | CurrentLength := 0; 39 | NextSeparator := IndexOf(theString, Separator, LastIndex); 40 | while (NextSeparator > 0) do 41 | begin 42 | S := Copy(theString, LastIndex + 1, NextSeparator - LastIndex); 43 | if (S <> '') then 44 | begin 45 | Inc(Total); 46 | if CurrentLength < Total then 47 | begin 48 | CurrentLength := Total + DeltaGrow; 49 | SetLength(Result, CurrentLength); 50 | end; 51 | Result[Total - 1] := S; 52 | end; 53 | LastIndex := NextSeparator + Length(Separator); 54 | NextSeparator := IndexOf(theString, Separator, LastIndex); 55 | end; 56 | 57 | if (LastIndex < Length(theString)) then 58 | begin 59 | Inc(Total); 60 | SetLength(Result, Total); 61 | Result[Total - 1] := Copy(theString, LastIndex + 1, Length(theString) - LastIndex); 62 | end 63 | else 64 | SetLength(Result, Total); 65 | end; 66 | 67 | {$IFDEF MSWINDOWS} 68 | function GetConsoleWidth : integer; 69 | var 70 | info : CONSOLE_SCREEN_BUFFER_INFO; 71 | hStdOut : THandle; 72 | begin 73 | Result := High(Integer); // Default is unlimited width 74 | hStdOut := GetStdHandle(STD_OUTPUT_HANDLE); 75 | if GetConsoleScreenBufferInfo(hStdOut, info) then 76 | Result := info.dwSize.X; 77 | end; 78 | {$ENDIF} 79 | {$IFDEF MACOS} 80 | function GetConsoleWidth : integer; 81 | begin 82 | result := 80; 83 | //TODO : Find a way to get the console width on osx 84 | end; 85 | {$ENDIF} 86 | {$IFDEF LINUX64} 87 | function GetConsoleWidth : integer; 88 | begin 89 | result := 80; 90 | //TODO : Find a way to get the console width on linux 91 | end; 92 | {$ENDIF} 93 | end. 94 | -------------------------------------------------------------------------------- /Tests/CommandParserTests.dpr: -------------------------------------------------------------------------------- 1 | program CommandParserTests; 2 | 3 | {$APPTYPE CONSOLE} 4 | uses 5 | SysUtils, 6 | DUnitX.Loggers.Console, 7 | DUnitX.Loggers.Xml.NUnit, 8 | DUnitX.TestRunner, 9 | DUnitX.TestFramework, 10 | TestCommandLineParser in 'TestCommandLineParser.pas', 11 | VSoft.CommandLine.OptionDef in '..\Src\VSoft.CommandLine.OptionDef.pas', 12 | VSoft.CommandLine.Options in '..\Src\VSoft.CommandLine.Options.pas', 13 | VSoft.CommandLine.Parser in '..\Src\VSoft.CommandLine.Parser.pas', 14 | VSoft.CommandLine.CommandDef in '..\Src\VSoft.CommandLine.CommandDef.pas', 15 | VSoft.CommandLine.Utils in '..\Src\VSoft.CommandLine.Utils.pas'; 16 | 17 | var 18 | runner : ITestRunner; 19 | results : IRunResults; 20 | logger : ITestLogger; 21 | nunitLogger : ITestLogger; 22 | begin 23 | try 24 | TDUnitX.CheckCommandLine; 25 | //Create the runner 26 | runner := TDUnitX.CreateRunner; 27 | runner.UseRTTI := True; 28 | //tell the runner how we will log things 29 | logger := TDUnitXConsoleLogger.Create(false); 30 | nunitLogger := TDUnitXXMLNUnitFileLogger.Create; 31 | runner.AddLogger(logger); 32 | runner.AddLogger(nunitLogger); 33 | 34 | //Run tests 35 | results := runner.Execute; 36 | 37 | {$IFNDEF CI} 38 | //We don't want this happening when running under CI. 39 | System.Write('Done.. press key to quit.'); 40 | System.Readln; 41 | {$ENDIF} 42 | except 43 | on E: Exception do 44 | System.Writeln(E.ClassName, ': ', E.Message); 45 | end; 46 | end. 47 | -------------------------------------------------------------------------------- /Tests/CommandParserTests_XE2.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {80D8E320-E4DF-4E3A-8E9E-0DEE18E05C6D} 4 | 16.1 5 | None 6 | CommandParserTests.dpr 7 | True 8 | Debug 9 | Win32 10 | 1 11 | Console 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | CommandParserTests_XE2 44 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 45 | $(DUnitX);$(DCC_UnitSearchPath) 46 | bindcompfmx;fmx;rtl;dbrtl;DbxClientDriver;bindcomp;inetdb;DBXInterBaseDriver;xmlrtl;DbxCommonDriver;bindengine;soaprtl;CustomIPTransport;dsnap;fmxase;CloudService;inet;fmxobj;inetdbxpress;fmxdae;dbexpress;$(DCC_UsePackage) 47 | $(BDS)\bin\delphi_PROJECTICON.ico 48 | .\$(Platform)\$(Config) 49 | .\$(Platform)\$(Config) 50 | 51 | 52 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 53 | 1033 54 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 55 | 56 | 57 | RaizeComponentsVclDb;RaizeComponentsVcl;vclimg;vclactnband;vcldb;bindcompvcl;addict4_d16;vclie;vcltouch;websnap;vclribbon;VclSmp;vcl;NxCommonDsgn;NxGridDsgn;dsnapcon;vclx;NxGridRun;webdsnap;lmdrtdocking;adortl;lmdrtl;$(DCC_UsePackage) 58 | 59 | 60 | DEBUG;$(DCC_Define) 61 | false 62 | true 63 | true 64 | true 65 | 66 | 67 | true 68 | 1033 69 | None 70 | false 71 | 72 | 73 | false 74 | RELEASE;$(DCC_Define) 75 | 0 76 | 0 77 | 78 | 79 | 80 | MainSource 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | Cfg_2 90 | Base 91 | 92 | 93 | Base 94 | 95 | 96 | Cfg_1 97 | Base 98 | 99 | 100 | 101 | Delphi.Personality.12 102 | 103 | 104 | 105 | 106 | False 107 | False 108 | 1 109 | 0 110 | 0 111 | 0 112 | False 113 | False 114 | False 115 | False 116 | False 117 | 3081 118 | 1252 119 | 120 | 121 | 122 | 123 | 1.0.0.0 124 | 125 | 126 | 127 | 128 | 129 | 1.0.0.0 130 | 131 | 132 | 133 | CommandParserTests.dpr 134 | 135 | 136 | 137 | 138 | 139 | CommandParserTests_XE2.exe 140 | true 141 | 142 | 143 | 144 | 145 | true 146 | 147 | 148 | true 149 | 150 | 151 | 152 | 153 | 1 154 | .dylib 155 | 156 | 157 | 0 158 | .bpl 159 | 160 | 161 | 1 162 | .dylib 163 | 164 | 165 | 1 166 | .dylib 167 | 168 | 169 | 170 | 171 | 1 172 | .dylib 173 | 174 | 175 | 0 176 | .dll;.bpl 177 | 178 | 179 | 180 | 181 | 1 182 | 183 | 184 | 1 185 | 186 | 187 | 188 | 189 | 190 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 191 | 1 192 | 193 | 194 | 195 | 196 | res\drawable-normal 197 | 1 198 | 199 | 200 | 201 | 202 | library\lib\x86 203 | 1 204 | 205 | 206 | 207 | 208 | 1 209 | 210 | 211 | 1 212 | 213 | 214 | 215 | 216 | 217 | library\lib\armeabi-v7a 218 | 1 219 | 220 | 221 | 222 | 223 | 1 224 | 225 | 226 | 1 227 | 228 | 229 | 230 | 231 | res\drawable-xlarge 232 | 1 233 | 234 | 235 | 236 | 237 | res\drawable-xhdpi 238 | 1 239 | 240 | 241 | 242 | 243 | 1 244 | 245 | 246 | 1 247 | 248 | 249 | 250 | 251 | res\drawable-xxhdpi 252 | 1 253 | 254 | 255 | 256 | 257 | library\lib\mips 258 | 1 259 | 260 | 261 | 262 | 263 | res\drawable 264 | 1 265 | 266 | 267 | 268 | 269 | 1 270 | 271 | 272 | 1 273 | 274 | 275 | 0 276 | 277 | 278 | 279 | 280 | 1 281 | .framework 282 | 283 | 284 | 0 285 | 286 | 287 | 288 | 289 | res\drawable-small 290 | 1 291 | 292 | 293 | 294 | 295 | 296 | 1 297 | 298 | 299 | Contents\MacOS 300 | 0 301 | 302 | 303 | 304 | 305 | classes 306 | 1 307 | 308 | 309 | 310 | 311 | 312 | 1 313 | 314 | 315 | 1 316 | 317 | 318 | 319 | 320 | res\drawable 321 | 1 322 | 323 | 324 | 325 | 326 | Contents\Resources 327 | 1 328 | 329 | 330 | 331 | 332 | 333 | 1 334 | 335 | 336 | 1 337 | 338 | 339 | 340 | 341 | 1 342 | 343 | 344 | library\lib\armeabi-v7a 345 | 1 346 | 347 | 348 | 0 349 | 350 | 351 | 1 352 | 353 | 354 | 1 355 | 356 | 357 | 358 | 359 | library\lib\armeabi 360 | 1 361 | 362 | 363 | 364 | 365 | res\drawable-large 366 | 1 367 | 368 | 369 | 370 | 371 | 0 372 | 373 | 374 | 0 375 | 376 | 377 | 0 378 | 379 | 380 | 0 381 | 382 | 383 | 0 384 | 385 | 386 | 387 | 388 | 1 389 | 390 | 391 | 1 392 | 393 | 394 | 395 | 396 | res\drawable-ldpi 397 | 1 398 | 399 | 400 | 401 | 402 | res\values 403 | 1 404 | 405 | 406 | 407 | 408 | 1 409 | 410 | 411 | 1 412 | 413 | 414 | 415 | 416 | res\drawable-mdpi 417 | 1 418 | 419 | 420 | 421 | 422 | res\drawable-hdpi 423 | 1 424 | 425 | 426 | 427 | 428 | 1 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | False 440 | True 441 | False 442 | 443 | 444 | 12 445 | 446 | 447 | 448 | 449 | 450 | -------------------------------------------------------------------------------- /Tests/TestCommandLineParser.pas: -------------------------------------------------------------------------------- 1 | unit TestCommandLineParser; 2 | {***************************************************************************} 3 | { } 4 | { DUnitX } 5 | { } 6 | { Copyright (C) 2012 Vincent Parrett } 7 | { } 8 | { vincent@finalbuilder.com } 9 | { http://www.finalbuilder.com } 10 | { } 11 | { } 12 | {***************************************************************************} 13 | { } 14 | { Licensed under the Apache License, Version 2.0 (the "License"); } 15 | { you may not use this file except in compliance with the License. } 16 | { You may obtain a copy of the License at } 17 | { } 18 | { http://www.apache.org/licenses/LICENSE-2.0 } 19 | { } 20 | { Unless required by applicable law or agreed to in writing, software } 21 | { distributed under the License is distributed on an "AS IS" BASIS, } 22 | { WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. } 23 | { See the License for the specific language governing permissions and } 24 | { limitations under the License. } 25 | { } 26 | {***************************************************************************} 27 | 28 | interface 29 | 30 | uses 31 | DUnitX.TestFramework, 32 | VSoft.CommandLine.Options, 33 | VSoft.CommandLine.Parser; 34 | 35 | type 36 | TExampleEnum = (enOne,enTwo,enThree); 37 | 38 | TExampleSet = set of TExampleEnum; 39 | 40 | [TestFixture] 41 | TCommandLineParserTests = class 42 | public 43 | 44 | [Setup] 45 | procedure Setup; 46 | 47 | [TearDown] 48 | procedure TearDown; 49 | 50 | [Test] 51 | procedure Will_Raise_On_Registering_Duplicate_Options; 52 | 53 | [Test] 54 | procedure Will_Raise_On_Registering_UnNamed_Option; 55 | 56 | [Test] 57 | procedure Test_Single_Option; 58 | 59 | [Test] 60 | procedure Will_Generate_Error_For_Unknown_Option; 61 | 62 | [Test] 63 | procedure Will_Generate_Error_For_Missing_Value; 64 | 65 | [Test] 66 | procedure Can_Register_Unnamed_Parameter; 67 | 68 | [Test] 69 | procedure Can_Parse_Unnamed_Parameter; 70 | 71 | [Test] 72 | procedure Can_Parse_Multiple_Unnamed_Parameters; 73 | 74 | [Test] 75 | procedure Will_Generate_Error_For_Extra_Unamed_Parameter; 76 | 77 | [Test] 78 | procedure Can_Parse_Quoted_Value; 79 | 80 | [Test] 81 | procedure Will_Raise_For_Missing_Param_File; 82 | 83 | [Test] 84 | procedure Can_Parse_Enum_Parameter; 85 | 86 | [Test] 87 | procedure Will_Generate_Error_For_Invalid_Enum; 88 | 89 | [Test] 90 | procedure Can_Parse_Set_Parameter; 91 | 92 | [Test] 93 | procedure Will_Generate_Error_For_Invalid_Set; 94 | 95 | [Test] 96 | procedure Can_Parse_EqualNameValueSeparator; 97 | 98 | [Test] 99 | procedure Can_Parse_ColonEqualNameValueSeparator; 100 | 101 | [Test] 102 | procedure Can_Parse_SpaceNameValueSeparator; 103 | 104 | [Test] 105 | procedure Test_String_Split; 106 | 107 | end; 108 | 109 | implementation 110 | 111 | uses 112 | Classes, 113 | VSoft.CommandLine.Utils, 114 | VSoft.CommandLine.OptionDef; 115 | 116 | { TCommandLineParserTests } 117 | 118 | procedure TCommandLineParserTests.Can_Parse_Enum_Parameter; 119 | var 120 | def : IOptionDefinition; 121 | test : TExampleEnum; 122 | sList : TStringList; 123 | parseResult : ICommandLineParseResult; 124 | 125 | begin 126 | def := TOptionsRegistry.RegisterOption('test','t', 127 | procedure(const value : TExampleEnum) 128 | begin 129 | test := value; 130 | end); 131 | 132 | sList := TStringList.Create; 133 | sList.Add('--test:enTwo'); 134 | try 135 | parseResult := TOptionsRegistry.Parse(sList); 136 | finally 137 | sList.Free; 138 | end; 139 | Assert.IsFalse(parseResult.HasErrors); 140 | Assert.AreEqual(Ord(enTwo), Ord(test)); 141 | end; 142 | 143 | procedure TCommandLineParserTests.Can_Parse_Multiple_Unnamed_Parameters; 144 | var 145 | def : IOptionDefinition; 146 | file1 : string; 147 | file2 : string; 148 | sList : TStringList; 149 | parseResult : ICommandLineParseResult; 150 | test : boolean; 151 | begin 152 | def := TOptionsRegistry.RegisterUnNamedOption('the file we want to process', 153 | procedure(const value : string) 154 | begin 155 | file1 := value; 156 | end); 157 | 158 | def := TOptionsRegistry.RegisterUnNamedOption('the second file we want to process', 159 | procedure(const value : string) 160 | begin 161 | file2 := value; 162 | end); 163 | 164 | def := TOptionsRegistry.RegisterOption('test','t', 165 | procedure(const value : boolean) 166 | begin 167 | test := value; 168 | end); 169 | def.HasValue := False; 170 | 171 | sList := TStringList.Create; 172 | sList.Add('c:\file1.txt'); 173 | sList.Add('--test'); 174 | sList.Add('c:\file2.txt'); 175 | try 176 | parseResult := TOptionsRegistry.Parse(sList); 177 | finally 178 | sList.Free; 179 | end; 180 | Assert.IsFalse(parseResult.HasErrors); 181 | Assert.AreEqual('c:\file1.txt',file1); 182 | Assert.AreEqual('c:\file2.txt',file2); 183 | end; 184 | 185 | procedure TCommandLineParserTests.Can_Parse_Quoted_Value; 186 | var 187 | def : IOptionDefinition; 188 | test : string; 189 | test2 : string; 190 | parseResult : ICommandLineParseResult; 191 | sList : TStringList; 192 | begin 193 | def := TOptionsRegistry.RegisterOption('test','t', 194 | procedure(const value : string) 195 | begin 196 | test := value; 197 | end); 198 | 199 | def := TOptionsRegistry.RegisterOption('test2','t2', 200 | procedure(const value : string) 201 | begin 202 | test2 := value; 203 | end); 204 | 205 | sList := TStringList.Create; 206 | sList.Add('--test:"hello world"'); 207 | sList.Add('--test2:''hello world'''); 208 | try 209 | parseResult := TOptionsRegistry.Parse(sList); 210 | finally 211 | sList.Free; 212 | end; 213 | Assert.AreEqual('hello world',test); 214 | Assert.AreEqual('hello world',test2); 215 | end; 216 | 217 | procedure TCommandLineParserTests.Can_Parse_Set_Parameter; 218 | var 219 | def : IOptionDefinition; 220 | test : TExampleSet; 221 | sList : TStringList; 222 | parseResult : ICommandLineParseResult; 223 | 224 | begin 225 | def := TOptionsRegistry.RegisterOption('test','t', 226 | procedure(const value : TExampleSet) 227 | begin 228 | test := value; 229 | end); 230 | 231 | sList := TStringList.Create; 232 | sList.Add('--test:[enOne,enThree]'); 233 | try 234 | parseResult := TOptionsRegistry.Parse(sList); 235 | finally 236 | sList.Free; 237 | end; 238 | Assert.IsFalse(parseResult.HasErrors); 239 | Assert.IsTrue(test = [enOne,enThree]); 240 | end; 241 | 242 | procedure TCommandLineParserTests.Can_Parse_SpaceNameValueSeparator; 243 | var 244 | def : IOptionDefinition; 245 | test : string; 246 | another : string; 247 | parseResult : ICommandLineParseResult; 248 | sList : TStringList; 249 | begin 250 | def := TOptionsRegistry.RegisterOption('test','t', 251 | procedure(const value : string) 252 | begin 253 | test := value; 254 | end); 255 | 256 | def := TOptionsRegistry.RegisterOption('another','a', 257 | procedure(const value : string) 258 | begin 259 | another:= value; 260 | end); 261 | 262 | 263 | sList := TStringList.Create; 264 | sList.Add('--test'); 265 | sList.Add('hello'); 266 | sList.Add('-a'); 267 | sList.Add('gotit'); 268 | try 269 | TOptionsRegistry.NameValueSeparator := ' '; 270 | parseResult := TOptionsRegistry.Parse(sList); 271 | finally 272 | sList.Free; 273 | end; 274 | Assert.AreEqual('hello',test); 275 | Assert.AreEqual('gotit',another); 276 | 277 | end; 278 | 279 | procedure TCommandLineParserTests.Can_Parse_EqualNameValueSeparator; 280 | var 281 | def : IOptionDefinition; 282 | test : string; 283 | parseResult : ICommandLineParseResult; 284 | sList : TStringList; 285 | begin 286 | def := TOptionsRegistry.RegisterOption('test','t', 287 | procedure(const value : string) 288 | begin 289 | test := value; 290 | end); 291 | 292 | sList := TStringList.Create; 293 | sList.Add('--test=hello'); 294 | try 295 | TOptionsRegistry.NameValueSeparator := '='; 296 | parseResult := TOptionsRegistry.Parse(sList); 297 | finally 298 | sList.Free; 299 | end; 300 | Assert.AreEqual('hello',test); 301 | end; 302 | 303 | procedure TCommandLineParserTests.Can_Parse_ColonEqualNameValueSeparator; 304 | var 305 | def : IOptionDefinition; 306 | test : string; 307 | parseResult : ICommandLineParseResult; 308 | sList : TStringList; 309 | begin 310 | def := TOptionsRegistry.RegisterOption('test','t', 311 | procedure(const value : string) 312 | begin 313 | test := value; 314 | end); 315 | 316 | sList := TStringList.Create; 317 | sList.Add('--test:=hello'); 318 | try 319 | TOptionsRegistry.NameValueSeparator := ':='; 320 | parseResult := TOptionsRegistry.Parse(sList); 321 | finally 322 | sList.Free; 323 | end; 324 | Assert.AreEqual('hello',test); 325 | end; 326 | 327 | 328 | procedure TCommandLineParserTests.Can_Parse_Unnamed_Parameter; 329 | var 330 | def : IOptionDefinition; 331 | res : string; 332 | sList : TStringList; 333 | parseResult : ICommandLineParseResult; 334 | begin 335 | def := TOptionsRegistry.RegisterUnNamedOption('the file we want to process', 336 | procedure(const value : string) 337 | begin 338 | res := value; 339 | end); 340 | 341 | sList := TStringList.Create; 342 | sList.Add('c:\test.txt'); 343 | try 344 | parseResult := TOptionsRegistry.Parse(sList); 345 | finally 346 | sList.Free; 347 | end; 348 | 349 | Assert.AreEqual('c:\test.txt',res); 350 | end; 351 | 352 | procedure TCommandLineParserTests.Can_Register_Unnamed_Parameter; 353 | var 354 | def : IOptionDefinition; 355 | begin 356 | def := TOptionsRegistry.RegisterUnNamedOption('the file we want to process', 357 | procedure(const value : string) 358 | begin 359 | end); 360 | 361 | Assert.IsTrue(def.IsUnnamed); 362 | 363 | end; 364 | 365 | procedure TCommandLineParserTests.Setup; 366 | begin 367 | TOptionsRegistry.DefaultCommand.Clear; 368 | end; 369 | 370 | procedure TCommandLineParserTests.TearDown; 371 | begin 372 | TOptionsRegistry.DefaultCommand.Clear; 373 | end; 374 | 375 | procedure TCommandLineParserTests.Test_Single_Option; 376 | var 377 | def : IOptionDefinition; 378 | result : boolean; 379 | parseResult : ICommandLineParseResult; 380 | sList : TStringList; 381 | begin 382 | def := TOptionsRegistry.RegisterOption('test','t', 383 | procedure(const value : boolean) 384 | begin 385 | result := value; 386 | end); 387 | def.HasValue := False; 388 | 389 | sList := TStringList.Create; 390 | sList.Add('--test'); 391 | try 392 | parseResult := TOptionsRegistry.Parse(sList); 393 | finally 394 | sList.Free; 395 | end; 396 | Assert.IsTrue(result); 397 | 398 | 399 | end; 400 | 401 | procedure TCommandLineParserTests.Test_String_Split; 402 | const 403 | s : string = 'Hello' + #13#10 + 'World' + #13#10; 404 | var 405 | values : TArray; 406 | begin 407 | values := TStringUtils.Split(s, #13#10); 408 | Assert.AreEqual(2, length(values)); 409 | Assert.AreEqual('hello', values[0]); 410 | Assert.AreEqual('world', values[1]); 411 | end; 412 | 413 | procedure TCommandLineParserTests.Will_Generate_Error_For_Extra_Unamed_Parameter; 414 | var 415 | def : IOptionDefinition; 416 | file1 : string; 417 | sList : TStringList; 418 | parseResult : ICommandLineParseResult; 419 | test : string; 420 | begin 421 | def := TOptionsRegistry.RegisterUnNamedOption('the file we want to process', 422 | procedure(const value : string) 423 | begin 424 | file1 := value; 425 | end); 426 | 427 | def := TOptionsRegistry.RegisterOption('test','t', 428 | procedure(const value : string) 429 | begin 430 | test := value; 431 | end); 432 | // def.HasValue := False; 433 | 434 | sList := TStringList.Create; 435 | sList.Add('c:\file1.txt'); 436 | sList.Add('--test:hello'); 437 | sList.Add('c:\file2.txt'); 438 | try 439 | parseResult := TOptionsRegistry.Parse(sList); 440 | WriteLn(parseResult.ErrorText); 441 | finally 442 | sList.Free; 443 | end; 444 | Assert.IsTrue(parseResult.HasErrors); 445 | Assert.AreEqual('c:\file1.txt',file1); 446 | Assert.AreEqual('hello',test); 447 | end; 448 | 449 | procedure TCommandLineParserTests.Will_Generate_Error_For_Missing_Value; 450 | var 451 | def : IOptionDefinition; 452 | result : boolean; 453 | parseResult : ICommandLineParseResult; 454 | sList : TStringList; 455 | begin 456 | def := TOptionsRegistry.RegisterOption('test','t', 457 | procedure(const value : boolean) 458 | begin 459 | result := value; 460 | end); 461 | def.HasValue := True; 462 | 463 | sList := TStringList.Create; 464 | sList.Add('--test'); 465 | try 466 | parseResult := TOptionsRegistry.Parse(sList); 467 | WriteLn(parseResult.ErrorText); 468 | finally 469 | sList.Free; 470 | end; 471 | Assert.IsTrue(parseResult.HasErrors); 472 | end; 473 | 474 | procedure TCommandLineParserTests.Will_Generate_Error_For_Unknown_Option; 475 | var 476 | parseResult : ICommandLineParseResult; 477 | sList : TStringList; 478 | begin 479 | sList := TStringList.Create; 480 | sList.Add('--blah'); 481 | try 482 | parseResult := TOptionsRegistry.Parse(sList); 483 | WriteLn(parseResult.ErrorText); 484 | finally 485 | sList.Free; 486 | end; 487 | Assert.IsTrue(parseResult.HasErrors); 488 | 489 | end; 490 | 491 | procedure TCommandLineParserTests.Will_Raise_For_Missing_Param_File; 492 | var 493 | def : IOptionDefinition; 494 | parseResult : ICommandLineParseResult; 495 | sList : TStringList; 496 | begin 497 | def := TOptionsRegistry.RegisterOption('options','o',nil); 498 | def.IsOptionFile := true; 499 | sList := TStringList.Create; 500 | sList.Add('--options:"x:\blah blah.txt"'); 501 | try 502 | parseResult := TOptionsRegistry.Parse(sList); 503 | WriteLn(parseResult.ErrorText); 504 | finally 505 | sList.Free; 506 | end; 507 | Assert.IsTrue(parseResult.HasErrors); 508 | end; 509 | 510 | procedure TCommandLineParserTests.Will_Raise_On_Registering_Duplicate_Options; 511 | var 512 | result : boolean; 513 | begin 514 | //same long names 515 | Assert.WillRaise( 516 | procedure 517 | begin 518 | TOptionsRegistry.RegisterOption('test','t', 519 | procedure(const value : boolean) 520 | begin 521 | result := value; 522 | end); 523 | TOptionsRegistry.RegisterOption('test','t', 524 | procedure(const value : boolean) 525 | begin 526 | result := value; 527 | end); 528 | 529 | end); 530 | 531 | //same short names 532 | Assert.WillRaise( 533 | procedure 534 | begin 535 | TOptionsRegistry.RegisterOption('test','t', 536 | procedure(const value : boolean) 537 | begin 538 | result := value; 539 | end); 540 | TOptionsRegistry.RegisterOption('t','blah', 541 | procedure(const value : boolean) 542 | begin 543 | result := value; 544 | end); 545 | 546 | end); 547 | 548 | 549 | 550 | end; 551 | 552 | procedure TCommandLineParserTests.Will_Raise_On_Registering_UnNamed_Option; 553 | begin 554 | //same long names 555 | Assert.WillRaise( 556 | procedure 557 | begin 558 | TOptionsRegistry.RegisterOption('','t', 559 | procedure(const value : boolean) 560 | begin 561 | end); 562 | 563 | end); 564 | end; 565 | 566 | procedure TCommandLineParserTests.Will_Generate_Error_For_Invalid_Enum; 567 | var 568 | def : IOptionDefinition; 569 | test : TExampleEnum; 570 | sList : TStringList; 571 | parseResult : ICommandLineParseResult; 572 | 573 | begin 574 | def := TOptionsRegistry.RegisterOption('test','t', 575 | procedure(const value : TExampleEnum) 576 | begin 577 | test := value; 578 | end); 579 | 580 | sList := TStringList.Create; 581 | sList.Add('--test:enbBlah'); 582 | try 583 | parseResult := TOptionsRegistry.Parse(sList); 584 | WriteLn(parseResult.ErrorText); 585 | finally 586 | sList.Free; 587 | end; 588 | Assert.IsTrue(parseResult.HasErrors); 589 | end; 590 | 591 | procedure TCommandLineParserTests.Will_Generate_Error_For_Invalid_Set; 592 | var 593 | def : IOptionDefinition; 594 | test : TExampleSet; 595 | sList : TStringList; 596 | parseResult : ICommandLineParseResult; 597 | 598 | begin 599 | def := TOptionsRegistry.RegisterOption('test','t', 600 | procedure(const value : TExampleSet) 601 | begin 602 | test := value; 603 | end); 604 | 605 | sList := TStringList.Create; 606 | sList.Add('--test:[enOne,enFoo]'); 607 | try 608 | parseResult := TOptionsRegistry.Parse(sList); 609 | WriteLn(parseResult.ErrorText); 610 | finally 611 | sList.Free; 612 | end; 613 | Assert.IsTrue(parseResult.HasErrors); 614 | 615 | end; 616 | 617 | initialization 618 | TDUnitX.RegisterTestFixture(TCommandLineParserTests); 619 | end. 620 | -------------------------------------------------------------------------------- /VSoft.CommandLine.dspec: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "id": "VSoft.CommandLine", 4 | "version": "0.1.9", 5 | "description": "Command Line Parser", 6 | "authors": "Vincent Parrett", 7 | "projectUrl": "https://github.com/VSoftTechnologies/VSoft.CommandLineParser", 8 | "repositoryUrl": "https://github.com/VSoftTechnologies/VSoft.CommandLineParser", 9 | "license": "Apache-2.0", 10 | "copyright": "Vincent Parrett and contributors", 11 | "tags": "commandline parser" 12 | }, 13 | "targetPlatforms": [ 14 | { 15 | "compiler": "XE2", 16 | "platforms": "Win32, Win64", 17 | "template": "default" 18 | }, 19 | { 20 | "compiler": "XE3", 21 | "platforms": "Win32, Win64", 22 | "template": "default" 23 | }, 24 | { 25 | "compiler": "XE4", 26 | "platforms": "Win32, Win64", 27 | "template": "default" 28 | }, 29 | { 30 | "compiler": "XE5", 31 | "platforms": "Win32, Win64", 32 | "template": "default" 33 | }, 34 | { 35 | "compiler": "XE6", 36 | "platforms": "Win32, Win64", 37 | "template": "default" 38 | }, 39 | { 40 | "compiler": "XE7", 41 | "platforms": "Win32, Win64", 42 | "template": "default" 43 | }, 44 | { 45 | "compiler": "XE8", 46 | "platforms": "Win32, Win64", 47 | "template": "default" 48 | }, 49 | { 50 | "compiler": "10.0", 51 | "platforms": "Win32, Win64", 52 | "template": "default" 53 | }, 54 | { 55 | "compiler": "10.1", 56 | "platforms": "Win32, Win64", 57 | "template": "default" 58 | }, 59 | { 60 | "compiler": "10.2", 61 | "platforms": "Win32, Win64", 62 | "template": "default" 63 | }, 64 | { 65 | "compiler": "10.3", 66 | "platforms": "Win32, Win64", 67 | "template": "default" 68 | }, 69 | { 70 | "compiler": "10.4", 71 | "platforms": "Win32, Win64", 72 | "template": "default" 73 | }, 74 | { 75 | "compiler": "11.0", 76 | "platforms": "Win32, Win64", 77 | "template": "default" 78 | }, 79 | { 80 | "compiler": "12.0", 81 | "platforms": "Win32, Win64", 82 | "template": "12plus" 83 | } 84 | ], 85 | "templates": [ 86 | { 87 | "name": "default", 88 | "source": [ 89 | { 90 | "src": "src\\**.pas", 91 | "flatten": true, 92 | "dest": "src" 93 | }, 94 | { 95 | "src":"packages\\Rad Studio $CompilerWithCodeName$\\*.dp*", 96 | "exclude": ["*.dproj.local"], 97 | "dest":"packages\\Rad Studio $CompilerWithCodeName$" 98 | } 99 | ], 100 | "searchPaths": [ 101 | { 102 | "path": "src" 103 | } 104 | ], 105 | "build": [ 106 | { 107 | "id": "Runtime", 108 | "project": ".\\packages\\Rad Studio $compilerWithCodeName$\\VSoft.CommandLineR.dproj" 109 | } 110 | ] 111 | }, 112 | { 113 | "name": "12plus", 114 | "source": [ 115 | { 116 | "src": "src\\**.pas", 117 | "flatten": true, 118 | "dest": "src" 119 | }, 120 | { 121 | "src":"packages\\Rad Studio $Compiler$\\*.dp*", 122 | "exclude": ["*.dproj.local"], 123 | "dest":"packages\\Rad Studio $Compiler$" 124 | } 125 | ], 126 | "searchPaths": [ 127 | { 128 | "path": "src" 129 | } 130 | ], 131 | "build": [ 132 | { 133 | "id": "Runtime", 134 | "project": ".\\packages\\Rad Studio $compiler$\\VSoft.CommandLineR.dproj" 135 | } 136 | ] 137 | } 138 | 139 | ] 140 | } 141 | -------------------------------------------------------------------------------- /VSoftCommandLine.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {E17630B3-C733-4ABF-A256-0426AFD56248} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Default.Personality.12 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /packages/Rad Studio 10.0 Seattle/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for 10.0'} 29 | {$LIBSUFFIX '230'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio 10.1 Berlin/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for 10.1'} 29 | {$LIBSUFFIX '240'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio 10.2 Tokyo/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for 10.2'} 29 | {$LIBSUFFIX '250'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio 10.3 Rio/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for 10.3'} 29 | {$LIBSUFFIX '260'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio 10.4 Sydney/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for 10.4'} 29 | {$LIBSUFFIX '270'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio 11.0 Alexandria/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for 10.4'} 29 | {$LIBSUFFIX AUTO} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio 11.0 Alexandria/VSoft.CommandLineR.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | True 4 | Package 5 | Debug 6 | None 7 | VSoft.CommandLineR.dpk 8 | Win32 9 | {D4400120-FA73-48CC-A729-0A004E03FCD0} 10 | 19.5 11 | 3 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | VSoft_CommandLineR 44 | All 45 | .\$(Platform)\$(Config) 46 | VSoft.CommandLine runtime for 11.0 47 | .\$(Platform)\$(Config) 48 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 49 | true 50 | 280 51 | true 52 | true 53 | true 54 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 55 | 3081 56 | 57 | 58 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 59 | true 60 | 1033 61 | 62 | 63 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 64 | true 65 | 1033 66 | 67 | 68 | true 69 | DEBUG;$(DCC_Define) 70 | true 71 | false 72 | true 73 | 74 | 75 | false 76 | 77 | 78 | 0 79 | RELEASE;$(DCC_Define) 80 | false 81 | 0 82 | 83 | 84 | 85 | MainSource 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | Base 95 | 96 | 97 | Cfg_1 98 | Base 99 | 100 | 101 | Cfg_2 102 | Base 103 | 104 | 105 | 106 | Delphi.Personality.12 107 | Package 108 | 109 | 110 | 111 | VSoft.CommandLineR.dpk 112 | 113 | 114 | 115 | True 116 | False 117 | 1 118 | 0 119 | 0 120 | 0 121 | False 122 | False 123 | False 124 | False 125 | False 126 | 3081 127 | 1252 128 | 129 | 130 | 131 | 132 | 1.0.0.0 133 | 134 | 135 | 136 | 137 | 138 | 1.0.0.0 139 | 140 | 141 | 142 | 143 | False 144 | False 145 | False 146 | True 147 | True 148 | 149 | 150 | 12 151 | 152 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /packages/Rad Studio 11.0 Alexandria/VSoft.CommandLineR.prjmgc: -------------------------------------------------------------------------------- 1 | [Settings] 2 | AutoLibSuffix=0 3 | ClearChildAppSettings=0 4 | ClearChildPackageSettings=1 5 | ClearChildVersionInfo=0 6 | NormalizeDproj=1 7 | SplitDproj=0 8 | EnableMissingPlatforms=0 9 | RemoveUnusedPlatforms=0 10 | RefreshFormType=0 11 | RemoveExcludedPackages=0 12 | RemoveDeployment=0 13 | RemoveUWP=1 14 | RemoveExplicits=0 15 | 16 | -------------------------------------------------------------------------------- /packages/Rad Studio 12.0/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for 12.0'} 29 | {$LIBSUFFIX AUTO} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio 12.0/VSoft.CommandLineR.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | True 4 | Package 5 | Debug 6 | None 7 | VSoft.CommandLineR.dpk 8 | Win32 9 | {D4400120-FA73-48CC-A729-0A004E03FCD0} 10 | VSoft.CommandLineR 11 | 20.3 12 | 3 13 | 14 | 15 | true 16 | 17 | 18 | true 19 | Base 20 | true 21 | 22 | 23 | true 24 | Base 25 | true 26 | 27 | 28 | true 29 | Base 30 | true 31 | 32 | 33 | true 34 | Cfg_1 35 | true 36 | true 37 | 38 | 39 | true 40 | Base 41 | true 42 | 43 | 44 | VSoft_CommandLineR 45 | All 46 | .\$(Platform)\$(Config) 47 | VSoft.CommandLine runtime for 12.0 48 | .\$(Platform)\$(Config) 49 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 50 | true 51 | 290 52 | true 53 | true 54 | true 55 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 56 | 3081 57 | 58 | 59 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 60 | true 61 | 1033 62 | 63 | 64 | Debug 65 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 66 | true 67 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 68 | 1033 69 | 70 | 71 | true 72 | DEBUG;$(DCC_Define) 73 | true 74 | false 75 | true 76 | 77 | 78 | false 79 | 80 | 81 | 0 82 | RELEASE;$(DCC_Define) 83 | false 84 | 0 85 | 86 | 87 | 88 | MainSource 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | Base 98 | 99 | 100 | Cfg_1 101 | Base 102 | 103 | 104 | Cfg_2 105 | Base 106 | 107 | 108 | 109 | Delphi.Personality.12 110 | Package 111 | 112 | 113 | 114 | VSoft.CommandLineR.dpk 115 | 116 | 117 | 118 | True 119 | False 120 | 1 121 | 0 122 | 0 123 | 0 124 | False 125 | False 126 | False 127 | False 128 | False 129 | 3081 130 | 1252 131 | 132 | 133 | 134 | 135 | 1.0.0.0 136 | 137 | 138 | 139 | 140 | 141 | 1.0.0.0 142 | 143 | 144 | 145 | 146 | False 147 | False 148 | False 149 | True 150 | True 151 | False 152 | 153 | 154 | 12 155 | 156 | 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /packages/Rad Studio 12.0/VSoft.CommandLineR.prjmgc: -------------------------------------------------------------------------------- 1 | [Settings] 2 | AutoLibSuffix=1 3 | ClearChildAppSettings=0 4 | ClearChildPackageSettings=1 5 | ClearChildVersionInfo=1 6 | NormalizeDproj=1 7 | SplitDproj=0 8 | EnableMissingPlatforms=0 9 | RemoveUnusedPlatforms=1 10 | RefreshFormType=0 11 | RemoveExcludedPackages=1 12 | RemoveDeployment=1 13 | RemoveUWP=1 14 | RemoveExplicits=0 15 | 16 | -------------------------------------------------------------------------------- /packages/Rad Studio XE2/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO ON} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for XE2'} 29 | {$LIBSUFFIX '160'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio XE2/VSoft.CommandLineR.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {D4400120-FA73-48CC-A729-0A004E03FCD0} 4 | VSoft.CommandLineR.dpk 5 | 13.4 6 | None 7 | True 8 | Debug 9 | Win32 10 | 3 11 | Package 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | 3081 44 | true 45 | All 46 | 160 47 | true 48 | true 49 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 50 | VSoft.CommandLine runtime for XE2 51 | true 52 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 53 | .\$(Platform)\$(Config) 54 | .\$(Platform)\$(Config) 55 | 56 | 57 | true 58 | 1033 59 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 60 | 61 | 62 | 1033 63 | true 64 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 65 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 66 | 67 | 68 | DEBUG;$(DCC_Define) 69 | false 70 | true 71 | true 72 | true 73 | 74 | 75 | true 76 | 1033 77 | false 78 | 79 | 80 | false 81 | RELEASE;$(DCC_Define) 82 | 0 83 | false 84 | 85 | 86 | 87 | MainSource 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | Cfg_2 97 | Base 98 | 99 | 100 | Base 101 | 102 | 103 | Cfg_1 104 | Base 105 | 106 | 107 | 108 | Delphi.Personality.12 109 | Package 110 | 111 | 112 | 113 | VSoft.CommandLineR.dpk 114 | 115 | 116 | True 117 | False 118 | 1 119 | 0 120 | 0 121 | 0 122 | False 123 | False 124 | False 125 | False 126 | False 127 | 3081 128 | 1252 129 | 130 | 131 | 132 | 133 | 1.0.0.0 134 | 135 | 136 | 137 | 138 | 139 | 1.0.0.0 140 | 141 | 142 | 143 | madBasic 1.2.7 - www.madshi.net 144 | madHelp 1.1.1 - www.madshi.net 145 | madDisAsm 2.2.6 - www.madshi.net 146 | madExceptIde 1.1.0 - www.madshi.net 147 | madExcept 5.1.0 - www.madshi.net 148 | madExceptVcl 2.1.0 - www.madshi.net 149 | madExceptWizard 3.1.8 - www.madshi.net 150 | 151 | 152 | 153 | 154 | True 155 | True 156 | 157 | 158 | 12 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /packages/Rad Studio XE3/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO ON} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for XE3'} 29 | {$LIBSUFFIX '170'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio XE3/VSoft.CommandLineR.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {D4400120-FA73-48CC-A729-0A004E03FCD0} 4 | VSoft.CommandLineR.dpk 5 | 14.4 6 | None 7 | True 8 | Debug 9 | Win32 10 | 3 11 | Package 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | 3081 44 | true 45 | All 46 | 170 47 | true 48 | true 49 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 50 | VSoft.CommandLine runtime for XE3 51 | true 52 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 53 | .\$(Platform)\$(Config) 54 | .\$(Platform)\$(Config) 55 | 56 | 57 | 1033 58 | true 59 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 60 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 61 | 62 | 63 | true 64 | 1033 65 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 66 | 67 | 68 | DEBUG;$(DCC_Define) 69 | false 70 | true 71 | true 72 | true 73 | 74 | 75 | true 76 | 1033 77 | false 78 | 79 | 80 | false 81 | RELEASE;$(DCC_Define) 82 | 0 83 | false 84 | 85 | 86 | 87 | MainSource 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | Cfg_2 97 | Base 98 | 99 | 100 | Base 101 | 102 | 103 | Cfg_1 104 | Base 105 | 106 | 107 | 108 | Delphi.Personality.12 109 | Package 110 | 111 | 112 | 113 | VSoft.CommandLineR.dpk 114 | 115 | 116 | True 117 | False 118 | 1 119 | 0 120 | 0 121 | 0 122 | False 123 | False 124 | False 125 | False 126 | False 127 | 3081 128 | 1252 129 | 130 | 131 | 132 | 133 | 1.0.0.0 134 | 135 | 136 | 137 | 138 | 139 | 1.0.0.0 140 | 141 | 142 | 143 | Microsoft Office 2000 Sample Automation Server Wrapper Components 144 | Microsoft Office XP Sample Automation Server Wrapper Components 145 | IP Abstraction Indy Implementation Design Time 146 | 147 | 148 | 149 | 150 | True 151 | True 152 | 153 | 154 | 12 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /packages/Rad Studio XE4/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO ON} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for XE4'} 29 | {$LIBSUFFIX '180'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio XE4/VSoft.CommandLineR.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {D4400120-FA73-48CC-A729-0A004E03FCD0} 4 | VSoft.CommandLineR.dpk 5 | 14.6 6 | None 7 | True 8 | Debug 9 | Win32 10 | 3 11 | Package 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | 3081 44 | true 45 | All 46 | 180 47 | true 48 | true 49 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 50 | VSoft.CommandLine runtime for XE4 51 | true 52 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 53 | .\$(Platform)\$(Config) 54 | .\$(Platform)\$(Config) 55 | 56 | 57 | 1033 58 | true 59 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 60 | 61 | 62 | true 63 | 1033 64 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 65 | 66 | 67 | DEBUG;$(DCC_Define) 68 | false 69 | true 70 | true 71 | true 72 | 73 | 74 | true 75 | 1033 76 | false 77 | 78 | 79 | false 80 | RELEASE;$(DCC_Define) 81 | 0 82 | false 83 | 84 | 85 | 86 | MainSource 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | Cfg_2 96 | Base 97 | 98 | 99 | Base 100 | 101 | 102 | Cfg_1 103 | Base 104 | 105 | 106 | 107 | Delphi.Personality.12 108 | Package 109 | 110 | 111 | 112 | VSoft.CommandLineR.dpk 113 | 114 | 115 | True 116 | False 117 | 1 118 | 0 119 | 0 120 | 0 121 | False 122 | False 123 | False 124 | False 125 | False 126 | 3081 127 | 1252 128 | 129 | 130 | 131 | 132 | 1.0.0.0 133 | 134 | 135 | 136 | 137 | 138 | 1.0.0.0 139 | 140 | 141 | 142 | Microsoft Office 2000 Sample Automation Server Wrapper Components 143 | Microsoft Office XP Sample Automation Server Wrapper Components 144 | IP Abstraction Indy Implementation Design Time 145 | 146 | 147 | 148 | 149 | False 150 | False 151 | True 152 | True 153 | 154 | 155 | 12 156 | 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /packages/Rad Studio XE5/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO ON} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for XE5'} 29 | {$LIBSUFFIX '190'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio XE5/VSoft.CommandLineR.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {D4400120-FA73-48CC-A729-0A004E03FCD0} 4 | VSoft.CommandLineR.dpk 5 | 15.3 6 | None 7 | True 8 | Debug 9 | Win32 10 | 3 11 | Package 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | 3081 44 | true 45 | All 46 | 190 47 | true 48 | true 49 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 50 | VSoft.CommandLine runtime for XE5 51 | true 52 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 53 | .\$(Platform)\$(Config) 54 | .\$(Platform)\$(Config) 55 | 56 | 57 | 1033 58 | true 59 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 60 | 61 | 62 | true 63 | 1033 64 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 65 | 66 | 67 | DEBUG;$(DCC_Define) 68 | false 69 | true 70 | true 71 | true 72 | 73 | 74 | true 75 | 1033 76 | false 77 | 78 | 79 | false 80 | RELEASE;$(DCC_Define) 81 | 0 82 | 0 83 | 84 | 85 | 86 | MainSource 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | Cfg_2 96 | Base 97 | 98 | 99 | Base 100 | 101 | 102 | Cfg_1 103 | Base 104 | 105 | 106 | 107 | Delphi.Personality.12 108 | Package 109 | 110 | 111 | 112 | VSoft.CommandLineR.dpk 113 | 114 | 115 | True 116 | False 117 | 1 118 | 0 119 | 0 120 | 0 121 | False 122 | False 123 | False 124 | False 125 | False 126 | 3081 127 | 1252 128 | 129 | 130 | 131 | 132 | 1.0.0.0 133 | 134 | 135 | 136 | 137 | 138 | 1.0.0.0 139 | 140 | 141 | 142 | Microsoft Office 2000 Sample Automation Server Wrapper Components 143 | Microsoft Office XP Sample Automation Server Wrapper Components 144 | IP Abstraction Indy Implementation Design Time 145 | Embarcadero DBExpress DataSnap Client Components 146 | Embarcadero DataSnap Connector Components 147 | Embarcadero DBExpress DataSnap Provider Client Components 148 | Embarcadero DBExpress DataSnap Server Components 149 | 150 | 151 | 152 | 153 | True 154 | True 155 | 156 | 157 | 12 158 | 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /packages/Rad Studio XE6/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for XE6'} 29 | {$LIBSUFFIX '200'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio XE6/VSoft.CommandLineR.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {D4400120-FA73-48CC-A729-0A004E03FCD0} 4 | VSoft.CommandLineR.dpk 5 | 15.4 6 | None 7 | True 8 | Debug 9 | Win32 10 | 3 11 | Package 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | VSoft_CommandLineR 44 | 3081 45 | true 46 | All 47 | 200 48 | true 49 | true 50 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 51 | VSoft.CommandLine runtime for XE6 52 | true 53 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 54 | .\$(Platform)\$(Config) 55 | .\$(Platform)\$(Config) 56 | 57 | 58 | 1033 59 | true 60 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 61 | 62 | 63 | true 64 | 1033 65 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 66 | 67 | 68 | DEBUG;$(DCC_Define) 69 | false 70 | true 71 | true 72 | true 73 | 74 | 75 | true 76 | 1033 77 | false 78 | 79 | 80 | false 81 | RELEASE;$(DCC_Define) 82 | 0 83 | 0 84 | 85 | 86 | 87 | MainSource 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | Cfg_2 97 | Base 98 | 99 | 100 | Base 101 | 102 | 103 | Cfg_1 104 | Base 105 | 106 | 107 | 108 | Delphi.Personality.12 109 | Package 110 | 111 | 112 | 113 | VSoft.CommandLineR.dpk 114 | 115 | 116 | True 117 | False 118 | 1 119 | 0 120 | 0 121 | 0 122 | False 123 | False 124 | False 125 | False 126 | False 127 | 3081 128 | 1252 129 | 130 | 131 | 132 | 133 | 1.0.0.0 134 | 135 | 136 | 137 | 138 | 139 | 1.0.0.0 140 | 141 | 142 | 143 | Microsoft Office 2000 Sample Automation Server Wrapper Components 144 | Microsoft Office XP Sample Automation Server Wrapper Components 145 | IP Abstraction Indy Implementation Design Time 146 | 147 | 148 | 149 | 150 | True 151 | True 152 | 153 | 154 | 12 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /packages/Rad Studio XE7/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for XE7'} 29 | {$LIBSUFFIX '210'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /packages/Rad Studio XE7/VSoft.CommandLineR.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {D4400120-FA73-48CC-A729-0A004E03FCD0} 4 | VSoft.CommandLineR.dpk 5 | 16.1 6 | None 7 | True 8 | Debug 9 | Win32 10 | 3 11 | Package 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | VSoft_CommandLineR 44 | 3081 45 | true 46 | All 47 | 210 48 | true 49 | true 50 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 51 | VSoft.CommandLine runtime for XE7 52 | true 53 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 54 | .\$(Platform)\$(Config) 55 | .\$(Platform)\$(Config) 56 | 57 | 58 | 1033 59 | true 60 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 61 | 62 | 63 | true 64 | 1033 65 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 66 | 67 | 68 | DEBUG;$(DCC_Define) 69 | false 70 | true 71 | true 72 | true 73 | 74 | 75 | true 76 | 1033 77 | false 78 | 79 | 80 | false 81 | RELEASE;$(DCC_Define) 82 | 0 83 | 0 84 | 85 | 86 | 87 | MainSource 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | Cfg_2 97 | Base 98 | 99 | 100 | Base 101 | 102 | 103 | Cfg_1 104 | Base 105 | 106 | 107 | 108 | Delphi.Personality.12 109 | Package 110 | 111 | 112 | 113 | VSoft.CommandLineR.dpk 114 | 115 | 116 | True 117 | False 118 | 1 119 | 0 120 | 0 121 | 0 122 | False 123 | False 124 | False 125 | False 126 | False 127 | 3081 128 | 1252 129 | 130 | 131 | 132 | 133 | 1.0.0.0 134 | 135 | 136 | 137 | 138 | 139 | 1.0.0.0 140 | 141 | 142 | 143 | Ethea SVGIconImageList VCL components 144 | 145 | 146 | 147 | 148 | True 149 | True 150 | 151 | 152 | 12 153 | 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /packages/Rad Studio XE8/VSoft.CommandLineR.dpk: -------------------------------------------------------------------------------- 1 | package VSoft.CommandLineR; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS OFF} 17 | {$RANGECHECKS OFF} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'VSoft.CommandLine runtime for XE8'} 29 | {$LIBSUFFIX '220'} 30 | {$RUNONLY} 31 | {$IMPLICITBUILD OFF} 32 | 33 | requires 34 | rtl; 35 | 36 | contains 37 | VSoft.CommandLine.CommandDef in '..\..\Src\VSoft.CommandLine.CommandDef.pas', 38 | VSoft.CommandLine.OptionDef in '..\..\Src\VSoft.CommandLine.OptionDef.pas', 39 | VSoft.CommandLine.Options in '..\..\Src\VSoft.CommandLine.Options.pas', 40 | VSoft.CommandLine.Parser in '..\..\Src\VSoft.CommandLine.Parser.pas', 41 | VSoft.CommandLine.Utils in '..\..\Src\VSoft.CommandLine.Utils.pas'; 42 | 43 | end. 44 | --------------------------------------------------------------------------------