How can I migrate my build server from Delphi XE to Delphi XE2?
The first important thing to note, is that the parameter DelphiWin32LibraryPath
changed its name to DelphiLibraryPath
in Delphi XE2. So you have to change your buildscripts from something like
msbuild /p:DelphiWin32LibraryPath="..." ...
to
msbuild /p:DelphiLibraryPath="..." ...
Second, when migrating projects from XE, Delphi XE2 adds some resource references to the project file that won't compile on the build server (as pointed out by this answer by Uwe Raabe). To fix this, open the dproj
file in a text editor and remove the lines that reference an ico
file called something like "ProjectName_Icon4.ICO".
The third nasty thing are the namespaces introduced in XE2. This will cause the build server to stop compiling with error messages such as
File "Windows.dcu" not found
This file is now called "Winapi.Windows". In order to avoid having to change all the uses clauses in your project you can tell the compiler to automatically add some namespaces implicitly:
msbuild /p:Namespace="System;System.Win;Winapi;Vcl;Vcl.Imaging;Data;Xml" ...
You might have to add some more namespaces that you use in your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With