Parameter |
Top Previous Next |
Use in command line mode > Parameter The complete summarized syntax by which Delphi2C# can be used via command line:
Expressions in brackets are optional. If a path contains spaces, it has to be quoted.
When using Delphi2C# as a command line tool, there are three ways in which the source and target files can be determined.
1. If a management is used to determine the source and target files a call by command line looks like:
Delphi2C# -p PROJECT -m MANAGEMENT
2. The source file(s) and the target directory can be passed directly at the command line:
Delphi2C# -p PROJECT -s SOURCE [-t TARGET] [-r]
if the '-r' option is appended, Delphi2C# will also translate all files in the sub-directories of the given source folder.
3. Delphi2C# can be told to start with a certain file - typically a dpr-file - and then look up all other files from which the first file depends and tranlated them too. In this case the command line either looks like:
Delphi2C# -p PROJECT -s SOURCE -t TARGET -l
The '-l' stands for "lookup".
or
Delphi2C# -p PROJECT [-l]
In the latter case, the parameters have to be provided by the project
-p PROJECT
The parameter -p must be followed by the path of the Delphi2C# project, with the options by which the files of the source directory shall be translated.
-m MANAGEMENT
The parameter -m is followed by the path to a Delphi2C# management, which specifies the source and target files. If an -m paramerter is provided, -s, -t and -r are ignored.
-s SOURCE
The parameter -s must be followed by a specification of the files, which shall be translated. In the simplest case this a specification is the path of a single file, like "C:\dir\source.pas". To transform all "pas" files of a directory, you can use a mask like: "C:\dir\*.pas;*.dpr". If there is no directory specified in the mask, all according files of the actually directory will be translated. If there is no special extension specified in the mask, all files of the directory will be translated. E.g.: "ab?.*" will chose all files of the directory beginning with "ab" followed by a single character, e.g. "ab1.pas", "ab2.pas" and "ab_.pas". Attention: in this case Delphi2C# will try to translate also files with other extensions than "*.pas". This will lead to errors for "*.txt" files or "*.inc"-files etc.
The parameter -s can also be used to specify a start file, if the command line ends with the -l -option. In this case Delphi2C# will also translate all files, which will be found in the files to translate and from which the start file depends.
-t TARGET
The specification of a target is optional. If there is no, all translated files will be written into the directory of the source files. A target directory has to be be specified, if the files shall be preprocessed only.
The parameter -t can also be used to specify a folder to which the translated start file will be written, if the command line ends with the -l(ookup) -option. The translations of the files, on which the start file depends are written into folders with the same relative positions as the according source files.
-r RECURSIVE
By the optional parameter "-r" you can force a recursive search for source files in all subdirectories.
-l LOOKUP
If the optional parameter "-l" is appended all files are looked up, from which the start file depends
-pause
With the optional parameter "-pause" you can keep the console window opened until a key is pressed. So you can read the messages, which were produced. Without this parameter the console window is closed as soon as the translations are finished.
|
This page belongs to the Delphi2C# Documentation |
Delphi2C# home Content |