Jump to content
Soji

How to set version number for all the projects in a project group

Recommended Posts

Hi,

 

I am looking for an easy option to set  "version information" of multiple projects with in a project group at the same time. Is there any option already available wit the Delphi IDE?

Going through each and every project and updating the version information for a particular build configuration is error prone and cumbersome. I have almost 75 projects in a project group. Don't want to click through each and every project and enter the version information for every release.

Any best practices or suggestions to handle this situation?

 

I use configuration manager to select a configuration to build all the projects in my development machine. (For release build I use a build server and MSBUILD) 

 

Kind regards,

Soji.

 

Share this post


Link to post

Don't use the IDE managed version resource. Use an external RC file with a version resource instead and update it with whatever suits your build pipeline best. For example a simple bat or cmd file.

I'm sure there are lots of homegrown utilities that can update the version in the dproj, an RC or RES file but I like to keep the number of dependencies down. A utility would just be yet another piece of software to install, maintain, etc.

  • Like 2
  • Thanks 1

Share this post


Link to post
Guest

Here, a sample for my project named "MyProject2.exe", looking at "MyProject2.DPROJ" we can find the "FileVersion" values: Here, myseft definition by mannual entry!!! not using "auto" increment  - for test!

...
    <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">       <---- my DEBUG mode for 32bits definition
        <DCC_RemoteDebug>false</DCC_RemoteDebug>
        <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
        <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
        <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
        <VerInfo_MajorVer>20</VerInfo_MajorVer>
        <VerInfo_MinorVer>21</VerInfo_MinorVer>
        <VerInfo_Release>22</VerInfo_Release>
        <VerInfo_Build>23</VerInfo_Build>
        <VerInfo_Locale>1033</VerInfo_Locale>
        <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=20.21.22.23;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
    </PropertyGroup>
...

Then, you can create yourself a tool to "find / change" it... if dont get wrong, you can use "reFIND" tool by Embarcadero and config it to find this text and change!

Or, you can use "FIND and REPLACE" in your IDE to find in all files in your projects (*.DPROJ files ) and  change the value

ok, YOU HAVE 75 PROJECT IN YOUR GROUP!

Dont worry! just limit your search for your "*.DPROJ" files!

FIND:  (last number version)

REPLACE: (new number version)

 

You see?

 

image.thumb.png.338aba385a3240253c4c48a870026e05.png

 

 

hug

Edited by Guest

Share this post


Link to post

Depending on your Delphi version you can use DDevExtensions.  

Unfortunately it's not available for 10.4. 

  • Thanks 1

Share this post


Link to post
32 minutes ago, Rob Truby said:

Depending on your Delphi version you can use DDevExtensions.  

Unfortunately it's not available for 10.4. 

You mean 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
15 hours ago, Anders Melander said:

Don't use the IDE managed version resource. Use an external RC file with a version resource instead and update it with whatever suits your build pipeline best. For example a simple bat or cmd file.

I'm sure there are lots of homegrown utilities that can update the version in the dproj, an RC or RES file but I like to keep the number of dependencies down. A utility would just be yet another piece of software to install, maintain, etc.

Thanks @Anders Melander. I was also not looking for any utilities. Try to find a best solution within IDE/projects itself.  

Share this post


Link to post
13 hours ago, emailx45 said:

Then, you can create yourself a tool to "find / change" it...

Thanks @emailx45. I started exactly with same idea sometime back. Then I found some issue when we upgraded Delphi version. The *.dproj file changed and my search and replace failed or did not work with different build configurations. I created a tool to search and replace build version at that time. Thanks for your detailed answer. Much appreciated.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×