The ProjectMaker - Speed up your compile times!
2005/2006 by Oliver Rutsch
What is this ProjectMaker tool?
Command line options and usage
Download ProjectMaker V1.4.1 and sources (437 kb) 07.12.2005
What's new in version 1.4?
New in version 1.4.1: Increase/decrease version numbers of selected projects
Selectable default compiler and individual compiler for each project
Selectable default make command and individual make command for each project
Some new command line options for automatic builds
Individual output directory for each project
Some minor bug fixes
Click here for "what's new" of former versions
The intension of the ProjectMaker tool is to speed up large project builds in a comfortable way.
If you're working on a large project then you may have noticed that compile times are slowing down more and more in the IDE. I don't know what the IDE compiler does in this time, but if you're exporting your project to a makefile and build this with the command line compiler bcc32.exe you will notice, that your project will compile 2-3 times faster than before. On large projects that's a great gain of time. In our company we have some projects where it is ten(!) times faster than the IDE. But exporting makefiles and building everything with batchfiles isn't very comfortable so most of us will stick with the IDE compiler.
For this purpose I created the ProjectMaker, a completely free tool for managing and compiling project groups.
The function of this tool is fairly simple, as it is using the borland command line tools in some combinations to compile a project. The following steps are executing when compiling a project with the ProjectMaker:
Call the commands in the pre-command line
Call bpr2mak for the specified projects. This creates (and overwrites!) a makefile with the name <project>.mak
Corrects some bugs of the bpr2mak program. AFAIK it is the same program in BCB5 and 6
Call make -f (-b) <project>.mak
Call the commands in the post-command line
So, if make -f of a project works, then it should
work in the ProjectMaker, too.
This tool needs no special installation. Just copy it to the place you like best and start it from here. The start directory needs write access to store the .ini-file of the ProjectMaker defaults.
Command line options and usage:
ProjectMaker <MyProject>.pmf <options>
The ProjectMaker file (.pmf) must be the first parameter, if you want to load a dedicated .pmf file on startup.
-l <logfile> : Log all output into the specified file. Useful for unattended builds.
-stop : Stops the compilation on any error. Overrides .ini-file entry.
-nonstop : Stops not on compilation errors. Overrides .ini-file entry.
-make : Starts the make process on all projects.
-build : Starts the build process on all projects.
-close : Closes the ProjectMaker after -make or -build
The usage of this tool is very simple: Just import a project group (.bpg) or single projects (.bpr, .bpk) and use the buttons you already know from the BCB IDE. Most of the time it will work out of the box and will compile your projects like before, but faster ;-)
Import of existing Borland Project Groups (*.bpg)
Add/Remove of single projects (*.bpr,*.bpf,*.bpk and makefiles)
Save projects list in a Project Maker File (pmf), will reload on start
Move projects in the list
Makefile generation on the fly, so your project is always up to date (bpr2mak)
Fixing a bug of bpr2mak with quoted slashes on end of a path
Make or build all or selected projects in the list
Activation/Deactivation of single projects
Toggle automatic makefile generation for hand-made makefiles
Pre/Post-build command line execution
Saves compiler output messages for every project
"Build from here" feature
Source code included
Not every project can compile without modifications with the command line compiler. Most of the time the command line compile may fail because there are missing include pathes of some 3rd party components. Adding these pathes in the IDE options should correct these problems.
There are some rare cases where the IDE compiler works and the command line compiler or the linker may fail with an internal compiler error or an access violation. Keep in mind that the IDE compiler/linker is NOT the same program as the command line compiler (and that's what makes the speed difference!), so there are differences in these tools. In those cases I would suggest to compile the project with the IDE. If you like, you can automate even this step in the ProjectMaker. Just define a command line only project and start the IDE with something like "bcb.exe /ns /m myproject.bpr". Unfortunately I had problems on serveral machines getting the right return code of bcb.exe, so you have to take care of the BCB output in these cases.
If the IDE is open and it compiles the same project, then the command line compiler will fail, because the IDE doesn't free the .tds file handles when the compilation has finished. Switch to another project or close the IDE in these cases.
Unfortunately the IDE tries to recompile projects, which are already compiled with the command line compiler. This doesn't apply to all projects and I don't see there any workaround.
bpr2mak.exe has some bugs and I don't know all of them. So sometimes unusual defines and switches may brake the makefile generation. Only way to come around is to modify the makefiles manually.
The modification of the version number doesn't work if the number of digits in the version number changes. This means a change from 188.8.131.52 to 184.108.40.206 works but not from 220.127.116.11 to 18.104.22.168. Unfortunately the .res-file has to be recompiled in these cases and that's too much effort for me. Use the IDE to change the version number then.
Write a helpfile, I hope the tooltips are enough to work with it
Version number modification should work in every case
Here's a screenshot:
Comments and suggestions are welcome: