Parameter

Top  Previous  Next

Use in command line mode > Parameter

 

Delphi2Cpp.exe can be controlled either by a management, which was produced with the translation manager or by parameters for the source and target files.

In the first case a call has the form:

 

Delphi2Cpp -p PROJECT -m MANAGEMENT

 

and in the second case:

 

Delphi2Cpp -p PROJECT -s SOURCE [-t TARGET] [-r]

 

Expressions in brackets are optional.

If a path contains spaces, it has to be quoted.

 

The parameters -p, -m, -s and -t can each be absolute paths or relative paths, where the -p parameter is to be set relative to the working directory and the other paths are to be set relative to the project path.

 

Parameter

Meaning

Examples

-p PROJECT

Delphi2Cpp project

C++Builder_vcl_ge.prj

-m MANAGEMENT

a project file made with the file-manager

my_management.ttm

-s SOURCE

Source file(s)

C:\dir\*.pas

-t TARGET

Target file or directory

C:\dir2\target

-r RECURSIVE

recursively including the files of the sub-folders

 

-pause

after processing waiting for a key

 

 

 

 

 

-p PROJECT

 

The parameter -p must be followed by the path of the Delphi2Cpp 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 Delphi2Cpp management, which specifies the source and target files. The path may be an absolute path or a path relative to the folder of the project.

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 Delphi2Cpp will try to translate also files with other extensions than "*.pas". This will lead to errors for "*.txt" files or "*.inc"-files etc.

 

 

-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.

 

-r RECURSIVE

 

By the optional parameter "-r"  you can force a recursive search for source files in all subdirectories.

 

-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 Delphi2Cpp Documentation

Delphi2Cpp home  Content