我试图利用MSBuild / Delphi 2010编辑一个EXE,我尝试这样做:
MSBuild.exe /t:Clean;Build /p:config=Release;ExtraDefines=“Code Test”/property:FileVersion=1.0.0.15 “D:My ProjectMyFile.dproj”
文件虽已建,但版本为t。
有什么错误?
我试图利用MSBuild / Delphi 2010编辑一个EXE,我尝试这样做:
MSBuild.exe /t:Clean;Build /p:config=Release;ExtraDefines=“Code Test”/property:FileVersion=1.0.0.15 “D:My ProjectMyFile.dproj”
文件虽已建,但版本为t。
有什么错误?
贵族财产“FileVersion”可在MSBuild会议内查阅,但除非你有某种用途的任务或目标,否则就不被用于任何用途。 你们要么需要(正如DHeffernan所说)创建一种版本的资源,由你的代码使用,要么使用一种分离后的工具,将这一版本应用于你的外壳或 d。
Using VerInfo_Keys
as an MSBuild property has worked for me.
The rest of the assembly properties you want also need to be provided at the same time however.
msbuild.exe "D:MyProjectMyFile.dproj" /p:Config=Release /p:VerInfo_Keys="FileVersion=1.2.3.4;ProductVersion=1.2.3.4;LegalCopyright=Copyright © My Company;ProductName=My Product;CompanyName=My Company" /t:Clean;Build
这里的主要问题是,<代码>FileVersion“attribute”是《国际特别安全公约》清单的一部分。 VerInfo_Keys
property but not a property se.
因此,我看到的解决办法是:
VersInfo_Keys
property (CSV-list)I ve implemented , 载有 MSBuild Inline Task (N.B.: NET Framework 4.0 and above must be used):
Put the gist (noticed above) to a libMSBuildTasksDelphi.VersionInfo.targets
file (git submodule in my case)
添加到德尔菲项目档案中(saydelphi-project.dproj
):
<Import Project="libMSBuildTasksDelphi.VersionInfo.targets" Condition="$(FileVersion)!= and Exists( libMSBuildTasksDelphi.VersionInfo.targets )"/>
condition "FileVersion is set" is to avoid failure in Delphi as the latter uses .NET 3.5 which does not support inline tasks (so, FileVersion is only set when 1 P-4, 1 P-3, 1 P-2 with MSBuild).
1 P-4, 1 P-3, 1 P-2
我也使用安伯斯语(Delphi XE7/10/2007/5)。 Just VersionName
and VersionC
"properties” are used than FileVersion
(N.B. Import
s conditions is amended appropriate.
my delphi 2009 app has a basic translation system that uses GNUGetText. i had used some win API calls to prepare the fonts. i thought it was working correctly until recently when someone from Malta ...
Ok, I m going nuts here. For the last (almost) four years, I ve been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include: Seemingly random errors in coride50.bpl ...
i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...
In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn t appear to be part of Oxygene, and I can ...
What is the equivalent of SetLength using Oxygene? I m trying to size an integer array. var listIndexes: array of integer; begin setLength(listIndexes,5); // doesn t work end;
How can I monitor or visualize memory fragmentation of a delphi application?
I have consistently had IDE problems in Delphi/C++Builder for years, with every version. I usually just reboot, recompile, etc. and move on. However, I keep seeing others say that the IDE is rock ...
I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...