XE2 Version Info Not Working

你说的曾经没有我的故事 提交于 2019-12-09 21:44:32

问题


I cannot see to get an XE2 project to include version information in the project files. A minimal project: program Project1;

uses
  Vcl.Forms,
  Unit2 in 'Unit2.pas' {Form2};

  {$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TForm2, Form2);
  Application.Run;
end.

and a blank unit:
    unit Unit2;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,       Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs;

type
 TForm2 = class(TForm)
 private
{ Private declarations }
 public
{ Public declarations }
 end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

end.

Compiles fine and I have "Project>>Options>>Version Info>>Include version information in project' Checked. If I uncheck it and come back its still checked as if the file is read only. No idea which file could have become read only?


回答1:


For your problem where it is not saving the selection you are probably changing the version information only in the Debug Configuration Target. At the top of the right hand panel there is a drop down box called Target. Select "All Configurations - All Platforms - 32-bit Windows platform" and uncheck it from there. After that, save and go back in, you will see that it saves the setting. After that you can uncheck it from the debug configuration and it will save. Delphi is inheriting the setting from the "All configurations" option for some reason.

S̶e̶e̶ ̶i̶f̶ ̶p̶u̶t̶t̶i̶n̶g̶ ̶a̶l̶l̶ ̶o̶f̶ ̶t̶h̶e̶ ̶v̶e̶r̶s̶i̶o̶n̶ ̶d̶e̶t̶a̶i̶l̶s̶ ̶y̶o̶u̶ ̶w̶a̶n̶t̶ ̶i̶n̶ ̶t̶h̶e̶ ̶a̶p̶p̶l̶i̶c̶a̶t̶i̶o̶n̶ ̶i̶n̶ ̶t̶h̶e̶ ̶"̶A̶l̶l̶ ̶C̶o̶n̶f̶i̶g̶u̶r̶a̶t̶i̶o̶n̶s̶"̶ ̶v̶e̶r̶s̶i̶o̶n̶ ̶i̶n̶f̶o̶ ̶h̶e̶l̶p̶s̶.̶I̶ ̶a̶m̶ ̶n̶o̶t̶ ̶a̶w̶a̶r̶e̶ ̶o̶f̶ ̶a̶ ̶p̶r̶o̶b̶l̶e̶m̶ ̶i̶n̶ ̶D̶e̶l̶p̶h̶i̶ ̶w̶h̶e̶r̶e̶ ̶i̶t̶ ̶d̶o̶e̶s̶n̶'̶t̶ ̶p̶u̶t̶ ̶t̶h̶e̶ ̶v̶e̶r̶s̶i̶o̶n̶ ̶i̶n̶f̶o̶r̶m̶a̶t̶i̶o̶n̶ ̶i̶n̶ ̶t̶h̶e̶ ̶E̶X̶E̶ ̶f̶i̶l̶e̶ ̶w̶h̶e̶n̶ ̶i̶t̶ ̶o̶n̶l̶y̶ ̶c̶o̶m̶e̶s̶ ̶t̶o̶ ̶d̶e̶b̶u̶g̶ ̶v̶e̶r̶s̶i̶o̶n̶s̶ ̶b̶u̶t̶ i̶t̶ ̶m̶a̶y̶ ̶b̶e̶ ̶s̶o̶m̶e̶t̶h̶i̶n̶g̶ ̶r̶e̶l̶a̶t̶e̶d̶ ̶t̶o̶ ̶X̶E̶2̶.̶

Updated to include the version cleanup project that Remi mentioned below:

https://github.com/ronaldhoek/delphiprojectcleanup




回答2:


In case it helps anyone, in XE2 the logic is reversed, so

Application.MainFormOnTaskbar := true;//will NOT show the icon on the task bar
Application.MainFormOnTaskbar := false;// WILL show the icon on the task bar

At least this is the case for me.



来源:https://stackoverflow.com/questions/21885610/xe2-version-info-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!