Solved

Automatic version correct (increasing build number)

Posted on 2000-04-25
12
235 Views
Last Modified: 2010-08-05
Let's say that i have initial screen with version number and build number in it (two labels). What I would like from Delphi is to increase build number every time i recompile project. Is that possible?

0
Comment
Question by:Roza
  • 6
  • 3
  • 2
  • +1
12 Comments
 
LVL 15

Accepted Solution

by:
simonet earned 200 total points
ID: 2747568
Sure it is.

Supposing you're using Delphi to create the version info, you can have Delphi automatically increase the build number everytime you rebuild your app.

Here's what to do:
On the Delphi IDE menu, click Project | Options...
On the "Version info" tab, set all the version information and check the "Auto-increment build number" check box.

That's all it takes.

Now, to read that version information from the executable into the 2 TLabels in your splash screen/about box, download a "How-To" application I wrote:

"How to extract Version information from EXEs, DLLs, VXDs, etc..."
http://www.bhnet.com.br/~simonet/howtoprojs.htm

Yours,

Alex
0
 
LVL 3

Expert Comment

by:Stefaan
ID: 2747606
Hi,

You can do that using the Project options in Delphi.

Open your Project, selection the Options item from the Project Menu.  This will open up a screen with some tabs.  Pick the version info tab, and there check the 'auto increment build number' option.
0
 
LVL 2

Author Comment

by:Roza
ID: 2747660
That's cool, but what about any other variables.
Let's say my username for LAN. Can it be stored somwhere in program during rebuild?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 2

Author Comment

by:Roza
ID: 2748071
That's cool, but what about any other variables.
Let's say my username for LAN. Can it be stored somwhere in program during rebuild?
0
 
LVL 15

Expert Comment

by:simonet
ID: 2748170
What is going on here? First all comments disappear. Then I post another answer and now it reappears again?

EE is all screwed up today.

Stefaan,

You just repeated what I had already stated in my proposed answer. Please read all existing comments to a question before posting your own. It's not nice ot step on someone else's toes.

Roza,

You can store anything you want in the version information screen provided by Delphi.

Just follow the steps I outlined and you'll get in the Version Info screen. There's a grid where you can set all information you want. If you scroll to the end of the grid, you can add your own custom variables, along with their values.

Yours,

Alex
0
 
LVL 3

Expert Comment

by:Stefaan
ID: 2750336
Hi Alex,

When I commented your comment wasn't there yet.  I guess we were both keying in our comments at the same time.  It was never my intention to repeat someone elses comment.
0
 
LVL 2

Author Comment

by:Roza
ID: 2750446
Adjusted points from 100 to 200
0
 
LVL 2

Author Comment

by:Roza
ID: 2750447
Hi!

Something strange is happening with ee.
Looks like I posted three identical questions and my comments are dissapearing.

Hi Alex,

  Ok. I can store variable into version info screen, but how to correct this everytime I rebuild.
Ex. I make Key named Date. Now when I rebuild my project I want to assign value datetostr(date).

Is something like that possible?
0
 
LVL 2

Expert Comment

by:DidierD
ID: 2750757
listening ...
0
 
LVL 2

Author Comment

by:Roza
ID: 2750777
Hi!

Something strange is happening with ee.
Looks like I posted three identical questions and my comments are dissapearing.

Hi Alex,

  Ok. I can store variable into version info screen, but how to correct this everytime I rebuild.
Ex. I make Key named Date. Now when I rebuild my project I want to assign value datetostr(date).

Is something like that possible?
0
 
LVL 15

Expert Comment

by:simonet
ID: 2751519
>Is something like that possible?

Unfortunately not, Roza.

I know what you mean - having the "BuildDate" or something like that in the version info, automatically managed by Delphi would be a rael nice feature. Too bad Delphi cannot do that today? Maybe that's possible with Delphi 6!

Yours,

Alex
0
 
LVL 2

Author Comment

by:Roza
ID: 2763435
Alex thanx for your answer. Guess I just wanted too much from my computer :)
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to fill array with TArray.Create? 14 90
Using idhttp to login to instagram 2 91
Delphi...Split view - idea? 1 70
Delphi: sending SMS on android platform 1 21
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question