mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-14 06:19:25 +01:00
+ creation of IDE configuration files
git-svn-id: trunk@3740 -
This commit is contained in:
parent
b784b2f39e
commit
4f199e533b
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -482,9 +482,11 @@ compiler/utils/fpc.cft svneol=native#text/plain
|
|||||||
compiler/utils/fpc.mpw -text
|
compiler/utils/fpc.mpw -text
|
||||||
compiler/utils/fpc.pp svneol=native#text/plain
|
compiler/utils/fpc.pp svneol=native#text/plain
|
||||||
compiler/utils/fpccfg.inc svneol=native#text/plain
|
compiler/utils/fpccfg.inc svneol=native#text/plain
|
||||||
|
compiler/utils/fpcfg.inc svneol=native#text/plain
|
||||||
compiler/utils/fpcmkcfg.pp svneol=native#text/plain
|
compiler/utils/fpcmkcfg.pp svneol=native#text/plain
|
||||||
compiler/utils/fpcsubst.pp svneol=native#text/plain
|
compiler/utils/fpcsubst.pp svneol=native#text/plain
|
||||||
compiler/utils/fpimpdef.pp svneol=native#text/plain
|
compiler/utils/fpimpdef.pp svneol=native#text/plain
|
||||||
|
compiler/utils/fpini.inc svneol=native#text/plain
|
||||||
compiler/utils/fppkg.pp svneol=native#text/plain
|
compiler/utils/fppkg.pp svneol=native#text/plain
|
||||||
compiler/utils/gppc386.pp svneol=native#text/plain
|
compiler/utils/gppc386.pp svneol=native#text/plain
|
||||||
compiler/utils/mk68kreg.pp svneol=native#text/plain
|
compiler/utils/mk68kreg.pp svneol=native#text/plain
|
||||||
|
|||||||
59
compiler/utils/fpcfg.inc
Normal file
59
compiler/utils/fpcfg.inc
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{$ifdef Delphi}
|
||||||
|
const fpcfg : array[0..3] of string[240]=(
|
||||||
|
{$else Delphi}
|
||||||
|
const fpcfg : array[0..3,1..240] of char=(
|
||||||
|
{$endif Delphi}
|
||||||
|
'#IFDEF NORMAL'#013#010+
|
||||||
|
' -T%fpctargetos%'#013#010+
|
||||||
|
' -Sg'#013#010+
|
||||||
|
' -O1'#013#010+
|
||||||
|
' -OG'#013#010+
|
||||||
|
' -Op3'#013#010+
|
||||||
|
' -Ratt'#013#010+
|
||||||
|
' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#013#010+
|
||||||
|
' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#013#010+
|
||||||
|
' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl'#013#010+
|
||||||
|
' -Cs131072'#013#010+
|
||||||
|
' -Ch2097152'#013,#010+
|
||||||
|
' -g-'#013#010+
|
||||||
|
' -p-'#013#010+
|
||||||
|
' -b-'#013#010+
|
||||||
|
'#ENDIF'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'#IFDEF DEBUG'#013#010+
|
||||||
|
' -T%fpctargetos%'#013#010+
|
||||||
|
' -Sg'#013#010+
|
||||||
|
' -Cr'#013#010+
|
||||||
|
' -Ci'#013#010+
|
||||||
|
' -Co'#013#010+
|
||||||
|
' -OG'#013#010+
|
||||||
|
' -Op3'#013#010+
|
||||||
|
' -Ratt'#013#010+
|
||||||
|
' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#013#010+
|
||||||
|
' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#013#010+
|
||||||
|
' -Fu%basepath%\units\%fpctarget%-%fp','ctargetos%\rtl'#013#010+
|
||||||
|
' -Cs131072'#013#010+
|
||||||
|
' -Ch2097152'#013#010+
|
||||||
|
' -g'#013#010+
|
||||||
|
' -p-'#013#010+
|
||||||
|
' -b-'#013#010+
|
||||||
|
'#ENDIF'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'#IFDEF RELEASE'#013#010+
|
||||||
|
' -T%fpctargetos%'#013#010+
|
||||||
|
' -Sg'#013#010+
|
||||||
|
' -O1'#013#010+
|
||||||
|
' -O2'#013#010+
|
||||||
|
' -OG'#013#010+
|
||||||
|
' -Op3'#013#010+
|
||||||
|
' -Ratt'#013#010+
|
||||||
|
' -Fu%basepath%\units\%fpctarget%-%fpctargetos%'#013#010+
|
||||||
|
' -Fu%basepath%\units\%fpctarget%-%fpctargetos%\*'#013#010+
|
||||||
|
' ','-Fu%basepath%\units\%fpctarget%-%fpctargetos%\rtl'#013#010+
|
||||||
|
' -Cs131072'#013#010+
|
||||||
|
' -Ch2097152'#013#010+
|
||||||
|
' -g-'#013#010+
|
||||||
|
' -p-'#013#010+
|
||||||
|
' -b-'#013#010+
|
||||||
|
'#ENDIF'#013#010
|
||||||
|
);
|
||||||
@ -26,10 +26,13 @@ uses usubst,SysUtils,Classes;
|
|||||||
}
|
}
|
||||||
|
|
||||||
{$i fpccfg.inc}
|
{$i fpccfg.inc}
|
||||||
|
{$i fpini.inc}
|
||||||
|
{$i fpcfg.inc}
|
||||||
|
|
||||||
Const
|
Const
|
||||||
BuildVersion={$I %FPCVERSION%};
|
BuildVersion={$I %FPCVERSION%};
|
||||||
BuildTarget={$I %FPCTARGET%};
|
BuildTarget={$I %FPCTARGET%};
|
||||||
|
BuildOSTarget={$I %FPCTARGETOS%};
|
||||||
|
|
||||||
|
|
||||||
Resourcestring
|
Resourcestring
|
||||||
@ -43,6 +46,9 @@ Resourcestring
|
|||||||
SUsage70 = ' -l filename read name/value pairs from filename';
|
SUsage70 = ' -l filename read name/value pairs from filename';
|
||||||
SUsage80 = ' -b show builtin template and exit.';
|
SUsage80 = ' -b show builtin template and exit.';
|
||||||
SUsage90 = ' -v be verbose.';
|
SUsage90 = ' -v be verbose.';
|
||||||
|
Susage100 = ' -0 use built in fpc.cfg template (default)';
|
||||||
|
Susage110 = ' -1 use built in fp.cfg template';
|
||||||
|
Susage120 = ' -2 use built in fp.ini template';
|
||||||
SErrUnknownOption = 'Error: Unknown option.';
|
SErrUnknownOption = 'Error: Unknown option.';
|
||||||
SErrArgExpected = 'Error: Option "%s" requires an argument.';
|
SErrArgExpected = 'Error: Option "%s" requires an argument.';
|
||||||
SErrNoSuchFile = 'Error: File "%s" does not exist.';
|
SErrNoSuchFile = 'Error: File "%s" does not exist.';
|
||||||
@ -60,17 +66,18 @@ Var
|
|||||||
List,Cfg : TStringList;
|
List,Cfg : TStringList;
|
||||||
TemplateFileName,
|
TemplateFileName,
|
||||||
OutputFileName : String;
|
OutputFileName : String;
|
||||||
|
IDEBuildin : Integer;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure Init;
|
procedure Init;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Verbose:=False;
|
Verbose:=False;
|
||||||
|
IDEBuildIn:=0;
|
||||||
List:=TStringList.Create;
|
List:=TStringList.Create;
|
||||||
AddToList(List,'FPCVERSION',BuildVersion);
|
AddToList(List,'FPCVERSION',BuildVersion);
|
||||||
AddToList(List,'FPCTARGET',BuildTarget);
|
AddToList(List,'FPCTARGET',BuildTarget);
|
||||||
|
AddToList(List,'FPCTARGETOS',BuildOSTarget);
|
||||||
AddToList(List,'PWD',GetCurrentDir);
|
AddToList(List,'PWD',GetCurrentDir);
|
||||||
AddToList(List,'BUILDDATE',DateToStr(Date));
|
AddToList(List,'BUILDDATE',DateToStr(Date));
|
||||||
AddToList(List,'BUILDTIME',TimeToStr(Time));
|
AddToList(List,'BUILDTIME',TimeToStr(Time));
|
||||||
@ -98,6 +105,9 @@ begin
|
|||||||
Writeln(SUsage70);
|
Writeln(SUsage70);
|
||||||
Writeln(SUsage80);
|
Writeln(SUsage80);
|
||||||
Writeln(SUsage90);
|
Writeln(SUsage90);
|
||||||
|
Writeln(SUsage100);
|
||||||
|
Writeln(SUsage110);
|
||||||
|
Writeln(SUsage120);
|
||||||
Halt(1);
|
Halt(1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -158,6 +168,9 @@ begin
|
|||||||
'u' : AddPair(List,GetOptArg+'=');
|
'u' : AddPair(List,GetOptArg+'=');
|
||||||
'o' : OutputFileName:=GetoptArg;
|
'o' : OutputFileName:=GetoptArg;
|
||||||
's' : SkipBackup:=True;
|
's' : SkipBackup:=True;
|
||||||
|
'0' : IDEBuildin:=0;
|
||||||
|
'1' : IDEBuildin:=1;
|
||||||
|
'2' : IDEBuildin:=2;
|
||||||
else
|
else
|
||||||
UnknownOption(S);
|
UnknownOption(S);
|
||||||
end;
|
end;
|
||||||
@ -174,7 +187,16 @@ begin
|
|||||||
AddToList(List,'TEMPLATEFILE',TemplateFileName);
|
AddToList(List,'TEMPLATEFILE',TemplateFileName);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
|
case IDEBuildin of
|
||||||
|
1:
|
||||||
|
Cfg.Text:=StrPas(Addr(fpcfg));
|
||||||
|
2:
|
||||||
|
Cfg.Text:=StrPas(Addr(fpini));
|
||||||
|
end;
|
||||||
|
|
||||||
AddToList(List,'TEMPLATEFILE','builtin');
|
AddToList(List,'TEMPLATEFILE','builtin');
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
52
compiler/utils/fpini.inc
Normal file
52
compiler/utils/fpini.inc
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{$ifdef Delphi}
|
||||||
|
const fpini : array[0..2] of string[240]=(
|
||||||
|
{$else Delphi}
|
||||||
|
const fpini : array[0..2,1..240] of char=(
|
||||||
|
{$endif Delphi}
|
||||||
|
'[Compile]'#013#010+
|
||||||
|
'CompileMode=DEBUG'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Help]'#013#010+
|
||||||
|
'Files="%basepath%\doc\fpctoc.htx"'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Editor]'#013#010+
|
||||||
|
'DefaultTabSize=8'#013#010+
|
||||||
|
'DefaultFlags=20599'#013#010+
|
||||||
|
'DefaultSaveExt=.pas'#013#010+
|
||||||
|
'DefaultIndentSize=1'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Highlight]'#013#010+
|
||||||
|
'Exts="*.pas;*.pp;*.inc"'#013#010+
|
||||||
|
'NeedsTabs="make*;make*.*"'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Sou','rcePath]'#013#010+
|
||||||
|
'SourceList=""'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Mouse]'#013#010+
|
||||||
|
'DoubleDelay=8'#013#010+
|
||||||
|
'ReverseButtons=0'#013#010+
|
||||||
|
'AltClickAction=6'#013#010+
|
||||||
|
'CtrlClickAction=1'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Search]'#013#010+
|
||||||
|
'FindFlags=4'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Breakpoints]'#013#010+
|
||||||
|
'Count=0'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Watches]'#013#010+
|
||||||
|
'Count=0'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Preferences]'#013#010+
|
||||||
|
'DesktopFileFlags=209'#013#010+
|
||||||
|
'CenterCurrentLineWhile','Debugging=1'#013#010+
|
||||||
|
'AutoSaveFlags=7'#013#010+
|
||||||
|
'MiscOptions=6'#013#010+
|
||||||
|
'DesktopLocation=1'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Misc]'#013#010+
|
||||||
|
'ShowReadme=1'#013#010+
|
||||||
|
#013#010+
|
||||||
|
'[Files]'#013#010+
|
||||||
|
'OpenExts="*.pas;*.pp;*.inc"'#013#010
|
||||||
|
);
|
||||||
Loading…
Reference in New Issue
Block a user