diff --git a/ACE.dll b/ACE.dll index 264e4be..0480293 100644 Binary files a/ACE.dll and b/ACE.dll differ diff --git a/BasicDLL.dll b/BasicDLL.dll index 8ef71fc..f999e15 100644 Binary files a/BasicDLL.dll and b/BasicDLL.dll differ diff --git a/CSAPI64.dll b/CSAPI64.dll deleted file mode 100644 index 3d70067..0000000 Binary files a/CSAPI64.dll and /dev/null differ diff --git a/CommKrnl.dll b/CommKrnl.dll index 0ded604..85cdcfc 100644 Binary files a/CommKrnl.dll and b/CommKrnl.dll differ diff --git a/CommonDlgUtils.dll b/CommonDlgUtils.dll index 4321217..98f78e3 100644 Binary files a/CommonDlgUtils.dll and b/CommonDlgUtils.dll differ diff --git a/CommonUse.dll b/CommonUse.dll index efa2469..0ce4426 100644 Binary files a/CommonUse.dll and b/CommonUse.dll differ diff --git a/DocProc.dll b/DocProc.dll index 75dd6e6..c46a210 100644 Binary files a/DocProc.dll and b/DocProc.dll differ diff --git a/Func2Ext.exe b/Func2Ext.exe deleted file mode 100644 index 230374b..0000000 Binary files a/Func2Ext.exe and /dev/null differ diff --git a/FuncDLL.dll b/FuncDLL.dll index 70e7037..857e351 100644 Binary files a/FuncDLL.dll and b/FuncDLL.dll differ diff --git a/GraphDll.dll b/GraphDll.dll deleted file mode 100644 index 8132dee..0000000 Binary files a/GraphDll.dll and /dev/null differ diff --git a/IIS_TSL.dll b/IIS_TSL.dll deleted file mode 100644 index fab4af8..0000000 Binary files a/IIS_TSL.dll and /dev/null differ diff --git a/InitDLL.dll b/InitDLL.dll index cf9f17b..089651b 100644 Binary files a/InitDLL.dll and b/InitDLL.dll differ diff --git a/LIBCURL-TSL.dll b/LIBCURL-TSL.dll new file mode 100644 index 0000000..705f942 Binary files /dev/null and b/LIBCURL-TSL.dll differ diff --git a/LU.exe b/LU.exe deleted file mode 100644 index 0607ea3..0000000 Binary files a/LU.exe and /dev/null differ diff --git a/LiveUpd.dll b/LiveUpd.dll index c90599d..b852ab6 100644 Binary files a/LiveUpd.dll and b/LiveUpd.dll differ diff --git a/LoginMgr.dll b/LoginMgr.dll index 985b117..b4c472f 100644 Binary files a/LoginMgr.dll and b/LoginMgr.dll differ diff --git a/MathKrnl.dll b/MathKrnl.dll index 0cda5b9..be14a44 100644 Binary files a/MathKrnl.dll and b/MathKrnl.dll differ diff --git a/Mod_TSL1.dll b/Mod_TSL1.dll deleted file mode 100644 index 9ca2b7b..0000000 Binary files a/Mod_TSL1.dll and /dev/null differ diff --git a/Mod_TSL2.dll b/Mod_TSL2.dll deleted file mode 100644 index 019ef2a..0000000 Binary files a/Mod_TSL2.dll and /dev/null differ diff --git a/Mod_TSL24.dll b/Mod_TSL24.dll index f3ebf2c..45972dc 100644 Binary files a/Mod_TSL24.dll and b/Mod_TSL24.dll differ diff --git a/Mod_TSL24New.dll b/Mod_TSL24New.dll deleted file mode 100644 index e810f4e..0000000 Binary files a/Mod_TSL24New.dll and /dev/null differ diff --git a/SysBugCheck.exe b/SysBugCheck.exe deleted file mode 100644 index 8338185..0000000 Binary files a/SysBugCheck.exe and /dev/null differ diff --git a/TSBLPAPI.DLL b/TSBLPAPI.DLL deleted file mode 100644 index f45d89f..0000000 Binary files a/TSBLPAPI.DLL and /dev/null differ diff --git a/TSCrypt.dll b/TSCrypt.dll index 5854578..bf48ef6 100644 Binary files a/TSCrypt.dll and b/TSCrypt.dll differ diff --git a/TSExpert.exe b/TSExpert.exe deleted file mode 100644 index a875a14..0000000 Binary files a/TSExpert.exe and /dev/null differ diff --git a/TSIcons.dll b/TSIcons.dll deleted file mode 100644 index 676cc72..0000000 Binary files a/TSIcons.dll and /dev/null differ diff --git a/TSIniMgr.dll b/TSIniMgr.dll deleted file mode 100644 index 3253dcb..0000000 Binary files a/TSIniMgr.dll and /dev/null differ diff --git a/TSL.exe b/TSL.exe index 1a5a544..35d3bb1 100644 Binary files a/TSL.exe and b/TSL.exe differ diff --git a/TSLCgi.exe b/TSLCgi.exe deleted file mode 100644 index 1e800d4..0000000 Binary files a/TSLCgi.exe and /dev/null differ diff --git a/TSLDebugModule.dll b/TSLDebugModule.dll index c703b11..b05e120 100644 Binary files a/TSLDebugModule.dll and b/TSLDebugModule.dll differ diff --git a/TSLEventMsg.dll b/TSLEventMsg.dll deleted file mode 100644 index 535cf9a..0000000 Binary files a/TSLEventMsg.dll and /dev/null differ diff --git a/TSLInterp.dll b/TSLInterp.dll index c540b88..021fc0c 100644 Binary files a/TSLInterp.dll and b/TSLInterp.dll differ diff --git a/TSLLdLibAp1.dll b/TSLLdLibAp1.dll deleted file mode 100644 index 6b99edb..0000000 Binary files a/TSLLdLibAp1.dll and /dev/null differ diff --git a/TSLLdLibAp2.dll b/TSLLdLibAp2.dll deleted file mode 100644 index 252cc74..0000000 Binary files a/TSLLdLibAp2.dll and /dev/null differ diff --git a/TSLLdLibAp24.dll b/TSLLdLibAp24.dll deleted file mode 100644 index 0ff93d5..0000000 Binary files a/TSLLdLibAp24.dll and /dev/null differ diff --git a/TSLLdLibIIS.dll b/TSLLdLibIIS.dll deleted file mode 100644 index 7c7b3a8..0000000 Binary files a/TSLLdLibIIS.dll and /dev/null differ diff --git a/TSLMemMan.dll b/TSLMemMan.dll index 4d8198a..c88563c 100644 Binary files a/TSLMemMan.dll and b/TSLMemMan.dll differ diff --git a/TSLPlugin.dll b/TSLPlugin.dll index 797fb1f..b275529 100644 Binary files a/TSLPlugin.dll and b/TSLPlugin.dll differ diff --git a/TSLib.dll b/TSLib.dll index 86147ad..e71a7c5 100644 Binary files a/TSLib.dll and b/TSLib.dll differ diff --git a/TSLogin.dll b/TSLogin.dll deleted file mode 100644 index e2c6afc..0000000 Binary files a/TSLogin.dll and /dev/null differ diff --git a/TSNetAPI.dll b/TSNetAPI.dll index a7f4650..d8b3716 100644 Binary files a/TSNetAPI.dll and b/TSNetAPI.dll differ diff --git a/TSSVRAPI.DLL b/TSSVRAPI.DLL index 6fbdacf..13d17ec 100644 Binary files a/TSSVRAPI.DLL and b/TSSVRAPI.DLL differ diff --git a/TSTransaction.dll b/TSTransaction.dll index 04d7139..4544ba6 100644 Binary files a/TSTransaction.dll and b/TSTransaction.dll differ diff --git a/TSWinAdmin64.exe b/TSWinAdmin64.exe deleted file mode 100644 index fc29726..0000000 Binary files a/TSWinAdmin64.exe and /dev/null differ diff --git a/TT_GateWayLib.dll b/TT_GateWayLib.dll index 71f438a..f865870 100644 Binary files a/TT_GateWayLib.dll and b/TT_GateWayLib.dll differ diff --git a/TT_RUNLOCALTSL.DLL b/TT_RUNLOCALTSL.DLL new file mode 100644 index 0000000..fd5f2e6 Binary files /dev/null and b/TT_RUNLOCALTSL.DLL differ diff --git a/TestDll.dll b/TestDll.dll deleted file mode 100644 index b8feb54..0000000 Binary files a/TestDll.dll and /dev/null differ diff --git a/TinyODBC.dll b/TinyODBC.dll deleted file mode 100644 index 6e34e11..0000000 Binary files a/TinyODBC.dll and /dev/null differ diff --git a/TinyRTDServer.dll b/TinyRTDServer.dll deleted file mode 100644 index c639be6..0000000 Binary files a/TinyRTDServer.dll and /dev/null differ diff --git a/UserData.dll b/UserData.dll deleted file mode 100644 index 2f5af0b..0000000 Binary files a/UserData.dll and /dev/null differ diff --git a/WebGraph.dll b/WebGraph.dll index 9786584..1ca31d2 100644 Binary files a/WebGraph.dll and b/WebGraph.dll differ diff --git a/WinDataCollect.dll b/WinDataCollect.dll deleted file mode 100644 index ecfdaac..0000000 Binary files a/WinDataCollect.dll and /dev/null differ diff --git a/chrome_elf.dll b/chrome_elf.dll new file mode 100644 index 0000000..25f4aa6 Binary files /dev/null and b/chrome_elf.dll differ diff --git a/d3dcompiler_43.dll b/d3dcompiler_43.dll deleted file mode 100644 index ab96161..0000000 Binary files a/d3dcompiler_43.dll and /dev/null differ diff --git a/d3dcompiler_47.dll b/d3dcompiler_47.dll index efd0813..e82d8c7 100644 Binary files a/d3dcompiler_47.dll and b/d3dcompiler_47.dll differ diff --git a/designer/utslcodeeditor.tsf b/designer/utslcodeeditor.tsf index 723eb26..048054e 100644 --- a/designer/utslcodeeditor.tsf +++ b/designer/utslcodeeditor.tsf @@ -4,7 +4,7 @@ unit UtslCodeEditor; 20220520 分离调试器代码 } interface -uses utslvcldesignerresource,cstructurelib,utslvclauxiliary,utslvclmemstruct,utslvclgdi, +uses utslvcldesignerresource,cstructurelib,utslvclauxiliary,utslvclmemstruct,utslvclgdi,utslvclstdctl, tslvcl,UTslmemo,UTslSynMemo,utslvclsyntaxparser,utslvcldebuger; { 1. page标签 @@ -2034,23 +2034,10 @@ type TEditer=class(TCustomcontrol) // begin if not it then return; ShowEchoWnd(); - //exe :=(FTslExe and ifstring(FTslExe))?FTslExe:SysExecName(); - if FEchoWnd.Exeing()then FEchoWnd.Endexe(); + if FEchoWnd.Exeing()then return FEchoWnd.Endexe(); s := FExecuteEditer.GetCurrentExuteString(it.Scriptpath); - // echo s,"\r\n"; - FEchoWnd.Exec(s,"",h); - //FEchoWnd.Exec(exe,format('"%s" -libpath "%s"',it.ScriptPath,getdirfromfile(it.ScriptPath)),h); + FEchoWnd.Exec("",s,h); end - {function ExecutePageItemWithCmd(it); - begin - s := FExecuteEditer.GetCurrentExuteString(it.Scriptpath); - hd := "d:\\test\\execmd.cmd"; - //RewriteString(hd,s); - _wapi.WinExec("cmd.exe",1); - //_wapi.WinExec("",1); - //SysExec("","cmd.exe /c " + s,nil,false,c,nil); - //echo "===\r\n"; - end } function SavePageItem(it,f); begin if not it then return -1; @@ -4256,60 +4243,47 @@ type TEditerEchoWnd=class(TSynMemoNorm) // ClearAll(); AppendString("ctrl+z 停止;ctrl+c 复制选择\r\n"); end; - FProcess := new TCreateProcessA(); - FProcess.BufSize := 1024 * 5; + FProcess := new tcustomprocess(self); FProcess.OnEcho := thisfunction(TEchoToString); + FProcess.onended := thisfunction(onprocend); + FProcess.onstarted := thisfunction(onprocstart); AppendString("ctrl+z 停止;ctrl+c 复制选择\r\n"); F_Highlighter := new TSynHighLighter(self); //Highlighter := new TSynHighLighter(self); end + function onprocstart(o,e); + begin + AppendString("开始执行"); + end + function onprocend(o,e); + begin + AppendString(format("\r\n执行结束:endcode:%d\r\n",o.ErrInfo)); + end function TEchoToString(o,s); begin - //t := now(); - {if (t-FDoLockTime)>(0.3E-5) then - begin - FDoLockTime := t; - if FIsLocked then - begin - FIsLocked := false; - DecPaintLock(); - end else - begin - FIsLocked := true; - IncPaintLock(); - end - end } AppendString(s); - //Visible := true; return true; end function Exec(exe,cmd,h); begin - //AppendString(format('"%s" %s\r\n',exe,cmd)); self.HighLighter := nil; AppendString(format('%s %s\r\n',exe,cmd)); - //EndExe(); - r := FProcess.CreateProcessWaitRead(exe,cmd,h); - AppendString(format("\r\n执行结束:endcode:%d\r\n",r)); - {if FIsLocked then - begin - FIsLocked := false; - DecPaintLock(); - end } + r := FProcess.CreateProcess(exe,cmd); + h := r; + if r=0 then AppendString("执行失败!"); self.HighLighter := F_Highlighter; - h := 0; return r; end function Exeing(); begin - return FProcess.LastExeHandle; + return FProcess.Handle; end function EndExe(); begin - if FProcess.LastExeHandle then + if FProcess.Handle then begin r := 1; - SysTerminate(r,FProcess.LastExeHandle); + SysTerminate(r,FProcess.Handle); end end function KeyDown(o,e);override; diff --git a/designer/utslvcldebuger.tsf b/designer/utslvcldebuger.tsf index ce55ec8..f98612a 100644 --- a/designer/utslvcldebuger.tsf +++ b/designer/utslvcldebuger.tsf @@ -4,7 +4,7 @@ interface @explan(说明) 编辑器调试功能 %% @date(20220520) **} -uses cstructurelib,utslvclauxiliary,utslvclmemstruct, UTslMemo,UTslSynMemo, tslvcl; +uses cstructurelib,utslvclauxiliary,utslvclmemstruct, UTslMemo,UTslSynMemo,utslvclstdctl, tslvcl; function tdbgcallback(); //调试回调 type TTslDebug = class(TTslDebuga) function create(AOwner); @@ -263,7 +263,7 @@ type TTslDebuga=class(TCustomControl) FRuningfile; //执行脚本文件名 FRuningItem; //执行的pageitem FCurrentgotoitem; //当前运行到的pageitem - FDebughandle; //调试的句柄 + fdebugproc; Fdebugedwhandle ;//调试的窗口 FDebugExe; //调试功能的exe FConnectchannel; //调试的 通道 @@ -611,7 +611,6 @@ type TTslDebuga=class(TCustomControl) fremotedbugstart := true; fscriptbrks := array(); {$ifdef linux} - // sp := ioFileseparator(); for i:= length(FDebugExe) downto 1 do begin @@ -619,15 +618,14 @@ type TTslDebuga=class(TCustomControl) begin exepath := FDebugExe[1:i]; break; - end + end end npm := array("LD_LIBRARY_PATH=" $ exepath ,getgtkdisplay()); - exestr := ParserCommandLine(exestr); - {$else } - npm := nil; + Sysexecsetenvs(npm,0); + exestr := ParserCommandLine(exestr); {$endif} - FDebughandle := sysexec(FDebugExe,exestr,npm,0,rcode,0); - if FDebughandle then + h := fdebugproc.CreateProcess(nil,exestr); + if h then begin ExecuteCommand("dbgcreatechannel"); ExecuteCommand("showeval","调试程序:"+FDebugExe); @@ -716,6 +714,15 @@ type TTslDebuga=class(TCustomControl) ow.DebugPageItem(ow.GetCurrentItem()); end end + fdebugproc := new tcustomprocess(self); + fdebugproc.onended := function(o,e) + begin + toolbtnState("停止"); + end + fdebugproc.OnEcho := function(); + begin + return 1; + end end function addbreak(item,idx,n); //添加断点 begin @@ -771,7 +778,7 @@ type TTslDebuga=class(TCustomControl) {$ifdef linux} {$else} if not Fdebugedwhandle then - Fdebugedwhandle := GetWindowHandleByPID(_wapi.GetProcessId(FDebughandle),_wapi); + Fdebugedwhandle := GetWindowHandleByPID(_wapi.GetProcessId(fdebugproc.Handle),_wapi); if Fdebugedwhandle then begin _wapi.SetForegroundWindow(Fdebugedwhandle); @@ -859,7 +866,7 @@ type TTslDebuga=class(TCustomControl) FConnectchannel := 0; g_tsldbgcallback_handle := nil; if FCurrentgotoitem and FCurrentgotoitem.FEditer then FCurrentgotoitem.FEditer.ExecuteCommand("ecruningto",nil); - FDebughandle := 0;Fdebugedwhandle := 0; + Fdebugedwhandle := 0; toolbtnState("停止"); return; end @@ -1163,11 +1170,11 @@ type TTslDebuga=class(TCustomControl) begin if FConnectchannel then begin - if FDebughandle then + if fdebugproc.Handle then begin //cd := {$ifdef linux} 1 {$else} -1 {$endif} ; - return SysTerminate(1,FDebughandle); + fdebugproc.terminate(1); end if FAttchedid then begin @@ -1232,15 +1239,11 @@ type TTslDebuga=class(TCustomControl) end //property rundirect read Frundirect write Frundirect; private - function getgtkdisplay(); + function getgtkdisplay(); //去掉try begin - try - dsp := sys_getenv("DISPLAY"); - if dsp="" then dsp := ":0"; - if not ifstring(dsp) then dsp := ":0"; - except - dsp := ":0"; - end; + dsp := Sysgetenv("DISPLAY"); + if dsp="" then dsp := ":0"; + if not ifstring(dsp) then dsp := ":0"; return "DISPLAY="+dsp; end function getdefaultdbger(); @@ -1527,10 +1530,10 @@ type TTslDebuga=class(TCustomControl) end function stopdebug(); //结束进程 begin - if FDebughandle then + if fdebugproc.Handle then begin - SysTerminate(1,FDebughandle); - FDebughandle := 0; Fdebugedwhandle := 0; + fdebugproc.terminate(1); + Fdebugedwhandle := 0; end end function parseriteminfo(item,idx,n,usr); diff --git a/extkrnl.dll b/extkrnl.dll index 23c5262..eea4567 100644 Binary files a/extkrnl.dll and b/extkrnl.dll differ diff --git a/funcext/tvclib/tslvcl.tsf b/funcext/tvclib/tslvcl.tsf index 8fc7ee1..ce5663a 100644 --- a/funcext/tvclib/tslvcl.tsf +++ b/funcext/tvclib/tslvcl.tsf @@ -5737,338 +5737,6 @@ type TIniFileExta=class(TIniFileExter) end end -type TCreateProcessA = class() - {** - @explan(说明) 进程构造对象 %% - **} - private - FOnEcho; - FBufSize; - {$ifdef linux} - static FProcesswnd; - function parserasexeclevparam(exe,cmd,e,arg,envp); - begin - arg := ParserCommandLine(exe+" "+cmd); - if not arg then return 0; - e := arg[0]; - for i := length(e) downto 2 do - begin - if e[i]="/" then - begin - ph := e[1:i]; - break; - end - end - arg[length(arg)] := nil; - envp := array(); - if ph then - begin - envp[length(envp)] := "LD_LIBRARY_PATH=LD_LIBRARY_PATH:"+ph; - end - envp[length(envp)] := getgtkdisplay(); - envp[length(envp)] :=nil; - return 1; - end - function getgtkdisplay(); - begin - try - dsp := sys_getenv("DISPLAY"); - if dsp="" then dsp := ":0"; - if not ifstring(dsp) then dsp := ":0"; - except - dsp := ":0"; - end; - return "DISPLAY="+dsp; - end - - type tprocesswnd = class(TCustomControl) - private - fidarraya; - fidarrayb; - fidarray; - Fmsg; - public - function create(AOwner); - begin - inherited; - Visible := false; - WsPopUp := true; - ht :=Handle ; - fidarray := array(); - fidarraya := array(); - fidarrayb := array(); - Fmsg := ""; - setlength(fmsg,1024); - //bindmessage(WM_USER,thisfunction(wmuser)); - end - function addproc(pid,fid,obj,t); - begin - fidarray[pid] := fid; - fidarraya[pid] := obj; - fidarrayb[pid] := t; - CallDatafunction(obj.OnPressStart,obj,pid); - _send_(WM_USER,pid,fid,1); - - end - function proccount(); - begin - return length(fidarrayb); - end - function clearproc(); - begin - for i,v in mrows(fidarray,1) do - begin - deleteproc(v); - end - end - function deleteproc(pid,flg); - begin - tsl_gtk_closehandle(fidarray[pid]);//删除fid - reindex(fidarray,array(pid:nil)); - reindex(fidarraya,array(pid:nil)); - tp := fidarrayb[pid]; - if (tp .& 2) and ifnil(flg) then - begin - SysTerminate(1,pid); - end - if tp .& 1 then - begin - ExitMessageLoop(); - end - reindex(fidarrayb,array(pid:nil)); - end - function wmuser(o,e):WM_USER;override; - begin - pid := e.wparam; - fid := e.lparam; - if pid and fid then - begin - r := _wapi.tsl_gtk_pipread(fid,Fmsg,1024); - if r=0 then - begin - deleteproc(pid,1); - return ; - end else - if r>0 then - begin - obj := fidarraya[pid]; - obj.DoOnEcho(obj,Fmsg[1:r]); - end else - begin - sleep(20); - end - _send_(WM_USER,pid,fid,1); - end - end - function Recycling();override; - begin - inherited; - deleteproc(); - end - end - {$endif} -public - function DoOnEcho(o,s);virtual; - begin - {** - @explan(说明) 打印 - **} - if not(CallMessgeFunction(FOnEcho,o,s))then - begin - echo s; - end - end - function create();override; - begin - inherited; - {$ifdef linux} - if not FProcesswnd then FProcesswnd := new tprocesswnd(initializeapplication()); - {$endif} - FBufSize := 1024; - end - function CreateProcessThread(exe,cmd); - begin - {$ifdef linux} - if parserasexeclevparam(exe,cmd,e,arg,envp)then - begin - //echo tostn(arg); - id := FProcesswnd._wapi.tsl_gtk_createprocessa(e,arg,envp,rh); - //1 跟着退出 2 4 - ct := FProcesswnd.proccount(); - FProcesswnd.addproc(id,rh,self(true),0); - end - return id; - {$endif} - si := new T_startupinfoa(); - sa := new T_security_attributes(); - pi := new T_process_information(); - sa.bInheritHandle := TRUE; //必须为TRUE,父进程的读写句柄可以被子进程继承 - sa.nLength := sa._size_; - //创建匿名管道 - w32 := gettswin32api(); - bRet := w32.CreatePipe(hRead,hWrite,sa._getptr_,0); - if not bRet then return 0; - w32.GetStartupInfoA(si._getptr_); - si.dwflags := 0x100; - si.hStdOutput := hWrite; - si.hStdError := hwrite; - p := w32.CreateProcessA(nil,format('%s %s ',exe,cmd),0,0,true,0,0,nil,si._getptr_,pi._getptr_); - return pi.hProcess; - end - function CreateProcessWaitRead(exe,cmd,hd,exitWithParent); - begin - {** - @explan(说明) 执行代码,非阻塞当前线程 %% - @param(exe)(string) 程序 %% - @param(cmd)(string) 命令行 %% - @param(hd)(pointer) 句柄,返回 %% - @return(integer) 进程退出码 %% - **} - if FCurrentExeHandle then return; - {$ifdef linux} - if parserasexeclevparam(exe,cmd,e,arg,envp)then - begin - //echo tostn(arg); - id := FProcesswnd._wapi.tsl_gtk_createprocessa(e,arg,envp,rh); - hd := id; - FCurrentExeHandle := id; - //1 跟着退出 2 4 - ct := FProcesswnd.proccount(); - FProcesswnd.addproc(id,rh,self(true),(((exitWithParent or ifnil(exitWithParent))* 2).| 1)); - initializeapplication().run(); - if ct <> FProcesswnd.proccount()then - begin - FProcesswnd.clearproc(); - end - FCurrentExeHandle := 0; - end - id := 0; - return 0; - {$endif} - if not(FBufSize>100)then FBufSize := 1024; - w32 := gettswin32api(); - si := new T_startupinfoa(); - sa := new T_security_attributes(); - pi := new T_process_information(); - sa.bInheritHandle := TRUE; //必须为TRUE,父进程的读写句柄可以被子进程继承 - sa.nLength := sa._size_; - //创建匿名管道 - bRet := w32.CreatePipe(hRead,hWrite,sa._getptr_,0); - if not bRet then return 0; - w32.GetStartupInfoA(si._getptr_); - si.dwflags := 0x100; - si.hStdOutput := hWrite; - si.hStdError := hwrite; - p := w32.CreateProcessA(nil,format('%s %s ',exe,cmd),0,0,true,0,0,nil,si._getptr_,pi._getptr_); - hd := pi.hProcess; - FCurrentExeHandle := hd; - w32.CloseHandle(hWrite); - if p then - begin - CallDatafunction(FOnPressStart,self(true),hd); - szReadBuf := ""; - setlength(szReadBuf,FBufSize); - nReadNum := 0; - ct1 := 0; - ct2 := 0; - ct3 := 0; - s := "123456"; - while w32.PeekNamedPipe(hRead,s,3,ct1,ct2,ct3) do - begin - if ct1 then - begin - if w32.ReadFile__(hRead,szReadBuf,FBufSize-1,nReadNum,nil)=0 then - begin - break; - end - tcs := szreadbuf[1:nreadnum]; - DoOnEcho(self(true),tcs); - end - MSG := new TTagMSG(); - hmsg := MSG._getptr_; - ///////////////////////////////////////////////////// - if(w32.PeekMessageA(hmsg,0,0,0,0x1))then - begin - if MSG.message=0x12 then - begin - if exitWithParent or ifnil(exitWithParent)then SysTerminate(1,hd); - w32.PostQuitMessage(0); - break; - end else - begin - w32.TranslateMessage(hmsg); - w32.DispatchMessageA(hmsg); - end - end else - begin - tslprocessmessages(false); - RunWorkerThreadLoop(); - w32.WaitMessage(); - end - ////////////////////////////////////////// - end - hd := 0; - w32.GetExitCodeProcess(pi.hProcess,cd); - w32.CloseHandle(hRead); - FCurrentExeHandle := 0; - end - return cd; - end - function CreateProcessWaitReadBlockThread(exe,cmd); - begin - {** - @explan(说明) 阻塞当前线程等待输出 %% - @param(exe)(string) 程序 %% - @param(cmd)(string) 命令行 %% - @return(integer) 进程退出码 %% - **} - {$ifdef linux} - return 0; - {$endif} - if not(FBufSize>100)then FBufSize := 1024; - w32 := gettswin32api(); - si := new T_startupinfoa(); - sa := new T_security_attributes(); - pi := new T_process_information(); - sa.bInheritHandle := TRUE; //必须为TRUE,父进程的读写句柄可以被子进程继承 - sa.nLength := sa._size_; - //创建匿名管道 - bRet := w32.CreatePipe(hRead,hWrite,sa._getptr_,0); - if not bRet then return 0; - w32.GetStartupInfoA(si._getptr_); - si.dwflags := 0x100; - si.hStdOutput := hWrite; - si.hStdError := hwrite; - p := w32.CreateProcessA(nil,format('%s %s ',exe,cmd),0,0,true,0,0,nil,si._getptr_,pi._getptr_); - w32.CloseHandle(hWrite); - if p then - begin - CallDatafunction(FOnPressStart,self(true),pi.hProcess); - szReadBuf := ""; - setlength(szReadBuf,FBufSize); - nReadNum := 0; - while(w32.ReadFile__(hRead,szReadBuf,FBufSize-1,nReadNum,nil)) do - begin - tcs := szreadbuf[1:nreadnum]; - DoOnEcho(self(true),tcs); - nreadnum := 0; - end - end - w32.GetExitCodeProcess(pi.hProcess,cd); - w32.CloseHandle(hRead); - return cd; - end - property BufSize read FBufSize write FBufSize; - property OnEcho read FOnEcho write FOnEcho; - property LastExeHandle read FCurrentExeHandle; - property OnPressStart read FOnPressStart write FOnPressStart; - private - FOnPressStart; - FCurrentExeHandle; - {** - @param(OnEcho)(function[TCreateProcessA,s:string]) 程序 %% - **} -end type TMyArrayA = class(tstrindexarray) {** @explan(数组类型) 忽略字符串下标的大小写%% diff --git a/funcext/tvclib/utslvclstdctl.tsf b/funcext/tvclib/utslvclstdctl.tsf index c69fd2c..d9d5628 100644 --- a/funcext/tvclib/utslvclstdctl.tsf +++ b/funcext/tvclib/utslvclstdctl.tsf @@ -6603,6 +6603,241 @@ type tcustomipaddr = class(TCustomControl) Fsynrects[3,1] := rc1; end end +type tcustomprocess = class(tcomponent) //进程对象 + {** + @explan(说明)带管道的进程对象 %% + **} + public + function create(AOwner); + begin + inherited; + fprocesshandle := 0; + if not ifarray(fproces) then fproces := array(); + if not ifarray(fpends) then fpends := array(); + if not ftm then + begin + ftm := new tcustomtimer(nil); + ftm.Interval := 500; + ftm.Ontimer := thisfunction(dispatchproc); + end + end + function CreateProcess(exe,cmd,exitWithParent); + begin + {** + @explan(说明) 执行代码,非阻塞当前线程 %% + @param(exe)(string) 程序 %% + @param(cmd)(string|array) 命令行 %% + @param(exitWithParent)(bool) 是否跟随父进程退出 %% + @return(pointer) 句柄 %% + **} + if fprocesshandle then return 0; + if not parserasexeclevparam(exe,cmd,e,arg,envp) then return 0; + Sysexecnewpipe(0); + ferrinfo := nil; + hd := sysexec(e,arg,nil,false,code); + if hd=0 then + begin + return 0; + end + dh := (((exitWithParent or ifnil(exitWithParent)))); + fprocesshandle := hd; + fexestring := e; + fparams := arg; + addto(self(true),dh); + return hd; + end + function writepipe(s);//写管道 + begin + {** + @explan(说明) 写管道%% + @param(s)(string) 写入的字符 %% + @return(integer) 写的信息 %% + **} + if fprocesshandle<>0 and ifstring(s) and s then + begin + return SysExecWritePipe(fprocesshandle,s); + end + return 0; + end + function terminate(code); + begin + {** + @explan(说明) 停止当前进程 %% + @param(code)(integer) 退出码 %% + **} + if not(code>0 or code<0) then code := 1; + if fprocesshandle<>0 then + begin + SysTerminate(code,fprocesshandle); + end + end + function Recycling();override; + begin + inherited; + id := fprocesshandle; + if (id<>0) and fpends[id] then SysTerminate(1,id); + FOnEcho := nil; + fonprcstart := nil; + fonprocended := nil; + end + published + property handle read fprocesshandle; + property errinfo read ferrinfo; + property exename read fexestring; + property paramarray read fparams; + property OnEcho read FOnEcho write FOnEcho; + property onstarted read fonprcstart write fonprcstart; + property onended read fonprocended write fonprocended; + {** + @param(OnEcho)(function[tcustomprocess,str]) 打印信息回调 %% + @param(onstarted)(function[tcustomprocess,nil]) 启动回调 %% + @param(onended)(function[tcustomprocess,str]) 停止回调 %% + @param(handle)(pointer) 进程句柄 %% + **} + private //成员变量 + ferrinfo; + fonprcstart; + fprocesshandle; + FOnEcho; + fonprocended; + fexestring; + fparams; + private //处理函数 + function doprocecho(o,s); //打印 + begin + if not(CallMessgeFunction(FOnEcho,o,s))then + begin + echo s; + end + end + function doonprocend(o,e); + begin + CallMessgeFunction(fonprocended,o,e) ; + fexestring := nil; + fparams := nil; + end + function doonprocstart(o,e); + begin + CallMessgeFunction(fonprcstart,o,e) ; + end + function parserasexeclevparam(exe,cmd,e,arg,envp); + begin + envp := nil; + if ifstring(cmd) then + begin + arg := ParserCommandLine(cmd); + end else + begin + arg := cmd; + end + if not arg then return 0; + if ifstring(exe) and exe then + begin + e := exe; + end + else + begin + e := arg[0]; + end + if not(ifstring(e) and e) then return 0; + {$ifdef linux} + for i := length(e) downto 2 do + begin + if e[i]="/" then + begin + ph := e[1:i]; + break; + end + end + envp := array(); + if ph then + begin + envp[length(envp)] := "LD_LIBRARY_PATH=LD_LIBRARY_PATH:"+ph; + end + envp[length(envp)] := getgtkdisplay(); + Sysexecsetenvs(envp,0); + {$endif} + return 1; + end + function getgtkdisplay(); + begin + try + dsp := sysgetenv("DISPLAY"); + if dsp="" then dsp := ":0"; + if not ifstring(dsp) then dsp := ":0"; + except + dsp := ":0"; + end; + return "DISPLAY="+dsp; + end + private //静态处理函数 + class function dispatchproc(); //循环处理打印 + begin + for i,v in mrows(fproces,1) do + begin + doecho(v); + end + end + class function doecho(pid);//打印处理 + begin + obj := fproces[pid]; + if not(obj) then return ; + sg := SysWaitForSingleObject(pid,10); + if sg<>258 then //如果退出 + begin + obj.ferrinfo := sg; + while true do //读完pip + begin + try + s := Sysexecreadpipe(pid); + except + s := 0; + end + if s then + begin + obj.doprocecho(obj,s); + end else //读完后删除对象 + begin + del(pid); + break; + end + end + end else //没有退出 + begin + s := Sysexecreadpipe(pid); //读一次 + if s then + begin + obj.doprocecho(obj,s); + end + end + end + class function addto(obj,f);//添加 + begin + id := obj.handle; + fproces[id] := obj; + fpends[id] := f; + obj.doonprocstart(obj,nil); + if length(fproces)=1 then + begin + ftm.start(); + end + end + class function del(pid); //删除 + begin + Sysexecdeletepipe(pid); + obj := fproces[pid]; + //obj.ExecuteCommand("clearhandle",0); + obj.fprocesshandle := 0; + reindex(fproces,array(pid:nil)); + reindex(fpends,array(pid:nil)); + obj.doonprocend(obj,nil); + if length(fproces)<1 then ftm.stop(); + end + private //静态存储变量 + static ftm; + static fproces; + static fpends; +end implementation type TtoolbuttonActionLink=class(TControlActionLink) {** diff --git a/gdiplus.dll b/gdiplus.dll deleted file mode 100644 index 99b09c9..0000000 Binary files a/gdiplus.dll and /dev/null differ diff --git a/libEGL.dll b/libEGL.dll index 4f8147b..cfae0a6 100644 Binary files a/libEGL.dll and b/libEGL.dll differ diff --git a/libGLESv2.dll b/libGLESv2.dll index e4e2bb7..ac8a4cc 100644 Binary files a/libGLESv2.dll and b/libGLESv2.dll differ diff --git a/libapr-1.dll b/libapr-1.dll deleted file mode 100644 index 8a04872..0000000 Binary files a/libapr-1.dll and /dev/null differ diff --git a/libcef.dll b/libcef.dll index 8142881..1cb5ea7 100644 Binary files a/libcef.dll and b/libcef.dll differ diff --git a/libfcgi.dll b/libfcgi.dll deleted file mode 100644 index a564a7f..0000000 Binary files a/libfcgi.dll and /dev/null differ diff --git a/libmySQL.dll b/libmySQL.dll deleted file mode 100644 index 7370d23..0000000 Binary files a/libmySQL.dll and /dev/null differ diff --git a/mfc100.dll b/mfc100.dll deleted file mode 100644 index 7175f83..0000000 Binary files a/mfc100.dll and /dev/null differ diff --git a/mfc100u.dll b/mfc100u.dll deleted file mode 100644 index 2ef5bcc..0000000 Binary files a/mfc100u.dll and /dev/null differ diff --git a/mfc110.dll b/mfc110.dll deleted file mode 100644 index 2f411b9..0000000 Binary files a/mfc110.dll and /dev/null differ diff --git a/mfc120.dll b/mfc120.dll deleted file mode 100644 index 7c0b92c..0000000 Binary files a/mfc120.dll and /dev/null differ diff --git a/mfc140u.dll b/mfc140u.dll deleted file mode 100644 index 1178ac8..0000000 Binary files a/mfc140u.dll and /dev/null differ diff --git a/mfcm140.dll b/mfcm140.dll deleted file mode 100644 index 7dc3ace..0000000 Binary files a/mfcm140.dll and /dev/null differ diff --git a/mod_tsl22.dll b/mod_tsl22.dll deleted file mode 100644 index 288f9d3..0000000 Binary files a/mod_tsl22.dll and /dev/null differ diff --git a/msvcp100.dll b/msvcp100.dll deleted file mode 100644 index 68fa0d3..0000000 Binary files a/msvcp100.dll and /dev/null differ diff --git a/msvcp110.dll b/msvcp110.dll deleted file mode 100644 index 7e27895..0000000 Binary files a/msvcp110.dll and /dev/null differ diff --git a/msvcp120.dll b/msvcp120.dll deleted file mode 100644 index 4ea1efa..0000000 Binary files a/msvcp120.dll and /dev/null differ diff --git a/msvcr100.dll b/msvcr100.dll deleted file mode 100644 index 0318fb0..0000000 Binary files a/msvcr100.dll and /dev/null differ diff --git a/msvcr110.dll b/msvcr110.dll deleted file mode 100644 index dd484a5..0000000 Binary files a/msvcr110.dll and /dev/null differ diff --git a/msvcr120.dll b/msvcr120.dll deleted file mode 100644 index d711c92..0000000 Binary files a/msvcr120.dll and /dev/null differ diff --git a/oci.dll b/oci.dll deleted file mode 100644 index 197a860..0000000 Binary files a/oci.dll and /dev/null differ diff --git a/oraocci11.dll b/oraocci11.dll deleted file mode 100644 index ce20ca8..0000000 Binary files a/oraocci11.dll and /dev/null differ diff --git a/orasql11.dll b/orasql11.dll deleted file mode 100644 index b16a737..0000000 Binary files a/orasql11.dll and /dev/null differ diff --git a/pcre.dll b/pcre.dll deleted file mode 100644 index 5dd216f..0000000 Binary files a/pcre.dll and /dev/null differ diff --git a/plugin/ExecSql.dll b/plugin/ExecSql.dll index 38e0f55..aa041cd 100644 Binary files a/plugin/ExecSql.dll and b/plugin/ExecSql.dll differ diff --git a/plugin/FileMgr.dll b/plugin/FileMgr.dll index 2ba5268..e3702e1 100644 Binary files a/plugin/FileMgr.dll and b/plugin/FileMgr.dll differ diff --git a/plugin/GraphExt.dll b/plugin/GraphExt.dll new file mode 100644 index 0000000..58ef600 Binary files /dev/null and b/plugin/GraphExt.dll differ diff --git a/plugin/LocFunc.dll b/plugin/LocFunc.dll new file mode 100644 index 0000000..03b25eb Binary files /dev/null and b/plugin/LocFunc.dll differ diff --git a/plugin/TSCAPTCHA.DLL b/plugin/TSCAPTCHA.DLL new file mode 100644 index 0000000..06b8631 Binary files /dev/null and b/plugin/TSCAPTCHA.DLL differ diff --git a/plugin/TSCURL.DLL b/plugin/TSCURL.DLL new file mode 100644 index 0000000..0c41735 Binary files /dev/null and b/plugin/TSCURL.DLL differ diff --git a/plugin/TSJSONParser.dll b/plugin/TSJSONParser.dll index f81d99b..232db59 100644 Binary files a/plugin/TSJSONParser.dll and b/plugin/TSJSONParser.dll differ diff --git a/plugin/TSLCPLUGIN.DLL b/plugin/TSLCPLUGIN.DLL index 2e04dc9..f2abb49 100644 Binary files a/plugin/TSLCPLUGIN.DLL and b/plugin/TSLCPLUGIN.DLL differ diff --git a/plugin/TSLClient.dll b/plugin/TSLClient.dll index 03778bf..2fadd55 100644 Binary files a/plugin/TSLClient.dll and b/plugin/TSLClient.dll differ diff --git a/plugin/TSLUIL.dll b/plugin/TSLUIL.dll index 4f09bfb..41bc0bc 100644 Binary files a/plugin/TSLUIL.dll and b/plugin/TSLUIL.dll differ diff --git a/plugin/TSSecurity.dll b/plugin/TSSecurity.dll index 66c8141..e81f34c 100644 Binary files a/plugin/TSSecurity.dll and b/plugin/TSSecurity.dll differ diff --git a/plugin/TSUILIB.DLL b/plugin/TSUILIB.DLL new file mode 100644 index 0000000..dce695b Binary files /dev/null and b/plugin/TSUILIB.DLL differ diff --git a/plugin/WEBGRAPHEXT.DLL b/plugin/WEBGRAPHEXT.DLL new file mode 100644 index 0000000..eccf406 Binary files /dev/null and b/plugin/WEBGRAPHEXT.DLL differ diff --git a/protocol.dll b/protocol.dll index 9f10890..2480a31 100644 Binary files a/protocol.dll and b/protocol.dll differ diff --git a/psqlodbc.dll b/psqlodbc.dll deleted file mode 100644 index c8efb46..0000000 Binary files a/psqlodbc.dll and /dev/null differ diff --git a/pubKrnl.dll b/pubKrnl.dll index e180b8b..887031c 100644 Binary files a/pubKrnl.dll and b/pubKrnl.dll differ diff --git a/ql2ts_level2.dll b/ql2ts_level2.dll deleted file mode 100644 index d18a96f..0000000 Binary files a/ql2ts_level2.dll and /dev/null differ diff --git a/ssleay32.dll b/ssleay32.dll deleted file mode 100644 index 5f90fc0..0000000 Binary files a/ssleay32.dll and /dev/null differ diff --git a/tbb.dll b/tbb.dll deleted file mode 100644 index 2c2a7b8..0000000 Binary files a/tbb.dll and /dev/null differ diff --git a/tbbmalloc.dll b/tbbmalloc.dll index 580f5f1..165ffcd 100644 Binary files a/tbbmalloc.dll and b/tbbmalloc.dll differ diff --git a/thostmduserapi.dll b/thostmduserapi.dll deleted file mode 100644 index 05ac512..0000000 Binary files a/thostmduserapi.dll and /dev/null differ diff --git a/tsLocallCall.dll b/tsLocallCall.dll deleted file mode 100644 index d76dbd0..0000000 Binary files a/tsLocallCall.dll and /dev/null differ diff --git a/tsjni.dll b/tsjni.dll deleted file mode 100644 index dfd2370..0000000 Binary files a/tsjni.dll and /dev/null differ diff --git a/tslapache.dll b/tslapache.dll deleted file mode 100644 index da9a312..0000000 Binary files a/tslapache.dll and /dev/null differ diff --git a/tslkrnl.dll b/tslkrnl.dll index ff8ef4f..4aa5f95 100644 Binary files a/tslkrnl.dll and b/tslkrnl.dll differ diff --git a/tslodbc.dll b/tslodbc.dll deleted file mode 100644 index 3bd5783..0000000 Binary files a/tslodbc.dll and /dev/null differ diff --git a/tslpcre.dll b/tslpcre.dll index 9a8023e..669553b 100644 Binary files a/tslpcre.dll and b/tslpcre.dll differ diff --git a/tslutils.dll b/tslutils.dll index 18d068e..fc84664 100644 Binary files a/tslutils.dll and b/tslutils.dll differ diff --git a/tsnet.dll b/tsnet.dll index a7454e8..4ac770b 100644 Binary files a/tsnet.dll and b/tsnet.dll differ diff --git a/ucrtbase.dll b/ucrtbase.dll deleted file mode 100644 index 44c9545..0000000 Binary files a/ucrtbase.dll and /dev/null differ diff --git a/vulkan-1.dll b/vulkan-1.dll new file mode 100644 index 0000000..9ebecc2 Binary files /dev/null and b/vulkan-1.dll differ diff --git a/widevinecdmadapter.dll b/widevinecdmadapter.dll deleted file mode 100644 index a8e18bd..0000000 Binary files a/widevinecdmadapter.dll and /dev/null differ