We have a system which consists of numerous applications. All applications have their version changed at the same time. Currently, when we release a new version, we have to manually open the project options of each application and change the version one by one. Is there any way to compile all applications on the same version, for example, save it in a global file and upon compilation, read this file and assign that version to the project? I'm just trying to eliminate too many steps, because we plan on changing the version numbers more frequently. I'd like to change it in one place only. Can this be done? and how?
相关问题
- Is there a Delphi 5 component that can handle .png
- Is there a way to install Delphi 2010 on Windows 2
- Visual Studio 2019 - error MSB8020: The build tool
- Is TWebBrowser dependant on IE version?
- Angular: ngc or tsc?
相关文章
- Build errors of missing packages in Visual Studio
- Copy different file to output directory for releas
- Best way to implement MVVM bindings (View <-> V
- Windows EventLog: How fast are operations with it?
- How to force Delphi compiler to display all hints
- Coloring cell background on firemonkey stringgrid
- HelpInsight documentation in Delphi 2007
- php module does not compile. Does not recognize “s
This is one of the use cases for dzPrepBuild: http://www.dummzeuch.de/delphi/dzprepbuild/englisch.html
(Note: The project has been moved to sourceforge because berlios was going to be shut down last year. http://sourceforge.net/projects/dzprepbuild/)
UPDATE: It is not part of RADStudio itself, but comes from Andreas Hausladen's DDevExtensions (which I'm so used to have...!).
You can do it from within the IDE with a ProjectGroup provided you installed the excellent DDevExtensions from Andreas Hausladen.
Options|Version Info page
.Project|Set Versioninfo...
to open the Set Project Versioninfo dialog (only once, the current project does not matter).For example, see how I set version to both projects at once:
Then a
Build All
on the ProjectGroup produced both exes with the version set at 1.1.1.9 and all other details...You can create a
VERSIONINFO
resource, in a plain text file (eg.,Versioninfo.rc
)Note: The C-style null terminators (
\0
) are needed at the end of each item as shown in order for the resource compiler to properly terminate the strings. Otherwise, when you use Explorer to display the version information for the executable you may get garbled or partially concatenated values.Add a line to your project source file:
I suggest putting the common version info resource into an externals reference in your version control system, and then you can just check it out into each project's folder and update it easily.
Do a Project->Build, and your version info is embedded in the .exe. You can verify by using Windows Explorer and viewing the properties of your app.
There's a couple of posts (one by me and one in a response by Jim Fleming) in the Embarcadero Delphi forums at CodeNewsFast archives. Mine is [here], where, I describe step-by-step how to use a pre-build event in your project to update the version number in the resource script I posted above.
Jim posts a few replies, but about a dozen posts or so down there's source for an executable that can be called from the pre-build event that works for him. (There are some things I'd do differently, like letting the IDE pass the project name and location on the command line; how to do so is described in the step-by-step article. I'd also handle the version parsing and incrementing differently, but the basic app is a good starting location.)
Embarcadero's groups are currently down, but I was able to retrieve Jim's code from CodeNewsFast as well, and can reproduce it here:
A) Create your Version Info resource file in your project directory or wherever, with the following
contents, and file extension .rc:
B) Create a new project in some folder, code of only module should be similar to:
C) In Project Options of the project whose build number should be incremented:
Remove the tick "include version info".
Add a pre-build event with the following text, as written, including the two pairs of double-quotes, substituting the parts within < >:
"<full file name and path of the auto-increment program exe>" "<full file name and path of the .rc resource file>"
D) Add to the project source, right below the "program" keyword:
be the same here: IIRC, got errors when they were different.
E) Compile, run and enjoy the return of Auto-Increment build numbers, despite Embarcadero's having removed the facility.
You could use the pre-build event to, for instance, update the
ProductName
orFileDescription
values, or any others that have to be different from the base script.