Delphi Update Package Source problem

Hello, 

I have problem with compilation Delphi Package. (My Delphi version: Delphi XE Professional) By default the package has optimization parameter set to off but I want to build them with optimization. Optimization option on actions Compiler tab is checked. (whole settings are in attached image) On Project tab is checked option: Update Package Source. 

With this configuration package is compiled without optimization. In cfg file generated for this package exist setting for optimization: -$O+. In build log there is an message: Updating package source with compiler settings.


I have also checked (using ProcessMonitor) what happens with dpk file while compile action is processed. There are three files with package source: 

1. Package.dpk.bak 

2. Package.dpk

3. Package.dpk.modified (created after compilation)

In all this files optimization is always set to off. I have checked Package.dpk file in BeforeCompile and AfterCompile actions events. I have no idea what I'm doing wrong. Can you help me with this problem? It is important to me to have correct release package compilation.

best regards

Adam Siwon

I could reproduce this here, a person who no longer works here appears to have ‘refactored’ code for no particular reason… I have restored the correct code and it’s working as expected : https://www.finalbuilder.com/downloads/finalbuilder/aex6/FB700_1021.exe

Hi,

Thank you for answer. After first test which I made, it seem to be that the problem is corrected in version 1022.  If I find something else, I will send you an information.

regards
Adam Siwoń