Support for FPC 2.4.0 *.lfm resource files

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1172 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
macpgmr
2010-02-28 22:45:14 +00:00
parent ca6cdc0315
commit c11c5f7592
2 changed files with 8 additions and 2 deletions

View File

@@ -79,6 +79,7 @@ TLabeledEdit.Font.Height=
TLabeledEdit.Font.Name= TLabeledEdit.Font.Name=
TLabeledEdit.Font.Style= TLabeledEdit.Font.Style=
TListBox.ScrollWidth= TListBox.ScrollWidth=
TDBImage.TabOrder=
; When -p switch is used with DfmToLfm, don't try to add parent's font ; When -p switch is used with DfmToLfm, don't try to add parent's font

View File

@@ -24,7 +24,7 @@ uses
const const
ProgramName = 'MakePasX'; ProgramName = 'MakePasX';
ProgramVersion = '0.02'; ProgramVersion = '0.03';
PasFileExt = '.pas'; {Pascal code file extension} PasFileExt = '.pas'; {Pascal code file extension}
DelProjFileExt = '.dpr'; {Delphi project file extension} DelProjFileExt = '.dpr'; {Delphi project file extension}
@@ -112,7 +112,8 @@ begin
WriteLn(NewFileVar, InStr); WriteLn(NewFileVar, InStr);
WriteLn(NewFileVar, WriteLn(NewFileVar,
' {$IFNDEF LCL} Windows, Messages, ', ' {$IFNDEF LCL} Windows, Messages, ',
'{$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}'); '{$ELSE} LclIntf, LMessages, LclType, {$ENDIF}'); //LResources not needed anymore
// '{$ELSE} LclIntf, LMessages, LclType, LResources, {$ENDIF}');
ReadLn(OldFileVar, InStr); ReadLn(OldFileVar, InStr);
repeat repeat
UnitPos := Pos('WINDOWS,', UpperCase(InStr)); UnitPos := Pos('WINDOWS,', UpperCase(InStr));
@@ -147,12 +148,15 @@ begin
begin begin
WriteLn(NewFileVar, '{$IFNDEF LCL}'); WriteLn(NewFileVar, '{$IFNDEF LCL}');
WriteLn(NewFileVar, InStr); WriteLn(NewFileVar, InStr);
WriteLn(NewFileVar, '{$ELSE}'); //Added this
WriteLn(NewFileVar, '{$R *.lfm}'); //Added this
WriteLn(NewFileVar, '{$ENDIF}'); WriteLn(NewFileVar, '{$ENDIF}');
HasForm := True; HasForm := True;
end end
else if (CompareText(InStr, 'end.') = 0) and HasForm then {End of unit?} else if (CompareText(InStr, 'end.') = 0) and HasForm then {End of unit?}
begin begin
(* // not needed anymore
{Note: Make sure IFDEF goes after initialization since Delphi {Note: Make sure IFDEF goes after initialization since Delphi
inserts new event handlers immediately before initialization line.} inserts new event handlers immediately before initialization line.}
WriteLn(NewFileVar, 'initialization'); WriteLn(NewFileVar, 'initialization');
@@ -161,6 +165,7 @@ begin
'.lrs} {Include form''s resource file}')); '.lrs} {Include form''s resource file}'));
WriteLn(NewFileVar, '{$ENDIF}'); WriteLn(NewFileVar, '{$ENDIF}');
WriteLn(NewFileVar); WriteLn(NewFileVar);
*)
WriteLn(NewFileVar, InStr); WriteLn(NewFileVar, InStr);
end end