diff --git a/designer/gettslvcldesignerstart.tsf b/designer/gettslvcldesignerstart.tsf index 77d7530..c3afdcf 100644 --- a/designer/gettslvcldesignerstart.tsf +++ b/designer/gettslvcldesignerstart.tsf @@ -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 - diff --git a/designer/teditorform.tsf b/designer/teditorform.tsf index e87906e..7665715 100644 --- a/designer/teditorform.tsf +++ b/designer/teditorform.tsf @@ -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"; diff --git a/designer/udesignerproject.tsf b/designer/udesignerproject.tsf index c5e6860..0182ec0 100644 --- a/designer/udesignerproject.tsf +++ b/designer/udesignerproject.tsf @@ -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); diff --git a/designer/utslcodeeditor.tsf b/designer/utslcodeeditor.tsf index a5de95b..fb83214 100644 --- a/designer/utslcodeeditor.tsf +++ b/designer/utslcodeeditor.tsf @@ -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 diff --git a/designer/utslvcldesigner.tsf b/designer/utslvcldesigner.tsf index e4d2944..06803f5 100644 --- a/designer/utslvcldesigner.tsf +++ b/designer/utslvcldesigner.tsf @@ -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(); diff --git a/exec_tsl/tsldesigner.sh b/exec_tsl/tsldesigner.sh index ddb4f7a..c943c3c 100644 --- a/exec_tsl/tsldesigner.sh +++ b/exec_tsl/tsldesigner.sh @@ -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 diff --git a/exec_tsl/tsleditor.sh b/exec_tsl/tsleditor.sh index 865c96c..22a281d 100644 --- a/exec_tsl/tsleditor.sh +++ b/exec_tsl/tsleditor.sh @@ -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 diff --git a/funcext/tvclib/ugtkinterface.tsf b/funcext/tvclib/ugtkinterface.tsf index 6d2f71c..b60f4c4 100644 --- a/funcext/tvclib/ugtkinterface.tsf +++ b/funcext/tvclib/ugtkinterface.tsf @@ -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 diff --git a/funcext/tvclib/utslvclauxiliary.tsf b/funcext/tvclib/utslvclauxiliary.tsf index 2eaf7fe..7c0f1df 100644 --- a/funcext/tvclib/utslvclauxiliary.tsf +++ b/funcext/tvclib/utslvclauxiliary.tsf @@ -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";