# Delphi Update Package Source problem

**URL:** <https://www.finalbuilder.com/forums/t/delphi-update-package-source-problem/3337>\
**Category:** Bugs\
**Created:** [February 3, 2011, 10:48am UTC](https://www.finalbuilder.com/forums/t/delphi-update-package-source-problem/3337 "2011-02-03T10:48:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![traptak](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/dec6dc/32.png) [@traptak](https://www.finalbuilder.com/forums/u/traptak)\
**Post date:** [February 3, 2011, 10:48am UTC](https://www.finalbuilder.com/forums/t/delphi-update-package-source-problem/3337/1 "2011-02-03T10:48:54Z")

</div>

Hello,&nbsp;

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.&nbsp;

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

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

1. Package.dpk.bak&nbsp;

2. Package.dpk

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

In all this files optimization is always set to off. I&nbsp;have checked&nbsp;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

 ![Compiler.jpg](https://www.finalbuilder.com/forums/uploads/default/original/2X/5/5eef5fd65559c182e2432a19454d2d4c3c970c44.jpeg)

 ![project.jpg](https://www.finalbuilder.com/forums/uploads/default/original/2X/d/da0126411030aaa57249e872aa34d01bd205bb5c.jpeg)

---

<div class="post-metadata">

**Author:** ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)\
**Post date:** [February 4, 2011, 3:40am UTC](https://www.finalbuilder.com/forums/t/delphi-update-package-source-problem/3337/2 "2011-02-04T03:40:53Z")

</div>

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](https://www.finalbuilder.com/downloads/finalbuilder/aex6/FB700_1021.exe)

---

<div class="post-metadata">

**Author:** ![traptak](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/dec6dc/32.png) [@traptak](https://www.finalbuilder.com/forums/u/traptak)\
**Post date:** [February 4, 2011, 7:46am UTC](https://www.finalbuilder.com/forums/t/delphi-update-package-source-problem/3337/3 "2011-02-04T07:46:20Z")

</div>

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