jcf: use FPC resources for storing default config

git-svn-id: trunk@43107 -
This commit is contained in:
paul 2013-10-05 12:47:28 +00:00
parent 3409da264c
commit 4c9c1ca079
4 changed files with 12 additions and 183 deletions

2
.gitattributes vendored
View File

@ -1654,7 +1654,7 @@ components/jcf2/IdePlugin/lazarus/jcfidelazarus.lpk svneol=native#text/plain
components/jcf2/IdePlugin/lazarus/jcfidelazarus.pas svneol=native#text/pascal
components/jcf2/IdePlugin/lazarus/jcfidemain.pas svneol=native#text/pascal
components/jcf2/IdePlugin/lazarus/jcfideregister.pas svneol=native#text/pascal
components/jcf2/IdePlugin/lazarus/jcfsettings.lpi svneol=native#text/plain
components/jcf2/IdePlugin/lazarus/jcfsettings.res -text
components/jcf2/IdePlugin/lazarus/jcfuiconsts.pas svneol=native#text/plain
components/jcf2/IdePlugin/lazarus/languages/jcfideregister.cs.po svneol=native#text/plain
components/jcf2/IdePlugin/lazarus/languages/jcfideregister.de.po svneol=native#text/plain

View File

@ -36,12 +36,14 @@ uses
{ rtl }
SysUtils, Classes,
{ lcl }
LCLType, FileUtil, LResources;
LCLType, FileUtil;
procedure Register;
implementation
{$R jcfsettings.res}
uses
{ lazarus }
LazIDEIntf, MenuIntf, IdeCommands,
@ -85,23 +87,21 @@ end;
procedure SetLazarusDefaultFileName;
var
R: TLResource;
S: TFileStream;
R: TResourceStream;
begin
JCFOptsFile := AppendPathDelim(LazarusIDE.GetPrimaryConfigPath) + DefaultJCFOptsFile;
LazarusIDE.CopySecondaryConfigFile(DefaultJCFOptsFile);
if not FileExistsUTF8(JCFOptsFile) then
begin
// create default
R := LazarusResources.Find('JCFSettings', 'CFG');
if (R <> nil) and (R.Value <> '') then
begin
S := TFileStream.Create(UTF8ToSys(JCFOptsFile), fmCreate);
try
S.Write(R.Value[1], Length(R.Value));
finally
S.Free;
end;
R := TResourceStream.Create(HInstance, PChar('JCFSettings'), PChar(RT_RCDATA));
S := TFileStream.Create(UTF8ToSys(JCFOptsFile), fmCreate);
try
S.CopyFrom(R, R.Size);
finally
S.Free;
R.Free;
end;
end;
end;
@ -149,7 +149,6 @@ end;
initialization
{$I jcfsettings.lpi}
lcJCFIDE := TJcfIdeMain.Create;
finalization

View File

