编辑器
修正
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -88,15 +88,7 @@ type teditorform = class(TVCform) //
|
||||
inherited ;
|
||||
GLobal G_OpenHostory;
|
||||
//////////////////目录/////////////////////
|
||||
{$ifdef linux}
|
||||
home := sysgetenv("HOME");
|
||||
if home then basepath := home+"/.vcl/";
|
||||
else
|
||||
basepath := ".vcl/";
|
||||
|
||||
{$else}
|
||||
basepath := TS_GetUserProfileHome();
|
||||
{$endif}
|
||||
sp := ioFileseparator();
|
||||
FCache := basepath+"editer"+sp+"cmpCaches";
|
||||
FPathDirPath := basepath+"editer"+sp+"paths.tsm";
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1610,6 +1610,7 @@ type TPageEditerItem=class(TPageItem)
|
||||
begin
|
||||
if v[i]=sp then
|
||||
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
|
||||
|
||||
@@ -2004,11 +2004,7 @@ type tdcompextmgr = class()
|
||||
end
|
||||
function getdesignerpath();
|
||||
begin
|
||||
{$ifdef linux}
|
||||
bpath := ".vcl/tsl/";
|
||||
{$else}
|
||||
bpath := TS_GetUserProfileHome();
|
||||
{$endif}
|
||||
return bpath+"designer"+ioFileseparator();
|
||||
end
|
||||
function getdesginerini();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
LOCKFILE=/tmp/$(basename "$0").lock
|
||||
#! LOCKFILE=/tmp/tsldesginer.lock
|
||||
LOCKFILE=/tmp/tsleditor.lock
|
||||
if [ -e ${LOCKFILE} ] && kill -0 `cat ${LOCKFILE}`; then
|
||||
echo " $0 already running"
|
||||
exit
|
||||
@@ -10,9 +11,10 @@ trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT
|
||||
#将当前程序进程id写入锁文件
|
||||
echo $$ > ${LOCKFILE}
|
||||
# 做你需要的事情
|
||||
TSLPATH=$(dirname $(dirname $(realpath $0) ))
|
||||
export GDK_BACKEND=x11
|
||||
export LD_LIBRARY_PATH=../
|
||||
../TSL ../exec_tsl/vcldesigner.tsl -libpath ../designer/
|
||||
export LD_LIBRARY_PATH="${TSLPATH}/"
|
||||
"${TSLPATH}/TSL" "${TSLPATH}/exec_tsl/vcldesigner.tsl" -libpath "${TSLPATH}/designer/"
|
||||
|
||||
# sleep 1000
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
LOCKFILE=/tmp/$(basename "$0").lock
|
||||
#! LOCKFILE=/tmp/$(basename "$0").lock
|
||||
LOCKFILE=/tmp/tsleditor.lock
|
||||
if [ -e ${LOCKFILE} ] && kill -0 `cat ${LOCKFILE}`; then
|
||||
echo " $0 already running"
|
||||
exit
|
||||
@@ -11,7 +12,9 @@ trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT
|
||||
echo $$ > ${LOCKFILE}
|
||||
# 做你需要的事情
|
||||
export GDK_BACKEND=x11
|
||||
export LD_LIBRARY_PATH=../;../TSL ../exec_tsl/tsleditor.tsl -libpath ../designer/
|
||||
TSLPATH=$(dirname $(dirname $(realpath $0) ))
|
||||
export LD_LIBRARY_PATH="${TSLPATH}/"
|
||||
"${TSLPATH}/TSL" "${TSLPATH}/exec_tsl/tsleditor.tsl" -libpath "${TSLPATH}/designer/"
|
||||
|
||||
# sleep 1000
|
||||
|
||||
|
||||
@@ -8618,7 +8618,7 @@ type tgtk_ctl_window_PoPup = class(tgtk_ctl_scroll_window)
|
||||
end
|
||||
function GtkBaseEventName();override;
|
||||
begin
|
||||
return inherited union2 array("configure-event","delete-event","scroll-event","activate-default");
|
||||
return inherited union2 array("configure-event","delete-event","scroll-event"{,"activate-default"});
|
||||
end
|
||||
function CreateWnd(dwExStyle,lpClassName,lpWindowName,dwStyle,x,y,nwidth,nheight,hwndparent,hmenu,hinstance,lpParam);override;
|
||||
begin
|
||||
|
||||
@@ -3453,7 +3453,18 @@ begin
|
||||
ph += vi;
|
||||
end
|
||||
end
|
||||
function TS_GetUserProfileHome():string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetUserProfileHome";
|
||||
{$ifdef linux}
|
||||
function TS_GetUserProfileHome();
|
||||
begin
|
||||
home := sysgetenv("HOME");
|
||||
if home then bpath := home+"/.vcl/";
|
||||
else
|
||||
bpath := ".vcl/";
|
||||
return bpath;
|
||||
end
|
||||
{$else}
|
||||
function TS_GetUserProfileHome():string;cdecl;external "TSSVRAPI.dll" name "TS_GetUserProfileHome";
|
||||
{$endif}
|
||||
function TS_GetUserProfileHomeInstance(t:integer):string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetUserProfileHomeInstance";
|
||||
function TS_GetUserConfigHome(t:integer):string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetUserConfigHome";
|
||||
function TS_GetHomePath(t:integer):string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetHomePath";
|
||||
|
||||
Reference in New Issue
Block a user