Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add Version info to my Console Applications?

It appears to be what console application projects generated by IDE's intrinsic wizard cannot have version resource managed by IDE <- note the emphasis here.

Is there any workaround(s) for this issue? (i even ready to write an OTA wizard)

like image 392
Premature Optimization Avatar asked May 29 '11 22:05

Premature Optimization


People also ask

How to version your application?

The Android framework provides an API to let you query the system for version information about your app. To obtain version information, use the getPackageInfo(java. lang. String, int) method of PackageManager .

How do I use console application?

The first step is to create a new application. Open a command prompt and create a new directory for your application. Make that the current directory. Type the command dotnet new console at the command prompt.

Is console application easy to develop?

Simplicity. Creating a console application is more straightforward than building an application that has a rich user interface. You do not need to know or use any user interface languages, tools or frameworks. You can implement a console application using simple C# programming.

What is console mode application?

A console application is a computer program designed to be used via a text-only computer interface, such as a text terminal, the command-line interface of some operating systems (Unix, DOS, etc.) or the text-based interface included with most graphical user interface (GUI) operating systems, such as the Windows Console ...


1 Answers

Add in your .dpr ( for example above the begin of the main code) the line:

{$R *.res} 

Then build your project.

It will force a resource file (.res) to be created. This also allows you to set the version info in the project options.

Update: I noticed that this 'bug' is fixed in Delphi 10 Seattle, or maybe in an earlier version. When I create a new console application, it will automatically have that $R directive.

like image 176
GolezTrol Avatar answered Oct 16 '22 10:10

GolezTrol