@ -1,170 +0,0 @@
LazarusResources.Add('JCFSettings','CFG',[
'<?xml version="1.0" ?>'#13#10'<JediCodeFormatSettings>'#13#10' <WriteVers'
+'ion> 2.44 </WriteVersion>'#13#10' <WriteDateTime> 40208.0415705324 </Wri'
+'teDateTime>'#13#10' <Description> format settings for use with Lazarus <'
+'/Description>'#13#10' <Obfuscate>'#13#10' <Enabled> False </Enabled>'
+#13#10' <Caps> 1 </Caps>'#13#10' <RemoveComments> True </RemoveCom'
+'ments>'#13#10' <RemoveWhiteSpace> True </RemoveWhiteSpace>'#13#10' '
+' <RemoveIndent> True </RemoveIndent>'#13#10' <RebreakLines> True </Re'
+'breakLines>'#13#10' </Obfuscate>'#13#10' <Clarify>'#13#10' <OnceOffs'
+'> 0 </OnceOffs>'#13#10' <Warnings> True </Warnings>'#13#10' <Warn'
+'UnusedParams> False </WarnUnusedParams>'#13#10' <IgnoreUnusedParams> S'
+'ender </IgnoreUnusedParams>'#13#10' <FileExtensions> dpr,lpr,pas,pp </'
+'FileExtensions>'#13#10' </Clarify>'#13#10' <Indent>'#13#10' <Indenta'
+'tionSpaces> 2 </IndentationSpaces>'#13#10' <FirstLevelIndent> 0 </Firs'
+'tLevelIndent>'#13#10' <HasFirstLevelIndent> False </HasFirstLevelInden'
+'t>'#13#10' <IndentBeginEnd> False </IndentBeginEnd>'#13#10' <Inde'
+'ntbeginEndSpaces> 2 </IndentbeginEndSpaces>'#13#10' <IndentLibraryProc'
+'s> True </IndentLibraryProcs>'#13#10' <IndentProcedureBody> False </In'
+'dentProcedureBody>'#13#10' <KeepCommentsWithCodeInGlobals> True </Keep'
+'CommentsWithCodeInGlobals>'#13#10' <KeepCommentsWithCodeInProcs> True '
+'</KeepCommentsWithCodeInProcs>'#13#10' <KeepCommentsWithCodeInClassDef'
+'> True </KeepCommentsWithCodeInClassDef>'#13#10' <KeepCommentsWithCode'
+'Elsewhere> True </KeepCommentsWithCodeElsewhere>'#13#10' <IndentElse> '
+'False </IndentElse>'#13#10' <IndentCaseElse> True </IndentCaseElse>'#13
+#10' <IndentNestedTypes> False </IndentNestedTypes>'#13#10' <Inden'
+'tVarAndConstInClass> False </IndentVarAndConstInClass>'#13#10' </Indent>'
+#13#10' <Spaces>'#13#10' <TabsToSpaces> True </TabsToSpaces>'#13#10' '
+' <SpacesToTabs> False </SpacesToTabs>'#13#10' <SpacesPerTab> 2 </Sp'
+'acesPerTab>'#13#10' <SpacesForTab> 2 </SpacesForTab>'#13#10' <Fix'
+'Spacing> True </FixSpacing>'#13#10' <SpaceBeforeClassHeritage> False <'
+'/SpaceBeforeClassHeritage>'#13#10' <SpacesBeforeColonVar> 0 </SpacesBe'
+'foreColonVar>'#13#10' <SpacesBeforeColonConst> 0 </SpacesBeforeColonCo'
+'nst>'#13#10' <SpacesBeforeColonParam> 0 </SpacesBeforeColonParam>'#13
+#10' <SpacesBeforeColonFn> 0 </SpacesBeforeColonFn>'#13#10' <Space'
+'sBeforeColonClassVar> 0 </SpacesBeforeColonClassVar>'#13#10' <SpacesBe'
+'foreColonRecordField> 0 </SpacesBeforeColonRecordField>'#13#10' <Space'
+'sBeforeColonCaseLabel> 0 </SpacesBeforeColonCaseLabel>'#13#10' <Spaces'
+'BeforeColonLabel> 0 </SpacesBeforeColonLabel>'#13#10' <SpacesBeforeCol'
+'onInGeneric> 0 </SpacesBeforeColonInGeneric>'#13#10' <MaxSpacesInCode>'
+' 2 </MaxSpacesInCode>'#13#10' <UseMaxSpacesInCode> True </UseMaxSpaces'
+'InCode>'#13#10' <SpaceForOperator> 0 </SpaceForOperator>'#13#10' '
+'<SpaceBeforeOpenBracketsInFunctionDeclaration> False </SpaceBeforeOpenBrack'
+'etsInFunctionDeclaration>'#13#10' <SpaceBeforeOpenBracketsInFunctionCa'
+'ll> False </SpaceBeforeOpenBracketsInFunctionCall>'#13#10' <SpaceBefor'
+'eOpenSquareBracketsInExpression> False </SpaceBeforeOpenSquareBracketsInExp'
+'ression>'#13#10' <SpaceAfterOpenBrackets> False </SpaceAfterOpenBracke'
+'ts>'#13#10' <SpaceBeforeCloseBrackets> False </SpaceBeforeCloseBracket'
+'s>'#13#10' <MoveSpaceToBeforeColon> False </MoveSpaceToBeforeColon>'#13
+#10' </Spaces>'#13#10' <Returns>'#13#10' <WhenRebreakLines> 2 </WhenR'
+'ebreakLines>'#13#10' <MaxLineLength> 90 </MaxLineLength>'#13#10' '
+'<NumReturnsAfterFinalEnd> 1 </NumReturnsAfterFinalEnd>'#13#10' <Remove'
+'BadReturns> True </RemoveBadReturns>'#13#10' <AddGoodReturns> True </A'
+'ddGoodReturns>'#13#10' <UsesOnePerLine> False </UsesOnePerLine>'#13#10
+' <BreakAfterUses> False </BreakAfterUses>'#13#10' <RemoveExpressi'
+'onReturns> True </RemoveExpressionReturns>'#13#10' <RemoveVarReturns> '
+'True </RemoveVarReturns>'#13#10' <NoReturnsInProperty> True </NoReturn'
+'sInProperty>'#13#10' <RemoveProcedureDefReturns> True </RemoveProcedur'
+'eDefReturns>'#13#10' <RemoveReturns> True </RemoveReturns>'#13#10' '
+' <RemoveVarBlankLines> True </RemoveVarBlankLines>'#13#10' <RemovePro'
+'cHeaderBlankLines> True </RemoveProcHeaderBlankLines>'#13#10' <Block> '
+'1 </Block>'#13#10' <BlockBegin> 0 </BlockBegin>'#13#10' <Label> 1'
+' </Label>'#13#10' <LabelBegin> 1 </LabelBegin>'#13#10' <CaseLabel'
+'> 1 </CaseLabel>'#13#10' <CaseBegin> 1 </CaseBegin>'#13#10' <Case'
+'Else> 0 </CaseElse>'#13#10' <CaseElseBegin> 0 </CaseElseBegin>'#13#10
+' <EndElse> 0 </EndElse>'#13#10' <ElseIf> 1 </ElseIf>'#13#10' '
,' <ElseBegin> 0 </ElseBegin>'#13#10' <BeforeCompilerDirectUses> 1 </Bef'
+'oreCompilerDirectUses>'#13#10' <BeforeCompilerDirectStatements> 0 </Be'
+'foreCompilerDirectStatements>'#13#10' <BeforeCompilerDirectGeneral> 1 '
+'</BeforeCompilerDirectGeneral>'#13#10' <AfterCompilerDirectUses> 1 </A'
+'fterCompilerDirectUses>'#13#10' <AfterCompilerDirectStatements> 0 </Af'
+'terCompilerDirectStatements>'#13#10' <AfterCompilerDirectGeneral> 1 </'
+'AfterCompilerDirectGeneral>'#13#10' <ReturnChars> 0 </ReturnChars>'#13
+#10' <RemoveConsecutiveBlankLines> True </RemoveConsecutiveBlankLines>'
+#13#10' <MaxConsecutiveBlankLines> 4 </MaxConsecutiveBlankLines>'#13#10
+' <MaxBlankLinesInSection> 1 </MaxBlankLinesInSection>'#13#10' <Li'
+'nesBeforeProcedure> 1 </LinesBeforeProcedure>'#13#10' </Returns>'#13#10' '
+'<Comments>'#13#10' <RemoveEmptyDoubleSlashComments> True </RemoveEmpty'
+'DoubleSlashComments>'#13#10' <RemoveEmptyCurlyBraceComments> True </Re'
+'moveEmptyCurlyBraceComments>'#13#10' </Comments>'#13#10' <Capitalisation>'
+#13#10' <Enabled> True </Enabled>'#13#10' <ReservedWords> 1 </Rese'
+'rvedWords>'#13#10' <Operators> 1 </Operators>'#13#10' <Directives'
+'> 1 </Directives>'#13#10' <Constants> 1 </Constants>'#13#10' <Typ'
+'es> 1 </Types>'#13#10' </Capitalisation>'#13#10' <SpecificWordCaps>'#13#10
+' <Enabled> True </Enabled>'#13#10' <Words> </Words>'#13#10' </S'
+'pecificWordCaps>'#13#10' <Identifiers>'#13#10' <Enabled> True </Enabl'
+'ed>'#13#10' <Words> ActivePage,AnsiCompareStr,AnsiCompareText,AnsiUppe'
+'rCase,AsBoolean,AsDateTime,AsFloat,AsInteger,Assign,AsString,AsVariant,Begi'
+'nDrag,Buttons,Caption,Checked,Classes,ClassName,Clear,Close,Components,Cont'
+'rols,Count,Create,Data,Dec,Delete,Destroy,Dialogs,Enabled,EndDrag,EOF,Excep'
+'tion,Execute,False,FieldByName,First,Forms,Free,FreeAndNil,GetFirstChild,Gr'
+'aphics,Height,idAbort,idCancel,idIgnore,IDispatch,idNo,idOk,idRetry,idYes,I'
+'nc,Initialize,IntToStr,ItemIndex,IUnknown,Lines,Math,MaxValue,mbAbort,mbAll'
+',mbCancel,mbHelp,mbIgnore,mbNo,mbOK,mbRetry,mbYes,mbYesToAll,Messages,MinVa'
+'lue,mnNoToAll,mrAbort,mrAll,mrCancel,mrIgnore,mrNo,mrNone,mrNoToAll,mrOk,mr'
+'Retry,mrYes,mrYesToAll,mtConfirmation,mtCustom,mtError,mtInformation,mtWarn'
+'ing,Name,Next,Open,Ord,ParamStr,PChar,Perform,ProcessMessages,Read,ReadOnly'
+',RecordCount,Register,Release,Result,Sender,SetFocus,Show,ShowMessage,Sourc'
+'e,StdCtrls,StrToInt,SysUtils,TAutoObject,TButton,TComponent,TDataModule,Tex'
+'t,TForm,TFrame,TList,TNotifyEvent,TObject,TObjectList,TPageControl,TPersist'
+'ent,True,TStringList,TStrings,TTabSheet,Unassigned,Value,Visible,WideString'
+',Width,Windows,Write </Words>'#13#10' </Identifiers>'#13#10' <NotIdent>'
+#13#10' <Enabled> True </Enabled>'#13#10' <Words> False,Name,nil,P'
+'Char,read,ReadOnly,True,WideString,write </Words>'#13#10' </NotIdent>'#13
+#10' <UnitNameCaps>'#13#10' <Enabled> True </Enabled>'#13#10' <Wo'
+'rds> ActnColorMaps,ActnCtrls,ActnList,ActnMan,ActnMenus,ActnPopup,ActnRes,A'
+'DOConst,ADODB,ADOInt,AppEvnts,AxCtrls,BandActn,bdeconst,bdemts,Buttons,Chec'
+'kLst,Classes,Clipbrd.pas,CmAdmCtl,ComCtrls,ComStrs,Consts,Controls,CtlConst'
+'s,CtlPanel,CustomizeDlg,DataBkr,DB,DBActns,dbcgrids,DBClient,DBClientActnRe'
+'s,DBClientActns,DBCommon,DBConnAdmin,DBConsts,DBCtrls,DbExcept,DBGrids,DBLo'
+'cal,DBLocalI,DBLogDlg,dblookup,DBOleCtl,DBPWDlg,DBTables,DBXpress,DdeMan,Di'
+'alogs,DrTable,DSIntf,ExtActns,ExtCtrls,ExtDlgs,FileCtrl,FMTBcd,Forms,Graphi'
+'cs,GraphUtil,Grids,HTTPIntr,IB,IBBlob,IBCustomDataSet,IBDatabase,IBDatabase'
+'Info,IBDCLConst,IBErrorCodes,IBEvents,IBExternals,IBExtract,IBGeneratorEdit'
+'or,IBHeader,IBIntf,IBQuery,IBRestoreEditor,IBSecurityEditor,IBServiceEditor'
+',IBSQL,IBSQLMonitor,IBStoredProc,IBTable,IBUpdateSQL,IBUtils,IBXConst,ImgLi'
+'st,Jcl8087,JclAbstractContainers,JclAlgorithms,JclAnsiStrings,JclAppInst,Jc'
+'lArrayLists,JclArraySets,JclBase,JclBinaryTrees,JclBorlandTools,JclCIL,JclC'
+'LR,JclCOM,JclComplex,JclCompression,JclConsole,JclContainerIntf,JclCounter,'
+'JclDateTime,JclDebug,JclDotNet,JclEDI,JclEDI_ANSIX12,JclEDI_ANSIX12_Ext,Jcl'
+'EDI_UNEDIFACT,JclEDI_UNEDIFACT_Ext,JclEDISEF,JclEDITranslators,JclEDIXML,Jc'
+'lExprEval,JclFileUtils,JclFont,JclGraphics,JclGraphUtils,JclHashMaps,JclHas'
+'hSets,JclHookExcept,JclIniFiles,JclLANMan,JclLinkedLists,JclLocales,JclLogi'
+'c,JclMapi,JclMath,JclMetadata,JclMIDI,JclMime,JclMiscel,JclMsdosSys,JclMult'
+'imedia,JclNTFS,JclPCRE,JclPeImage,JclPrint,JclQGraphics,JclQGraphUtils,JclQ'
+'ueues,JclRegistry,JclResources,JclRTTI,JclSchedule,JclSecurity,JclShell,Jcl'
+'SimpleXml,JclStacks,JclStatistics,JclStreams,JclStrHashMap,JclStringLists,J'
+'clStrings,JclStructStorage,JclSvcCtrl,JclSynch,JclSysInfo,JclSysUtils,JclTa'
+'sk,JclTD32,JclUnicode,JclUnitConv,JclUnitVersioning,JclUnitVersioningProvid'
+'ers,JclValidation,JclVectors,JclWideFormat,JclWideStrings,JclWin32,JclWin32'
,'Ex,JclWinMIDI,ListActns,Mask,MConnect,Menus,Midas,MidasCon,MidConst,MPlayer'
+',MtsRdm,Mxconsts,ObjBrkr,OleAuto,OleConst,OleCtnrs,OleCtrls,OleDB,OleServer'
+',Outline,Printers,Provider,recerror,ScktCnst,ScktComp,ScktMain,SConnect,Sha'
+'dowWnd,SimpleDS,SMINTF,SqlConst,SqlExpr,SqlTimSt,StdActnMenus,StdActns,StdC'
+'trls,StdStyleActnCtrls,SvcMgr,SysUtils,TabNotBk,Tabs,TConnect,Themes,ToolWi'
+'n,ValEdit,VDBConsts,WinHelpViewer,XPActnCtrls,XPMan,XPStyleActnCtrls </Word'
+'s>'#13#10' </UnitNameCaps>'#13#10' <Asm>'#13#10' <Caps> 0 </Caps>'#13
+#10' <BreaksAfterLabel> 1 </BreaksAfterLabel>'#13#10' <BreaksAfter'
+'LabelEnabled> True </BreaksAfterLabelEnabled>'#13#10' <StatementIndent'
+'Enabled> True </StatementIndentEnabled>'#13#10' <StatementIndent> 7 </'
+'StatementIndent>'#13#10' <ParamsIndentEnabled> True </ParamsIndentEnab'
+'led>'#13#10' <ParamsIndent> 15 </ParamsIndent>'#13#10' </Asm>'#13#10
+' <PreProcessor>'#13#10' <Enabled> False </Enabled>'#13#10' <Defi'
+'nedSymbols> MSWINDOWS </DefinedSymbols>'#13#10' <DefinedOptions> </De'
+'finedOptions>'#13#10' </PreProcessor>'#13#10' <Align>'#13#10' <Align'
+'Assign> False </AlignAssign>'#13#10' <AlignConst> False </AlignConst>'
+#13#10' <AlignTypedef> False </AlignTypedef>'#13#10' <AlignVars> F'
+'alse </AlignVars>'#13#10' <AlignComment> False </AlignComment>'#13#10
+' <AlignFields> False </AlignFields>'#13#10' <InterfaceOnly> False'
+' </InterfaceOnly>'#13#10' <MinColumn> 2 </MinColumn>'#13#10' <Max'
+'Column> 60 </MaxColumn>'#13#10' <MaxVariance> 5 </MaxVariance>'#13#10
+' <MaxVarianceInterface> 5 </MaxVarianceInterface>'#13#10' <MaxUna'
+'lignedStatements> 0 </MaxUnalignedStatements>'#13#10' </Align>'#13#10' <R'
+'eplace>'#13#10' <Enabled> False </Enabled>'#13#10' <Words> </Wor'
+'ds>'#13#10' </Replace>'#13#10' <Uses>'#13#10' <RemoveEnabled> False '
+'</RemoveEnabled>'#13#10' <InsertInterfaceEnabled> False </InsertInterf'
+'aceEnabled>'#13#10' <InsertImplementationEnabled> False </InsertImplem'
+'entationEnabled>'#13#10' <FindReplaceEnabled> False </FindReplaceEnabl'
+'ed>'#13#10' <Remove> </Remove>'#13#10' <InsertInterface> </Inse'
+'rtInterface>'#13#10' <InsertImplementation> </InsertImplementation>'
+#13#10' <Find> </Find>'#13#10' <Replace> </Replace>'#13#10' </U'
+'ses>'#13#10' <Transform>'#13#10' <BeginEndStyle> 1 </BeginEndStyle>'
+#13#10' <AddBlockEndSemicolon> True </AddBlockEndSemicolon>'#13#10' '
+' <SortUsesInterface> False </SortUsesInterface>'#13#10' <SortUsesImpl'
+'mentation> False </SortUsesImplmentation>'#13#10' <SortUsesProgram> Fa'
+'lse </SortUsesProgram>'#13#10' <SortUsesBreakOnReturn> False </SortUse'
+'sBreakOnReturn>'#13#10' <SortUsesBreakOnComment> False </SortUsesBreak'
+'OnComment>'#13#10' <SortUsesSortOrder> 0 </SortUsesSortOrder>'#13#10' '
+' <SortUsesNoComments> False </SortUsesNoComments>'#13#10' </Transform>'
+#13#10'</JediCodeFormatSettings>'#13#10
]);

Binary file not shown.