"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/proc_install_zip.pas" between
CudaText-1.92.0.tar.gz and CudaText-1.93.0.tar.gz

About: CudaText is a cross-platform text editor (written in Lazarus).

proc_install_zip.pas  (CudaText-1.92.0):proc_install_zip.pas  (CudaText-1.93.0)
skipping to change at line 357 skipping to change at line 357
FreeAndNil(ini); FreeAndNil(ini);
end; end;
end; end;
procedure DoInstallLexer( procedure DoInstallLexer(
const AFilenameInf, ADirAcp: string; const AFilenameInf, ADirAcp: string;
out AReport: string); out AReport: string);
var var
i_sub: integer; i_sub: integer;
ini_section, ini_section,
s_lexer, fn_lexer, fn_acp, fn_lexmap, fn_json: string; s_lexer, fn_lexer, fn_acp, fn_lexmap, fn_lexmap_final, fn_json: string;
an, an_sub: TecSyntAnalyzer; an, an_sub: TecSyntAnalyzer;
ini_file, ini_lexmap: TIniFile; ini_file: TIniFile;
sections: TStringList; sections: TStringList;
DirLexers, DirSettings: string; DirLexers, DirSettings: string;
begin begin
AReport:= ''; AReport:= '';
DirLexers:= AppDir_Lexers; DirLexers:= AppDir_Lexers;
DirSettings:= AppDir_SettingsDefault; DirSettings:= AppDir_SettingsDefault;
ini_file:= TIniFile.Create(AFilenameInf); ini_file:= TIniFile.Create(AFilenameInf);
sections:= TStringList.Create; sections:= TStringList.Create;
skipping to change at line 398 skipping to change at line 398
exit exit
end; end;
if FileExists(fn_lexer) then if FileExists(fn_lexer) then
begin begin
CopyFile(fn_lexer, DirLexers+DirectorySeparator+ExtractFileName(fn_lexer )); CopyFile(fn_lexer, DirLexers+DirectorySeparator+ExtractFileName(fn_lexer ));
AReport:= AReport+msgStatusPackageLexer+' '+s_lexer+#10; AReport:= AReport+msgStatusPackageLexer+' '+s_lexer+#10;
end; end;
if FileExists(fn_lexmap) then if FileExists(fn_lexmap) then
CopyFile(fn_lexmap, DirLexers+DirectorySeparator+ExtractFileName(fn_lexm begin
ap)) fn_lexmap_final:= DirLexers+DirectorySeparator+ExtractFileName(fn_lexmap
);
CopyFile(fn_lexmap, fn_lexmap_final);
end
else else
AReport:= AReport+msgStatusPackageMissedLexerMap+#10; AReport:= AReport+msgStatusPackageMissedLexerMap+#10;
if FileExists(fn_json) then if FileExists(fn_json) then
begin begin
CopyFile(fn_json, DirSettings+DirectorySeparator+ExtractFileName(fn_json )); CopyFile(fn_json, DirSettings+DirectorySeparator+ExtractFileName(fn_json ));
AReport:= AReport+msgStatusPackageLexerSettings+' '+s_lexer+#10; AReport:= AReport+msgStatusPackageLexerSettings+' '+s_lexer+#10;
end; end;
if FileExists(fn_acp) then if FileExists(fn_acp) then
skipping to change at line 432 skipping to change at line 435
if not UiOps.LexerThemes then if not UiOps.LexerThemes then
begin begin
DoLoadLexerStylesFromFile_JsonLexerOps(an, GetAppLexerOpsFilename(an.Lex erName), false); DoLoadLexerStylesFromFile_JsonLexerOps(an, GetAppLexerOpsFilename(an.Lex erName), false);
end; end;
//set sublexer links //set sublexer links
for i_sub:= 0 to an.SubAnalyzers.Count-1 do for i_sub:= 0 to an.SubAnalyzers.Count-1 do
begin begin
s_lexer:= ini_file.ReadString(ini_section, 'link'+Inttostr(i_sub+1), '') ; s_lexer:= ini_file.ReadString(ini_section, 'link'+Inttostr(i_sub+1), '') ;
if s_lexer='' then Continue; if s_lexer='' then Continue;
if s_lexer='Style sheets' then s_lexer:= 'CSS';
if s_lexer='Assembler' then s_lexer:= 'Assembly';
{
//write [ref] section in cuda-lexmap //write [ref] section in cuda-lexmap
ini_lexmap:= TIniFile.Create(DirLexers+DirectorySeparator+ExtractFileNam e(fn_lexmap)); ini_lexmap:= TIniFile.Create(fn_lexmap_final);
try try
ini_lexmap.WriteString('ref', IntToStr(i_sub), s_lexer); ini_lexmap.WriteString('ref', IntToStr(i_sub), s_lexer);
finally finally
FreeAndNil(ini_lexmap); FreeAndNil(ini_lexmap);
end; end;
}
an_sub:= AppManager.FindLexerByName(s_lexer); an_sub:= AppManager.FindLexerByName(s_lexer);
if an_sub<>nil then if an_sub<>nil then
begin begin
an.SubAnalyzers.Items[i_sub].SyntAnalyzer:= an_sub; an.SubAnalyzers.Items[i_sub].SyntAnalyzer:= an_sub;
//MsgBox('Linked lexer "'+an.LexerName+'" to "'+s_lexer+'"', mb_ok or MB_ICONINFORMATION); //MsgBox('Linked lexer "'+an.LexerName+'" to "'+s_lexer+'"', mb_ok or MB_ICONINFORMATION);
end end
else else
begin begin
AReport:= AReport+(msgCannotFindSublexerInLibrary+' '+s_lexer)+#10; AReport:= AReport+(msgCannotFindSublexerInLibrary+' '+s_lexer)+#10;
 End of changes. 7 change blocks. 
7 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)