【问题标题】:XE2 Version Info Not WorkingXE2 版本信息不起作用
【发布时间】:2014-02-19 15:53:30
【问题描述】:

我无法让 XE2 项目在项目文件中包含版本信息。 一个最小的项目: 程序项目1;

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.

编译正常,我选中了“项目>>选项>>版本信息>>在项目中包含版本信息”。如果我取消选中它并返回它仍然检查,就好像文件是只读的一样。不知道哪个文件可以已变为只读?

【问题讨论】:

  • 你重建项目了吗?未编译,重建...
  • 是的,我做到了。我按预期进行的任何更改。我打开了 XE2 基本目录(在我的 B:Drive 上,它是一个 SSD)并使用 Windows 资源管理器(Win 7)检查了属性。 “只读”复选框是精简版(未选中且非空白),因此我假设其中一个文件至少是只读的。我取消选中它并点击“应用”,但该框仍然很亮。这可能是问题吗?
  • @SetiNet Windows 将继续使用资源管理器中的只读标志来执行此操作。不要对此有任何注意。您可以对 PC 上的几乎任何文件夹执行相同操作。它背后可能有一些逻辑,但我还没有弄清楚它是什么。

标签: delphi delphi-xe2


【解决方案1】:

对于未保存选择的问题,您可能仅在调试配置目标中更改版本信息。在右侧面板的顶部有一个名为 Target 的下拉框。选择“所有配置 - 所有平台 - 32 位 Windows 平台”并从那里取消选中它。之后,保存并返回,您会看到它保存了设置。之后,您可以从调试配置中取消选中它,它将保存。 Delphi 出于某种原因从“所有配置”选项继承了设置。

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̶.̶

已更新以包含 Remi 在下面提到的版本清理项目:

https://github.com/ronaldhoek/delphiprojectcleanup

【讨论】:

  • 每个构建版本设置优先于所有配置版本设置是一个已知问题,即使您设置了所有配置设置并清除了每个构建配置。有第三方工具可以清理版本信息“垃圾”以使所有配置正常工作。
  • @RemyLebeau 谢谢,不知道。你说的是 DDevExtensions andy.jgknet.de/blog/ide-tools/ddevextensions
  • 我不记得具体的工具,我只知道有一些浮动。在 Embarcadero 论坛中搜索过去关于此事的讨论。
  • 还是不开心。我编译了清理工具并针对我的项目运行它。它做了“某事”,然后离开了进度条。我重新加载了 XE2 和默认程序,但它仍然不包含版本信息或自动生成内部版本号。
  • @SetiNet 我相信这是一个仅在 XE3 中修复的问题 - 请参阅此处 qc.embarcadero.com/wc/qcmain.aspx?d=98487
【解决方案2】:

如果它对任何人都有帮助,在 XE2 中逻辑是相反的,所以

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

至少我是这样的。

【讨论】:

  • 这与提出的问题无关。阅读文本,而不是仅仅从上下文中获取一行代码并发布一个完全不同主题的答案。
猜你喜欢
  • 1970-01-01
  • 2011-12-24
  • 1970-01-01
  • 1970-01-01
  • 2018-10-28
  • 1970-01-01
  • 1970-01-01
  • 2011-12-15
  • 1970-01-01
相关资源
最近更新 更多