编辑器

修正
This commit is contained in:
JianjunLiu
2023-10-27 11:46:40 +08:00
parent faf5a8aaa5
commit d742f8edfa
9 changed files with 34 additions and 46 deletions
-10
View File
@@ -78,13 +78,3 @@ function PostMessageA(hWnd:pointer;Msg:integer;wParam:pointer;lParam:pointer):in
function FindWindowA(lpClassName:string;lpWindowName:string):pointer;stdcall;external "User32.dll" name "FindWindowA";//引入api
{$endif}
function getdcompath();
begin
{$ifdef linux}
bpath := ".vcl/tsl/";
{$else}
bpath := TS_GetUserProfileHome();
{$endif}
return bpath+"designer"+ioFileseparator()+"dcmps"+ioFileseparator();
end
+2 -10
View File
@@ -87,16 +87,8 @@ type teditorform = class(TVCform) //
begin
inherited ;
GLobal G_OpenHostory;
//////////////////目录/////////////////////
{$ifdef linux}
home := sysgetenv("HOME");
if home then basepath := home+"/.vcl/";
else
basepath := ".vcl/";
{$else}
basepath := TS_GetUserProfileHome();
{$endif}
//////////////////目录/////////////////////
basepath := TS_GetUserProfileHome();
sp := ioFileseparator();
FCache := basepath+"editer"+sp+"cmpCaches";
FPathDirPath := basepath+"editer"+sp+"paths.tsm";
+6 -12
View File
@@ -331,14 +331,7 @@ type TProjectView = class(TVCForm) //
end
FTslEditer.ReadOnlyDirs := array(GetVCLdir());
fio := ioFileseparator();
{$ifdef linux}
home := sysgetenv("HOME");
if home then bpath := home+"/.vcl/";
else
bpath := ".vcl/";
{$else}
bpath := TS_GetUserProfileHome();
{$endif}
FTslEditer.TslCacheDir := bpath+"designer"+fio+"cmpCaches";
FCodeblockPath := bpath+"editer"+fio+"BlockManager.tsm";
Fhighlightpath := bpath+"editer"+fio+"highlight.tsm";
@@ -1542,7 +1535,12 @@ end
r := array();
r["build"] := "--buildexe";
r["buildfile"] := "."+"\\"+FExecEntry+".tsl";
r["output"] := "."+"\\"+FExecEntry+".exe";
{$ifdef linux}
hz := ".out";
{$else}
hz := ".exe";
{$endif}
r["output"] := "."+"\\"+FExecEntry+hz;
r["exports"] := "";
r["dependsdir"]:=".\\";
r["depends"]:="";
@@ -2218,11 +2216,7 @@ implementation
type TDesignerProjectsRecoder = class() //工程名记录
function Create();
begin
{$ifdef linux}
bpath := ".vcl/tsl/";
{$else}
bpath := TS_GetUserProfileHome();
{$endif}
ph := bpath+"designer"+ioFileseparator()+"ProjectsInfo.ini";
CreateDirWithFileName(ph);
FIni := new TIniFileExta("",ph);
+2 -2
View File
@@ -1609,7 +1609,8 @@ type TPageEditerItem=class(TPageItem)
for i := length(v) downto 1 do
begin
if v[i]=sp then
begin
begin
Caption := v[i+1:];
if ddex>i then
begin
fscriptname := v[(i+1):(ddex-1)];
@@ -1617,7 +1618,6 @@ type TPageEditerItem=class(TPageItem)
begin
fscriptname := v[i+1:];
end
Caption := fscriptname;
break;
end
if v[i]="." then
+1 -5
View File
@@ -2003,12 +2003,8 @@ type tdcompextmgr = class()
ffile ;
end
function getdesignerpath();
begin
{$ifdef linux}
bpath := ".vcl/tsl/";
{$else}
begin
bpath := TS_GetUserProfileHome();
{$endif}
return bpath+"designer"+ioFileseparator();
end
function getdesginerini();