fixed result of version info VersionInfoMessages

git-svn-id: trunk@9852 -
This commit is contained in:
mattias 2006-09-09 20:18:39 +00:00
parent a887252122
commit 8a1ec98260
3 changed files with 21 additions and 22 deletions

View File

@ -7463,6 +7463,7 @@ var
WorkingDir: String;
CompilerParams: String;
Count: integer;
VersionInfo: TProjectVersionInfo;
begin
if Project1.MainUnitInfo=nil then begin
// this project has not source to compile
@ -7477,17 +7478,17 @@ begin
MessagesView.BeginBlock;
try
// handle versioninfo
Result := Project1.VersionInfo.CompileRCFile(Project1.MainFilename,
MainBuildBoss.GetTargetOS(true));
for Count := 1 to Project1.VersionInfo.VersionInfoMessages.Count do
MessagesView.AddMsg(Format(Project1.VersionInfo.VersionInfoMessages[Count - 1],
['"', Project1.ShortDescription, '"']), '' ,-1);
if Result <> MrOk then exit;
Result:=DoSaveForBuild;
if Result<>mrOk then exit;
// handle versioninfo
VersionInfo:=Project1.VersionInfo;
Result := VersionInfo.CompileRCFile(Project1.MainFilename,MainBuildBoss.GetTargetOS(true));
if Result <> mrOk then exit;
for Count := 1 to VersionInfo.VersionInfoMessages.Count do
MessagesView.AddMsg(Format(VersionInfo.VersionInfoMessages[Count - 1],
['"', Project1.ShortDescription, '"']), '' ,-1);
// compile required packages
if not (pbfDoNotCompileDependencies in Flags) then begin
PkgFlags:=[pcfDoNotSaveEditorFiles];

View File

@ -2484,8 +2484,8 @@ function TProject.FormIsCreatedInProjectFile(
var p: integer;
begin
Result:=(CodeToolBoss.FindCreateFormStatement(MainUnitInfo.Source,
1,AClassName,AName,p)
=0);
1,AClassName,AName,p)=0);
if p=0 then ;
end;
function TProject.IndexOfUnitWithName(const AnUnitName:string;

View File

@ -32,15 +32,14 @@
}
unit W32VersionInfo;
{$mode objfpc}
{$H+}
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Process, LCLProc, Controls, Forms,
CodeToolManager, CodeCache,
LazConf, Dialogprocs;
Classes, SysUtils, Process, LCLProc, Controls, Forms,
CodeToolManager, CodeCache,
LazConf, Dialogprocs;
type
{ TProjectVersionInfo }
@ -103,6 +102,10 @@ type
function UpdateMainSourceFile(const AFilename: string): TModalResult;
procedure SetFileNames(const MainFilename: string);
public
constructor Create;
destructor Destroy; override;
function CompileRCFile(const MainFilename, TargetOS: string): TModalResult;
property Modified: boolean read FModified write SetModified;
property UseVersionInfo: boolean read FUseVersionInfo write SetUseVersionInfo;
@ -122,11 +125,6 @@ type
property OriginalFilenameString: string read FOriginalFilenameString write SetOriginalFilenameString;
property ProdNameString: string read FProdNameString write SetProdNameString;
property ProductVersionString: string read FProductVersionString write SetProductVersionString;
constructor Create;
destructor Destroy; override;
function CompileRCFile(const MainFilename, TargetOS: string): TModalResult;
property VersionInfoMessages: TStringList read GetVersionInfoMessages;
property OnModified: TNotifyEvent read FOnModified write FOnModified;
@ -413,8 +411,8 @@ end;
function TProjectVersionInfo.GetVersionInfoMessages: TStringList;
begin
if fVersionInfoMessages<>nil then exit;
fVersionInfoMessages:=TStringList.Create;
if fVersionInfoMessages=nil then
fVersionInfoMessages:=TStringList.Create;
Result:=fVersionInfoMessages;
end;