Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
427 views
in Technique[技术] by (71.8m points)

delphi - 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)

question from:https://stackoverflow.com/questions/6170880/how-can-i-add-version-info-to-my-console-applications

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...