From 587f79753b9c97204beab5d2b713d5942daab2ea Mon Sep 17 00:00:00 2001 From: zamtmn Date: Fri, 27 Dec 2024 00:36:09 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B?= =?UTF-8?q?=20=D1=81=20=D0=BF=D1=83=D1=82=D1=8F=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cad_source/components/zebase/uzbpaths.pas | 200 ++++++++--- cad_source/components/zebase/uzbtypes.pas | 3 + .../zscript/UBaseTypeDescriptor.pas | 3 +- cad_source/other/tmp322_freetype.pp | 4 +- cad_source/zcad.pas | 2 +- cad_source/zcad/commands/uzccmdeditunit.pas | 2 +- cad_source/zcad/commands/uzccmdload.pas | 4 +- .../commands/uzccommand_cfgaddsupportpath.pas | 2 +- .../zcad/commands/uzccommand_copyclip.pas | 12 +- .../zcad/commands/uzccommand_dataimport.pas | 2 +- .../commands/uzccommand_drawsuperline.pas | 10 +- .../zcad/commands/uzccommand_dwgnew.pas | 2 +- .../uzccommand_examplevarmanipulation.pas | 2 +- .../zcad/commands/uzccommand_expldbcheck.pas | 2 +- cad_source/zcad/commands/uzccommand_help.pas | 7 +- cad_source/zcad/commands/uzccommand_l2sl.pas | 2 +- cad_source/zcad/commands/uzccommand_load.pas | 14 +- .../zcad/commands/uzccommand_mergeblocks.pas | 2 +- .../zcad/commands/uzccommand_saveas.pas | 5 +- .../zcad/commands/uzccommand_unitsman.pas | 2 +- .../zcad/commands/uzccommand_varsedsel.pas | 2 +- .../zcad/commands/uzccommand_varsedunit.pas | 2 +- cad_source/zcad/core/drawings/uzcdrawing.pas | 8 +- cad_source/zcad/core/drawings/uzcdrawings.pas | 6 +- cad_source/zcad/devicebase/uzcdevicebase.pas | 2 +- cad_source/zcad/electrotech/uzccomdb.pas | 8 +- .../zcad/electrotech/uzccomelectrical.pas | 18 +- cad_source/zcad/electrotech/uzccomops.pas | 4 +- .../electrotech/uzcregelectrotechfeatures.pas | 4 +- .../entities/uzcenitiesvariablesextender.pas | 4 +- .../entities/uzclibraryblocksregister.pas | 2 +- .../entities/uzcregisterenitiesfeatures.pas | 2 +- cad_source/zcad/gui/forms/uzcfcommandline.pas | 2 +- cad_source/zcad/gui/forms/uzcflinetypes.pas | 2 +- cad_source/zcad/gui/forms/uzcfprojecttree.pas | 8 +- cad_source/zcad/gui/forms/uzcfsplash.pas | 8 +- .../gui/odjectinspector/uzcoidecorations.pas | 5 + .../gui/odjectinspector/uzcoiregister.pas | 28 +- cad_source/zcad/gui/uzcmainwindow.pas | 10 +- cad_source/zcad/gui/uzctbextmenus.pas | 6 +- cad_source/zcad/gui/uzctbexttoolbars.pas | 61 ++-- cad_source/zcad/lclmod/uzctreenode.pas | 2 +- cad_source/zcad/register/uzcregexceptions.pas | 4 +- .../zcad/register/uzcregfontmanager.pas | 8 +- .../zcad/register/uzcreggeneralwiewarea.pas | 98 +++--- cad_source/zcad/register/uzcreginterface.pas | 10 +- cad_source/zcad/register/uzcreglog.pas | 2 +- .../zcad/register/uzcregnavigatordevices.pas | 2 +- cad_source/zcad/register/uzcregother.pas | 20 +- cad_source/zcad/register/uzcregpaths.pas | 12 +- cad_source/zcad/register/uzcregsystempas.pas | 4 +- cad_source/zcad/register/uzcregzscript.pas | 2 +- cad_source/zcad/uzcfilestructure.pas | 13 + cad_source/zcad/uzcpathmacros.pas | 32 +- cad_source/zcad/uzcsysinfo.pas | 14 +- cad_source/zcad/uzcsysvars.pas | 6 +- cad_source/zcad/uzctranslations.pas | 16 +- .../zcad/velec/managerem/uzvdevtoxlsx.pas | 7 +- .../velec/managerem/uzvmodeltoxlsxfps.pas | 5 +- .../zcad/velec/managerem/uzvxlsxtocad.pas | 2 +- cad_source/zcad/velec/uzvaddconnection.pas | 2 +- cad_source/zcad/velec/uzvagsl.pas | 2 +- cad_source/zcad/velec/uzvcabmountmethod.pas | 4 +- cad_source/zcad/velec/uzvelscheme.pas | 12 +- cad_source/zcad/velec/uzvnum.pas | 2 +- cad_source/zcad/velec/uzvremoveconnection.pas | 2 +- cad_source/zcad/velec/uzvtreedevice.pas | 4 +- cad_source/zengine/fonts/uzefontmanager.pas | 4 +- cad_source/zengine/misc/uzeiopalette.pas | 2 +- .../runtimefiles/common/rtl/sysvar.pas | 8 +- .../runtimefiles/zcad/preload/autorun.cmd | 10 +- .../runtimefiles/zcad/preload/stage0.cmd0 | 8 +- .../zcadelectrotech/components/afterbuild.cmd | 2 +- .../components/blockpreviewexport.cmd | 328 +++++++++--------- .../zcadelectrotech/menu/menuscontent.xml | 2 +- .../zcadelectrotech/preload/autorun.cmd | 10 +- .../zcadelectrotech/preload/stage0.cmd0 | 22 +- 77 files changed, 639 insertions(+), 518 deletions(-) diff --git a/cad_source/components/zebase/uzbpaths.pas b/cad_source/components/zebase/uzbpaths.pas index f80e20ac8..653a03a3e 100644 --- a/cad_source/components/zebase/uzbpaths.pas +++ b/cad_source/components/zebase/uzbpaths.pas @@ -19,12 +19,13 @@ unit uzbPaths; interface -uses SysUtils, - Masks,LazUTF8, - uzctnrVectorStrings, - uzmacros,uzbLogIntf; +uses + SysUtils, + Masks,LazUTF8, + uzctnrVectorStrings, + uzmacros,uzbLogIntf; type - //калбэки для перебора [суб]директорий + //калбэки для процедур/методов перебора [суб]директорий TFromDirIterator=procedure(const AFileName:String;PData:pointer); TFromDirIteratorObj=procedure(const AFileName:String;PData:pointer)of object; @@ -36,70 +37,151 @@ interface //подстановка макросов в APath function ExpandPath(APath:String;AItDirectory:boolean=false):String; +//поиск файла по списку путей разделенных PathSeparator function FindInPaths(const APaths:String; const AFileName:String):String; -function FindFileInDataPaths(const ASubFolder:String;const AFileName:String):String; + +//DistroPath - путь к дистрибутиву программы, это /etc/zcad/ или +//ExtractFilePath(paramstr(0))+'../..' в зависимости где фактически лежат +//файлы дистрибутива и что найдет FindDistroPath + +//DataPaths - пути данных программы, сейчас их 2, разделены PathSeparator +//1: /home/user/.config/zcad/ +//2: DistroPath +//всё ищется сначала в 1, потом в 2 +//запись производится в 1 + +//поиск файла в подпапке в DataPaths +function FindFileInDataPaths(const ASubFolder:String; + const AFileName:String):String; +//пути к подпапке в DataPaths function GetPathsInDataPaths(const ASubFolder:String):String; -function GetWritableFilePath(const ASubFolder:String;const AFileName:String):String; +//путь к подпапке в /home/user/.config/zcad/ +function GetWritableFilePath(const ASubFolder:String; + const AFileName:String):String; //**Получает части текста разделеные разделителем. //**path - текст в котором идет поиск. //**separator - разделитель. //**part - переменная которая возвращает куски текста -function GetPartOfPath(out part:String;var path:String;const separator:String):String; -function GetSupportPath:String; -{TODO: костыли))} -function GeAddrSupportPath:PString; -procedure AddSupportPath(const APath:String); +function GetPartOfPath(out part:String; + var path:String;const separator:String):String; + +//геттеры соответствующих переменных + +//разные пути с файлами поддержки, почти всегда поиск файлов осуществляется +//по этим путям. пути соджет настроить юзер в настройках программы +function GetSupportPaths:String; +//путь к бинарнику +function GetBinPath:String; +//путь к дистрибутиву +function GetDistroPath:String; +//путь к папке временных файлов +function GetTempPath:String; +//дополнительные пути с файлами поддержки, сюда рути добавляются скриптами при +//запуске программы, при загрузке preload, не сохраняются и не редактируются +function GetAdditionalSupportPaths:String; + +function GetTempFileName(const APath,APrefix,AExt:String):String; + +//добавить путь в AdditionalSupportPaths +procedure AddToAdditionalSupportPaths(const APath:String); + +//перебор файлов в папке/папках по маске, выполнение AProc и AMethod +//с подходящими файлами +procedure FromDirIterator(const APath,AMask,AFirstLoadFileName:String; + AProc:TFromDirIterator;AMethod:TFromDirIteratorObj; + APData:pointer=nil;AIgnoreDoubles:Boolean=False); +procedure FromDirsIterator(const APath,AMask,AFirstLoadFileName:String; + AProc:TFromDirIterator;AMethod:TFromDirIteratorObj; + APData:pointer=nil;AIgnoreDoubles:Boolean=False); + +//поиск расположения дистрибутива, см. вариант 2 выше про DataPaths +function FindDistroPath(const CF:TDataFilesExistChecFunc):string; + +var + //SupportPath сохраняется и настраивается, поэтому в интерфейсе с доступом + //геттером и прямым + SupportPaths:String; -procedure FromDirIterator(const APath,AMask,AFirstLoadFileName:String;AProc:TFromDirIterator;AMethod:TFromDirIteratorObj;APData:pointer=nil;AIgnoreDoubles:Boolean=False); -procedure FromDirsIterator(const APath,AMask,AFirstLoadFileName:String;AProc:TFromDirIterator;AMethod:TFromDirIteratorObj;APData:pointer=nil;AIgnoreDoubles:Boolean=False); -function FindDataPath(const CF:TDataFilesExistChecFunc):string; -var DataPath,BinPath,AdditionalSupportPath,TempPath:String; implementation -var WriteDataPath,SupportPath:String; -procedure AddSupportPath(const APath:String); +var +//остальные переменные с доступом только по геттеру + AdditionalSupportPaths,DistroPath,BinPath,WriteDataPath,TempPath:String; + +procedure AddToAdditionalSupportPaths(const APath:String); begin if APath=''then exit; - if AdditionalSupportPath='' then - AdditionalSupportPath:=APath + if AdditionalSupportPaths='' then + AdditionalSupportPaths:=APath else - if (AdditionalSupportPath[Length(AdditionalSupportPath)]=PathSeparator)or(APath[1]=PathSeparator) then - AdditionalSupportPath:=AdditionalSupportPath+APath + if (AdditionalSupportPaths[Length(AdditionalSupportPaths)]=PathSeparator)or + (APath[1]=PathSeparator) then + AdditionalSupportPaths:=AdditionalSupportPaths+APath else - AdditionalSupportPath:=AdditionalSupportPath+PathSeparator+APath; + AdditionalSupportPaths:=AdditionalSupportPaths+PathSeparator+APath; end; -function GetSupportPath:String; +function GetSupportPaths:String; begin - if AdditionalSupportPath='' then - result:=SupportPath + if AdditionalSupportPaths='' then + result:=SupportPaths else - if SupportPath='' then - result:=AdditionalSupportPath + if SupportPaths='' then + result:=AdditionalSupportPaths else - if SupportPath[Length(SupportPath)]=DirectorySeparator then - result:=SupportPath+AdditionalSupportPath + if SupportPaths[Length(SupportPaths)]=DirectorySeparator then + result:=SupportPaths+AdditionalSupportPaths else - result:=SupportPath+PathSeparator+AdditionalSupportPath + result:=SupportPaths+PathSeparator+AdditionalSupportPaths end; -function GeAddrSupportPath:PString; +function GetBinPath:String; begin - result:=@SupportPath; + result:=BinPath; end; +function GetDistroPath:String; +begin + result:=DistroPath; +end; +function GetTempPath:String; +begin + result:=TempPath; +end; +function GetAdditionalSupportPaths:String; +begin + result:=AdditionalSupportPaths; +end; +function GetTempFileName(const APath,APrefix,AExt:String):String; +//модифицированная копипаста из sysutils +Var + I:LongWord; + Start:String; +begin + If (APath='') then + Start:=GetTempPath + else + Start:=IncludeTrailingPathDelimiter(APath); + Start:=Start+APrefix; + I:=Random(high(LongWord)); + Repeat + Result:=Format('%s%.8x.%s',[Start,I,AExt]); + Inc(I); + Until not (FileExists(Result) or DirectoryExists(Result)); +end; + function FindFileInDataPaths(const ASubFolder:String;const AFileName:String):String; begin result:=IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(GetAppConfigDir(false))+ASubFolder)+AFileName; if FileExists(result)then exit; - result:=IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(DataPath)+ASubFolder)+AFileName; + result:=IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(DistroPath)+ASubFolder)+AFileName; if not FileExists(result)then exit(''); end; function GetPathsInDataPaths(const ASubFolder:String):String; begin result:=IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(GetAppConfigDir(false))+ASubFolder)+PathSeparator - +IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(DataPath)+ASubFolder); + +IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(DistroPath)+ASubFolder); end; function GetWritableFilePath(const ASubFolder:String;const AFileName:String):String; @@ -158,7 +240,7 @@ function ExpandPath(APath:String;AItDirectory:boolean=false):String; begin DefaultMacros.SubstituteMacros(APath); if APath='' then - result:=DataPath + result:=DistroPath else result:=APath; result:=StringReplace(result,'/',PathDelim,[rfReplaceAll, rfIgnoreCase]); @@ -167,31 +249,36 @@ function ExpandPath(APath:String;AItDirectory:boolean=false):String; end; procedure FromDirIteratorInternal(const path,mask,firstloadfilename:String;proc:TFromDirIterator;method:TFromDirIteratorObj;pdata:pointer;pvs:PTZctnrVectorStrings); - procedure processfile(const s:String); +var sr: TSearchRec; + s:String; + tpath:string; + + procedure processfile(const AFilename:String); var fn:String; begin - fn:=SysToUTF8(path)+SysToUTF8(s); - zTraceLn(sysutils.Format('{D}[FILEOPS]Process file %s',[fn])); + //todo: убрать лишние операйии с именем файла + fn:=ConcatPaths([SysToUTF8(path),SysToUTF8(AFilename)]); + //fn:=SysToUTF8(tpath); + zTraceLn(sysutils.Format('{D}[FILEOPS]Process file %AFilename',[fn])); if @method<>nil then method(fn,pdata); if @proc<>nil then proc(fn,pdata); end; -var sr: TSearchRec; - s:String; begin zTraceLn('{D+}[FILEOPS]FromDirIteratorInternal start'); if firstloadfilename<>'' then if fileexists(path+firstloadfilename) then processfile(firstloadfilename); - if FindFirst(path + '*', faDirectory, sr) = 0 then begin + if FindFirst(IncludeTrailingPathDelimiter(path)+'*', faDirectory, sr) = 0 then begin repeat if (sr.Name <> '.') and (sr.Name <> '..') then begin - if DirectoryExists(path + sr.Name) then - FromDirIteratorInternal(path + sr.Name + '/',mask,firstloadfilename,proc,method,pdata,pvs) + tpath:=ConcatPaths([path,sr.Name]); + if DirectoryExists(tpath) then + FromDirIteratorInternal(IncludeTrailingPathDelimiter(tpath),mask,firstloadfilename,proc,method,pdata,pvs) else begin s:=lowercase(sr.Name); if s<>firstloadfilename then @@ -242,22 +329,27 @@ procedure FromDirIterator(const APath,AMask,AFirstLoadFileName:String;AProc:TFro if AIgnoreDoubles then vs.done; end; -function FindDataPath(const CF:TDataFilesExistChecFunc):string; +function FindDistroPath(const CF:TDataFilesExistChecFunc):string; var ts:string; begin - if @cf<>nil then begin - if cf(DataPath) then - exit(DataPath); - ts:=GetAppConfigDir(true); - if cf(ts) then - exit(ts); + try + if @cf<>nil then begin + if cf(DistroPath) then + exit(DistroPath); + ts:=GetAppConfigDir(true); + if cf(ts) then + exit(ts); + end; + Result:=''; + finally + if result<>''then + DistroPath:=Result; end; - result:=''; end; initialization BinPath:=SysToUTF8(ExtractFilePath(paramstr(0))); - DataPath:=SysToUTF8(ExpandFileName(ExtractFilePath(paramstr(0))+'../..'));; - WriteDataPath:=GetAppConfigDir(false); + DistroPath:=IncludeTrailingPathDelimiter(SysToUTF8(ExpandFileName(ExtractFilePath(paramstr(0))+'../..'))); + WriteDataPath:=IncludeTrailingPathDelimiter(GetAppConfigDir(false)); TempPath:=IncludeTrailingPathDelimiter(GetTempDir); end. diff --git a/cad_source/components/zebase/uzbtypes.pas b/cad_source/components/zebase/uzbtypes.pas index 95b2fffca..b592669c9 100644 --- a/cad_source/components/zebase/uzbtypes.pas +++ b/cad_source/components/zebase/uzbtypes.pas @@ -207,6 +207,9 @@ TCalculatedString=record value:string; format:string; end; +PFString=^TFString; +TFString={-}function:string{/pointer/}; + TOSnapModeControl=(On,Off,AsOwner); TTextJustify=(jstl(*'TopLeft'*), jstc(*'TopCenter'*), diff --git a/cad_source/components/zscript/UBaseTypeDescriptor.pas b/cad_source/components/zscript/UBaseTypeDescriptor.pas index fbd1e4d27..36cc84047 100644 --- a/cad_source/components/zscript/UBaseTypeDescriptor.pas +++ b/cad_source/components/zscript/UBaseTypeDescriptor.pas @@ -170,7 +170,6 @@ TPointerTypeManipulator=class(TBaseTypeManipulator) //destructor Done;virtual; end; - var FundamentalDoubleDescriptorObj:DoubleDescriptor; FundamentalUnicodeStringDescriptorObj:GDBUnicodeStringDescriptor; @@ -558,7 +557,6 @@ function TEnumDataDescriptor.GetDecoratedValueAsString(pinstance:Pointer; const begin result:=GetValueAsString(pinstance); end; - constructor TCalculatedStringDescriptor.init; begin inherited init('TCalculatedStringDescriptor',nil); @@ -648,4 +646,5 @@ function TCalculatedStringDescriptor.CreateProperties(const f:TzeUnitsFormat;mod GDBEnumDataDescriptorObj.init; CalculatedStringDescriptor.init; + end. diff --git a/cad_source/other/tmp322_freetype.pp b/cad_source/other/tmp322_freetype.pp index 66e7660e8..0d280156f 100644 --- a/cad_source/other/tmp322_freetype.pp +++ b/cad_source/other/tmp322_freetype.pp @@ -390,7 +390,7 @@ function TFontManager.GetSearchPath : string; procedure TFontManager.SetSearchPath (AValue : string); procedure AddPath (apath : string); begin - FPaths.Add (IncludeTrailingBackslash(Apath)); + FPaths.Add (IncludeTrailingPathDelimiter(Apath)); end; var p : integer; begin @@ -1064,7 +1064,7 @@ procedure TBaseStringBitmaps.GetBoundRect (out aRect : TRect); {$ifdef WINDOWS} procedure SetWindowsFontPath; begin - DefaultSearchPath := includetrailingbackslash(GetEnvironmentVariable('windir')) + 'fonts'; + DefaultSearchPath := IncludeTrailingPathDelimiter(GetEnvironmentVariable('windir')) + 'fonts'; end; {$endif} diff --git a/cad_source/zcad.pas b/cad_source/zcad.pas index 2d984c820..479688761 100644 --- a/cad_source/zcad.pas +++ b/cad_source/zcad.pas @@ -331,7 +331,7 @@ //инициализация drawings FontManager.EnumerateFontFiles; - uzcdrawings.startup('$(ZDataPath)/rtl/dwg/DrawingVars.pas',''); + uzcdrawings.startup('$(DistroPath)/rtl/dwg/DrawingVars.pas',''); uzcdevicebase.startup; {$IF lcl_fullversion>2001200} {$ELSE} diff --git a/cad_source/zcad/commands/uzccmdeditunit.pas b/cad_source/zcad/commands/uzccmdeditunit.pas index 925978895..4e401a011 100644 --- a/cad_source/zcad/commands/uzccmdeditunit.pas +++ b/cad_source/zcad/commands/uzccmdeditunit.pas @@ -59,7 +59,7 @@ function EditUnit(var entityunit:TSimpleUnit):boolean; mem.AddData(@astring[1],length(astring)); entityunit.free; - units.parseunit(GetSupportPath,InterfaceTranslate,mem,@entityunit); + units.parseunit(GetSupportPaths,InterfaceTranslate,mem,@entityunit); pu:=entunits.beginiterate(ir); if pu<>nil then diff --git a/cad_source/zcad/commands/uzccmdload.pas b/cad_source/zcad/commands/uzccmdload.pas index 247d6900b..4304ec51b 100644 --- a/cad_source/zcad/commands/uzccmdload.pas +++ b/cad_source/zcad/commands/uzccmdload.pas @@ -114,10 +114,10 @@ function Internal_Load_Merge(const s: AnsiString;loadproc:TFileLoadProcedure;Loa dbpas:=''; end; if dbpas<>'' then begin - pu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName); + pu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName); if assigned(pu) then begin mem.InitFromFile(dbpas); - units.parseunit(GetSupportPath,InterfaceTranslate,mem,PTSimpleUnit(pu)); + units.parseunit(GetSupportPaths,InterfaceTranslate,mem,PTSimpleUnit(pu)); remapprjdb(pu); mem.done; end; diff --git a/cad_source/zcad/commands/uzccommand_cfgaddsupportpath.pas b/cad_source/zcad/commands/uzccommand_cfgaddsupportpath.pas index 04276a83f..72c0c96e3 100644 --- a/cad_source/zcad/commands/uzccommand_cfgaddsupportpath.pas +++ b/cad_source/zcad/commands/uzccommand_cfgaddsupportpath.pas @@ -27,7 +27,7 @@ interface implementation function cfgAddSupportPath_com(const Context:TZCADCommandContext;operands:TCommandOperands):TCommandResult; begin - AddSupportPath(ExpandPath(operands)); + AddToAdditionalSupportPaths(ExpandPath(operands)); result:=cmd_ok; end; diff --git a/cad_source/zcad/commands/uzccommand_copyclip.pas b/cad_source/zcad/commands/uzccommand_copyclip.pas index bef8916d6..3495031de 100644 --- a/cad_source/zcad/commands/uzccommand_copyclip.pas +++ b/cad_source/zcad/commands/uzccommand_copyclip.pas @@ -32,7 +32,8 @@ interface uzgldrawcontext, uzcdrawings, uzccommandsabstract,uzccommandsimpl, - uzegeometry,uzegeometrytypes,uzcCommand_Duplicate; + uzegeometry,uzegeometrytypes,uzcCommand_Duplicate, + uzcFileStructure; const ZCAD_DXF_CLIPBOARD_NAME='DXF2000@ZCADv0.9'; @@ -54,10 +55,11 @@ procedure CopyToClipboard; begin if fileexists(utf8tosys(CopyClipFile)) then SysUtils.deletefile(CopyClipFile); - s:=temppath+'Z$C'+inttohex(random(15),1)+inttohex(random(15),1)+inttohex(random(15),1)+inttohex(random(15),1) - +inttohex(random(15),1)+inttohex(random(15),1)+inttohex(random(15),1)+inttohex(random(15),1)+'.dxf'; + s:=GetTempFileName(GetTempPath,'Z$C','dxf'); + //s:=GetTempPath+'Z$C'+inttohex(random(15),1)+inttohex(random(15),1)+inttohex(random(15),1)+inttohex(random(15),1) + // +inttohex(random(15),1)+inttohex(random(15),1)+inttohex(random(15),1)+inttohex(random(15),1)+'.dxf'; CopyClipFile:=s; - savedxf2000(s,DataPath + '/components/empty.dxf',ClipboardDWG^); + savedxf2000(s,ConcatPaths([GetDistroPath,CFScomponentsDir,CFSemptydxfFile]),ClipboardDWG^); s:=s+#0; suni:=unicodestring(s); Clipboard.Open; @@ -79,7 +81,7 @@ procedure ReCreateClipboardDWG; ClipboardDWG.done; Freemem(ClipboardDWG); end; - ClipboardDWG:=drawings.CreateDWG('$(ZDataPath)/rtl/dwg/DrawingVars.pas',''); + ClipboardDWG:=drawings.CreateDWG('$(DistroPath)/rtl/dwg/DrawingVars.pas',''); //ClipboardDWG.DimStyleTable.AddItem('Standart',pds); end; diff --git a/cad_source/zcad/commands/uzccommand_dataimport.pas b/cad_source/zcad/commands/uzccommand_dataimport.pas index 8dc22d70e..74b1f2950 100644 --- a/cad_source/zcad/commands/uzccommand_dataimport.pas +++ b/cad_source/zcad/commands/uzccommand_dataimport.pas @@ -189,7 +189,7 @@ function DataImport_com(const Context:TZCADCommandContext;operands:TCommandOpera exit(cmd_cancel); end else begin //FileName:=ExpandPath(operands); - FileName:=FindInPaths(GetSupportPath,operands); + FileName:=FindInPaths(GetSupportPaths,operands); end; isload:=FileExists(utf8tosys(FileName)); if isload then begin diff --git a/cad_source/zcad/commands/uzccommand_drawsuperline.pas b/cad_source/zcad/commands/uzccommand_drawsuperline.pas index ebd3efa72..81b8dabb8 100644 --- a/cad_source/zcad/commands/uzccommand_drawsuperline.pas +++ b/cad_source/zcad/commands/uzccommand_drawsuperline.pas @@ -121,7 +121,7 @@ class procedure TMethod2ltContextSetter.SetCtx(mode:TLapeScriptContextModes;ctx: end; if LSCMContextSetup in mode then begin if ctx is TMethod2ltContext then begin - psu:=units.findunit(GetSupportPath,InterfaceTranslate,'superline'); + psu:=units.findunit(GetSupportPaths,InterfaceTranslate,'superline'); if psu<>nil then pvd:=psu.FindVariable('CABLE_MountingMethod') else @@ -176,7 +176,7 @@ function createSuperLine(p1,p2:GDBVertex;nameSL:string;changeLayer:boolean;Layer pvarext:=psuperline^.GetExtension; if pvarext<>nil then begin - psu:=units.findunit(GetSupportPath,InterfaceTranslate,'superline'); + psu:=units.findunit(GetSupportPaths,InterfaceTranslate,'superline'); if psu<>nil then pvarext.entityunit.copyfrom(psu); end; @@ -234,7 +234,7 @@ procedure createline; pvarext:=psuperline^.GetExtension; if pvarext<>nil then begin - psu:=units.findunit(GetSupportPath,InterfaceTranslate,'superline'); + psu:=units.findunit(GetSupportPaths,InterfaceTranslate,'superline'); if psu<>nil then pvarext.entityunit.copyfrom(psu); end; @@ -292,10 +292,10 @@ procedure createline; begin //ZCMsgCallBackInterface.TextMessage('operands:'+operands,TMWOHistoryOut); - //psu:=units.findunit(SupportPath,InterfaceTranslate,'superline'); + //psu:=units.findunit(SupportPaths,InterfaceTranslate,'superline'); //пытаемся найти или загрузить модуль - psu:=units.findunit(GetSupportPath,//пути по которым будет искаться юнит если он еще небыл загружен + psu:=units.findunit(GetSupportPaths,//пути по которым будет искаться юнит если он еще небыл загружен InterfaceTranslate,//процедура локализации которая будет пытаться перевести на русский все что можно при загрузке 'superline');//имя модуля diff --git a/cad_source/zcad/commands/uzccommand_dwgnew.pas b/cad_source/zcad/commands/uzccommand_dwgnew.pas index aab84011c..61b8435b8 100644 --- a/cad_source/zcad/commands/uzccommand_dwgnew.pas +++ b/cad_source/zcad/commands/uzccommand_dwgnew.pas @@ -46,7 +46,7 @@ function DWGNew_com(const Context:TZCADCommandContext;operands:TCommandOperands) FileName:ansistring; dwgname:ansistring; begin - PDrawing:=drawings.CreateDWG('$(ZDataPath)/rtl/dwg/DrawingDeviceBase.pas','$(ZDataPath)/rtl/dwg/DrawingVars.pas'); + PDrawing:=drawings.CreateDWG('$(DistroPath)/rtl/dwg/DrawingDeviceBase.pas','$(DistroPath)/rtl/dwg/DrawingVars.pas'); drawings.PushBackData(PDrawing); FileName:=operands; diff --git a/cad_source/zcad/commands/uzccommand_examplevarmanipulation.pas b/cad_source/zcad/commands/uzccommand_examplevarmanipulation.pas index 87b208c97..f2aa19228 100644 --- a/cad_source/zcad/commands/uzccommand_examplevarmanipulation.pas +++ b/cad_source/zcad/commands/uzccommand_examplevarmanipulation.pas @@ -73,7 +73,7 @@ function ExampleVarManipulation_com(const Context:TZCADCommandContext;operands:T ProcessVariableAttributes(pvd^.attrib,vda_RO,0);//ставим ридонли для инспектора //пытаемся найти или загрузить модуль - pu:=units.findunit(GetSupportPath,//пути по которым будет искаться юнит если он еще небыл загружен + pu:=units.findunit(GetSupportPaths,//пути по которым будет искаться юнит если он еще небыл загружен InterfaceTranslate,//процедура локализации которая будет пытаться перевести на русский все что можно при загрузке 'uentrepresentation');//имя модуля if pu<>nil then begin //если нашли diff --git a/cad_source/zcad/commands/uzccommand_expldbcheck.pas b/cad_source/zcad/commands/uzccommand_expldbcheck.pas index 53cf2b66a..8ad5e9a4c 100644 --- a/cad_source/zcad/commands/uzccommand_expldbcheck.pas +++ b/cad_source/zcad/commands/uzccommand_expldbcheck.pas @@ -53,7 +53,7 @@ function explDbCheck_com(const Context:TZCADCommandContext;operands:TCommandOper begin pum:=drawings.GetCurrentDWG^.GetDWGUnits;//получаем модули подключеные к чертежу if pum<>nil then begin - pdbu:=pum^.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName);//получаем модуль БД чертежа + pdbu:=pum^.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName);//получаем модуль БД чертежа if pdbu<>nil then while commandmanager.getentity(rscmSelectDestinationEntity,pEntity) do begin EntVarExt:=pEntity^.GetExtension; diff --git a/cad_source/zcad/commands/uzccommand_help.pas b/cad_source/zcad/commands/uzccommand_help.pas index 8f4079430..e78c44620 100644 --- a/cad_source/zcad/commands/uzccommand_help.pas +++ b/cad_source/zcad/commands/uzccommand_help.pas @@ -22,9 +22,10 @@ interface uses + SysUtils, {$ifdef unix}Process,sysutils,{$else}windows,Forms,{$endif} uzcLog,LCLIntf, - uzccommandsabstract,uzccommandsimpl,uzccommandsmanager, + uzccommandsabstract,uzccommandsimpl,uzccommandsmanager,uzcFileStructure, uzbpaths; implementation @@ -78,11 +79,11 @@ function Help_com(const Context:TZCADCommandContext;operands:TCommandOperands):T var htmlDoc:string; begin - htmlDoc:=DataPath+'/help/userguide.ru.html';//todo: расхардкодить + htmlDoc:=ConcatPaths([GetDistroPath,CFShelpDir,format(CFSuserguide_shtmlFile,['ru'])]);//todo: расхардкодить if CommandManager.CommandsStack.isEmpty then OpenDocument(htmlDoc) else - OpenDocumentWithAnchor(htmlDoc,'#_'+lowercase(CommandManager.CommandsStack.getLast^.CommandName)); + OpenDocumentWithAnchor(htmlDoc,format('#_%s',[lowercase(CommandManager.CommandsStack.getLast^.CommandName)])); result:=cmd_ok; end; diff --git a/cad_source/zcad/commands/uzccommand_l2sl.pas b/cad_source/zcad/commands/uzccommand_l2sl.pas index f4764098f..e8e96b1a0 100644 --- a/cad_source/zcad/commands/uzccommand_l2sl.pas +++ b/cad_source/zcad/commands/uzccommand_l2sl.pas @@ -81,7 +81,7 @@ function L2SL_com(const Context:TZCADCommandContext;operands:TCommandOperands):T psuperline^.init(nil,nil,0,pv^.CoordInWCS.lBegin,pv^.CoordInWCS.lEnd); pvarext:=psuperline^.GetExtension; if pvarext<>nil then begin - psu:=units.findunit(GetSupportPath,InterfaceTranslate,'superline'); + psu:=units.findunit(GetSupportPaths,InterfaceTranslate,'superline'); if psu<>nil then pvarext.entityunit.copyfrom(psu); end; diff --git a/cad_source/zcad/commands/uzccommand_load.pas b/cad_source/zcad/commands/uzccommand_load.pas index 7b83a5051..de08da048 100644 --- a/cad_source/zcad/commands/uzccommand_load.pas +++ b/cad_source/zcad/commands/uzccommand_load.pas @@ -65,9 +65,9 @@ TZCADPathsMacroMethods=class if cdwg<>nil then begin result:=ExtractFileDir(cdwg^.GetFileName); if result=''then - result:=TempPath; + result:=GetTempPath; end else - result:=TempPath; + result:=GetTempPath; end; class function TZCADPathsMacroMethods.MacroFuncCurrentDrawingFileNameOnly(const {%H-}Param: string; const Data: PtrInt;var {%H-}Abort: boolean): string; @@ -79,9 +79,9 @@ TZCADPathsMacroMethods=class result:=ExtractFileName(cdwg^.GetFileName); result:=ChangeFileExt(result,''); if result=''then - result:=TempPath; + result:=GetTempPath; end else - result:=TempPath; + result:=GetTempPath; end; class function TZCADPathsMacroMethods.MacroFuncCurrentDrawingFileName(const {%H-}Param: string; const Data: PtrInt;var {%H-}Abort: boolean): string; @@ -92,9 +92,9 @@ TZCADPathsMacroMethods=class if cdwg<>nil then begin result:=ExtractFileName(cdwg^.GetFileName); if result=''then - result:=TempPath; + result:=GetTempPath; end else - result:=TempPath; + result:=GetTempPath; end; class function TZCADPathsMacroMethods.MacroFuncLastAutoSaveFile(const {%H-}Param: string; const Data: PtrInt;var {%H-}Abort: boolean): string; @@ -123,7 +123,7 @@ function Load_com(const Context:TZCADCommandContext;operands:TCommandOperands):T if LastFileHandle>=0 then loadproc:=Ext2LoadProcMap.vec.GetPLincedData(LastFileHandle)^.FileLoadProcedure; end else begin - s:=FindInPaths(GetSupportPath,operands); + s:=FindInPaths(GetSupportPaths,operands); if s='' then s:=ExpandPath(operands); end; diff --git a/cad_source/zcad/commands/uzccommand_mergeblocks.pas b/cad_source/zcad/commands/uzccommand_mergeblocks.pas index 6fd5c5916..caf442873 100644 --- a/cad_source/zcad/commands/uzccommand_mergeblocks.pas +++ b/cad_source/zcad/commands/uzccommand_mergeblocks.pas @@ -42,7 +42,7 @@ function MergeBlocks_com(const Context:TZCADCommandContext;operands:TCommandOper drawings.CurrentDWG:=BlockBaseDWG; if length(operands)>0 then - s:=FindInPaths(GetSupportPath,operands); + s:=FindInPaths(GetSupportPaths,operands); result:=Merge_com(Context,s); drawings.CurrentDWG:=pdwg; diff --git a/cad_source/zcad/commands/uzccommand_saveas.pas b/cad_source/zcad/commands/uzccommand_saveas.pas index f94dbf243..163f9b9cb 100644 --- a/cad_source/zcad/commands/uzccommand_saveas.pas +++ b/cad_source/zcad/commands/uzccommand_saveas.pas @@ -34,6 +34,7 @@ interface uzcstrconsts, uzcdrawings, uzcinterface, + uzcFileStructure, uzeffdxf,uzedrawingsimple,Varman,uzctnrVectorBytes,uzcdrawing,uzcTranslations,uzeconsts; function SaveAs_com(const Context:TZCADCommandContext;operands:TCommandOperands):TCommandResult; @@ -48,8 +49,8 @@ function dwgSaveDXFDPAS(s:String;dwg:PTSimpleDrawing):Integer; pu:ptunit; allok:boolean; begin - allok:=savedxf2000(s,DataPath + '/components/empty.dxf',dwg^); - pu:=PTZCADDrawing(dwg).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName); + allok:=savedxf2000(s,ConcatPaths([GetDistroPath,CFScomponentsDir,CFSemptydxfFile]),dwg^); + pu:=PTZCADDrawing(dwg).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName); mem.init(1024); pu^.SavePasToMem(mem); mem.SaveToFile(ChangeFileExt(expandpath(s),'.dbpas')); diff --git a/cad_source/zcad/commands/uzccommand_unitsman.pas b/cad_source/zcad/commands/uzccommand_unitsman.pas index 4595d62f5..33dd54e46 100644 --- a/cad_source/zcad/commands/uzccommand_unitsman.pas +++ b/cad_source/zcad/commands/uzccommand_unitsman.pas @@ -39,7 +39,7 @@ function UnitsMan_com(const Context:TZCADCommandContext;operands:TCommandOperand PUnit:ptunit; begin if length(Operands)>0 then begin - PUnit:=units.findunit(GetSupportPath,InterfaceTranslate,operands); + PUnit:=units.findunit(GetSupportPaths,InterfaceTranslate,operands); if PUnit<>nil then EditUnit(PUnit^) else diff --git a/cad_source/zcad/commands/uzccommand_varsedsel.pas b/cad_source/zcad/commands/uzccommand_varsedsel.pas index ece028a56..7890f4e81 100644 --- a/cad_source/zcad/commands/uzccommand_varsedsel.pas +++ b/cad_source/zcad/commands/uzccommand_varsedsel.pas @@ -71,7 +71,7 @@ function VarsEdSel_com(const Context:TZCADCommandContext;operands:TCommandOperan pentvarext:=pobj^.GetExtension; if pentvarext<>nil then begin pentvarext.entityunit.free; - units.parseunit(GetSupportPath,InterfaceTranslate,mem,@pentvarext.entityunit); + units.parseunit(GetSupportPaths,InterfaceTranslate,mem,@pentvarext.entityunit); mem.Seek(0); inc(counter); end; diff --git a/cad_source/zcad/commands/uzccommand_varsedunit.pas b/cad_source/zcad/commands/uzccommand_varsedunit.pas index cc653ce06..c98e95156 100644 --- a/cad_source/zcad/commands/uzccommand_varsedunit.pas +++ b/cad_source/zcad/commands/uzccommand_varsedunit.pas @@ -45,7 +45,7 @@ function VarsEdUnit_com(const Context:TZCADCommandContext;operands:TCommandOpera begin if length(Operands)>0 then begin op:=Operands; - u:=units.findunit(GetSupportPath,InterfaceTranslate,op); + u:=units.findunit(GetSupportPaths,InterfaceTranslate,op); if u<>nil then EditUnit(u^) else diff --git a/cad_source/zcad/core/drawings/uzcdrawing.pas b/cad_source/zcad/core/drawings/uzcdrawing.pas index 49c852021..1456e1be6 100644 --- a/cad_source/zcad/core/drawings/uzcdrawing.pas +++ b/cad_source/zcad/core/drawings/uzcdrawing.pas @@ -259,14 +259,14 @@ constructor TZCADDrawing.init; pdwgwarsunit^.CreateFixedVariable('DWG_TextSize','Double',@TextSize); if preloadedfile1<>'' then - DWGUnits.loadunit(GetSupportPath,InterfaceTranslate,expandpath(preloadedfile1),nil); + DWGUnits.loadunit(GetSupportPaths,InterfaceTranslate,expandpath(preloadedfile1),nil); if preloadedfile2<>'' then - DWGUnits.loadunit(GetSupportPath,InterfaceTranslate,expandpath(preloadedfile2),nil); - DWGDBUnit:=DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName); + DWGUnits.loadunit(GetSupportPaths,InterfaceTranslate,expandpath(preloadedfile2),nil); + DWGDBUnit:=DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName); pcam:=nil; pvd:=nil; - pdwgwarsunit:=DWGUnits.findunit(GetSupportPath,InterfaceTranslate,'DrawingVars'); + pdwgwarsunit:=DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,'DrawingVars'); if assigned(pdwgwarsunit) then pvd:=pdwgwarsunit.InterfaceVariables.findvardesc('camera'); if pvd<>nil then diff --git a/cad_source/zcad/core/drawings/uzcdrawings.pas b/cad_source/zcad/core/drawings/uzcdrawings.pas index f5114cd1b..5ca9657d7 100644 --- a/cad_source/zcad/core/drawings/uzcdrawings.pas +++ b/cad_source/zcad/core/drawings/uzcdrawings.pas @@ -376,8 +376,8 @@ procedure TZCADDrawingsManager.asociatedwgvars; { TODO : переделать } if typeof(CurrentDWG^)=typeof(TZCADDrawing) then begin - DWGDBUnit:=PTZCADDrawing(CurrentDWG).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName); - DWGUnit:=PTZCADDrawing(CurrentDWG).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,'DrawingVars'); + DWGDBUnit:=PTZCADDrawing(CurrentDWG).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName); + DWGUnit:=PTZCADDrawing(CurrentDWG).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,'DrawingVars'); //DWGUnit.AssignToSymbol(SysVar.DWG.DWG_SnapGrid,'DWG_SnapGrid'); SysVar.dwg.DWG_SnapGrid:=@CurrentDWG.SnapGrid; //DWGUnit.AssignToSymbol(SysVar.DWG.DWG_DrawGrid,'DWG_DrawGrid'); @@ -989,7 +989,7 @@ procedure startup(preloadedfile1,preloadedfile2:String); LTypeManager.init(100); - LTypeManager.LoadFromFile(FindInPaths(GetSupportPath,'zcad.lin'),TLOLoad); + LTypeManager.LoadFromFile(FindInPaths(GetSupportPaths,'zcad.lin'),TLOLoad); //FromDirIterator({sysparam.programpath+'fonts/'}'C:\Program Files\AutoCAD 2010\Fonts\','*.shx','',addf,nil); diff --git a/cad_source/zcad/devicebase/uzcdevicebase.pas b/cad_source/zcad/devicebase/uzcdevicebase.pas index 7ab0253d5..4ae6dc89c 100644 --- a/cad_source/zcad/devicebase/uzcdevicebase.pas +++ b/cad_source/zcad/devicebase/uzcdevicebase.pas @@ -202,7 +202,7 @@ constructor DeviceManager.init; end; procedure loaddev(const fn:string;pdata:pointer); begin - units.loadunit(GetSupportPath,InterfaceTranslate,{utf8tosys}(fn),nil); + units.loadunit(GetSupportPaths,InterfaceTranslate,{utf8tosys}(fn),nil); end; procedure loadvariants(const fn:string;pdata:pointer); var diff --git a/cad_source/zcad/electrotech/uzccomdb.pas b/cad_source/zcad/electrotech/uzccomdb.pas index 75a61b883..c05083b96 100644 --- a/cad_source/zcad/electrotech/uzccomdb.pas +++ b/cad_source/zcad/electrotech/uzccomdb.pas @@ -47,7 +47,7 @@ function DBaseAdd_com(const Context:TZCADCommandContext;operands:TCommandOperand begin if commandmanager.ContextCommandParams<>nil then begin - pu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName); + pu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName); pvd:=pu^.FindVariable('DBCounter'); vn:=inttostr(Integer(pvd.data.Addr.Instance^)); vn:='_EQ'+dupestring('0',6-length(vn))+vn; @@ -73,7 +73,7 @@ function DBaseRename_com(const Context:TZCADCommandContext;operands:TCommandOper begin if commandmanager.ContextCommandParams<>nil then begin - pu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName); + pu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName); pdbv:=pu.InterfaceVariables.findvardescbyinst(PTHardTypedData(commandmanager.ContextCommandParams)^.Instance); if pdbv<>nil then begin @@ -131,7 +131,7 @@ procedure DBLinkProcess(pEntity:PGDBObjEntity;const drawing:TDrawingDef); pum:=drawing.GetDWGUnits; if pum<>nil then begin - pdbu:=pum^.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName); + pdbu:=pum^.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName); if pdbu<>nil then begin pdbv:=pdbu^.FindVariable(pstring(pvn.data.Addr.Instance)^); @@ -161,7 +161,7 @@ function DBaseLink_com(const Context:TZCADCommandContext;operands:TCommandOperan begin if commandmanager.ContextCommandParams<>nil then begin - pu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName); + pu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName); pdbv:=pu.InterfaceVariables.findvardescbyinst(PTHardTypedData(commandmanager.ContextCommandParams)^.Instance); if pdbv<>nil then begin diff --git a/cad_source/zcad/electrotech/uzccomelectrical.pas b/cad_source/zcad/electrotech/uzccomelectrical.pas index 21ca46d12..d57419845 100644 --- a/cad_source/zcad/electrotech/uzccomelectrical.pas +++ b/cad_source/zcad/electrotech/uzccomelectrical.pas @@ -704,7 +704,7 @@ procedure KIP_CDBuild_com.Command(Operands:TCommandOperands); //создаем матрицу для перемещения по оси У на +15 t_matrix:=uzegeometry.CreateTranslationMatrix(createvertex(0,15,0)); //ищем модуль с переменными дефолтными переменными для представителя устройства - pu:=units.findunit(GetSupportPath,InterfaceTranslate,'uentrepresentation'); + pu:=units.findunit(GetSupportPaths,InterfaceTranslate,'uentrepresentation'); //эта команда работает после указания пользователем точки вставки //смещение первого вставляемого элемента nulvertex currentcoord:=nulvertex; @@ -1426,7 +1426,7 @@ function El_Wire_com.AfterClick(const Context:TZCADCommandContext;wc: GDBvertex; zcSetEntPropFromCurrentDrawingProp(TempNet); drawings.standardization(TempNet,GDBNetID); ptempnetvarext:=TempNet^.GetExtension; - ptempnetvarext.entityunit.copyfrom(units.findunit(GetSupportPath,InterfaceTranslate,'trace')); + ptempnetvarext.entityunit.copyfrom(units.findunit(GetSupportPaths,InterfaceTranslate,'trace')); pvd:=ptempnetvarext.entityunit.FindVariable('NMO_Suffix'); pstring(pvd^.data.Addr.Instance)^:=inttostr(drawings.GetCurrentDWG.numerator.getnumber(UNNAMEDNET,SysVar.DSGN.DSGN_TraceAutoInc^)); pvd:=ptempnetvarext.entityunit.FindVariable('NMO_Prefix'); @@ -1617,7 +1617,7 @@ function _Cable_com_BeforeClick(const Context:TZCADCommandContext;wc: GDBvertex; //uunitmanager.units.loadunit(expandpath('*blocks\el\cable.pas'),@p3dpl^.ou); pcablevarext:=p3dpl^.GetExtension; - pcablevarext.entityunit.copyfrom(units.findunit(GetSupportPath,InterfaceTranslate,'cable')); + pcablevarext.entityunit.copyfrom(units.findunit(GetSupportPaths,InterfaceTranslate,'cable')); //pvd:=p3dpl^.ou.FindVariable('DB_link'); //pstring(pvd^.Instance)^:='Кабель ??'; @@ -2345,7 +2345,7 @@ function _Material_com_Legend(const Context:TZCADCommandContext;operands:TComman pt^.ptablestyle:=drawings.GetCurrentDWG.TableStyleTable.getAddres('Spec'); pt^.tbl.free; - pdbu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName); + pdbu:=PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName); currentgroup:=MainSpecContentFormat.beginiterate(ir_inscf); if currentgroup<>nil then if length(currentgroup^)>1 then @@ -2791,7 +2791,7 @@ function El_Leader_com_AfterClick(const Context:TZCADCommandContext;wc: GDBverte pcablevarext:=pleader^.GetExtension; if pcablevarext<>nil then - pcablevarext.entityunit.copyfrom(units.findunit(GetSupportPath,InterfaceTranslate,'elleader')); + pcablevarext.entityunit.copyfrom(units.findunit(GetSupportPaths,InterfaceTranslate,'elleader')); zcSetEntPropFromCurrentDrawingProp(pleader); drawings.standardization(pleader,GDBELleaderID); @@ -2934,7 +2934,7 @@ function CreateCable(name,mater:String):PGDBObjCable; result.init(drawings.GetCurrentROOT,nil,0); //result := Pointer(drawings.GetCurrentROOT.ObjArray.CreateInitObj(GDBCableID,drawings.GetCurrentROOT)); pentvarext:=result^.GetExtension; - pentvarext.entityunit.copyfrom(units.findunit(GetSupportPath,InterfaceTranslate,'cable')); + pentvarext.entityunit.copyfrom(units.findunit(GetSupportPaths,InterfaceTranslate,'cable')); pvd:=pentvarext.entityunit.FindVariable('NMO_Suffix'); pstring(pvd^.data.Addr.Instance)^:=''; pvd:=pentvarext.entityunit.FindVariable('NMO_Prefix'); @@ -3047,7 +3047,7 @@ procedure LinkRisersToNets; begin begin //s:=ExpandPath(operands); - s:=FindInPaths(GetSupportPath,operands); + s:=FindInPaths(GetSupportPaths,operands); end; end; isload:=FileExists(utf8tosys(s)); @@ -3153,7 +3153,7 @@ procedure LinkRisersToNets; plinevarext:=New_line^.GetExtension; if plinevarext=nil then plinevarext:=AddVariablesToEntity(New_line); - plinevarext.entityunit.copyfrom(units.findunit(GetSupportPath,InterfaceTranslate,'_riserlink')); + plinevarext.entityunit.copyfrom(units.findunit(GetSupportPaths,InterfaceTranslate,'_riserlink')); vd:=plinevarext.entityunit.FindVariable('LengthOverrider'); pvn :=FindVariableInEnt(riser,'Elevation'); @@ -3453,7 +3453,7 @@ procedure startup; SysUnit^.RegisterType(TypeInfo(TLinkType)); MainSpecContentFormat.init(100); - MainSpecContentFormat.loadfromfile(FindInPaths(GetSupportPath,'main.sf')); + MainSpecContentFormat.loadfromfile(FindInPaths(GetSupportPaths,'main.sf')); CreateZCADCommand(@RegenZEnts_com,'RegenZEnts',CADWG,0); Wire.init('El_Wire',0,0); commandmanager.CommandRegister(@Wire); diff --git a/cad_source/zcad/electrotech/uzccomops.pas b/cad_source/zcad/electrotech/uzccomops.pas index e0607b85b..56c302fa8 100644 --- a/cad_source/zcad/electrotech/uzccomops.pas +++ b/cad_source/zcad/electrotech/uzccomops.pas @@ -690,7 +690,7 @@ function GetNumUnit(uname:String):PTUnit; UManager.init; defaultunit.init(DefNumMetric); - units.loadunit(GetSupportPath,InterfaceTranslate,expandpath('$(ZDataPath)/rtl/objcalc/opsmarkdef.pas'),(@defaultunit)); + units.loadunit(GetSupportPaths,InterfaceTranslate,expandpath('$(DistroPath)/rtl/objcalc/opsmarkdef.pas'),(@defaultunit)); pcabledesk:=cman.beginiterate(ir); if pcabledesk<>nil then repeat @@ -804,7 +804,7 @@ function GetNumUnit(uname:String):PTUnit; //cpGC_HDShortName.ChangedData.StoreUndoData(pvd4^.data.Addr.GetInstance); end; - units.loadunit(GetSupportPath,InterfaceTranslate,expandpath('$(ZDataPath)/rtl/objcalc/opsmark.pas'),(currentunit)); + units.loadunit(GetSupportPaths,InterfaceTranslate,expandpath('$(DistroPath)/rtl/objcalc/opsmark.pas'),(currentunit)); //if pvd1<>nil then begin // cpGC_NumberInGroup.ChangedData.StoreDoData(pvd1^.data.Addr.GetInstance);; diff --git a/cad_source/zcad/electrotech/uzcregelectrotechfeatures.pas b/cad_source/zcad/electrotech/uzcregelectrotechfeatures.pas index 272483cb1..b54bf1251 100644 --- a/cad_source/zcad/electrotech/uzcregelectrotechfeatures.pas +++ b/cad_source/zcad/electrotech/uzcregelectrotechfeatures.pas @@ -91,8 +91,8 @@ procedure RunEentityFunctionEditor(PInstance:Pointer); initialization; - FunctionsTree.LoadTree(expandpath('$(ZDataPath)/rtl/functions.xml'),InterfaceTranslate); - RepresentationsTree.LoadTree(expandpath('$(ZDataPath)/rtl/representations.xml'),InterfaceTranslate); + FunctionsTree.LoadTree(expandpath('$(DistroPath)/rtl/functions.xml'),InterfaceTranslate); + RepresentationsTree.LoadTree(expandpath('$(DistroPath)/rtl/representations.xml'),InterfaceTranslate); CreateZCADCommand(@FunctionsTest_com,'ft',CADWG,0); CreateZCADCommand(@RepresentationsTest_com,'rt',CADWG,0); diff --git a/cad_source/zcad/entities/uzcenitiesvariablesextender.pas b/cad_source/zcad/entities/uzcenitiesvariablesextender.pas index ddaf0e1d1..cfa2df212 100644 --- a/cad_source/zcad/entities/uzcenitiesvariablesextender.pas +++ b/cad_source/zcad/entities/uzcenitiesvariablesextender.pas @@ -352,7 +352,7 @@ procedure TVariablesExtender.PostLoad(var context:TIODXFLoadContext); pvd:=EntityUnit.FindVariable('VariablesContentReplaceFrom',true); if pvd<>nil then if pvd^.data.PTD=@FundamentalStringDescriptorObj then begin - uou:=pointer(units.findunit(GetSupportPath,InterfaceTranslate,pvd^.GetValueAsString)); + uou:=pointer(units.findunit(GetSupportPaths,InterfaceTranslate,pvd^.GetValueAsString)); if uou<>nil then begin EntityUnit.free; EntityUnit.CopyFrom(uou); @@ -435,7 +435,7 @@ class function TVariablesExtender.EntIOLoadUSES(_Name,_Value:String;ptu:PExtensi vardata:TVariablesExtender; begin vardata:=PGDBObjEntity(PEnt)^.GetExtension; - usedunit:=pointer(units.findunit(GetSupportPath,InterfaceTranslate,_Value)); + usedunit:=pointer(units.findunit(GetSupportPaths,InterfaceTranslate,_Value)); if vardata=nil then begin vardata:=addvariablestoentity(PEnt); diff --git a/cad_source/zcad/entities/uzclibraryblocksregister.pas b/cad_source/zcad/entities/uzclibraryblocksregister.pas index 4ac20b471..5c76bb2a2 100644 --- a/cad_source/zcad/entities/uzclibraryblocksregister.pas +++ b/cad_source/zcad/entities/uzclibraryblocksregister.pas @@ -46,7 +46,7 @@ function ReadBlockLibrary_com(const Context:TZCADCommandContext;operands:TComman line,block,depends,s:String; f:TZctnrVectorBytes; begin - s:=FindInPaths(GetSupportPath,operands); + s:=FindInPaths(GetSupportPaths,operands); f.InitFromFile(s); while f.notEOF do begin diff --git a/cad_source/zcad/entities/uzcregisterenitiesfeatures.pas b/cad_source/zcad/entities/uzcregisterenitiesfeatures.pas index 0a7d3a0e7..2c10fbf34 100644 --- a/cad_source/zcad/entities/uzcregisterenitiesfeatures.pas +++ b/cad_source/zcad/entities/uzcregisterenitiesfeatures.pas @@ -415,7 +415,7 @@ procedure GDBObjBlockDefLoadVarsFromFile(pEntity:PGDBObjBlockDef); pentvarext:TVariablesExtender; begin if pos(DevicePrefix,pEntity^.name)=1 then begin - uou:=pointer(units.findunit(GetSupportPath,InterfaceTranslate,pEntity^.name)); + uou:=pointer(units.findunit(GetSupportPaths,InterfaceTranslate,pEntity^.name)); if uou<>nil then begin pentvarext:=pEntity^.GetExtension; pentvarext.entityunit.CopyFrom(uou); diff --git a/cad_source/zcad/gui/forms/uzcfcommandline.pas b/cad_source/zcad/gui/forms/uzcfcommandline.pas index f3cdc521a..b79699782 100644 --- a/cad_source/zcad/gui/forms/uzcfcommandline.pas +++ b/cad_source/zcad/gui/forms/uzcfcommandline.pas @@ -300,7 +300,7 @@ procedure TCLine.FormCreate(Sender: TObject); //---------------BevelOuter:=bvnone; aliases.init(100); - aliases.loadfromfile(expandpath('$(ZDataPath)/menu/default.cla')); + aliases.loadfromfile(expandpath('$(DistroPath)/menu/default.cla')); //DMenu:=TDMenuWnd.Create(self); diff --git a/cad_source/zcad/gui/forms/uzcflinetypes.pas b/cad_source/zcad/gui/forms/uzcflinetypes.pas index ed2b91273..b583a8389 100644 --- a/cad_source/zcad/gui/forms/uzcflinetypes.pas +++ b/cad_source/zcad/gui/forms/uzcflinetypes.pas @@ -256,7 +256,7 @@ procedure TLineTypesForm._CreateLT(Sender: TObject); procedure TLineTypesForm._LoadLT(Sender: TObject); begin LineTypesLoadForm:=TLineTypesLoadForm.Create(nil); - if LineTypesLoadForm.run(FindInPaths(GetSupportPath,'zcad.lin'))=ZCmrok then + if LineTypesLoadForm.run(FindInPaths(GetSupportPaths,'zcad.lin'))=ZCmrok then Memo1.Text:=LineTypesLoadForm.text; Freeandnil(LineTypesLoadForm); end; diff --git a/cad_source/zcad/gui/forms/uzcfprojecttree.pas b/cad_source/zcad/gui/forms/uzcfprojecttree.pas index ad5571d28..5b7a3ed0c 100644 --- a/cad_source/zcad/gui/forms/uzcfprojecttree.pas +++ b/cad_source/zcad/gui/forms/uzcfprojecttree.pas @@ -136,7 +136,7 @@ procedure TProjectTreeForm.ChangePage; begin T_ProjectDB.Selected:=nil; self.ProjectEquipmentN.DeleteChildren; - BuildTreeByEQ(ProjectEquipmentN,PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName),MenusManager.GetPopupMenu('PROJECTDBCXMENU',nil)); + BuildTreeByEQ(ProjectEquipmentN,PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName),MenusManager.GetPopupMenu('PROJECTDBCXMENU',nil)); (* ProjectEquipmentNodeN.free; Getmem(pointer(ProjectEquipmentNode.SubNode),sizeof(TGDBTree)); @@ -346,7 +346,7 @@ procedure TProjectTreeForm.AfterConstruction; BuildTreeByEQ(ProgramEquipmentN,DBUnit,MenusManager.GetPopupMenu('PROGRAMDBCXMENU',nil)); if drawings.GetCurrentDWG<>nil then - BuildTreeByEQ(ProjectEquipmentN,PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPath,InterfaceTranslate,DrawingDeviceBaseUnitName),MenusManager.GetPopupMenu('PROJECTDBCXMENU',nil)); + BuildTreeByEQ(ProjectEquipmentN,PTZCADDrawing(drawings.GetCurrentDWG).DWGUnits.findunit(GetSupportPaths,InterfaceTranslate,DrawingDeviceBaseUnitName),MenusManager.GetPopupMenu('PROJECTDBCXMENU',nil)); end; function ProjectTree_com(const Context:TZCADCommandContext;Operands:pansichar):Integer; @@ -361,8 +361,8 @@ initialization ProjectTreeForm:=nil; BlockCategory.init(100); EqCategory.init(100); - BlockCategory.loadfromfile(expandpath('$(ZDataPath)/rtl/BlockCategory.cat')); - EqCategory.loadfromfile(expandpath('$(ZDataPath)/rtl/EqCategory.cat')); + BlockCategory.loadfromfile(expandpath('$(DistroPath)/rtl/BlockCategory.cat')); + EqCategory.loadfromfile(expandpath('$(DistroPath)/rtl/EqCategory.cat')); CreateZCADCommand(@ProjectTree_com,'ProjectTree',CADWG,0); end; finalization diff --git a/cad_source/zcad/gui/forms/uzcfsplash.pas b/cad_source/zcad/gui/forms/uzcfsplash.pas index dfdd69631..3c5ce8749 100644 --- a/cad_source/zcad/gui/forms/uzcfsplash.pas +++ b/cad_source/zcad/gui/forms/uzcfsplash.pas @@ -23,6 +23,7 @@ interface uzcsysparams,uzbpaths,uniqueinstanceraw,uzcstrconsts,uzbstrproc,Forms, stdctrls, Controls, Graphics,ExtCtrls,LazUTF8,sysutils, uzbLogTypes,uzbLogDecorators, + uzcFileStructure, uzcLog; type TSplashForm = class(TForm) @@ -63,13 +64,16 @@ procedure TSplashForm.TXTOut; self.txt.repaint; end; procedure TSplashForm.AfterConstruction; +var + fLogo:string; begin inherited; self.DoubleBuffered:=true; Logo:=TImage.create(self); Logo.Align:=alclient; - if FileExists({$IFNDEF DELPHI}utf8tosys{$ENDIF}(DataPath)+'/components/logo.png') then - Logo.Picture.LoadFromFile((DataPath)+'/components/logo.png'); + flogo:=ConcatPaths([UTF8ToSys(GetDistroPath),CFScomponentsDir,CFSlogopngFile]); + if FileExists(flogo) then + Logo.Picture.LoadFromFile(flogo); Logo.Parent:=self; self.BorderStyle:=bsNone; self.Color:=clNone; diff --git a/cad_source/zcad/gui/odjectinspector/uzcoidecorations.pas b/cad_source/zcad/gui/odjectinspector/uzcoidecorations.pas index 9b7e5f46d..dbb339f3d 100644 --- a/cad_source/zcad/gui/odjectinspector/uzcoidecorations.pas +++ b/cad_source/zcad/gui/odjectinspector/uzcoidecorations.pas @@ -67,6 +67,10 @@ function ZColorDecorator(PInstance:Pointer):String; begin result:=ColorToString(PColor(PInstance)^); end; +function TFStringDecorator(PInstance:Pointer):String; +begin + result:=PFString(PInstance)^; +end; procedure CreateComboPropEditor(TheOwner:TPropEditorOwner;pinstance:pointer;FreeOnLostFocus:boolean;PTD:PUserTypeDescriptor;out propeditor:TPropEditor; out cbedit:TComboBox;f:TzeUnitsFormat); begin propeditor:=TPropEditor.Create(theowner,PInstance,ptd^,FreeOnLostFocus,f); @@ -585,6 +589,7 @@ procedure DecorateSysTypes; DecorateType(SysUnit.TypeName2PTD('TGDBPaletteColor'),PaletteColorDecorator,ColorDecoratorCreateEditor,drawIndexColorProp); DecorateType(SysUnit.TypeName2PTD('TGDBOSMode'),nil,CreateEmptyEditor,nil); DecorateType(SysUnit.TypeName2PTD('TZColor'),ZColorDecorator,ZColorDecoratorCreateEditor,{drawIndexColorProp}nil); + DecorateType(SysUnit.TypeName2PTD('TFString'),TFStringDecorator,ZColorDecoratorCreateEditor,nil); AddFastEditorToType(SysUnit.TypeName2PTD('Integer'),@OIUI_FE_HalfButtonGetPrefferedSize,@OIUI_FE_ButtonGreatThatDraw,@OIUI_FE_IntegerInc); AddFastEditorToType(SysUnit.TypeName2PTD('Integer'),@OIUI_FE_HalfButtonGetPrefferedSize,@OIUI_FE_ButtonLessThatDraw,@OIUI_FE_IntegerDec); diff --git a/cad_source/zcad/gui/odjectinspector/uzcoiregister.pas b/cad_source/zcad/gui/odjectinspector/uzcoiregister.pas index c25d051e2..17a758269 100644 --- a/cad_source/zcad/gui/odjectinspector/uzcoiregister.pas +++ b/cad_source/zcad/gui/odjectinspector/uzcoiregister.pas @@ -301,24 +301,24 @@ function tdummyclass.GetPeditorFocusPriority:TControlWithPriority; end; initialization - system_pas_path:=expandpath('$(ZDataPath)/rtl/system.pas'); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_WhiteBackground','Boolean',@INTFObjInspWhiteBackground); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_Level0HeaderColor','Integer',@INTFObjInspLevel0HeaderColor); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_BorledColor','Integer',@INTFObjInspBorderColor); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowHeaders','Boolean',@INTFObjInspShowHeaders); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowSeparator','Boolean',@INTFObjInspShowSeparator); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_OldStyleDraw','Boolean',@INTFObjInspOldStyleDraw); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowFastEditors','Boolean',@INTFObjInspShowFastEditors); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowOnlyHotFastEditors','Boolean',@INTFObjInspShowOnlyHotFastEditors); + system_pas_path:=expandpath('$(DistroPath)/rtl/system.pas'); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_WhiteBackground','Boolean',@INTFObjInspWhiteBackground); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_Level0HeaderColor','Integer',@INTFObjInspLevel0HeaderColor); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_BorledColor','Integer',@INTFObjInspBorderColor); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowHeaders','Boolean',@INTFObjInspShowHeaders); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowSeparator','Boolean',@INTFObjInspShowSeparator); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_OldStyleDraw','Boolean',@INTFObjInspOldStyleDraw); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowFastEditors','Boolean',@INTFObjInspShowFastEditors); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowOnlyHotFastEditors','Boolean',@INTFObjInspShowOnlyHotFastEditors); INTFObjInspRowHeight.Enable:=LocalRowHeightOverride; INTFObjInspRowHeight.Value:=LocalRowHeight; - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_RowHeight_OverriderEnable','Boolean',@INTFObjInspRowHeight.Enable); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_RowHeight_OverriderEnable','Boolean',@INTFObjInspRowHeight.Enable); PRowHeight:=@INTFObjInspRowHeight.Value; PRowHeightOverride:=@INTFObjInspRowHeight.Enable; - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_RowHeight_OverriderValue','Integer',@INTFObjInspRowHeight.Value); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_SpaceHeight','Integer',@INTFObjInspSpaceHeight); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowEmptySections','Boolean',@INTFObjInspShowEmptySections); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ButtonSizeReducing','Integer',@INTFObjInspButtonSizeReducing); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_RowHeight_OverriderValue','Integer',@INTFObjInspRowHeight.Value); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_SpaceHeight','Integer',@INTFObjInspSpaceHeight); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ShowEmptySections','Boolean',@INTFObjInspShowEmptySections); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_ObjInsp_ButtonSizeReducing','Integer',@INTFObjInspButtonSizeReducing); SysVar.INTF.INTF_OBJINSP_Properties.INTF_ObjInsp_RowHeight:=@INTFObjInspRowHeight; SysVar.INTF.INTF_OBJINSP_Properties.INTF_ObjInsp_Level0HeaderColor:=@INTFObjInspLevel0HeaderColor; SysVar.INTF.INTF_OBJINSP_Properties.INTF_ObjInsp_BorderColor:=@INTFObjInspBorderColor; diff --git a/cad_source/zcad/gui/uzcmainwindow.pas b/cad_source/zcad/gui/uzcmainwindow.pas index a7f302f22..2ed26c4ea 100644 --- a/cad_source/zcad/gui/uzcmainwindow.pas +++ b/cad_source/zcad/gui/uzcmainwindow.pas @@ -48,6 +48,8 @@ interface uzcimagesmanager,usupportgui,uzcuidialogs, uzcActionsManager, + uzcFileStructure, + //это разделять нельзя, иначе загрузятся невыровенные рекорды {$INCLUDE allgeneratedfiles.inc}uzcregother, @@ -1017,7 +1019,7 @@ procedure TZCADMainWindow._onCreate(Sender: TObject); TZGuiExceptionsHandler.InstallHandler(ZcadException); SuppressedShortcuts:=TXMLConfig.Create(nil); - SuppressedShortcuts.Filename:=DataPath+'/components/suppressedshortcuts.xml'; + SuppressedShortcuts.Filename:=ConcatPaths([GetDistroPath,CFScomponentsDir,CFSsuppressedshortcutsxmlFile]); if SysParam.saved.UniqueInstance then CreateOrRunFIPCServer; @@ -1036,15 +1038,15 @@ procedure TZCADMainWindow._onCreate(Sender: TObject); InitSystemCalls; - ImagesManager.ScanDir(DataPath+'/images/'); - ImagesManager.LoadAliasesDir(DataPath+'/images/navigator.ima'); + ImagesManager.ScanDir(ConcatPaths([GetDistroPath,CFSimagesDir])); + ImagesManager.LoadAliasesDir(ConcatPaths([GetDistroPath,CFSimagesDir,CFSnavigatorimaFile])); //StandartActions:=TActionList.Create(self); InsertComponent(StandartActions); if not assigned(StandartActions.Images) then StandartActions.Images:={TImageList.Create(StandartActions)}ImagesManager.IconList; - brocenicon:=StandartActions.LoadImage(DataPath+'/menu/BMP/noimage.bmp'); + brocenicon:=StandartActions.LoadImage(ConcatPaths([GetDistroPath,'menu/BMP/noimage.bmp'])); ToolBarsManager.setup(self,StandartActions,sysvar.INTF.INTF_DefaultControlHeight^); diff --git a/cad_source/zcad/gui/uzctbextmenus.pas b/cad_source/zcad/gui/uzctbextmenus.pas index 66d66048d..96d57643d 100644 --- a/cad_source/zcad/gui/uzctbextmenus.pas +++ b/cad_source/zcad/gui/uzctbextmenus.pas @@ -110,8 +110,8 @@ class procedure ZMenuExt.ZMenuExtSampleFiles(MT:TMenuType;fmf:TForm;aName: strin begin localpm.localpm:=RootMenuItem; localpm.ImageIndex:=ImagesManager.GetImageIndex('Dxf'); - FromDirIterator(expandpath('$(ZDataPath)//examples'),'*.dxf','',@bugfileiterator,nil); - FromDirIterator(expandpath('$(ZDataPath)//examples'),'*.dwg','',@bugfileiterator,nil); + FromDirIterator(expandpath('$(DistroPath)//examples'),'*.dxf','',@bugfileiterator,nil); + FromDirIterator(expandpath('$(DistroPath)//examples'),'*.dwg','',@bugfileiterator,nil); localpm.localpm:=nil; localpm.ImageIndex:=-1; end; @@ -120,7 +120,7 @@ class procedure ZMenuExt.ZMenuExtDebugFiles(MT:TMenuType;fmf:TForm;aName: string begin localpm.localpm:=RootMenuItem; localpm.ImageIndex:=ImagesManager.GetImageIndex('Dxf'); - FromDirIterator(expandpath('$(ZDataPath)/../errors/'),'*.dxf','',@bugfileiterator,nil); + FromDirIterator(expandpath('$(DistroPath)/../errors/'),'*.dxf','',@bugfileiterator,nil); localpm.localpm:=nil; localpm.ImageIndex:=-1; end; diff --git a/cad_source/zcad/gui/uzctbexttoolbars.pas b/cad_source/zcad/gui/uzctbexttoolbars.pas index e9b135685..70846e56a 100644 --- a/cad_source/zcad/gui/uzctbexttoolbars.pas +++ b/cad_source/zcad/gui/uzctbexttoolbars.pas @@ -33,7 +33,7 @@ interface uzcgui2linewidth,uzcflineweights,uzcgui2textstyles,uzcgui2dimstyles, uzedrawingsimple,uzcdrawing,uzcuidialogs,uzbstrproc, uzestyleslayers,zUndoCmdChgBaseTypes,uzcutils,gzctnrVectorTypes,uzcCtrlFindEditBox, - zUndoCmdChgTypes; + zUndoCmdChgTypes,uzcLog,uzcFileStructure; type TMyToolbar=class(TToolBar) public @@ -311,34 +311,33 @@ class procedure TZTBZCADExtensions.TBGroupActionCreateFunc(fmf:TForm;actlist:TAc procedure SetImage(actlist:TActionList;ppanel:TToolBar;b:TToolButton;img:string;autosize:boolean;identifer:string); var - bmp:Graphics.TBitmap; -begin - if length(img)>1 then - begin - if img[1]<>'#' then - begin - img:={SysToUTF8}(DataPath)+'/menu/BMP/'+img; - bmp:=Graphics.TBitmap.create; - bmp.LoadFromFile(img); - bmp.Transparent:=true; - if not assigned(ppanel.Images) then - ppanel.Images:=actlist.Images; - b.ImageIndex:= - ppanel.Images.Add(bmp,nil); - freeandnil(bmp); - //-----------b^.SetImageFromFile(img) - end - else - begin - b.caption:=(system.copy(img,2,length(img)-1)); - b.caption:=InterfaceTranslate(identifer,b.caption); - if autosize then - if utf8length(img)>3 then - b.Font.size:=11-utf8length(img); - end; - end; - b.Height:=ppanel.ButtonHeight; - b.Width:=ppanel.ButtonWidth; + bmp:Graphics.TBitmap; +begin + if length(img)>1 then begin + if img[1]<>'#' then begin + img:=ConcatPaths([GetDistroPath,'menu/BMP',img]); + bmp:=Graphics.TBitmap.create; + try + bmp.LoadFromFile(img); + bmp.Transparent:=true; + if not assigned(ppanel.Images) then + ppanel.Images:=actlist.Images; + b.ImageIndex:= + ppanel.Images.Add(bmp,nil); + except + programlog.LogOutStr(sysutils.format('Image "%s" not not found',[img]),LM_Error); + end; + bmp.free; + end else begin + b.caption:=(system.copy(img,2,length(img)-1)); + b.caption:=InterfaceTranslate(identifer,b.caption); + if autosize then + if utf8length(img)>3 then + b.Font.size:=11-utf8length(img); + end; + end; + b.Height:=ppanel.ButtonHeight; + b.Width:=ppanel.ButtonWidth; end; class procedure TZTBZCADExtensions.TBButtonCreateFunc(fmf:TForm;actlist:TActionList;aNode: TDomNode; TB:TToolBar); @@ -624,7 +623,7 @@ class procedure TZTBZCADExtensions.ChangeLayout(Sender:Tobject); s:string; begin if sender is TComboBox then begin - s:=DataPath+'/components/'+(sender as TComboBox).text+'.xml'; + s:=ConcatPaths([GetDistroPath,CFScomponentsDir,(sender as TComboBox).text+'.xml']); LoadLayoutFromFile(s); end; end; @@ -649,7 +648,7 @@ class function TZTBZCADExtensions.CreateLayoutbox(tb:TToolBar):TComboBox; result:=TComboBox.Create(tb); result.Style:=csDropDownList; result.Sorted:=true; - FromDirIterator(DataPath+'/components/','*.xml','',addfiletoLayoutbox,nil,pointer(result)); + FromDirsIterator(GetPathsInDataPaths(CFScomponentsDir),'*.xml','',addfiletoLayoutbox,nil,pointer(result)); result.OnChange:=ChangeLayout; s:=extractfilename(sysvar.PATH.LayoutFile^); diff --git a/cad_source/zcad/lclmod/uzctreenode.pas b/cad_source/zcad/lclmod/uzctreenode.pas index a92c6361b..bebeef16a 100644 --- a/cad_source/zcad/lclmod/uzctreenode.pas +++ b/cad_source/zcad/lclmod/uzctreenode.pas @@ -450,7 +450,7 @@ procedure TMyActionListHelper.SetImage(img,identifer:string;var action:TZAction) if img[1]<>'#' then begin action.imgstr:=''; - action.ImageIndex:=LoadImage(DataPath+'/menu/BMP/'+img); + action.ImageIndex:=LoadImage(ConcatPaths([GetDistroPath,'menu/BMP',img])); if action.ImageIndex=-1 then begin action.ImageIndex:=brocenicon; diff --git a/cad_source/zcad/register/uzcregexceptions.pas b/cad_source/zcad/register/uzcregexceptions.pas index 36d7fdb6e..feb276588 100644 --- a/cad_source/zcad/register/uzcregexceptions.pas +++ b/cad_source/zcad/register/uzcregexceptions.pas @@ -147,8 +147,8 @@ procedure ProvideBuildAndRunTimeInfo(var f:system.text;ARaiseList:PExceptObject) Write(f, ' Compile time: ');WriteLn(f,sysvar.SYS.SSY_CompileInfo.SYS_CompileTime); Write(f, ' LCL version: ');WriteLn(f,sysvar.SYS.SSY_CompileInfo.SYS_LCLVersion); Write(f, ' Environment version: ');WriteLn(f,sysvar.SYS.SSY_CompileInfo.SYS_EnvironmentVersion); - Write(f, ' Program path: ');WriteLn(f,DataPath); - Write(f, ' Temporary path: ');WriteLn(f,TempPath); + Write(f, ' Program path: ');WriteLn(f,GetDistroPath); + Write(f, ' Temporary path: ');WriteLn(f,GetTempPath); WriteLn(f,'end.'); end; diff --git a/cad_source/zcad/register/uzcregfontmanager.pas b/cad_source/zcad/register/uzcregfontmanager.pas index f1075d924..52d2b7a70 100644 --- a/cad_source/zcad/register/uzcregfontmanager.pas +++ b/cad_source/zcad/register/uzcregfontmanager.pas @@ -29,11 +29,11 @@ implementation system_pas_path:string; initialization - system_pas_path:=expandpath('$(ZDataPath)/rtl/system.pas'); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'PATH_Fonts','String',@sysvarPATHFontsPath); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'PATH_AlternateFont','String',@sysvarAlternateFont); + system_pas_path:=expandpath('$(DistroPath)/rtl/system.pas'); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'PATH_Fonts','String',@sysvarPATHFontsPath); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'PATH_AlternateFont','String',@sysvarAlternateFont); {$IF DEFINED(USELAZFREETYPETTFIMPLEMENTATION) and DEFINED(USEFREETYPETTFIMPLEMENTATION)} - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_UseLazFreeTypeImplementation','Boolean',@sysvarTTFUseLazFreeTypeImplementation); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_UseLazFreeTypeImplementation','Boolean',@sysvarTTFUseLazFreeTypeImplementation); sysvar.RD.RD_UseLazFreeTypeImplementation:=@sysvarTTFUseLazFreeTypeImplementation; {$ELSE} {$ENDIF} diff --git a/cad_source/zcad/register/uzcreggeneralwiewarea.pas b/cad_source/zcad/register/uzcreggeneralwiewarea.pas index 4698b77a9..b25e2a68d 100644 --- a/cad_source/zcad/register/uzcreggeneralwiewarea.pas +++ b/cad_source/zcad/register/uzcreggeneralwiewarea.pas @@ -45,55 +45,55 @@ class procedure TShowCursorHelper.ShowCursorHandlerDrawLine(var DC:TDrawContext) initialization TGeneralViewArea.RegisterShowCursorHandler(TShowCursorHelper.ShowCursorHandlerDrawLine); - system_pas_path:=expandpath('$(ZDataPath)/rtl/system.pas'); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_CursorSize','Integer',@sysvarDISPCursorSize); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_OSSize','Double',@sysvarDISPOSSize); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_CrosshairSize','Double',@SysVarDISPCrosshairSize); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_BackGroundColor','TRGB',@sysvarDISPBackGroundColor); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_MaxRenderTime','Integer',@sysvarRDMaxRenderTime); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_ZoomFactor','Double',@sysvarDISPZoomFactor); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_SystmGeometryDraw','Boolean',@sysvarDISPSystmGeometryDraw); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_SystmGeometryDraw','Boolean',@sysvarDISPSystmGeometryDraw); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_SystmGeometryColor','TGDBPaletteColor',@sysvarDISPSystmGeometryColor); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_HotGripColor','TGDBPaletteColor',@sysvarDISPHotGripColor); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_SelectedGripColor','TGDBPaletteColor',@sysvarDISPSelGripColor); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_UnSelectedGripColor','TGDBPaletteColor',@sysvarDISPUnSelGripColor); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DWG_OSMode','TGDBOSMode',@sysvarDWGOSMode); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DWG_OSModeControl','Boolean',@sysvarDWGOSModeControl); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_GripSize','Integer',@sysvarDISPGripSize); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_ColorAxis','Boolean',@sysvarDISPColorAxis); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_DrawZAxis','Boolean',@sysvarDISPDrawZAxis); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_DrawInsidePaintMessage','TGDB3StateBool',@sysvarDrawInsidePaintMessage); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DWG_PolarMode','Boolean',@sysvarDWGPolarMode); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_LineSmooth','Boolean',@SysVarRDLineSmooth); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_UseStencil','Boolean',@sysvarRDUseStencil); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_LastRenderTime','Integer',@sysvarRDLastRenderTime); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_LastUpdateTime','Integer',@sysvarRDLastUpdateTime); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_ID_Enabled','Boolean',@SysVarRDImageDegradationEnabled); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_ID_PrefferedRenderTime','Integer',@SysVarRDImageDegradationPrefferedRenderTime); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_ID_MaxDegradationFactor','Double',@SysVarRDImageDegradationMaxDegradationFactor); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_RemoveSystemCursorFromWorkArea','Boolean',@SysVarDISPRemoveSystemCursorFromWorkArea); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DSGN_SelNew','Boolean',@sysvarDSGNSelNew); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DWG_EditInSubEntry','Boolean',@sysvarDWGEditInSubEntry); - - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_SpatialNodeCount','Integer',@SysVarRDSpatialNodeCount); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_SpatialNodesDepth','Integer',@SysVarRDSpatialNodesDepth); - - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DWG_RotateTextInLT','Boolean',@sysvarDWGRotateTextInLT); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_MaxLTPatternsInEntity','Integer',@SysVarRDMaxLTPatternsInEntity); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_PanObjectDegradation','Boolean',@SysVarRDPanObjectDegradation); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DSGN_OTrackTimerInterval','Integer',@sysvarDSGNOTrackTimerInterval); - - - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DSGN_EntityMoveStartTimerInterval','Integer',@sysvarDSGNEntityMoveStartTimerInterval); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DSGN_EntityMoveStartOffset','Integer',@sysvarDSGNEntityMoveStartOffset); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DSGN_EntityMoveByMouseUp','Boolean',@sysvarDSGNEntityMoveByMouseUp); - - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DSGN_MaxSelectEntsCountWithObjInsp','Integer',@sysvarDSGNMaxSelectEntsCountWithObjInsp); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DSGN_MaxSelectEntsCountWithGrips','Integer',@sysvarDSGNMaxSelectEntsCountWithGrips); - - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'DISP_LWDisplayScale','Integer',@sysvarDISPLWDisplayScale); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_Light','Boolean',@sysvarRDLight); + system_pas_path:=expandpath('$(DistroPath)/rtl/system.pas'); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_CursorSize','Integer',@sysvarDISPCursorSize); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_OSSize','Double',@sysvarDISPOSSize); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_CrosshairSize','Double',@SysVarDISPCrosshairSize); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_BackGroundColor','TRGB',@sysvarDISPBackGroundColor); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_MaxRenderTime','Integer',@sysvarRDMaxRenderTime); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_ZoomFactor','Double',@sysvarDISPZoomFactor); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_SystmGeometryDraw','Boolean',@sysvarDISPSystmGeometryDraw); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_SystmGeometryDraw','Boolean',@sysvarDISPSystmGeometryDraw); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_SystmGeometryColor','TGDBPaletteColor',@sysvarDISPSystmGeometryColor); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_HotGripColor','TGDBPaletteColor',@sysvarDISPHotGripColor); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_SelectedGripColor','TGDBPaletteColor',@sysvarDISPSelGripColor); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_UnSelectedGripColor','TGDBPaletteColor',@sysvarDISPUnSelGripColor); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DWG_OSMode','TGDBOSMode',@sysvarDWGOSMode); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DWG_OSModeControl','Boolean',@sysvarDWGOSModeControl); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_GripSize','Integer',@sysvarDISPGripSize); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_ColorAxis','Boolean',@sysvarDISPColorAxis); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_DrawZAxis','Boolean',@sysvarDISPDrawZAxis); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_DrawInsidePaintMessage','TGDB3StateBool',@sysvarDrawInsidePaintMessage); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DWG_PolarMode','Boolean',@sysvarDWGPolarMode); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_LineSmooth','Boolean',@SysVarRDLineSmooth); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_UseStencil','Boolean',@sysvarRDUseStencil); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_LastRenderTime','Integer',@sysvarRDLastRenderTime); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_LastUpdateTime','Integer',@sysvarRDLastUpdateTime); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_ID_Enabled','Boolean',@SysVarRDImageDegradationEnabled); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_ID_PrefferedRenderTime','Integer',@SysVarRDImageDegradationPrefferedRenderTime); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_ID_MaxDegradationFactor','Double',@SysVarRDImageDegradationMaxDegradationFactor); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_RemoveSystemCursorFromWorkArea','Boolean',@SysVarDISPRemoveSystemCursorFromWorkArea); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DSGN_SelNew','Boolean',@sysvarDSGNSelNew); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DWG_EditInSubEntry','Boolean',@sysvarDWGEditInSubEntry); + + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_SpatialNodeCount','Integer',@SysVarRDSpatialNodeCount); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_SpatialNodesDepth','Integer',@SysVarRDSpatialNodesDepth); + + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DWG_RotateTextInLT','Boolean',@sysvarDWGRotateTextInLT); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_MaxLTPatternsInEntity','Integer',@SysVarRDMaxLTPatternsInEntity); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_PanObjectDegradation','Boolean',@SysVarRDPanObjectDegradation); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DSGN_OTrackTimerInterval','Integer',@sysvarDSGNOTrackTimerInterval); + + + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DSGN_EntityMoveStartTimerInterval','Integer',@sysvarDSGNEntityMoveStartTimerInterval); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DSGN_EntityMoveStartOffset','Integer',@sysvarDSGNEntityMoveStartOffset); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DSGN_EntityMoveByMouseUp','Boolean',@sysvarDSGNEntityMoveByMouseUp); + + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DSGN_MaxSelectEntsCountWithObjInsp','Integer',@sysvarDSGNMaxSelectEntsCountWithObjInsp); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DSGN_MaxSelectEntsCountWithGrips','Integer',@sysvarDSGNMaxSelectEntsCountWithGrips); + + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'DISP_LWDisplayScale','Integer',@sysvarDISPLWDisplayScale); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_Light','Boolean',@sysvarRDLight); sysvar.DISP.DISP_CursorSize:=@sysvarDISPCursorSize; sysvar.DISP.DISP_OSSize:=@sysvarDISPOSSize; diff --git a/cad_source/zcad/register/uzcreginterface.pas b/cad_source/zcad/register/uzcreginterface.pas index 723f5244b..d0bad0ed8 100644 --- a/cad_source/zcad/register/uzcreginterface.pas +++ b/cad_source/zcad/register/uzcreginterface.pas @@ -28,19 +28,19 @@ implementation initialization DecorateSysTypes; - system_pas_path:=expandpath('$(ZDataPath)/rtl/system.pas'); - units.CreateExtenalSystemVariable(SysVarNotSavedUnit,SysVarNSN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_GLUVersion','String',@GLUVersion); + system_pas_path:=expandpath('$(DistroPath)/rtl/system.pas'); + units.CreateExtenalSystemVariable(SysVarNotSavedUnit,SysVarNSN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_GLUVersion','String',@GLUVersion); SysVarNotSavedUnit.AssignToSymbol(SysVar.RD.RD_GLUVersion,'RD_GLUVersion'); sysvar.RD.RD_GLUVersion^:=GLUVersion; - units.CreateExtenalSystemVariable(SysVarNotSavedUnit,SysVarNSN,GetSupportPath,system_pas_path,InterfaceTranslate,'RD_GLUExtensions','String',@GLUExtensions); + units.CreateExtenalSystemVariable(SysVarNotSavedUnit,SysVarNSN,GetSupportPaths,system_pas_path,InterfaceTranslate,'RD_GLUExtensions','String',@GLUExtensions); SysVarNotSavedUnit.AssignToSymbol(SysVar.RD.RD_GLUExtensions,'RD_GLUExtensions'); sysvar.RD.RD_GLUExtensions^:=GLUExtensions; - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_CommandLineEnabled','Boolean',@INTFCommandLineEnabled); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_CommandLineEnabled','Boolean',@INTFCommandLineEnabled); SysVarUnit.AssignToSymbol(SysVar.INTF.INTF_CommandLineEnabled,'INTF_CommandLineEnabled'); - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,system_pas_path,InterfaceTranslate,'INTF_MessagesSuppressDoubles','TGDB3StateBool',@INTFMessagesSuppressDoubles); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,system_pas_path,InterfaceTranslate,'INTF_MessagesSuppressDoubles','TGDB3StateBool',@INTFMessagesSuppressDoubles); SysVarUnit.AssignToSymbol(SysVar.INTF.INTF_MESSAGES_Properties.INTF_Messages_SuppressDoubles,'INTF_MessagesSuppressDoubles'); SysVar.sys.SYS_UniqueInstance:=@SysParam.saved.UniqueInstance; diff --git a/cad_source/zcad/register/uzcreglog.pas b/cad_source/zcad/register/uzcreglog.pas index 87abbcfe6..bc9a468b4 100644 --- a/cad_source/zcad/register/uzcreglog.pas +++ b/cad_source/zcad/register/uzcreglog.pas @@ -125,7 +125,7 @@ initialization PositionDecorator.init; PositionDecoratorHandle:=ProgramLog.addDecorator(PositionDecorator); - LogFileName:=TempPath+filelog; + LogFileName:=ConcatPaths([GetTempPath,filelog]); if CommandLineParser.HasOption(LOGFILEHDL)then for i:=0 to CommandLineParser.OptionOperandsCount(LOGFILEHDL)-1 do LogFileName:=CommandLineParser.OptionOperand(LOGFILEHDL,i); diff --git a/cad_source/zcad/register/uzcregnavigatordevices.pas b/cad_source/zcad/register/uzcregnavigatordevices.pas index 8922d44f9..9befd827e 100644 --- a/cad_source/zcad/register/uzcregnavigatordevices.pas +++ b/cad_source/zcad/register/uzcregnavigatordevices.pas @@ -143,7 +143,7 @@ function CreateNavigatorCables(FormName:string):TForm; end; initialization - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,expandpath('$(ZDataPath)/rtl/system.pas'),InterfaceTranslate,'DSGN_NavigatorsUseMainFunction','Boolean',@UseMainFunction); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,expandpath('$(DistroPath)/rtl/system.pas'),InterfaceTranslate,'DSGN_NavigatorsUseMainFunction','Boolean',@UseMainFunction); ZCADGUIManager.RegisterZCADFormInfo('NavigatorDevices',rsDevices,TNavigatorDevices,rect(0,100,200,600),ZCADFormSetupProc,CreateNavigatorDevices,@NavigatorDevices,true); ZCADGUIManager.RegisterZCADFormInfo('NavigatorRisers',rsRisers,TNavigatorRisers,rect(0,100,200,600),ZCADFormSetupProc,CreateNavigatorRisers,@NavigatorRisers,true); ZCADGUIManager.RegisterZCADFormInfo('NavigatorCables',rsCables,TNavigatorCables,rect(0,100,200,600),ZCADFormSetupProc,CreateNavigatorCables,@NavigatorCables,true); diff --git a/cad_source/zcad/register/uzcregother.pas b/cad_source/zcad/register/uzcregother.pas index 67cb66c1d..e73d33a57 100644 --- a/cad_source/zcad/register/uzcregother.pas +++ b/cad_source/zcad/register/uzcregother.pas @@ -32,13 +32,13 @@ implementation var mem:TZctnrVectorBytes; initialization; - units.loadunit(GetSupportPath,InterfaceTranslate,expandpath('$(ZDataPath)/rtl/sysvar.pas'),nil); - units.loadunit(GetSupportPath,InterfaceTranslate,FindFileInDataPaths(CFSrtlDir,CFSsavedvarpasFile),nil); - units.loadunit(GetSupportPath,InterfaceTranslate,expandpath('$(ZDataPath)/rtl/devicebase.pas'),nil); + units.loadunit(GetSupportPaths,InterfaceTranslate,expandpath('$(DistroPath)/rtl/sysvar.pas'),nil); + units.loadunit(GetSupportPaths,InterfaceTranslate,FindFileInDataPaths(CFSrtlDir,CFSsavedvarpasFile),nil); + units.loadunit(GetSupportPaths,InterfaceTranslate,expandpath('$(DistroPath)/rtl/devicebase.pas'),nil); - SysVarUnit:=units.findunit(GetSupportPath,InterfaceTranslate,'sysvar'); - SavedUnit:=units.findunit(GetSupportPath,InterfaceTranslate,'savedvar'); - DBUnit:=units.findunit(GetSupportPath,InterfaceTranslate,'devicebase'); + SysVarUnit:=units.findunit(GetSupportPaths,InterfaceTranslate,'sysvar'); + SavedUnit:=units.findunit(GetSupportPaths,InterfaceTranslate,'savedvar'); + DBUnit:=units.findunit(GetSupportPaths,InterfaceTranslate,'devicebase'); if SysVarUnit<>nil then begin @@ -203,10 +203,10 @@ initialization; end; - units.loadunit(GetSupportPath,InterfaceTranslate,expandpath('$(ZDataPath)/rtl/cables.pas'),nil); - units.loadunit(GetSupportPath,InterfaceTranslate,expandpath('$(ZDataPath)/rtl/devices.pas'),nil); - units.loadunit(GetSupportPath,InterfaceTranslate,expandpath('$(ZDataPath)/rtl/connectors.pas'),nil); - units.loadunit(GetSupportPath,InterfaceTranslate,expandpath('$(ZDataPath)/rtl/styles/styles.pas'),nil); + units.loadunit(GetSupportPaths,InterfaceTranslate,expandpath('$(DistroPath)/rtl/cables.pas'),nil); + units.loadunit(GetSupportPaths,InterfaceTranslate,expandpath('$(DistroPath)/rtl/devices.pas'),nil); + units.loadunit(GetSupportPaths,InterfaceTranslate,expandpath('$(DistroPath)/rtl/connectors.pas'),nil); + units.loadunit(GetSupportPaths,InterfaceTranslate,expandpath('$(DistroPath)/rtl/styles/styles.pas'),nil); SysVar.debug.memdeb.GetMemCount:=nil; SysVar.debug.memdeb.FreeMemCount:=nil; diff --git a/cad_source/zcad/register/uzcregpaths.pas b/cad_source/zcad/register/uzcregpaths.pas index eca6328ce..2855b8f25 100644 --- a/cad_source/zcad/register/uzcregpaths.pas +++ b/cad_source/zcad/register/uzcregpaths.pas @@ -20,17 +20,17 @@ {$INCLUDE zengineconfig.inc} interface uses - uzcsysvars,uzbpaths,uzctranslations,UUnitManager,Varman, + uzcsysvars,uzbPaths,uzctranslations,UUnitManager,Varman, TypeDescriptors,uzcLog,uzcsysparams; implementation initialization - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,expandpath('$(ZDataPath)/rtl/system.pas'),InterfaceTranslate,'PATH_Support_Path','String',GeAddrSupportPath); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,expandpath('$(DistroPath)/rtl/system.pas'),InterfaceTranslate,'PATH_Support_Path','String',@SupportPaths); sysvar.PATH.Dictionaries:=@SysParam.saved.DictionariesPath; - sysvar.PATH.Program_Data:=@DataPath; - sysvar.PATH.Support_Path:=GeAddrSupportPath; - sysvar.PATH.AdditionalSupport_Path:=@AdditionalSupportPath; - sysvar.PATH.Temp_files:=@TempPath; + sysvar.PATH.Program_Data:=@GetDistroPath; + sysvar.PATH.Support_Path:=@SupportPaths; + sysvar.PATH.AdditionalSupport_Path:=@GetAdditionalSupportPaths; + sysvar.PATH.Temp_files:=@GetTempPath; finalization ProgramLog.LogOutFormatStr('Unit "%s" finalization',[{$INCLUDE %FILE%}],LM_Info,UnitsFinalizeLMId); end. diff --git a/cad_source/zcad/register/uzcregsystempas.pas b/cad_source/zcad/register/uzcregsystempas.pas index 8d78c3224..7cb9ffa13 100644 --- a/cad_source/zcad/register/uzcregsystempas.pas +++ b/cad_source/zcad/register/uzcregsystempas.pas @@ -33,8 +33,8 @@ initialization; with programlog.Enter('uzcregsystempas.initialization',LM_Debug) do begin if SysUnit=nil then begin - units.loadunit(GetSupportPath,InterfaceTranslate,expandpath('$(ZDataPath)/rtl/system.pas'),nil); - SysUnit:=units.findunit(GetSupportPath,InterfaceTranslate,'System'); + units.loadunit(GetSupportPaths,InterfaceTranslate,expandpath('$(DistroPath)/rtl/system.pas'),nil); + SysUnit:=units.findunit(GetSupportPaths,InterfaceTranslate,'System'); end; programlog.leave(IfEntered); end; diff --git a/cad_source/zcad/register/uzcregzscript.pas b/cad_source/zcad/register/uzcregzscript.pas index 6dd86e839..872f55838 100644 --- a/cad_source/zcad/register/uzcregzscript.pas +++ b/cad_source/zcad/register/uzcregzscript.pas @@ -71,7 +71,7 @@ procedure _OnCreateSystemUnit(ptsu:PTUnit); end; initialization OnCreateSystemUnit:=_OnCreateSystemUnit; - units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPath,expandpath('$(ZDataPath)/rtl/system.pas'),InterfaceTranslate,'ShowHiddenFieldInObjInsp','Boolean',@debugShowHiddenFieldInObjInsp); + units.CreateExtenalSystemVariable(SysVarUnit,SysVarN,GetSupportPaths,expandpath('$(DistroPath)/rtl/system.pas'),InterfaceTranslate,'ShowHiddenFieldInObjInsp','Boolean',@debugShowHiddenFieldInObjInsp); finalization ProgramLog.LogOutFormatStr('Unit "%s" finalization',[{$INCLUDE %FILE%}],LM_Info,UnitsFinalizeLMId); end. diff --git a/cad_source/zcad/uzcfilestructure.pas b/cad_source/zcad/uzcfilestructure.pas index 007e585f7..fe1960b0e 100644 --- a/cad_source/zcad/uzcfilestructure.pas +++ b/cad_source/zcad/uzcfilestructure.pas @@ -28,7 +28,20 @@ interface CFScomponentsDir='components'; CFSdefaultlayoutxmlFile='defaultlayout.xml'; + CFSemptydxfFile='empty.dxf'; + CFSsuppressedshortcutsxmlFile='suppressedshortcuts.xml'; + CFSlogopngFile='logo.png'; CFSconfigsDir='configs'; + + CFSdictionariesDir='dictionaries'; + + CFSlanguagesDir='languages'; + + CFShelpDir='help'; + CFSuserguide_shtmlFile='userguide.%s.html'; + + CFSimagesDir='images'; + CFSnavigatorimaFile='navigator.ima'; implementation end. diff --git a/cad_source/zcad/uzcpathmacros.pas b/cad_source/zcad/uzcpathmacros.pas index e11db49de..abb30ab33 100644 --- a/cad_source/zcad/uzcpathmacros.pas +++ b/cad_source/zcad/uzcpathmacros.pas @@ -20,14 +20,16 @@ {$INCLUDE zengineconfig.inc} interface uses + SysUtils,Forms, + {$IFDEF WINDOWS}ShlObj,{$ENDIF}LazUTF8, MacroDefIntf,uzmacros, - uzclog,uzblog,uzbpaths,Forms,uzcstrconsts, - {$IFDEF WINDOWS}ShlObj,{$ENDIF}{$IFNDEF DELPHI}LazUTF8,{$ENDIF}sysutils,uzcsysvars; + uzclog,uzblog,uzbpaths,uzcstrconsts, + uzcFileStructure; type TZCADPathsMacroMethods=class - class function MacroFuncZDataPath(const {%H-}Param: string; const Data: PtrInt; + class function MacroFuncDistroPath(const {%H-}Param: string; const Data: PtrInt; var {%H-}Abort: boolean): string; - class function MacroFuncZBinPath(const {%H-}Param: string; const Data: PtrInt; + class function MacroFuncBinPath(const {%H-}Param: string; const Data: PtrInt; var {%H-}Abort: boolean): string; class function MacroFuncDataSearhPrefixes(const {%H-}Param: string; const Data: PtrInt; var {%H-}Abort: boolean): string; @@ -53,22 +55,22 @@ TZCADPathsMacroMethods=class var {%H-}Abort: boolean): string; end; implementation -class function TZCADPathsMacroMethods.MacroFuncZDataPath(const {%H-}Param: string; const Data: PtrInt;var {%H-}Abort: boolean): string; +class function TZCADPathsMacroMethods.MacroFuncDistroPath(const {%H-}Param: string; const Data: PtrInt;var {%H-}Abort: boolean): string; begin - result:=DataPath; + result:=GetDistroPath; end; -class function TZCADPathsMacroMethods.MacroFuncZBinPath(const {%H-}Param: string; const Data: PtrInt;var {%H-}Abort: boolean): string; +class function TZCADPathsMacroMethods.MacroFuncBinPath(const {%H-}Param: string; const Data: PtrInt;var {%H-}Abort: boolean): string; begin - result:=BinPath; + result:=GetBinPath; end; class function TZCADPathsMacroMethods.MacroFuncZCADDictionariesPath(const {%H-}Param: string; const Data: PtrInt; var {%H-}Abort: boolean): string; begin - result:=DataPath+'/dictionaries'; + result:=ConcatPaths([GetDistroPath,CFSdictionariesDir]); end; class function TZCADPathsMacroMethods.MacroFuncTEMPPath(const {%H-}Param: string; const Data: PtrInt;var {%H-}Abort: boolean): string; begin - result:=TempPath; + result:=GetTempPath; end; class function TZCADPathsMacroMethods.MacroFuncSystemFontsPath(const {%H-}Param: string; const Data: PtrInt;var {%H-}Abort: boolean): string; {$IF defined(WINDOWS)} @@ -109,7 +111,7 @@ class function TZCADPathsMacroMethods.MacroFuncEnv(const Param: string; const Da class function TZCADPathsMacroMethods.MacroFuncDataSearhPrefixes(const {%H-}Param: string; const Data: PtrInt; var {%H-}Abort: boolean): string; begin - Result:=IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(GetAppConfigDir(false))+Param)+';'+IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(DataPath)+Param); + Result:=IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(GetAppConfigDir(false))+Param)+';'+IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(GetDistroPath)+Param); end; class function TZCADPathsMacroMethods.MacroFuncUserDir(const Param: string; const {%H-}Data: PtrInt;var {%H-}Abort: boolean): string; begin @@ -133,10 +135,10 @@ class function TZCADPathsMacroMethods.MacroFuncDirectorySeparator(const Param: s end; initialization -DefaultMacros.AddMacro(TTransferMacro.Create('ZBinPath','', - 'Path to ZCAD binary',TZCADPathsMacroMethods.MacroFuncZBinPath,[])); -DefaultMacros.AddMacro(TTransferMacro.Create('ZDataPath','', - 'Path to ZCAD data',TZCADPathsMacroMethods.MacroFuncZDataPath,[])); +DefaultMacros.AddMacro(TTransferMacro.Create('BinPath','', + 'Path to ZCAD binary',TZCADPathsMacroMethods.MacroFuncBinPath,[])); +DefaultMacros.AddMacro(TTransferMacro.Create('DistroPath','', + 'Path to ZCAD distributive',TZCADPathsMacroMethods.MacroFuncDistroPath,[])); DefaultMacros.AddMacro(TTransferMacro.Create('TEMP','', 'TEMP path',TZCADPathsMacroMethods.MacroFuncTEMPPath,[])); DefaultMacros.AddMacro(TTransferMacro.Create('ZCADDictionariesPath','', diff --git a/cad_source/zcad/uzcsysinfo.pas b/cad_source/zcad/uzcsysinfo.pas index 0eb868e52..d28a13c58 100644 --- a/cad_source/zcad/uzcsysinfo.pas +++ b/cad_source/zcad/uzcsysinfo.pas @@ -170,8 +170,8 @@ function DataFilesExistChec(const ACheckedPath:string):boolean; programlog.LogOutStr('DefaultUnicodeCodePage:='+inttostr(DefaultUnicodeCodePage),LM_Info); programlog.LogOutStr('UTF8CompareLocale:='+inttostr(UTF8CompareLocale),LM_Info); - programlog.LogOutFormatStr('SysParam.ProgramPath="%s"',[DataPath],LM_Necessarily); - programlog.LogOutFormatStr('SysParam.TempPath="%s"',[TempPath],LM_Necessarily); + programlog.LogOutFormatStr('SysParam.ProgramPath="%s"',[GetDistroPath],LM_Necessarily); + programlog.LogOutFormatStr('SysParam.TempPath="%s"',[GetTempPath],LM_Necessarily); programlog.LogOutFormatStr('SysParam.ScreenX=%d',[SysParam.notsaved.ScreenX],LM_Info); programlog.LogOutFormatStr('SysParam.ScreenY=%d',[SysParam.notsaved.ScreenY],LM_Info); programlog.LogOutFormatStr('SysParam.NoSplash=%s',[BoolToStr(SysParam.saved.NoSplash,true)],LM_Info); @@ -183,8 +183,8 @@ function DataFilesExistChec(const ACheckedPath:string):boolean; with programlog.Enter('Macros',LM_Info) do try programlog.LogOutFormatStr('$(AppName)="%s"',[ExpandPath('$(AppName)')],LM_Necessarily); - programlog.LogOutFormatStr('$(ZBinPath)="%s"',[ExpandPath('$(ZBinPath)')],LM_Necessarily); - programlog.LogOutFormatStr('$(ZDataPath)="%s"',[ExpandPath('$(ZDataPath)')],LM_Necessarily); + programlog.LogOutFormatStr('$(BinPath)="%s"',[ExpandPath('$(BinPath)')],LM_Necessarily); + programlog.LogOutFormatStr('$(DistroPath)="%s"',[ExpandPath('$(DistroPath)')],LM_Necessarily); programlog.LogOutFormatStr('$(UserDir)="%s"',[ExpandPath('$(UserDir)')],LM_Necessarily); programlog.LogOutFormatStr('$(GlobalConfigDir)="%s"',[ExpandPath('$(GlobalConfigDir)')],LM_Necessarily); programlog.LogOutFormatStr('$(LocalConfigDir)="%s"',[ExpandPath('$(LocalConfigDir)')],LM_Necessarily); @@ -197,12 +197,8 @@ function DataFilesExistChec(const ACheckedPath:string):boolean; finally programlog.leave(IfEntered);end; end; procedure FindData; -var - tdp:string; begin - tdp:=FindDataPath(DataFilesExistChec); - if tdp<>'' then - DataPath:=tdp; + FindDistroPath(DataFilesExistChec); end; initialization diff --git a/cad_source/zcad/uzcsysvars.pas b/cad_source/zcad/uzcsysvars.pas index 4a631c2e9..416720b5d 100644 --- a/cad_source/zcad/uzcsysvars.pas +++ b/cad_source/zcad/uzcsysvars.pas @@ -60,7 +60,7 @@ tdebug=record {REGISTERRECORDTYPE tpath} tpath=record Support_Path:PString;(*'Support files'*) - AdditionalSupport_Path:PString;(*'Additional support files'*)(*oi_readonly*) + AdditionalSupport_Path:TFString;(*'Additional support files'*)(*oi_readonly*) Preload_Path:PString;(*'Preload files'*) Fonts_Path:PString;(*'Fonts'*) Alternate_Font:PString;(*'Alternate font file'*) @@ -68,8 +68,8 @@ tpath=record Template_File:PString;(*'Default template'*) LayoutFile:PString;(*'Current layout'*) Dictionaries:PString;(*'Dictionaries'*) - Program_Data:PString;(*'Program data'*)(*oi_readonly*) - Temp_files:PString;(*'Temporary files'*)(*oi_readonly*) + Program_Data:TFString;(*'Program data'*)(*oi_readonly*) + Temp_files:TFString;(*'Temporary files'*)(*oi_readonly*) Device_Library:PString;(*'Device base'*) end; PTCanvasData=^TCanvasData; diff --git a/cad_source/zcad/uzctranslations.pas b/cad_source/zcad/uzctranslations.pas index c92ef324f..ebc3d1a0f 100644 --- a/cad_source/zcad/uzctranslations.pas +++ b/cad_source/zcad/uzctranslations.pas @@ -22,7 +22,7 @@ interface uses uzbpaths,uzbstrproc,uzbLogTypes,uzcLog,uzbLog, - uzcsysparams, + uzcsysparams,uzcFileStructure, uSpeller,uzcSpeller, LazUTF8,gettext,translations, fileutil,LResources,sysutils,forms, @@ -190,19 +190,19 @@ procedure internalCreatePO(out CreatedPO:TmyPOFile;UpdatePOMode:Boolean;POFormat CreatedPO:=nil; if not UpdatePOMode then begin if Lang<>'' then begin - AFilename:=Format(PODirectory + POFormat,[Lang]); + AFilename:=Format(ConcatPaths([PODirectory,POFormat]),[Lang]); if FileExists(AFilename) then CreatedPO:=TmyPOFile.Create(AFilename); end; if (FallbackLang<>'')and(not assigned(CreatedPO)) then begin - AFilename:=Format(PODirectory + POFormat,[FallbackLang]); + AFilename:=Format(ConcatPaths([PODirectory,POFormat]),[FallbackLang]); if FileExists(AFilename) then CreatedPO:=TmyPOFile.Create(AFilename); end; if (not assigned(RunTimePO)) then CreatedPO:=TmyPOFile.Create; end else begin - AFilename:=(PODirectory + POFileName); + AFilename:=ConcatPaths([PODirectory,POFileName]); if FileExists(AFilename) then begin CreatedPO:=TmyPOFile.Create(AFilename,true); //actualypo:=TmyPOFile.Create; @@ -310,7 +310,7 @@ initialization TranslateLogModuleId:=programlog.RegisterModule('TRANSLATOR'); TranslateSpellerLogModuleId:=ProgramLog.RegisterModule('TRANSLATOR/SPELLER'); DisableTranslateCount:=0; - PODirectory := DataPath+'/languages/'; + PODirectory:=ConcatPaths([GetDistroPath,CFSlanguagesDir]); GetLanguageIDs(Lang, FallbackLang); // определено в модуле gettext if sysparam.saved.LangOverride<>'' then begin Lang:=sysparam.saved.LangOverride; @@ -319,9 +319,9 @@ initialization createpo; LRSTranslator:=TPoTranslator.Create; if not sysparam.saved.updatepo then begin - TranslateResourceStrings(PODirectory + ZCADTranslatedPOFileName, Lang, FallbackLang); - TranslateUnitResourceStrings('anchordockstr', PODirectory + 'anchordockstr.%s.po', Lang, FallbackLang); - TranslateUnitResourceStrings('lclstrconsts', PODirectory + 'lclstrconsts.%S.po', Lang, FallbackLang); + TranslateResourceStrings(ConcatPaths([PODirectory,ZCADTranslatedPOFileName]),Lang,FallbackLang); + TranslateUnitResourceStrings('anchordockstr',ConcatPaths([PODirectory,'anchordockstr.%s.po']),Lang,FallbackLang); + TranslateUnitResourceStrings('lclstrconsts',ConcatPaths([PODirectory,'lclstrconsts.%S.po']),Lang,FallbackLang); end; finalization diff --git a/cad_source/zcad/velec/managerem/uzvdevtoxlsx.pas b/cad_source/zcad/velec/managerem/uzvdevtoxlsx.pas index 76e9b8965..39132f774 100644 --- a/cad_source/zcad/velec/managerem/uzvdevtoxlsx.pas +++ b/cad_source/zcad/velec/managerem/uzvdevtoxlsx.pas @@ -52,7 +52,8 @@ interface uzcsysvars, Classes, uzcdrawing, uzvxlsxtocad, - Varman; + Varman, + uzbPaths; type TVXLSXCELL=record @@ -844,7 +845,7 @@ function vExportDevToXLSX_com(const Context:TZCADCommandContext;operands:TComman //открываем шаблон для его заполнения fileTemplate:='Не работает!!!!!!!!!!!!!'; ZCMsgCallBackInterface.Do_BeforeShowModal(nil); - isload:=OpenFileDialog(fileTemplate,LastFileHandle,'','Книга XLSX с поддержкой макросов|*.xlsm|Книга Excel 97-2003|*.xls|Книга Excel|*.xlsx',sysvar.PATH.Program_Data^+'preload\xlsxtemplates\devinxlsx\','Open Excel pattern file...'); + isload:=OpenFileDialog(fileTemplate,LastFileHandle,'','Книга XLSX с поддержкой макросов|*.xlsm|Книга Excel 97-2003|*.xls|Книга Excel|*.xlsx',GetDistroPath+'preload\xlsxtemplates\devinxlsx\','Open Excel pattern file...'); ZCMsgCallBackInterface.Do_AfterShowModal(nil); if not isload then begin result:=cmd_cancel; @@ -917,7 +918,7 @@ function vExportDevToXLSXToCAD_com(const Context:TZCADCommandContext;operands:TC //открываем шаблон для его заполнения fileTemplate:='Не работает!!!!!!!!!!!!!'; ZCMsgCallBackInterface.Do_BeforeShowModal(nil); - isload:=OpenFileDialog(fileTemplate,LastFileHandle,'','Книга XLSX с поддержкой макросов|*.xlsm|Книга Excel 97-2003|*.xls|Книга Excel|*.xlsx',sysvar.PATH.Program_Data^+'preload\xlsxtemplates\devinxlsx\','Open Excel pattern file...'); + isload:=OpenFileDialog(fileTemplate,LastFileHandle,'','Книга XLSX с поддержкой макросов|*.xlsm|Книга Excel 97-2003|*.xls|Книга Excel|*.xlsx',GetDistroPath+'preload\xlsxtemplates\devinxlsx\','Open Excel pattern file...'); ZCMsgCallBackInterface.Do_AfterShowModal(nil); if not isload then begin result:=cmd_cancel; diff --git a/cad_source/zcad/velec/managerem/uzvmodeltoxlsxfps.pas b/cad_source/zcad/velec/managerem/uzvmodeltoxlsxfps.pas index 30381a212..21ad84be7 100644 --- a/cad_source/zcad/velec/managerem/uzvmodeltoxlsxfps.pas +++ b/cad_source/zcad/velec/managerem/uzvmodeltoxlsxfps.pas @@ -54,7 +54,8 @@ interface Classes, uzcdrawing, Varman, - uzelongprocesssupport; + uzelongprocesssupport, + uzbPaths; type TVXLSXCELL=record @@ -2383,7 +2384,7 @@ function vExportModelToXLSXFPS_com(const Context:TZCADCommandContext;operands:TC //открываем шаблон для его заполнения fileTemplate:='Не работает!!!!!!!!!!!!!'; ZCMsgCallBackInterface.Do_BeforeShowModal(nil); - isload:=OpenFileDialog(fileTemplate,LastFileHandle,'','Книга XLSX с поддержкой макросов|*.xlsm|Книга Excel 97-2003|*.xls|Книга Excel|*.xlsx',sysvar.PATH.Program_Data^+'preload\xlsxtemplates\modelinxlsx\','Open Excel pattern file...'); + isload:=OpenFileDialog(fileTemplate,LastFileHandle,'','Книга XLSX с поддержкой макросов|*.xlsm|Книга Excel 97-2003|*.xls|Книга Excel|*.xlsx',GetDistroPath+'preload\xlsxtemplates\modelinxlsx\','Open Excel pattern file...'); ZCMsgCallBackInterface.Do_AfterShowModal(nil); if not isload then begin result:=cmd_cancel; diff --git a/cad_source/zcad/velec/managerem/uzvxlsxtocad.pas b/cad_source/zcad/velec/managerem/uzvxlsxtocad.pas index 3fd083292..6ff2fb21d 100644 --- a/cad_source/zcad/velec/managerem/uzvxlsxtocad.pas +++ b/cad_source/zcad/velec/managerem/uzvxlsxtocad.pas @@ -139,7 +139,7 @@ implementation entvarext:=result^.GetExtension; if entvarext<>nil then begin - psu:=units.findunit(GetSupportPath,@InterfaceTranslate,InsertionName); // + psu:=units.findunit(GetSupportPaths,@InterfaceTranslate,InsertionName); // if psu<>nil then entvarext.entityunit.copyfrom(psu); end; diff --git a/cad_source/zcad/velec/uzvaddconnection.pas b/cad_source/zcad/velec/uzvaddconnection.pas index 2120d9fc3..b7ecdd3d5 100644 --- a/cad_source/zcad/velec/uzvaddconnection.pas +++ b/cad_source/zcad/velec/uzvaddconnection.pas @@ -55,7 +55,7 @@ function uzvaddconnection_com(const Context:TZCADCommandContext;operands:TComman begin //Ищем модуль и загружаем его - pu:=units.findunit(GetSupportPath,//пути по которым будет искаться юнит если он еще небыл загружен + pu:=units.findunit(GetSupportPaths,//пути по которым будет искаться юнит если он еще небыл загружен InterfaceTranslate,//процедура локализации которая будет пытаться перевести на русский все что можно при загрузке 'slcabagenmodul');//имя модуля if pu<>nil then begin //если нашли diff --git a/cad_source/zcad/velec/uzvagsl.pas b/cad_source/zcad/velec/uzvagsl.pas index acd8f5b59..31075c329 100644 --- a/cad_source/zcad/velec/uzvagsl.pas +++ b/cad_source/zcad/velec/uzvagsl.pas @@ -1809,7 +1809,7 @@ function Test111sl(const Context:TZCADCommandContext;operands:TCommandOperands): SysUnit^.RegisterType(TypeInfo(TAutogenSuperLine));//регистрируем тип данных в зкадном RTTI SysUnit^.SetTypeDesk(TypeInfo(TAutogenSuperLine),['NameSuperLine','Cable laying type','Accuracy','Distance from the wall','Layer change','Layer name prefix']);//даем человеческие имена параметрам - //psu:=units.findunit(SupportPath,InterfaceTranslate,'superline'); + //psu:=units.findunit(SupportPaths,InterfaceTranslate,'superline'); //DrawSuperlineParams.pu:=psu; zcShowCommandParams(pointer(SysUnit^.TypeName2PTD('TAutogenSuperLine')),@autogenSuperLine); diff --git a/cad_source/zcad/velec/uzvcabmountmethod.pas b/cad_source/zcad/velec/uzvcabmountmethod.pas index a8de17f5a..ef5cb44f2 100644 --- a/cad_source/zcad/velec/uzvcabmountmethod.pas +++ b/cad_source/zcad/velec/uzvcabmountmethod.pas @@ -94,11 +94,11 @@ procedure RunMountingMethodsFastEditor(PInstance:Pointer); initialization MountingMethodsTree:=TTreePropManager.Create('~','MountingMethodsRoot');//создаем экземпляр, указываем разделитель и имя корневого узла - MountingMethodsTree.LoadTree(expandpath('$(ZDataPath)/rtl/velec/mountingmethodss.xml'),InterfaceTranslate);//грузим файл передаем путь и переводчика + MountingMethodsTree.LoadTree(expandpath('$(DistroPath)/rtl/velec/mountingmethodss.xml'),InterfaceTranslate);//грузим файл передаем путь и переводчика CreateZCADCommand(@MountingMethodsTest_com,'mt',CADWG,0);//тестовая команда, вызывает окно с твоим деревом - AddFastEditorToType(units.findunit(GetSupportPath,InterfaceTranslate,'cables').TypeName2PTD('TDCableMountingMethod'),//привязка быстрого редактора, я вяжу к String, ты поставишь свой тип + AddFastEditorToType(units.findunit(GetSupportPaths,InterfaceTranslate,'cables').TypeName2PTD('TDCableMountingMethod'),//привязка быстрого редактора, я вяжу к String, ты поставишь свой тип @OIUI_FE_ButtonGetPrefferedSize,//процедура определяющая размер кнопки в инспекторе @OIUI_FE_ButtonMultiplyDraw,//процедура рисующая кнопку в инспекторе @RunMountingMethodsFastEditor);//запуск редактора и возврат значения diff --git a/cad_source/zcad/velec/uzvelscheme.pas b/cad_source/zcad/velec/uzvelscheme.pas index 41cec128f..cf5c1741c 100644 --- a/cad_source/zcad/velec/uzvelscheme.pas +++ b/cad_source/zcad/velec/uzvelscheme.pas @@ -926,7 +926,7 @@ TInfoVertex=record //ищем модуль с переменными дефолтными переменными для представителя устройства - // pu:=units.findunit(SupportPath,InterfaceTranslate,'uentrepresentation'); + // pu:=units.findunit(SupportPaths,InterfaceTranslate,'uentrepresentation'); //временно выключаем все расширители примитива чтоб они не скопировались //в клон @@ -1024,7 +1024,7 @@ TInfoVertex=record //**добавление свойств устройтсва if entvarext<>nil then begin - psu:=units.findunit(GetSupportPath,@InterfaceTranslate,'develscheme'); // + psu:=units.findunit(GetSupportPaths,@InterfaceTranslate,'develscheme'); // if psu<>nil then entvarext.entityunit.copyfrom(psu); end; @@ -1173,7 +1173,7 @@ TInfoVertex=record //**добавление свойств устройтсва if entvarext<>nil then begin - psu:=units.findunit(GetSupportPath,@InterfaceTranslate,'develscheme'); // + psu:=units.findunit(GetSupportPaths,@InterfaceTranslate,'develscheme'); // if psu<>nil then entvarext.entityunit.copyfrom(psu); end; @@ -1326,7 +1326,7 @@ TInfoVertex=record cabl2:=TEdgeTree(G.GetEdge(listVertex[tparent].vertex,listVertex[tparent].vertex.Parent).AsPointer[vpTEdgeTree]^); entvarextParent:=cabl2.segm^.specialize GetExtension; - psu:=units.findunit(GetSupportPath,@InterfaceTranslate,'cableelscheme'); // + psu:=units.findunit(GetSupportPaths,@InterfaceTranslate,'cableelscheme'); // if psu<>nil then entvarext.entityunit.copyfrom(psu); @@ -1371,7 +1371,7 @@ TInfoVertex=record delvarext:=cableLine^.specialize GetExtension; if delvarext<>nil then begin - psu:=units.findunit(GetSupportPath,@InterfaceTranslate,'cableelscheme'); // + psu:=units.findunit(GetSupportPaths,@InterfaceTranslate,'cableelscheme'); // if psu<>nil then delvarext.entityunit.copyfrom(psu); end; @@ -1452,7 +1452,7 @@ TInfoVertex=record // //pvarext:=cableLine^.specialize GetExtension; //подклчаемся к инспектору // if entvarext<>nil then // begin - // psu:=units.findunit(SupportPath,@InterfaceTranslate,'cable'); // + // psu:=units.findunit(SupportPaths,@InterfaceTranslate,'cable'); // // if psu<>nil then // entvarext.entityunit.copyfrom(psu); // end; diff --git a/cad_source/zcad/velec/uzvnum.pas b/cad_source/zcad/velec/uzvnum.pas index b4f0bf3ff..3673c9fb0 100644 --- a/cad_source/zcad/velec/uzvnum.pas +++ b/cad_source/zcad/velec/uzvnum.pas @@ -982,7 +982,7 @@ function buildCableGroupLine(listHeadDevice:TListHeadDevice;ourGraph:TGraphBuild pvarext:=polyObj^.specialize GetExtension; //подклчаемся к инспектору if pvarext<>nil then begin - psu:=units.findunit(GetSupportPath,@InterfaceTranslate,'cable'); // + psu:=units.findunit(GetSupportPaths,@InterfaceTranslate,'cable'); // if psu<>nil then pvarext.entityunit.copyfrom(psu); end; diff --git a/cad_source/zcad/velec/uzvremoveconnection.pas b/cad_source/zcad/velec/uzvremoveconnection.pas index b3992cf4c..a13585b1e 100644 --- a/cad_source/zcad/velec/uzvremoveconnection.pas +++ b/cad_source/zcad/velec/uzvremoveconnection.pas @@ -55,7 +55,7 @@ function uzvremoveconnection_com(const Context:TZCADCommandContext;operands:TCom begin //Ищем модуль и загружаем его - pu:=units.findunit(GetSupportPath,//пути по которым будет искаться юнит если он еще небыл загружен + pu:=units.findunit(GetSupportPaths,//пути по которым будет искаться юнит если он еще небыл загружен InterfaceTranslate,//процедура локализации которая будет пытаться перевести на русский все что можно при загрузке 'slcabagenmodul');//имя модуля if pu<>nil then begin //если нашли diff --git a/cad_source/zcad/velec/uzvtreedevice.pas b/cad_source/zcad/velec/uzvtreedevice.pas index 237702e4f..58f2c1c8a 100644 --- a/cad_source/zcad/velec/uzvtreedevice.pas +++ b/cad_source/zcad/velec/uzvtreedevice.pas @@ -930,7 +930,7 @@ // counterGroupDevice=record // pvarext:=cableLine^.specialize GetExtension; //подклчаемся к инспектору // if pvarext<>nil then // begin -// psu:=units.findunit(SupportPath,@InterfaceTranslate,'cable'); // +// psu:=units.findunit(SupportPaths,@InterfaceTranslate,'cable'); // // if psu<>nil then // pvarext.entityunit.copyfrom(psu); // end; @@ -1221,7 +1221,7 @@ counterGroupDevice=record pvarext:=cableLine^.specialize GetExtension; //подклчаемся к инспектору if pvarext<>nil then begin - psu:=units.findunit(GetSupportPath,@InterfaceTranslate,'cable'); // + psu:=units.findunit(GetSupportPaths,@InterfaceTranslate,'cable'); // if psu<>nil then pvarext.entityunit.copyfrom(psu); end; diff --git a/cad_source/zengine/fonts/uzefontmanager.pas b/cad_source/zengine/fonts/uzefontmanager.pas index 9617adaa7..a15782e69 100644 --- a/cad_source/zengine/fonts/uzefontmanager.pas +++ b/cad_source/zengine/fonts/uzefontmanager.pas @@ -185,8 +185,8 @@ procedure GDBFontManager.CreateBaseFont; begin f.init(length(r.Value)); f.AddData(@r.Value[1],length(r.Value)); - f.SaveToFile(expandpath(TempPath+filename)); - pbasefont:=addFonfByFile(TempPath+filename); + f.SaveToFile(expandpath(GetTempPath+filename)); + pbasefont:=addFonfByFile(GetTempPath+filename); f.done; if pbasefont=nil then zDebugLn('{F}'+rsReserveFontNotLoad) diff --git a/cad_source/zengine/misc/uzeiopalette.pas b/cad_source/zengine/misc/uzeiopalette.pas index dd2c5398a..47dbefa40 100644 --- a/cad_source/zengine/misc/uzeiopalette.pas +++ b/cad_source/zengine/misc/uzeiopalette.pas @@ -53,7 +53,7 @@ procedure readpalette; line,sub:String; f:TZctnrVectorBytes; begin - f.InitFromFile(DataPath+filename); + f.InitFromFile(ConcatPaths([GetDistroPath,filename])); while f.notEOF do begin line:=f.readString; diff --git a/environment/runtimefiles/common/rtl/sysvar.pas b/environment/runtimefiles/common/rtl/sysvar.pas index c6c3ad162..0b9c1b147 100644 --- a/environment/runtimefiles/common/rtl/sysvar.pas +++ b/environment/runtimefiles/common/rtl/sysvar.pas @@ -156,8 +156,8 @@ implementation DSGN_OTrackTimerInterval:=500; DISP_LWDisplayScale:=10; RD_Light:=False; - PATH_Preload_Path:='$(ZDataPath)/preload/;$(UserDir)/zcad/preload/;$(LocalConfigDir)/$(AppName)/preload/;$(GlobalConfigDir)/$(AppName)/preload/'; - PATH_Fonts:='$(SystemFontsPath)/;$(UserFontsPath)/;$(ZDataPath)/fonts/;C:/APPS/MY/acad/support/;C:/Program Files/Autodesk/AutoCAD 2020/Fonts/'; + PATH_Preload_Path:='$(DistroPath)/preload/;$(UserDir)/zcad/preload/;$(LocalConfigDir)/$(AppName)/preload/;$(GlobalConfigDir)/$(AppName)/preload/'; + PATH_Fonts:='$(SystemFontsPath)/;$(UserFontsPath)/;$(DistroPath)/fonts/;C:/APPS/MY/acad/support/;C:/Program Files/Autodesk/AutoCAD 2020/Fonts/'; PATH_AlternateFont:='_mipGost.shx'; PATH_Support_Path:='$DataSearhPrefixes(rtl);$DataSearhPrefixes(rtl/objdefunits);$DataSearhPrefixes(rtl/objdefunits/include);$DataSearhPrefixes(components);$DataSearhPrefixes(blocks/el/general);$DataSearhPrefixes(blocks/el/general/velecdevice)'; INTF_CommandLineEnabled:=True; @@ -204,8 +204,8 @@ implementation SAVE_Auto_On:=True; SYS_RunTime:=0; SYS_Version:=''; - PATH_Device_Library:='$(ZDataPath)/programdb;$(ZDataPath)/userdb'; - PATH_Template_Path:='$(ZDataPath)/templates'; + PATH_Device_Library:='$(DistroPath)/programdb;$(DistroPath)/userdb'; + PATH_Template_Path:='$(DistroPath)/templates'; PATH_Template_File:='minimal.dxf'; PATH_LayoutFile:='defaultlayout.xml'; end. \ No newline at end of file diff --git a/environment/runtimefiles/zcad/preload/autorun.cmd b/environment/runtimefiles/zcad/preload/autorun.cmd index 95b5b5556..31bb973f2 100644 --- a/environment/runtimefiles/zcad/preload/autorun.cmd +++ b/environment/runtimefiles/zcad/preload/autorun.cmd @@ -1,5 +1,5 @@ ;Комментарий -;$(ZDataPath)-путь к программе +;$(DistroPath)-путь к дистрибутиву программы ;------------------------ ;Создание пустого чертежа ;------------------------ @@ -8,10 +8,10 @@ ;------------------------ ;Загрузка ткстовых файлов ;------------------------ -;Load($(ZDataPath)/sample/test_dxf/teapot.dxf) -;Load($(ZDataPath)/sample/test_dxf/em.dxf) -;Load($(ZDataPath)/autosave/autosave.dxf) -;Load($(ZDataPath)/sample/zigzag.dxf) +;Load($(DistroPath)/sample/test_dxf/teapot.dxf) +;Load($(DistroPath)/sample/test_dxf/em.dxf) +;Load($(DistroPath)/autosave/autosave.dxf) +;Load($(DistroPath)/sample/zigzag.dxf) ;----------------------------------- ;Показ окна "О программе" при старте diff --git a/environment/runtimefiles/zcad/preload/stage0.cmd0 b/environment/runtimefiles/zcad/preload/stage0.cmd0 index 35acf4767..159536e4e 100644 --- a/environment/runtimefiles/zcad/preload/stage0.cmd0 +++ b/environment/runtimefiles/zcad/preload/stage0.cmd0 @@ -1,6 +1,6 @@ ;Комментарий ;*-путь к программе -LoadActions($(ZDataPath)/menu/actionscontent.xml) -LoadToolBars($(ZDataPath)/menu/toolbarscontent.xml) -LoadPalettes($(ZDataPath)/menu/palettescontent.xml) -LoadMenus($(ZDataPath)/menu/menuscontent.xml) \ No newline at end of file +LoadActions($(DistroPath)/menu/actionscontent.xml) +LoadToolBars($(DistroPath)/menu/toolbarscontent.xml) +LoadPalettes($(DistroPath)/menu/palettescontent.xml) +LoadMenus($(DistroPath)/menu/menuscontent.xml) \ No newline at end of file diff --git a/environment/runtimefiles/zcadelectrotech/components/afterbuild.cmd b/environment/runtimefiles/zcadelectrotech/components/afterbuild.cmd index 8d75bf70f..0905df148 100644 --- a/environment/runtimefiles/zcadelectrotech/components/afterbuild.cmd +++ b/environment/runtimefiles/zcadelectrotech/components/afterbuild.cmd @@ -1,2 +1,2 @@ -ExecuteFile($(ZDataPath)/components/blockpreviewexport.cmd) +ExecuteFile($(DistroPath)/components/blockpreviewexport.cmd) Quit \ No newline at end of file diff --git a/environment/runtimefiles/zcadelectrotech/components/blockpreviewexport.cmd b/environment/runtimefiles/zcadelectrotech/components/blockpreviewexport.cmd index d42eeba0c..b0fb16c7b 100644 --- a/environment/runtimefiles/zcadelectrotech/components/blockpreviewexport.cmd +++ b/environment/runtimefiles/zcadelectrotech/components/blockpreviewexport.cmd @@ -5,223 +5,223 @@ InsertLayersFromBase(*) LayerOff(SYS_PIN) LayerOff(EL_DEVICE_NAME) -BlocksInBasePreViewExport(DEVICE_*|DEVICE_EL_VL_MOTOR1;DEVICE_EL_VL_HEATER1;DEVICE_EL_VL_DEVICE1|48|<>|$(ZDataPath)/images/palettes/<>_300.png) -BlocksInBasePreViewExport(DEVICE_*|DEVICE_EL_VL_MOTOR1;DEVICE_EL_VL_HEATER1;DEVICE_EL_VL_DEVICE1|24|<>|$(ZDataPath)/images/palettes/<>_150.png) -BlocksInBasePreViewExport(DEVICE_*|DEVICE_EL_VL_MOTOR1;DEVICE_EL_VL_HEATER1;DEVICE_EL_VL_DEVICE1|24|<>|$(ZDataPath)/images/palettes/<>.png) +BlocksInBasePreViewExport(DEVICE_*|DEVICE_EL_VL_MOTOR1;DEVICE_EL_VL_HEATER1;DEVICE_EL_VL_DEVICE1|48|<>|$(DistroPath)/images/palettes/<>_300.png) +BlocksInBasePreViewExport(DEVICE_*|DEVICE_EL_VL_MOTOR1;DEVICE_EL_VL_HEATER1;DEVICE_EL_VL_DEVICE1|24|<>|$(DistroPath)/images/palettes/<>_150.png) +BlocksInBasePreViewExport(DEVICE_*|DEVICE_EL_VL_MOTOR1;DEVICE_EL_VL_HEATER1;DEVICE_EL_VL_DEVICE1|24|<>|$(DistroPath)/images/palettes/<>.png) -BlockPreViewExport(24|A4K|$(ZDataPath)/images/palettes/A4K.png) -BlockPreViewExport(24|A4K|$(ZDataPath)/images/palettes/A4K_150.png) -BlockPreViewExport(48|A4K|$(ZDataPath)/images/palettes/A4K_300.png) +BlockPreViewExport(24|A4K|$(DistroPath)/images/palettes/A4K.png) +BlockPreViewExport(24|A4K|$(DistroPath)/images/palettes/A4K_150.png) +BlockPreViewExport(48|A4K|$(DistroPath)/images/palettes/A4K_300.png) -BlockPreViewExport(24|A3K|$(ZDataPath)/images/palettes/A3K.png) -BlockPreViewExport(24|A3K|$(ZDataPath)/images/palettes/A3K_150.png) -BlockPreViewExport(48|A3K|$(ZDataPath)/images/palettes/A3K_300.png) +BlockPreViewExport(24|A3K|$(DistroPath)/images/palettes/A3K.png) +BlockPreViewExport(24|A3K|$(DistroPath)/images/palettes/A3K_150.png) +BlockPreViewExport(48|A3K|$(DistroPath)/images/palettes/A3K_300.png) -BlockPreViewExport(24|A3A|$(ZDataPath)/images/palettes/A3A.png) -BlockPreViewExport(24|A3A|$(ZDataPath)/images/palettes/A3A_150.png) -BlockPreViewExport(48|A3A|$(ZDataPath)/images/palettes/A3A_300.png) +BlockPreViewExport(24|A3A|$(DistroPath)/images/palettes/A3A.png) +BlockPreViewExport(24|A3A|$(DistroPath)/images/palettes/A3A_150.png) +BlockPreViewExport(48|A3A|$(DistroPath)/images/palettes/A3A_300.png) -BlockPreViewExport(24|A3A+|$(ZDataPath)/images/palettes/A3A+.png) -BlockPreViewExport(24|A3A+|$(ZDataPath)/images/palettes/A3A+_150.png) -BlockPreViewExport(48|A3A+|$(ZDataPath)/images/palettes/A3A+_300.png) +BlockPreViewExport(24|A3A+|$(DistroPath)/images/palettes/A3A+.png) +BlockPreViewExport(24|A3A+|$(DistroPath)/images/palettes/A3A+_150.png) +BlockPreViewExport(48|A3A+|$(DistroPath)/images/palettes/A3A+_300.png) -BlockPreViewExport(24|A3A++|$(ZDataPath)/images/palettes/A3A++.png) -BlockPreViewExport(24|A3A++|$(ZDataPath)/images/palettes/A3A++_150.png) -BlockPreViewExport(48|A3A++|$(ZDataPath)/images/palettes/A3A++_300.png) +BlockPreViewExport(24|A3A++|$(DistroPath)/images/palettes/A3A++.png) +BlockPreViewExport(24|A3A++|$(DistroPath)/images/palettes/A3A++_150.png) +BlockPreViewExport(48|A3A++|$(DistroPath)/images/palettes/A3A++_300.png) -BlockPreViewExport(24|A2K|$(ZDataPath)/images/palettes/A2K.png) -BlockPreViewExport(24|A2K|$(ZDataPath)/images/palettes/A2K_150.png) -BlockPreViewExport(48|A2K|$(ZDataPath)/images/palettes/A2K_300.png) +BlockPreViewExport(24|A2K|$(DistroPath)/images/palettes/A2K.png) +BlockPreViewExport(24|A2K|$(DistroPath)/images/palettes/A2K_150.png) +BlockPreViewExport(48|A2K|$(DistroPath)/images/palettes/A2K_300.png) -BlockPreViewExport(24|A2A|$(ZDataPath)/images/palettes/A2A.png) -BlockPreViewExport(24|A2A|$(ZDataPath)/images/palettes/A2A_150.png) -BlockPreViewExport(48|A2A|$(ZDataPath)/images/palettes/A2A_300.png) +BlockPreViewExport(24|A2A|$(DistroPath)/images/palettes/A2A.png) +BlockPreViewExport(24|A2A|$(DistroPath)/images/palettes/A2A_150.png) +BlockPreViewExport(48|A2A|$(DistroPath)/images/palettes/A2A_300.png) -BlockPreViewExport(24|A2A+|$(ZDataPath)/images/palettes/A2A+.png) -BlockPreViewExport(24|A2A+|$(ZDataPath)/images/palettes/A2A+_150.png) -BlockPreViewExport(48|A2A+|$(ZDataPath)/images/palettes/A2A+_300.png) +BlockPreViewExport(24|A2A+|$(DistroPath)/images/palettes/A2A+.png) +BlockPreViewExport(24|A2A+|$(DistroPath)/images/palettes/A2A+_150.png) +BlockPreViewExport(48|A2A+|$(DistroPath)/images/palettes/A2A+_300.png) -BlockPreViewExport(24|A2A++|$(ZDataPath)/images/palettes/A2A++.png) -BlockPreViewExport(24|A2A++|$(ZDataPath)/images/palettes/A2A++_150.png) -BlockPreViewExport(48|A2A++|$(ZDataPath)/images/palettes/A2A++_300.png) +BlockPreViewExport(24|A2A++|$(DistroPath)/images/palettes/A2A++.png) +BlockPreViewExport(24|A2A++|$(DistroPath)/images/palettes/A2A++_150.png) +BlockPreViewExport(48|A2A++|$(DistroPath)/images/palettes/A2A++_300.png) -BlockPreViewExport(24|A1K|$(ZDataPath)/images/palettes/A1K.png) -BlockPreViewExport(24|A1K|$(ZDataPath)/images/palettes/A1K_150.png) -BlockPreViewExport(48|A1K|$(ZDataPath)/images/palettes/A1K_300.png) +BlockPreViewExport(24|A1K|$(DistroPath)/images/palettes/A1K.png) +BlockPreViewExport(24|A1K|$(DistroPath)/images/palettes/A1K_150.png) +BlockPreViewExport(48|A1K|$(DistroPath)/images/palettes/A1K_300.png) -BlockPreViewExport(24|A1A|$(ZDataPath)/images/palettes/A1A.png) -BlockPreViewExport(24|A1A|$(ZDataPath)/images/palettes/A1A_150.png) -BlockPreViewExport(48|A1A|$(ZDataPath)/images/palettes/A1A_300.png) +BlockPreViewExport(24|A1A|$(DistroPath)/images/palettes/A1A.png) +BlockPreViewExport(24|A1A|$(DistroPath)/images/palettes/A1A_150.png) +BlockPreViewExport(48|A1A|$(DistroPath)/images/palettes/A1A_300.png) -BlockPreViewExport(24|A1A+|$(ZDataPath)/images/palettes/A1A+.png) -BlockPreViewExport(24|A1A+|$(ZDataPath)/images/palettes/A1A+_150.png) -BlockPreViewExport(48|A1A+|$(ZDataPath)/images/palettes/A1A+_300.png) +BlockPreViewExport(24|A1A+|$(DistroPath)/images/palettes/A1A+.png) +BlockPreViewExport(24|A1A+|$(DistroPath)/images/palettes/A1A+_150.png) +BlockPreViewExport(48|A1A+|$(DistroPath)/images/palettes/A1A+_300.png) -BlockPreViewExport(24|A0K|$(ZDataPath)/images/palettes/A0K.png) -BlockPreViewExport(24|A0K|$(ZDataPath)/images/palettes/A0K_150.png) -BlockPreViewExport(48|A0K|$(ZDataPath)/images/palettes/A0K_300.png) +BlockPreViewExport(24|A0K|$(DistroPath)/images/palettes/A0K.png) +BlockPreViewExport(24|A0K|$(DistroPath)/images/palettes/A0K_150.png) +BlockPreViewExport(48|A0K|$(DistroPath)/images/palettes/A0K_300.png) -BlockPreViewExport(24|A0A|$(ZDataPath)/images/palettes/A0A.png) -BlockPreViewExport(24|A0A|$(ZDataPath)/images/palettes/A0A_150.png) -BlockPreViewExport(48|A0A|$(ZDataPath)/images/palettes/A0A_300.png) +BlockPreViewExport(24|A0A|$(DistroPath)/images/palettes/A0A.png) +BlockPreViewExport(24|A0A|$(DistroPath)/images/palettes/A0A_150.png) +BlockPreViewExport(48|A0A|$(DistroPath)/images/palettes/A0A_300.png) -BlockPreViewExport(24|A0A+|$(ZDataPath)/images/palettes/A0A+.png) -BlockPreViewExport(24|A0A+|$(ZDataPath)/images/palettes/A0A+_150.png) -BlockPreViewExport(48|A0A+|$(ZDataPath)/images/palettes/A0A+_300.png) +BlockPreViewExport(24|A0A+|$(DistroPath)/images/palettes/A0A+.png) +BlockPreViewExport(24|A0A+|$(DistroPath)/images/palettes/A0A+_150.png) +BlockPreViewExport(48|A0A+|$(DistroPath)/images/palettes/A0A+_300.png) -BlockPreViewExport(24|A0A++|$(ZDataPath)/images/palettes/A0A++.png) -BlockPreViewExport(24|A0A++|$(ZDataPath)/images/palettes/A0A++_150.png) -BlockPreViewExport(48|A0A++|$(ZDataPath)/images/palettes/A0A++_300.png) +BlockPreViewExport(24|A0A++|$(DistroPath)/images/palettes/A0A++.png) +BlockPreViewExport(24|A0A++|$(DistroPath)/images/palettes/A0A++_150.png) +BlockPreViewExport(48|A0A++|$(DistroPath)/images/palettes/A0A++_300.png) -BlockPreViewExport(24|EL_VL_REPORT1_1|$(ZDataPath)/images/palettes/EL_VL_REPORT1_1+.png) -BlockPreViewExport(24|EL_VL_REPORT1_1|$(ZDataPath)/images/palettes/EL_VL_REPORT1_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT1_1|$(ZDataPath)/images/palettes/EL_VL_REPORT1_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT1_1|$(DistroPath)/images/palettes/EL_VL_REPORT1_1+.png) +BlockPreViewExport(24|EL_VL_REPORT1_1|$(DistroPath)/images/palettes/EL_VL_REPORT1_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT1_1|$(DistroPath)/images/palettes/EL_VL_REPORT1_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT2_1|$(ZDataPath)/images/palettes/EL_VL_REPORT2_1+.png) -BlockPreViewExport(24|EL_VL_REPORT2_1|$(ZDataPath)/images/palettes/EL_VL_REPORT2_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT2_1|$(ZDataPath)/images/palettes/EL_VL_REPORT2_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT2_1|$(DistroPath)/images/palettes/EL_VL_REPORT2_1+.png) +BlockPreViewExport(24|EL_VL_REPORT2_1|$(DistroPath)/images/palettes/EL_VL_REPORT2_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT2_1|$(DistroPath)/images/palettes/EL_VL_REPORT2_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT4_1|$(ZDataPath)/images/palettes/EL_VL_REPORT4_1.png) -BlockPreViewExport(24|EL_VL_REPORT4_1|$(ZDataPath)/images/palettes/EL_VL_REPORT4_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT4_1|$(ZDataPath)/images/palettes/EL_VL_REPORT4_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT4_1|$(DistroPath)/images/palettes/EL_VL_REPORT4_1.png) +BlockPreViewExport(24|EL_VL_REPORT4_1|$(DistroPath)/images/palettes/EL_VL_REPORT4_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT4_1|$(DistroPath)/images/palettes/EL_VL_REPORT4_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT6_1|$(ZDataPath)/images/palettes/EL_VL_REPORT6_1+.png) -BlockPreViewExport(24|EL_VL_REPORT6_1|$(ZDataPath)/images/palettes/EL_VL_REPORT6_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT6_1|$(ZDataPath)/images/palettes/EL_VL_REPORT6_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT6_1|$(DistroPath)/images/palettes/EL_VL_REPORT6_1+.png) +BlockPreViewExport(24|EL_VL_REPORT6_1|$(DistroPath)/images/palettes/EL_VL_REPORT6_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT6_1|$(DistroPath)/images/palettes/EL_VL_REPORT6_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT7_1|$(ZDataPath)/images/palettes/EL_VL_REPORT7_1.png) -BlockPreViewExport(24|EL_VL_REPORT7_1|$(ZDataPath)/images/palettes/EL_VL_REPORT7_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT7_1|$(ZDataPath)/images/palettes/EL_VL_REPORT7_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT7_1|$(DistroPath)/images/palettes/EL_VL_REPORT7_1.png) +BlockPreViewExport(24|EL_VL_REPORT7_1|$(DistroPath)/images/palettes/EL_VL_REPORT7_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT7_1|$(DistroPath)/images/palettes/EL_VL_REPORT7_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT8_1|$(ZDataPath)/images/palettes/EL_VL_REPORT8_1.png) -BlockPreViewExport(24|EL_VL_REPORT8_1|$(ZDataPath)/images/palettes/EL_VL_REPORT8_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT8_1|$(ZDataPath)/images/palettes/EL_VL_REPORT8_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT8_1|$(DistroPath)/images/palettes/EL_VL_REPORT8_1.png) +BlockPreViewExport(24|EL_VL_REPORT8_1|$(DistroPath)/images/palettes/EL_VL_REPORT8_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT8_1|$(DistroPath)/images/palettes/EL_VL_REPORT8_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT9_1|$(ZDataPath)/images/palettes/EL_VL_REPORT9_1.png) -BlockPreViewExport(24|EL_VL_REPORT9_1|$(ZDataPath)/images/palettes/EL_VL_REPORT9_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT9_1|$(ZDataPath)/images/palettes/EL_VL_REPORT9_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT9_1|$(DistroPath)/images/palettes/EL_VL_REPORT9_1.png) +BlockPreViewExport(24|EL_VL_REPORT9_1|$(DistroPath)/images/palettes/EL_VL_REPORT9_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT9_1|$(DistroPath)/images/palettes/EL_VL_REPORT9_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT10_1|$(ZDataPath)/images/palettes/EL_VL_REPORT10_1.png) -BlockPreViewExport(24|EL_VL_REPORT10_1|$(ZDataPath)/images/palettes/EL_VL_REPORT10_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT10_1|$(ZDataPath)/images/palettes/EL_VL_REPORT10_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT10_1|$(DistroPath)/images/palettes/EL_VL_REPORT10_1.png) +BlockPreViewExport(24|EL_VL_REPORT10_1|$(DistroPath)/images/palettes/EL_VL_REPORT10_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT10_1|$(DistroPath)/images/palettes/EL_VL_REPORT10_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT11_1|$(ZDataPath)/images/palettes/EL_VL_REPORT11_1.png) -BlockPreViewExport(24|EL_VL_REPORT11_1|$(ZDataPath)/images/palettes/EL_VL_REPORT11_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT11_1|$(ZDataPath)/images/palettes/EL_VL_REPORT11_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT11_1|$(DistroPath)/images/palettes/EL_VL_REPORT11_1.png) +BlockPreViewExport(24|EL_VL_REPORT11_1|$(DistroPath)/images/palettes/EL_VL_REPORT11_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT11_1|$(DistroPath)/images/palettes/EL_VL_REPORT11_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT12_1|$(ZDataPath)/images/palettes/EL_VL_REPORT12_1.png) -BlockPreViewExport(24|EL_VL_REPORT12_1|$(ZDataPath)/images/palettes/EL_VL_REPORT12_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT12_1|$(ZDataPath)/images/palettes/EL_VL_REPORT12_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT12_1|$(DistroPath)/images/palettes/EL_VL_REPORT12_1.png) +BlockPreViewExport(24|EL_VL_REPORT12_1|$(DistroPath)/images/palettes/EL_VL_REPORT12_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT12_1|$(DistroPath)/images/palettes/EL_VL_REPORT12_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT13_1|$(ZDataPath)/images/palettes/EL_VL_REPORT13_1.png) -BlockPreViewExport(24|EL_VL_REPORT13_1|$(ZDataPath)/images/palettes/EL_VL_REPORT13_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT13_1|$(ZDataPath)/images/palettes/EL_VL_REPORT13_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT13_1|$(DistroPath)/images/palettes/EL_VL_REPORT13_1.png) +BlockPreViewExport(24|EL_VL_REPORT13_1|$(DistroPath)/images/palettes/EL_VL_REPORT13_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT13_1|$(DistroPath)/images/palettes/EL_VL_REPORT13_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT14_1|$(ZDataPath)/images/palettes/EL_VL_REPORT14_1.png) -BlockPreViewExport(24|EL_VL_REPORT14_1|$(ZDataPath)/images/palettes/EL_VL_REPORT14_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT14_1|$(ZDataPath)/images/palettes/EL_VL_REPORT14_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT14_1|$(DistroPath)/images/palettes/EL_VL_REPORT14_1.png) +BlockPreViewExport(24|EL_VL_REPORT14_1|$(DistroPath)/images/palettes/EL_VL_REPORT14_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT14_1|$(DistroPath)/images/palettes/EL_VL_REPORT14_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT15_1|$(ZDataPath)/images/palettes/EL_VL_REPORT15_1.png) -BlockPreViewExport(24|EL_VL_REPORT15_1|$(ZDataPath)/images/palettes/EL_VL_REPORT15_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT15_1|$(ZDataPath)/images/palettes/EL_VL_REPORT15_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT15_1|$(DistroPath)/images/palettes/EL_VL_REPORT15_1.png) +BlockPreViewExport(24|EL_VL_REPORT15_1|$(DistroPath)/images/palettes/EL_VL_REPORT15_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT15_1|$(DistroPath)/images/palettes/EL_VL_REPORT15_1_300.png) -BlockPreViewExport(24|EL_VL_REPORT16_1|$(ZDataPath)/images/palettes/EL_VL_REPORT16_1.png) -BlockPreViewExport(24|EL_VL_REPORT16_1|$(ZDataPath)/images/palettes/EL_VL_REPORT16_1_150.png) -BlockPreViewExport(48|EL_VL_REPORT16_1|$(ZDataPath)/images/palettes/EL_VL_REPORT16_1_300.png) +BlockPreViewExport(24|EL_VL_REPORT16_1|$(DistroPath)/images/palettes/EL_VL_REPORT16_1.png) +BlockPreViewExport(24|EL_VL_REPORT16_1|$(DistroPath)/images/palettes/EL_VL_REPORT16_1_150.png) +BlockPreViewExport(48|EL_VL_REPORT16_1|$(DistroPath)/images/palettes/EL_VL_REPORT16_1_300.png) -BlockPreViewExport(24|EL_VL_VEDOMOSTI1_1|$(ZDataPath)/images/palettes/EL_VL_VEDOMOSTI1_1.png) -BlockPreViewExport(24|EL_VL_VEDOMOSTI1_1|$(ZDataPath)/images/palettes/EL_VL_VEDOMOSTI1_1_150.png) -BlockPreViewExport(48|EL_VL_VEDOMOSTI1_1|$(ZDataPath)/images/palettes/EL_VL_VEDOMOSTI1_1_300.png) +BlockPreViewExport(24|EL_VL_VEDOMOSTI1_1|$(DistroPath)/images/palettes/EL_VL_VEDOMOSTI1_1.png) +BlockPreViewExport(24|EL_VL_VEDOMOSTI1_1|$(DistroPath)/images/palettes/EL_VL_VEDOMOSTI1_1_150.png) +BlockPreViewExport(48|EL_VL_VEDOMOSTI1_1|$(DistroPath)/images/palettes/EL_VL_VEDOMOSTI1_1_300.png) -BlockPreViewExport(24|EL_VL_VEDOMOSTI2_1|$(ZDataPath)/images/palettes/EL_VL_VEDOMOSTI2_1.png) -BlockPreViewExport(24|EL_VL_VEDOMOSTI2_1|$(ZDataPath)/images/palettes/EL_VL_VEDOMOSTI2_1_150.png) -BlockPreViewExport(48|EL_VL_VEDOMOSTI2_1|$(ZDataPath)/images/palettes/EL_VL_VEDOMOSTI2_1_300.png) +BlockPreViewExport(24|EL_VL_VEDOMOSTI2_1|$(DistroPath)/images/palettes/EL_VL_VEDOMOSTI2_1.png) +BlockPreViewExport(24|EL_VL_VEDOMOSTI2_1|$(DistroPath)/images/palettes/EL_VL_VEDOMOSTI2_1_150.png) +BlockPreViewExport(48|EL_VL_VEDOMOSTI2_1|$(DistroPath)/images/palettes/EL_VL_VEDOMOSTI2_1_300.png) -BlockPreViewExport(24|EL_VL_VEDOMOSTI4_1|$(ZDataPath)/images/palettes/EL_VL_VEDOMOSTI4_1.png) -BlockPreViewExport(24|EL_VL_VEDOMOSTI4_1|$(ZDataPath)/images/palettes/EL_VL_VEDOMOSTI4_1_150.png) -BlockPreViewExport(48|EL_VL_VEDOMOSTI4_1|$(ZDataPath)/images/palettes/EL_VL_VEDOMOSTI4_1_300.png) +BlockPreViewExport(24|EL_VL_VEDOMOSTI4_1|$(DistroPath)/images/palettes/EL_VL_VEDOMOSTI4_1.png) +BlockPreViewExport(24|EL_VL_VEDOMOSTI4_1|$(DistroPath)/images/palettes/EL_VL_VEDOMOSTI4_1_150.png) +BlockPreViewExport(48|EL_VL_VEDOMOSTI4_1|$(DistroPath)/images/palettes/EL_VL_VEDOMOSTI4_1_300.png) -BlockPreViewExport(24|DIAGRAM_CN0|$(ZDataPath)/images/palettes/DIAGRAM_CN0.png) -BlockPreViewExport(24|DIAGRAM_CN0|$(ZDataPath)/images/palettes/DIAGRAM_CN0_150.png) -BlockPreViewExport(48|DIAGRAM_CN0|$(ZDataPath)/images/palettes/DIAGRAM_CN0_300.png) +BlockPreViewExport(24|DIAGRAM_CN0|$(DistroPath)/images/palettes/DIAGRAM_CN0.png) +BlockPreViewExport(24|DIAGRAM_CN0|$(DistroPath)/images/palettes/DIAGRAM_CN0_150.png) +BlockPreViewExport(48|DIAGRAM_CN0|$(DistroPath)/images/palettes/DIAGRAM_CN0_300.png) -BlockPreViewExport(24|DIAGRAM_CN1|$(ZDataPath)/images/palettes/DIAGRAM_CN1.png) -BlockPreViewExport(24|DIAGRAM_CN1|$(ZDataPath)/images/palettes/DIAGRAM_CN1_150.png) -BlockPreViewExport(48|DIAGRAM_CN1|$(ZDataPath)/images/palettes/DIAGRAM_CN1_300.png) +BlockPreViewExport(24|DIAGRAM_CN1|$(DistroPath)/images/palettes/DIAGRAM_CN1.png) +BlockPreViewExport(24|DIAGRAM_CN1|$(DistroPath)/images/palettes/DIAGRAM_CN1_150.png) +BlockPreViewExport(48|DIAGRAM_CN1|$(DistroPath)/images/palettes/DIAGRAM_CN1_300.png) -BlockPreViewExport(24|DIAGRAM_PE1|$(ZDataPath)/images/palettes/DIAGRAM_PE1.png) -BlockPreViewExport(24|DIAGRAM_PE1|$(ZDataPath)/images/palettes/DIAGRAM_PE1_150.png) -BlockPreViewExport(48|DIAGRAM_PE1|$(ZDataPath)/images/palettes/DIAGRAM_PE1_300.png) +BlockPreViewExport(24|DIAGRAM_PE1|$(DistroPath)/images/palettes/DIAGRAM_PE1.png) +BlockPreViewExport(24|DIAGRAM_PE1|$(DistroPath)/images/palettes/DIAGRAM_PE1_150.png) +BlockPreViewExport(48|DIAGRAM_PE1|$(DistroPath)/images/palettes/DIAGRAM_PE1_300.png) -BlockPreViewExport(24|DIAGRAM_PE2|$(ZDataPath)/images/palettes/DIAGRAM_PE2.png) -BlockPreViewExport(24|DIAGRAM_PE2|$(ZDataPath)/images/palettes/DIAGRAM_PE2_150.png) -BlockPreViewExport(48|DIAGRAM_PE2|$(ZDataPath)/images/palettes/DIAGRAM_PE2_300.png) +BlockPreViewExport(24|DIAGRAM_PE2|$(DistroPath)/images/palettes/DIAGRAM_PE2.png) +BlockPreViewExport(24|DIAGRAM_PE2|$(DistroPath)/images/palettes/DIAGRAM_PE2_150.png) +BlockPreViewExport(48|DIAGRAM_PE2|$(DistroPath)/images/palettes/DIAGRAM_PE2_300.png) -BlockPreViewExport(24|DIAGRAM_H0|$(ZDataPath)/images/palettes/DIAGRAM_H0.png) -BlockPreViewExport(24|DIAGRAM_H0|$(ZDataPath)/images/palettes/DIAGRAM_H0_150.png) -BlockPreViewExport(48|DIAGRAM_H0|$(ZDataPath)/images/palettes/DIAGRAM_H0_300.png) +BlockPreViewExport(24|DIAGRAM_H0|$(DistroPath)/images/palettes/DIAGRAM_H0.png) +BlockPreViewExport(24|DIAGRAM_H0|$(DistroPath)/images/palettes/DIAGRAM_H0_150.png) +BlockPreViewExport(48|DIAGRAM_H0|$(DistroPath)/images/palettes/DIAGRAM_H0_300.png) -BlockPreViewExport(24|DIAGRAM_FD0|$(ZDataPath)/images/palettes/DIAGRAM_FD0.png) -BlockPreViewExport(24|DIAGRAM_FD0|$(ZDataPath)/images/palettes/DIAGRAM_FD0_150.png) -BlockPreViewExport(48|DIAGRAM_FD0|$(ZDataPath)/images/palettes/DIAGRAM_FD0_300.png) +BlockPreViewExport(24|DIAGRAM_FD0|$(DistroPath)/images/palettes/DIAGRAM_FD0.png) +BlockPreViewExport(24|DIAGRAM_FD0|$(DistroPath)/images/palettes/DIAGRAM_FD0_150.png) +BlockPreViewExport(48|DIAGRAM_FD0|$(DistroPath)/images/palettes/DIAGRAM_FD0_300.png) -BlockPreViewExport(24|DIAGRAM_FD1|$(ZDataPath)/images/palettes/DIAGRAM_FD1.png) -BlockPreViewExport(24|DIAGRAM_FD1|$(ZDataPath)/images/palettes/DIAGRAM_FD1_150.png) -BlockPreViewExport(48|DIAGRAM_FD1|$(ZDataPath)/images/palettes/DIAGRAM_FD1_300.png) +BlockPreViewExport(24|DIAGRAM_FD1|$(DistroPath)/images/palettes/DIAGRAM_FD1.png) +BlockPreViewExport(24|DIAGRAM_FD1|$(DistroPath)/images/palettes/DIAGRAM_FD1_150.png) +BlockPreViewExport(48|DIAGRAM_FD1|$(DistroPath)/images/palettes/DIAGRAM_FD1_300.png) -BlockPreViewExport(24|DIAGRAM_QF1|$(ZDataPath)/images/palettes/DIAGRAM_QF1.png) -BlockPreViewExport(24|DIAGRAM_QF1|$(ZDataPath)/images/palettes/DIAGRAM_QF1_150.png) -BlockPreViewExport(48|DIAGRAM_QF1|$(ZDataPath)/images/palettes/DIAGRAM_QF1_300.png) +BlockPreViewExport(24|DIAGRAM_QF1|$(DistroPath)/images/palettes/DIAGRAM_QF1.png) +BlockPreViewExport(24|DIAGRAM_QF1|$(DistroPath)/images/palettes/DIAGRAM_QF1_150.png) +BlockPreViewExport(48|DIAGRAM_QF1|$(DistroPath)/images/palettes/DIAGRAM_QF1_300.png) -BlockPreViewExport(24|EL_VL_LINE4_1|$(ZDataPath)/images/palettes/EL_VL_LINE4_1.png) -BlockPreViewExport(24|EL_VL_LINE4_1|$(ZDataPath)/images/palettes/EL_VL_LINE4_1_150.png) -BlockPreViewExport(48|EL_VL_LINE4_1|$(ZDataPath)/images/palettes/EL_VL_LINE4_1_300.png) +BlockPreViewExport(24|EL_VL_LINE4_1|$(DistroPath)/images/palettes/EL_VL_LINE4_1.png) +BlockPreViewExport(24|EL_VL_LINE4_1|$(DistroPath)/images/palettes/EL_VL_LINE4_1_150.png) +BlockPreViewExport(48|EL_VL_LINE4_1|$(DistroPath)/images/palettes/EL_VL_LINE4_1_300.png) -BlockPreViewExport(24|EL_VL_LINE4_2|$(ZDataPath)/images/palettes/EL_VL_LINE4_2.png) -BlockPreViewExport(24|EL_VL_LINE4_2|$(ZDataPath)/images/palettes/EL_VL_LINE4_2_150.png) -BlockPreViewExport(48|EL_VL_LINE4_2|$(ZDataPath)/images/palettes/EL_VL_LINE4_2_300.png) +BlockPreViewExport(24|EL_VL_LINE4_2|$(DistroPath)/images/palettes/EL_VL_LINE4_2.png) +BlockPreViewExport(24|EL_VL_LINE4_2|$(DistroPath)/images/palettes/EL_VL_LINE4_2_150.png) +BlockPreViewExport(48|EL_VL_LINE4_2|$(DistroPath)/images/palettes/EL_VL_LINE4_2_300.png) -BlockPreViewExport(24|EL_VL_SCHEMA1_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA1_0.png) -BlockPreViewExport(24|EL_VL_SCHEMA1_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA1_0_150.png) -BlockPreViewExport(48|EL_VL_SCHEMA1_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA1_0_300.png) +BlockPreViewExport(24|EL_VL_SCHEMA1_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA1_0.png) +BlockPreViewExport(24|EL_VL_SCHEMA1_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA1_0_150.png) +BlockPreViewExport(48|EL_VL_SCHEMA1_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA1_0_300.png) -BlockPreViewExport(24|EL_VL_SCHEMA2_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA2_0.png) -BlockPreViewExport(24|EL_VL_SCHEMA2_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA2_0_150.png) -BlockPreViewExport(48|EL_VL_SCHEMA2_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA2_0_300.png) +BlockPreViewExport(24|EL_VL_SCHEMA2_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA2_0.png) +BlockPreViewExport(24|EL_VL_SCHEMA2_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA2_0_150.png) +BlockPreViewExport(48|EL_VL_SCHEMA2_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA2_0_300.png) -BlockPreViewExport(24|EL_VL_SCHEMA3_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA3_0.png) -BlockPreViewExport(24|EL_VL_SCHEMA3_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA3_0_150.png) -BlockPreViewExport(48|EL_VL_SCHEMA3_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA3_0_300.png) +BlockPreViewExport(24|EL_VL_SCHEMA3_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA3_0.png) +BlockPreViewExport(24|EL_VL_SCHEMA3_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA3_0_150.png) +BlockPreViewExport(48|EL_VL_SCHEMA3_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA3_0_300.png) -BlockPreViewExport(24|EL_VL_SCHEMA4_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA4_0.png) -BlockPreViewExport(24|EL_VL_SCHEMA4_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA4_0_150.png) -BlockPreViewExport(48|EL_VL_SCHEMA4_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA4_0_300.png) +BlockPreViewExport(24|EL_VL_SCHEMA4_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA4_0.png) +BlockPreViewExport(24|EL_VL_SCHEMA4_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA4_0_150.png) +BlockPreViewExport(48|EL_VL_SCHEMA4_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA4_0_300.png) -BlockPreViewExport(24|EL_VL_SCHEMA5_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA5_0.png) -BlockPreViewExport(24|EL_VL_SCHEMA5_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA5_0_150.png) -BlockPreViewExport(48|EL_VL_SCHEMA5_0|$(ZDataPath)/images/palettes/EL_VL_SCHEMA5_0_300.png) +BlockPreViewExport(24|EL_VL_SCHEMA5_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA5_0.png) +BlockPreViewExport(24|EL_VL_SCHEMA5_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA5_0_150.png) +BlockPreViewExport(48|EL_VL_SCHEMA5_0|$(DistroPath)/images/palettes/EL_VL_SCHEMA5_0_300.png) -BlockPreViewExport(24|EL_VL_HIGH_L1|$(ZDataPath)/images/palettes/EL_VL_HIGH_L1.png) -BlockPreViewExport(24|EL_VL_HIGH_L1|$(ZDataPath)/images/palettes/EL_VL_HIGH_L1_150.png) -BlockPreViewExport(48|EL_VL_HIGH_L1|$(ZDataPath)/images/palettes/EL_VL_HIGH_L1_300.png) +BlockPreViewExport(24|EL_VL_HIGH_L1|$(DistroPath)/images/palettes/EL_VL_HIGH_L1.png) +BlockPreViewExport(24|EL_VL_HIGH_L1|$(DistroPath)/images/palettes/EL_VL_HIGH_L1_150.png) +BlockPreViewExport(48|EL_VL_HIGH_L1|$(DistroPath)/images/palettes/EL_VL_HIGH_L1_300.png) -BlockPreViewExport(24|EL_VL_HIGH_CZ1|$(ZDataPath)/images/palettes/EL_VL_HIGH_CZ1.png) -BlockPreViewExport(24|EL_VL_HIGH_CZ1|$(ZDataPath)/images/palettes/EL_VL_HIGH_CZ1_150.png) -BlockPreViewExport(48|EL_VL_HIGH_CZ1|$(ZDataPath)/images/palettes/EL_VL_HIGH_CZ1_300.png) +BlockPreViewExport(24|EL_VL_HIGH_CZ1|$(DistroPath)/images/palettes/EL_VL_HIGH_CZ1.png) +BlockPreViewExport(24|EL_VL_HIGH_CZ1|$(DistroPath)/images/palettes/EL_VL_HIGH_CZ1_150.png) +BlockPreViewExport(48|EL_VL_HIGH_CZ1|$(DistroPath)/images/palettes/EL_VL_HIGH_CZ1_300.png) -BlockPreViewExport(24|EL_VL_HIGH_FD0|$(ZDataPath)/images/palettes/EL_VL_HIGH_FD0.png) -BlockPreViewExport(24|EL_VL_HIGH_FD0|$(ZDataPath)/images/palettes/EL_VL_HIGH_FD0_150.png) -BlockPreViewExport(48|EL_VL_HIGH_FD0|$(ZDataPath)/images/palettes/EL_VL_HIGH_FD0_300.png) +BlockPreViewExport(24|EL_VL_HIGH_FD0|$(DistroPath)/images/palettes/EL_VL_HIGH_FD0.png) +BlockPreViewExport(24|EL_VL_HIGH_FD0|$(DistroPath)/images/palettes/EL_VL_HIGH_FD0_150.png) +BlockPreViewExport(48|EL_VL_HIGH_FD0|$(DistroPath)/images/palettes/EL_VL_HIGH_FD0_300.png) -BlockPreViewExport(24|UNIT_GRID1|$(ZDataPath)/images/palettes/UNIT_GRID1.png) -BlockPreViewExport(24|UNIT_GRID1|$(ZDataPath)/images/palettes/UNIT_GRID1_150.png) -BlockPreViewExport(48|UNIT_GRID1|$(ZDataPath)/images/palettes/UNIT_GRID1_300.png) +BlockPreViewExport(24|UNIT_GRID1|$(DistroPath)/images/palettes/UNIT_GRID1.png) +BlockPreViewExport(24|UNIT_GRID1|$(DistroPath)/images/palettes/UNIT_GRID1_150.png) +BlockPreViewExport(48|UNIT_GRID1|$(DistroPath)/images/palettes/UNIT_GRID1_300.png) -BlockPreViewExport(24|UNIT_GRID2|$(ZDataPath)/images/palettes/UNIT_GRID2.png) -BlockPreViewExport(24|UNIT_GRID2|$(ZDataPath)/images/palettes/UNIT_GRID2_150.png) -BlockPreViewExport(48|UNIT_GRID2|$(ZDataPath)/images/palettes/UNIT_GRID2_300.png) +BlockPreViewExport(24|UNIT_GRID2|$(DistroPath)/images/palettes/UNIT_GRID2.png) +BlockPreViewExport(24|UNIT_GRID2|$(DistroPath)/images/palettes/UNIT_GRID2_150.png) +BlockPreViewExport(48|UNIT_GRID2|$(DistroPath)/images/palettes/UNIT_GRID2_300.png) LayerOff(TEXT) -BlocksInBasePreViewExport(comp*||48|<>|$(ZDataPath)/images/palettes/<>_300.png) -BlocksInBasePreViewExport(comp*||24|<>|$(ZDataPath)/images/palettes/<>_150.png) +BlocksInBasePreViewExport(comp*||48|<>|$(DistroPath)/images/palettes/<>_300.png) +BlocksInBasePreViewExport(comp*||24|<>|$(DistroPath)/images/palettes/<>_150.png) diff --git a/environment/runtimefiles/zcadelectrotech/menu/menuscontent.xml b/environment/runtimefiles/zcadelectrotech/menu/menuscontent.xml index 342bebc6d..d846b4187 100644 --- a/environment/runtimefiles/zcadelectrotech/menu/menuscontent.xml +++ b/environment/runtimefiles/zcadelectrotech/menu/menuscontent.xml @@ -220,7 +220,7 @@ - + diff --git a/environment/runtimefiles/zcadelectrotech/preload/autorun.cmd b/environment/runtimefiles/zcadelectrotech/preload/autorun.cmd index 796317df8..f73a21283 100644 --- a/environment/runtimefiles/zcadelectrotech/preload/autorun.cmd +++ b/environment/runtimefiles/zcadelectrotech/preload/autorun.cmd @@ -1,5 +1,5 @@ ;Комментарий -;$(ZDataPath)-путь к программе +;$(DistroPath)-путь к программе ;------------------- ;Загрузка УГО блоков ;------------------- @@ -34,10 +34,10 @@ MergeBlocks(_velec_diagram.dxf) ;------------------------ ;Загрузка ткстовых файлов ;------------------------ -;Load($(ZDataPath)/sample/test_dxf/teapot.dxf) -;Load($(ZDataPath)/sample/test_dxf/em.dxf) -;Load($(ZDataPath)/autosave/autosave.dxf) -;Load($(ZDataPath)/sample/zigzag.dxf) +;Load($(DistroPath)/sample/test_dxf/teapot.dxf) +;Load($(DistroPath)/sample/test_dxf/em.dxf) +;Load($(DistroPath)/autosave/autosave.dxf) +;Load($(DistroPath)/sample/zigzag.dxf) ;----------------------------------- ;Показ окна "О программе" при старте diff --git a/environment/runtimefiles/zcadelectrotech/preload/stage0.cmd0 b/environment/runtimefiles/zcadelectrotech/preload/stage0.cmd0 index e3cca5ff0..25bd5ed19 100644 --- a/environment/runtimefiles/zcadelectrotech/preload/stage0.cmd0 +++ b/environment/runtimefiles/zcadelectrotech/preload/stage0.cmd0 @@ -1,12 +1,12 @@ ;Комментарий -;$(ZDataPath)-путь к программе -LoadActions($(ZDataPath)/menu/actionscontent.xml) -LoadActions($(ZDataPath)/menu/electrotechactionscontent.xml) -LoadActions($(ZDataPath)/menu/velecactionscontent.xml) -LoadToolBars($(ZDataPath)/menu/toolbarscontent.xml) -LoadToolBars($(ZDataPath)/menu/electrotechtoolbarscontent.xml) -LoadToolBars($(ZDataPath)/menu/velectoolbarscontent.xml) -LoadPalettes($(ZDataPath)/menu/palettescontent.xml) -LoadMenus($(ZDataPath)/menu/menuscontent.xml) -LoadMenus($(ZDataPath)/menu/electrotechmenuscontent.xml) -LoadMenus($(ZDataPath)/menu/velecmenuscontent.xml) \ No newline at end of file +;$(DistroPath)-путь к программе +LoadActions($(DistroPath)/menu/actionscontent.xml) +LoadActions($(DistroPath)/menu/electrotechactionscontent.xml) +LoadActions($(DistroPath)/menu/velecactionscontent.xml) +LoadToolBars($(DistroPath)/menu/toolbarscontent.xml) +LoadToolBars($(DistroPath)/menu/electrotechtoolbarscontent.xml) +LoadToolBars($(DistroPath)/menu/velectoolbarscontent.xml) +LoadPalettes($(DistroPath)/menu/palettescontent.xml) +LoadMenus($(DistroPath)/menu/menuscontent.xml) +LoadMenus($(DistroPath)/menu/electrotechmenuscontent.xml) +LoadMenus($(DistroPath)/menu/velecmenuscontent.xml) \ No newline at end of file