开发者

MSBuild of Delphi project for RELEASE still sets D+ option

开发者 https://www.devze.com 2023-01-24 07:47 出处:网络
We\'re trying to build our Delphi 2007 projects using MSBuild. In the IDE we set all Buidl configurations to Debug with (among others) the D+ option on.

We're trying to build our Delphi 2007 projects using MSBuild. In the IDE we set all Buidl configurations to Debug with (among others) the D+ option on.

The Release build configuration, of course has the debug options off.

We build the project with the following command line:

Msbuild /target:Build /property:configuration=Release /clp:NoItemAndPropertyList

the resulting DCC command contains the correct command parameters (-$D-):

C:\Program Files (x86)\CodeGear\RAD Studio\5.0\bin\dcc32.exe 
    -B 
    -GD 
    -H- 
    -I <removed for clarity>
    -LE<removed for clarity>
    -LN <removed for clarity>
    -O <removed for clarity>
    -R <removed for clarity>
    -U <removed for clarity>
    --no-config 
    -$C- 
    -$D- 
    -$L- 
    -$Y- 
    -W-   projectname.dpk   

But when i run the project, the D+ option is on because my code shows a warning dialog after an {$ifopt D+}. If i change the active Buidl configuration in the IDE it works correcty. So it seems that dcc32 is still reading the options from the IDE in stead of the command line overrides.

Can anybody help me to fix this?

Edit: Realizing now that a .dpk has its compile options explicitly included ({DEBUGINFO ON}). Obviously this overrides the commandline parameters of the dcc32 command. Could this be the cause 开发者_如何转开发of my problems? ... and how to override them?


Found the answer myself :-)

The explicit settings in the .dpk are the problem, but they can be overriden without loss of IDE functionality by changing the {$ into {<space> changed.

See the following link: Compile DPK files using DCC32

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号