MSBuild does not pass the version number from continuaCI

Hi guys,

I use MSBuild to build some Delphi projects and I want Continua to keep track of the versioning. On Windows, the final exe file does not get versioning from continua.

How can I pass this info to the final exe? Do I need to use external tools?

Thanks
John

Hi John

As far as I can tell, Delphi’s MSBuild support doesn’t provide any way to update the version info from the command line.

Continua CI can pass the version info as environment variables or command line options to any tool or batch file, and it provides expressions that will allow you to pass the values from Continua to whatever tool you end up using.

I know you probably don’t want to ‘hear’ this, but managing delphi version info is trivial with FinalBuilder :wink:

Hi Vincent,

I’ll try to use an external tool but would love a cross-platform solution, which is even more complicated

Does FinalBuilder call MSBUILD? Can it compile to any platform? And would versioning work for other platforms than Win?

Thanks

John

Hi John

FinalBuilder’s Delphi action only supports Win32, Win64, Linux64 and OSX32 (so not the mobile platforms). It’s version info support is limited to Win32/Win64.

The Delphi action does not call MSBuild, it calls dcc32, dcc64 etc.

There is also a Win32 Version info updater action, which can update an rc file with version info, you would then need to compile the rc file (using the embarcadero resource compiler action) and then include the resulting .res file in your project (and turn off the default version info).

FinalBuilder does also have an MSBuild action. You would still be limited to whatever Embarcadero support with MSBuild, ie it’s no different from the MSBuild action in Continua CI.

What platforms are you compiling for?

Hi Vincent,

next month I will add an Android version so I am trying to create a solution from the beginning.

Anyways, I have external tools now.

I’ve got a problem though to launch the external files.

I have added an action with the following configuration:

but the build complains:

When I run the command directly, it works fine. How does CI launch those files? with cmd /c?

Thanks

Hi John,

It starts a process directly using the executable path as the filename. This process runs under the Continua CI Server service user account.

I suspect that that Z: is a mapped drive. Mapped drives are created when a user logs in and are not accessible by Windows services like Continua CI. Either copy the tool to the local drive or use a UNC path e.g. \\computername\…

Also note that you don’t need the double quotes in the Executable Path or the Working Directory fields.

Yes, that’s it.

Thanks Dave