From 9123b517f57fc0c2bab0b0cf17a740fb37c4a88a Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Mon, 17 Jul 2023 10:38:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 目录相关的函数 --- funcext/tvclib/tslvcl.tsf | 35 +++++++++++++++++++++++++++++ funcext/tvclib/utslvclauxiliary.tsf | 14 ++++++++++++ 2 files changed, 49 insertions(+) diff --git a/funcext/tvclib/tslvcl.tsf b/funcext/tvclib/tslvcl.tsf index c6d8d5a..b14f628 100644 --- a/funcext/tvclib/tslvcl.tsf +++ b/funcext/tvclib/tslvcl.tsf @@ -45,6 +45,13 @@ function CheckTslCode(code,err); // //function TS_ExecPath(); //function TS_GetAppPath(); function TS_GetUserProfileHome(); +function TS_GetUserProfileHomeInstance(t:integer):string; +function TS_GetUserConfigHome(t:integer):string; +function TS_GetHomePath(t:integer):string; +function TS_ModulePath():string; +function TS_ExecPath():string; +function TS_GetAppPath():string; +function TS_GetIniPath(t:integer;iname:string):string; //function TS_GetIniPath(hometype,IniName); function CopyUsedTslDllToNewDir(p); ///////////////////////////////////////////// @@ -6224,6 +6231,34 @@ function CreateDirWithFileName(fname);//È· begin return unit(utslvclauxiliary).CreateDirWithFileName(fname); end +function TS_GetUserProfileHomeInstance(t:integer):string; +begin + return unit(utslvclauxiliary).TS_GetUserProfileHomeInstance(t); +end +function TS_GetUserConfigHome(t:integer):string; +begin + return unit(utslvclauxiliary).TS_GetUserConfigHome(t); +end +function TS_GetHomePath(t:integer):string; +begin + return unit(utslvclauxiliary).TS_GetHomePath(); +end +function TS_ModulePath():string; +begin + return unit(utslvclauxiliary).TS_ModulePath(); +end +function TS_ExecPath():string; +begin + return unit(utslvclauxiliary).TS_ExecPath(); +end +function TS_GetAppPath():string; +begin + return unit(utslvclauxiliary).TS_GetAppPath(); +end +function TS_GetIniPath(t:integer;iname:string):string; +begin + return unit(utslvclauxiliary).TS_GetIniPath(t,iname); +end function DeleteAllFiles(path);//ɾ³ýĿ¼ËùÓÐÎļþ begin diff --git a/funcext/tvclib/utslvclauxiliary.tsf b/funcext/tvclib/utslvclauxiliary.tsf index edbc2ff..19ce18b 100644 --- a/funcext/tvclib/utslvclauxiliary.tsf +++ b/funcext/tvclib/utslvclauxiliary.tsf @@ -41,6 +41,13 @@ function HexFormatStrToTsl(D); function DeleteAllFiles(path); function CreateDirWithFileName(fname); function TS_GetUserProfileHome(); +function TS_GetUserProfileHomeInstance(t:integer):string; +function TS_GetUserConfigHome(t:integer):string; +function TS_GetHomePath(t:integer):string; +function TS_ModulePath():string; +function TS_ExecPath():string; +function TS_GetAppPath():string; +function TS_GetIniPath(t:integer;iname:string):string; function gettslexefullpath(); type tuiglobaldata=class() //È«¾Ö¶ÔÏó´æ´¢ static UIData; @@ -2972,6 +2979,13 @@ begin end end function TS_GetUserProfileHome():string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetUserProfileHome"; +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"; +function TS_ModulePath():string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_ModulePath"; +function TS_ExecPath():string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_ExecPath"; +function TS_GetAppPath():string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetAppPath"; +function TS_GetIniPath(t:integer;iname:string):string;cdecl;external {$ifdef linux}"libTSSVRAPI.so"{$else}"TSSVRAPI.dll"{$endif} name "TS_GetIniPath"; function IsTextUTF8(str) begin {utf8¹æÔò