How to automatically load a project when starting Delphi
I want to specify a project to be opened when I launch Delphi(D2010).
Is there a command-line parameter to pass to bds.exe, like the -r option allowing to load a specific Registry Setting, where I co开发者_开发技巧uld pass the name of the project I want to open when launching bds.exe?
The only options I know of are:
-ns "no splash"
-np "no project"
-hm "Heap Monitor"
-attach "attach to process(JIT)"
-r "registry root"
-p "Personalities"
Just add the path after your command.
"{path to rad studio}\bin\bds.exe" -pDelphi "C:\Projects\TestProj\TestProj.dproj"
BTW: here is the IDE Command Line Reference.
Sounds to me that instead of launching Delphi, you should just double-click the project file. The OS will start Delphi for you, and Delphi will open the project automatically. Make a shortcut to it on your desktop or in your Start menu for easy access.
In Delphi 7 and earlier, use the DPR file. For later versions, use the DPROJ or BDSPROJ file instead.
Works for project groups, too.
精彩评论