The IDETOBPR utility converts .IDE project files for Borland C++ (versions 4 and 5) into C++Builder .BPR project files. The command-line syntax is
idetobpr [-v] filename.ide
To create a non-VCL application, use the -v option, which causes the generated .BPR files to specify linkage to non-VCL versions of the RTL, OWL, and BIDS libraries. Because VCL and MFC header files are incompatible, -v is turned on automatically for MFC projects.
IDETOBPR generates makefiles according to the following guidelines.
A separate .BPR file is generated for each target in the .IDE file. If there are multiple targets in the .IDE file, IDETOBPR generates a .BPG (group) file that calls each .BPR file.
If the target is not an EXE, DLL, or static LIB, a batch-file target is created and added to the generated .BPG file.
IDETOBPR looks for a .CPP file with the same name as the .IDE file. It adds the following lines to the .CPP file to enable C++Builder's Project Manager to display dependent nodes in the project. (The .CPP file is backed up prior to modification.)
#include <condefs.h>
USEUNIT("dependent .CPP filename")
USEUNIT("dependent .CPP filename")
: // one for eached linked OBJ file
USERC("dependent .RC filename")
USERC("dependent .RC filename")
: // one for each RC file
#define WinMain
//for DLL targets, this is changed to '#define DllEntryPoint'
If IDETOBPR cannot find a .CPP file with the same name as the .IDE file, it creates one. The generated .CPP file is used only by the C++Builder Project Manager to display dependent project nodes. If there is a .C file with the same name as the .IDE file, it is untouched and is still used to build the target.
Default project options are not copied to the .BPR file. These options can be added by hand when the project is opened in C++Builder.
In Include and Library paths, and in defines, references to environment variables are expanded. This is particularly important for the environment variable BCROOT. If BCROOT is not in your environment, the generated makefile may have invalid entries; IDETOBPR issues a warning in this case.
Occurrences of $env(BCROOT) or BC5 in Include and Library paths are changed to $(BCB). For OWL and BIDS projects, include\obsolete is appended to the path.
C++Builder cannot handle options set on individual files. If IDETOBPR finds local option overrides on nodes in the .IDE file, it ignores the local overrides and issues a warning.
Sourcepools in .IDE files are collapsed.
Unless you are converting an MFC project or -v is included on the command line, library names are changed as follows.
If -v is included on the command line (or if you are converting an MFC project), only the MFC and VCL library names are updated to the latest versions; _NO_VCL is added to the list of macro defines. For MFC projects, _MSC_VER=1100 is prepended to the list of macro defines.