更新编辑器

This commit is contained in:
liujianjun 2024-07-12 11:06:52 +08:00
parent fe3445e419
commit d25849910e
7 changed files with 17 additions and 87 deletions

View File

@ -422,7 +422,7 @@ type t_compile_config=class(tdcreateform)
end end
function format_build_params(d); function format_build_params(d);
begin begin
r := d["build"]+="="+format('"%s" ',d["buildfile"]); r := d["build"]+"="+format('"%s" ',d["buildfile"]);
if d["libpath"] and ifstring(d["libpath"]) then if d["libpath"] and ifstring(d["libpath"]) then
begin begin
r+="\r\n-libpath "+d["libpath"]+" "; r+="\r\n-libpath "+d["libpath"]+" ";

View File

@ -255,21 +255,7 @@ begin
end end
function deletefuncacheini(); function deletefuncacheini();
begin begin
plg := pluginpath(); return filedelete("",(TS_ModulePath()+"FunCache.ini"));
{$ifdef linux}
sp :="/";
{$else}
sp := "\\";
{$endif}
for i:= length(plg)-1 downto 1 do
begin
if plg[i]=sp then
begin
fn := plg[1:i]+"FunCache.ini";
r := filedelete("",fn);
return r;
end
end
end end
{$ifdef linux} {$ifdef linux}
function PostMessageA(hWnd:pointer;Msg:integer;wParam:pointer;lParam:pointer)begin end ; function PostMessageA(hWnd:pointer;Msg:integer;wParam:pointer;lParam:pointer)begin end ;

View File

@ -49,21 +49,7 @@ type TVclDesignerStart = class(TVclDesigner) //ʵ
end end
function deletefuncacheini(); function deletefuncacheini();
begin begin
plg := pluginpath(); return filedelete("",(TS_ModulePath()+"FunCache.ini"));
{$ifdef linux}
sp :="/";
{$else}
sp := "\\";
{$endif}
for i:= length(plg)-1 downto 1 do
begin
if plg[i]=sp then
begin
fn := plg[1:i]+"FunCache.ini";
r := filedelete("",fn);
return r;
end
end
end end
{$ifdef linux} {$ifdef linux}
function PostMessageA(); function PostMessageA();

View File

@ -1737,16 +1737,7 @@ type TTslChmHelp=class
function Create(); function Create();
begin begin
FChmName := "help\\LANGUAGEGUIDE.CHM"; FChmName := "help\\LANGUAGEGUIDE.CHM";
FTSLinterpPath := ""; FTSLinterpPath := TS_ModulePath();
n := pluginpath();
for i := length(n)-1 downto 3 do
begin
if n[i]="\\" then
begin
FTSLinterpPath := n[1:i];
break;
end
end
end end
property ChmName read FChmName write FChmName; property ChmName read FChmName write FChmName;
private private
@ -2244,16 +2235,7 @@ type TEditer=class(TCustomcontrol) //
end end
r["buildfile"] := f; r["buildfile"] := f;
r["resourcepat"] := "*.ini,*.tfm"; r["resourcepat"] := "*.ini,*.tfm";
fio := ioFileseparator(); ot := TS_ModulePath()+ it.scriptname+hz;
plg := pluginpath();
for i := length(plg)-1 downto 1 do
begin
if plg[i]=fio then
begin
ot := plg[1:i]+it.scriptname+hz;
break;
end
end
ds := getlibpathstr(); ds := getlibpathstr();
r["libpath"] := ds; r["libpath"] := ds;
if ot then r["output"] := ot; if ot then r["output"] := ot;
@ -4983,23 +4965,13 @@ type TEditerEchoWnd=class(TSynMemoNorm) //
end end
function build(dir,d); function build(dir,d);
begin begin
plg := pluginpath(); {$ifdef linux}
fio := ioFileseparator(); exe := TS_ModulePath()+"TSL" ;
for i := length(plg)-1 downto 1 do {$else}
begin exe := TS_ModulePath()+"tsl.exe" ;
if plg[i]=fio then {$endif}
begin if fileexists("",exe) then
{$ifdef linux} begin
exe := plg[1:i]+"TSL" ;
{$else}
exe := plg[1:i]+"tsl.exe";
{$endif}
break;
end
end
if fileexists("",exe) then
begin
AppendString("build:\r\n"); AppendString("build:\r\n");
cmd := "tsl "+format_build_params(d); cmd := "tsl "+format_build_params(d);
FProcess.StartupDirectory := dir; FProcess.StartupDirectory := dir;
@ -5011,7 +4983,7 @@ type TEditerEchoWnd=class(TSynMemoNorm) //
if r=0 then AppendString("±àÒëʧ°Ü!"); if r=0 then AppendString("±àÒëʧ°Ü!");
self.HighLighter := F_Highlighter; self.HighLighter := F_Highlighter;
return r; return r;
end end
//AppendString(format('%s %s\r\n',exe,cmd)); //AppendString(format('%s %s\r\n',exe,cmd));
end end
@ -5077,7 +5049,7 @@ type TEditerEchoWnd=class(TSynMemoNorm) //
private private
function format_build_params(d); function format_build_params(d);
begin begin
r := d["build"]+="="+format('"%s" ',d["buildfile"]); r := d["build"]+"="+format('"%s" ',d["buildfile"]);
if d["libpath"] and ifstring(d["libpath"]) then if d["libpath"] and ifstring(d["libpath"]) then
begin begin
r+="-libpath "+d["libpath"]+" "; r+="-libpath "+d["libpath"]+" ";

View File

@ -444,21 +444,7 @@ type TTslDebuga=class(TCustomControl)
end end
function deletefuncacheini(); function deletefuncacheini();
begin begin
plg := pluginpath(); return filedelete("",(TS_ModulePath()+"FunCache.ini"));
{$ifdef linux}
sp := "/";
{$else}
sp := "\\";
{$endif}
for i := length(plg)-1 downto 1 do
begin
if plg[i]=sp then
begin
fn := plg[1:i]+"FunCache.ini";
r := filedelete("",fn);
return r;
end
end
end end
public public
property runbtncall read frunbtncall write frunbtncall; property runbtncall read frunbtncall write frunbtncall;

Binary file not shown.

Binary file not shown.