diff --git a/designer/ctl_mgr/t_compile_config.tsf b/designer/ctl_mgr/t_compile_config.tsf index 6e2b073..3fc2308 100644 --- a/designer/ctl_mgr/t_compile_config.tsf +++ b/designer/ctl_mgr/t_compile_config.tsf @@ -422,7 +422,7 @@ type t_compile_config=class(tdcreateform) end function format_build_params(d); begin - r := d["build"]+="="+format('"%s" ',d["buildfile"]); + r := d["build"]+"="+format('"%s" ',d["buildfile"]); if d["libpath"] and ifstring(d["libpath"]) then begin r+="\r\n-libpath "+d["libpath"]+" "; diff --git a/designer/gettsleditorstart.tsf b/designer/gettsleditorstart.tsf index c340d15..8345082 100644 --- a/designer/gettsleditorstart.tsf +++ b/designer/gettsleditorstart.tsf @@ -255,21 +255,7 @@ begin end function deletefuncacheini(); begin - plg := pluginpath(); - {$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 + return filedelete("",(TS_ModulePath()+"FunCache.ini")); end {$ifdef linux} function PostMessageA(hWnd:pointer;Msg:integer;wParam:pointer;lParam:pointer)begin end ; diff --git a/designer/gettslvcldesignerstart.tsf b/designer/gettslvcldesignerstart.tsf index c3afdcf..a6837bb 100644 --- a/designer/gettslvcldesignerstart.tsf +++ b/designer/gettslvcldesignerstart.tsf @@ -49,21 +49,7 @@ type TVclDesignerStart = class(TVclDesigner) //ʵ end function deletefuncacheini(); begin - plg := pluginpath(); - {$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 + return filedelete("",(TS_ModulePath()+"FunCache.ini")); end {$ifdef linux} function PostMessageA(); diff --git a/designer/utslcodeeditor.tsf b/designer/utslcodeeditor.tsf index 3be71ae..3ff9225 100644 --- a/designer/utslcodeeditor.tsf +++ b/designer/utslcodeeditor.tsf @@ -1737,16 +1737,7 @@ type TTslChmHelp=class function Create(); begin FChmName := "help\\LANGUAGEGUIDE.CHM"; - FTSLinterpPath := ""; - n := pluginpath(); - for i := length(n)-1 downto 3 do - begin - if n[i]="\\" then - begin - FTSLinterpPath := n[1:i]; - break; - end - end + FTSLinterpPath := TS_ModulePath(); end property ChmName read FChmName write FChmName; private @@ -2243,17 +2234,8 @@ type TEditer=class(TCustomcontrol) // {$endif} end r["buildfile"] := f; - r["resourcepat"] := "*.ini,*.tfm"; - fio := ioFileseparator(); - 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 + r["resourcepat"] := "*.ini,*.tfm"; + ot := TS_ModulePath()+ it.scriptname+hz; ds := getlibpathstr(); r["libpath"] := ds; if ot then r["output"] := ot; @@ -4982,24 +4964,14 @@ type TEditerEchoWnd=class(TSynMemoNorm) // return true; end function build(dir,d); - begin - plg := pluginpath(); - fio := ioFileseparator(); - for i := length(plg)-1 downto 1 do - begin - if plg[i]=fio then - begin -{$ifdef linux} - exe := plg[1:i]+"TSL" ; -{$else} - exe := plg[1:i]+"tsl.exe"; -{$endif} - break; - - end - end - if fileexists("",exe) then - begin + begin + {$ifdef linux} + exe := TS_ModulePath()+"TSL" ; + {$else} + exe := TS_ModulePath()+"tsl.exe" ; + {$endif} + if fileexists("",exe) then + begin AppendString("build:\r\n"); cmd := "tsl "+format_build_params(d); FProcess.StartupDirectory := dir; @@ -5011,7 +4983,7 @@ type TEditerEchoWnd=class(TSynMemoNorm) // if r=0 then AppendString("±àÒëʧ°Ü!"); self.HighLighter := F_Highlighter; return r; - end + end //AppendString(format('%s %s\r\n',exe,cmd)); end @@ -5077,7 +5049,7 @@ type TEditerEchoWnd=class(TSynMemoNorm) // private function format_build_params(d); begin - r := d["build"]+="="+format('"%s" ',d["buildfile"]); + r := d["build"]+"="+format('"%s" ',d["buildfile"]); if d["libpath"] and ifstring(d["libpath"]) then begin r+="-libpath "+d["libpath"]+" "; diff --git a/designer/utslvcldebuger.tsf b/designer/utslvcldebuger.tsf index 465c55c..32dd7c0 100644 --- a/designer/utslvcldebuger.tsf +++ b/designer/utslvcldebuger.tsf @@ -444,21 +444,7 @@ type TTslDebuga=class(TCustomControl) end function deletefuncacheini(); begin - plg := pluginpath(); - {$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 + return filedelete("",(TS_ModulePath()+"FunCache.ini")); end public property runbtncall read frunbtncall write frunbtncall; diff --git a/tsleditor.exe b/tsleditor.exe index 853fb13..26f9758 100644 Binary files a/tsleditor.exe and b/tsleditor.exe differ diff --git a/tslvcltool.exe b/tslvcltool.exe index c5277a7..70ab806 100644 Binary files a/tslvcltool.exe and b/tslvcltool.exe differ