mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 23:59:10 +02:00
IDE: New project description for an application with UTF8 RTL support.
git-svn-id: trunk@47571 -
This commit is contained in:
parent
4a4651ad58
commit
74d2ec821a
@ -32,6 +32,7 @@ const
|
|||||||
|
|
||||||
ProjDescGroupName = 'Project';
|
ProjDescGroupName = 'Project';
|
||||||
ProjDescNameApplication = 'Application';
|
ProjDescNameApplication = 'Application';
|
||||||
|
ProjDescNameUtf8Application = 'UTF-8 Application';
|
||||||
ProjDescNameSimpleProgram = 'Simple Program';
|
ProjDescNameSimpleProgram = 'Simple Program';
|
||||||
ProjDescNameProgram = 'Program';
|
ProjDescNameProgram = 'Program';
|
||||||
ProjDescNameConsoleApplication = 'Console application';
|
ProjDescNameConsoleApplication = 'Console application';
|
||||||
|
@ -2326,6 +2326,7 @@ resourcestring
|
|||||||
dlgProjectOptions = 'Project Options';
|
dlgProjectOptions = 'Project Options';
|
||||||
dlgProjectOptionsFor = 'Options for Project: %s';
|
dlgProjectOptionsFor = 'Options for Project: %s';
|
||||||
dlgPOApplication = 'Application';
|
dlgPOApplication = 'Application';
|
||||||
|
dlgPOUtf8Application = 'UTF-8 Application';
|
||||||
dlgPOFroms = 'Forms';
|
dlgPOFroms = 'Forms';
|
||||||
dlgPOResources = 'Resources';
|
dlgPOResources = 'Resources';
|
||||||
rsResourceFileName = 'File name';
|
rsResourceFileName = 'File name';
|
||||||
@ -4646,6 +4647,8 @@ resourcestring
|
|||||||
|
|
||||||
lisApplicationProgramDescriptor = 'A graphical Free Pascal application using'
|
lisApplicationProgramDescriptor = 'A graphical Free Pascal application using'
|
||||||
+' the cross-platform LCL library for its GUI.';
|
+' the cross-platform LCL library for its GUI.';
|
||||||
|
lisUtf8ApplicationProgramDescriptor = 'A graphical application for FPC 3.0 and higher using'
|
||||||
|
+' the cross-platform LCL library for its GUI and mapping FPC default String to UTF-8 encoding.';
|
||||||
lisSimpleProgramProgramDescriptor = 'A most simple Free Pascal command line program.';
|
lisSimpleProgramProgramDescriptor = 'A most simple Free Pascal command line program.';
|
||||||
lisProgramProgramDescriptor = 'A Free Pascal command line program with some useful settings added.';
|
lisProgramProgramDescriptor = 'A Free Pascal command line program with some useful settings added.';
|
||||||
lisConsoleApplicationProgramDescriptor = 'A Free Pascal command line program using'
|
lisConsoleApplicationProgramDescriptor = 'A Free Pascal command line program using'
|
||||||
|
@ -2564,6 +2564,7 @@ begin
|
|||||||
// project descriptors
|
// project descriptors
|
||||||
LazProjectDescriptors:=TLazProjectDescriptors.Create;
|
LazProjectDescriptors:=TLazProjectDescriptors.Create;
|
||||||
RegisterProjectDescriptor(TProjectApplicationDescriptor.Create);
|
RegisterProjectDescriptor(TProjectApplicationDescriptor.Create);
|
||||||
|
RegisterProjectDescriptor(TProjectUtf8ApplicationDescriptor.Create);
|
||||||
RegisterProjectDescriptor(TProjectSimpleProgramDescriptor.Create);
|
RegisterProjectDescriptor(TProjectSimpleProgramDescriptor.Create);
|
||||||
RegisterProjectDescriptor(TProjectProgramDescriptor.Create);
|
RegisterProjectDescriptor(TProjectProgramDescriptor.Create);
|
||||||
RegisterProjectDescriptor(TProjectConsoleApplicationDescriptor.Create);
|
RegisterProjectDescriptor(TProjectConsoleApplicationDescriptor.Create);
|
||||||
|
@ -315,6 +315,14 @@ type
|
|||||||
function CreateStartFiles({%H-}AProject: TLazProject): TModalResult; override;
|
function CreateStartFiles({%H-}AProject: TLazProject): TModalResult; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TProjectUtf8ApplicationDescriptor = class(TProjectApplicationDescriptor)
|
||||||
|
public
|
||||||
|
constructor Create; override;
|
||||||
|
function GetLocalizedName: string; override;
|
||||||
|
function GetLocalizedDescription: string; override;
|
||||||
|
function InitProject(AProject: TLazProject): TModalResult; override;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TProjectSimpleProgramDescriptor }
|
{ TProjectSimpleProgramDescriptor }
|
||||||
|
|
||||||
TProjectSimpleProgramDescriptor = class(TProjectDescriptor)
|
TProjectSimpleProgramDescriptor = class(TProjectDescriptor)
|
||||||
@ -1261,8 +1269,7 @@ begin
|
|||||||
Result := GetLocalizedName + LineEnding+LineEnding + lisApplicationProgramDescriptor;
|
Result := GetLocalizedName + LineEnding+LineEnding + lisApplicationProgramDescriptor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TProjectApplicationDescriptor.InitProject(
|
function TProjectApplicationDescriptor.InitProject(AProject: TLazProject): TModalResult;
|
||||||
AProject: TLazProject): TModalResult;
|
|
||||||
var
|
var
|
||||||
NewSource: String;
|
NewSource: String;
|
||||||
MainFile: TLazProjectFile;
|
MainFile: TLazProjectFile;
|
||||||
@ -1312,6 +1319,33 @@ begin
|
|||||||
[nfIsPartOfProject,nfOpenInEditor,nfCreateDefaultSrc]);
|
[nfIsPartOfProject,nfOpenInEditor,nfCreateDefaultSrc]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TProjectUtf8ApplicationDescriptor }
|
||||||
|
|
||||||
|
constructor TProjectUtf8ApplicationDescriptor.Create;
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
Name:=ProjDescNameUtf8Application;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TProjectUtf8ApplicationDescriptor.GetLocalizedName: string;
|
||||||
|
begin
|
||||||
|
Result:=dlgPOUtf8Application;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TProjectUtf8ApplicationDescriptor.GetLocalizedDescription: string;
|
||||||
|
begin
|
||||||
|
Result := GetLocalizedName + LineEnding+LineEnding + lisUtf8ApplicationProgramDescriptor;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TProjectUtf8ApplicationDescriptor.InitProject(AProject: TLazProject): TModalResult;
|
||||||
|
begin
|
||||||
|
Result := inherited InitProject(AProject);
|
||||||
|
Assert(AProject.LazCompilerOptions.CustomOptions='',
|
||||||
|
'TProjectUtf8ApplicationDescriptor.InitProject: CustomOptions<>''');
|
||||||
|
AProject.LazCompilerOptions.CustomOptions := '-dEnableUTF8RTL' + LineEnding
|
||||||
|
+ '-FcUTF8' + LineEnding;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TProjectSimpleProgramDescriptor }
|
{ TProjectSimpleProgramDescriptor }
|
||||||
|
|
||||||
constructor TProjectSimpleProgramDescriptor.Create;
|
constructor TProjectSimpleProgramDescriptor.Create;
|
||||||
|
Loading…
Reference in New Issue
Block a user