Features of porting complex modular software written in Delphi under Linux OS

This story is not intended for developers who do not know what Delphi is and cannot program in it. People who do not deal with these development tools are asked not to comment on the article and not injure the already shattered nerves of the grandfathers who stubbornly continue to support long-term developments written using these development tools. Suggestions to rewrite everything from scratch into something more fashionable are not welcome.





Introduction

My name is Konstantin Timofeev, I am 40 years old and I am the leading programmer of the 3B Service company in the division dealing with automation systems for dynamic calculations (SADR). Our main software product is the simulation environment for dynamic systems SimInTech (nee PC Simulation In Technical Devices - 4, abbreviated as PC "MVTU").





Historically, this software product began to develop at the Department of Nuclear Reactors and Power Plants (E7), Moscow State Technical University. Bauman. The first versions of the PC "MVTU" were developed at the department under the leadership of Ph.D. Kozlov Oleg Stepanovich. The software package was intended for structural modeling of the dynamics of nuclear power plants. The functional of the PC "MVTU" consisted in drawing up a model of the system in the form of a block diagram with the subsequent automatic formation of a system of differential equations of the dynamics of the system and their numerical solution and displaying the calculation results on graphs. In the further development of this topic, I joined the development in 2003 and on the basis of the PC "MVTU-3" we began to create an industrial version of the software complex - PC "MVTU-4", which later received the name SimInTech.The development of a new version of the program required a very serious revision of the program architecture and made it possible to create a complex that allows one to build full-scale models of the dynamics of nuclear power plants, as well as systems in other industries, and is a worthy competitor to the Simulink, AmeSim, VisSim systems.





ยซ-3ยป Delphi, 3 ( 5). , . ( ).





2003 , Delphi 6. Windows Delphi 10.3.3. Delphi, \++ , FORTRAN. , .





1:  โ€“

SimInTech . , - . , โ€“ : , , , , , , , (, -, ). - โ€“ (). โ€“ , โ€“ .. ). โ€“ ( , ). , , .





:





- , .





- .





- , , , OPC, shared memory.





- .





- .





- \\.





- .





- .





- COM- ( ).





. Delphi , ( , ) :





- โ€“ Tee Chart Pro.





- โ€“ SynEdit, TBCEditor.





- โ€“ DSPack.





- \\ \ \ \ โ€“ VirtualTreeView.





- โ€“ zeosdbo.





- โ€“ GLScenes.





- โ€“ JEDI VCL + JCL - , .





, DLL C FORTRAN, RSA MD5 . Windows- Direct2D, ( ).





โ€“ , . .





. . , DLL , override . , . ( ) \ \ . , โ€“ .. ( ). , โ€“ .. .





, , , fastmm5, . , , .





215073 ( , dfm). Delphi 2858375 , .





.





2:

, Windows, (). , , GRS . BDSM โ€“ ( ) Suse Linux, -, . , , - . โ€“ Wine , 32 Direct2D , . , , . , API , . - Windows-.





Java , FORTRAN - . , Delphi , - ( ). Java ( - , ), . C#, - GUI Linux .





GUI 2:





1.       Qt C++ - , , โ€“ VCL . , .   , Qt (qucs ) , .





2.       Free Pascal + Lazarus. ( ) , . , .





  , Delphi IFDEF- Lazarus. , SimInTech Windows 2 .   , .





Lazarus , , -, , 2D-. AggPas Lazarus-, Direct2D . . Lazarus- CodeTyphon Studio , Linux . :





1 โ€“ , , Delphi-. . BCEditor ( SynEdit, ), DSPack ( , ), TeeChart Pro ( TAChart, ).





2 โ€“ โ€“ ORCA 2D, Direct2D .





3:

โ€“ , .. , , :





1 โ€“ , shared object โ€“ .





2 โ€“ C FORTRAN.





3 โ€“ , , .. .





4 โ€“ .





5 โ€“ dfm ( 2 Windows Linux .





1 3, Lazarus LCL VCL, .





VirtualBox , . Open Suse, Alt Linux 8.3 Alt Linux 9. https://pilotlogic.com/ . โ€“ su ./install.sh  , Alt Linux , โ€“ , .  โ€“   CodeTyphonIns\installbin\ScriptsLin\ln_All_Functions.sh  .





Alt Linux , , Ubuntu:





#------------ 100 Alt (apt-get compitible)----------
 elif [ -f /etc/altlinux-release ] ; then
   vOSVerNum=100
   vOSDistribution="Alt Linux (apt-get compatible)"
   vMultiArchDirPlan=200

      
      







AstraLinux ( sudo). AltLinux 9 Astra Linux Orel.





Astra Linux , โ€“ git 2.11, SmartGIT- 2.16. git . 





Linux.





, . , DLL .





, Free Pascal, , RTL- cmem, libc. Delphi dpr- ( Delphi  SimpleShareMem fastmm4 \ fastmm5 ). . , fpcx64mm   Synopse mORMot framework 2.  , , simmm.pas :





unit simmm;
  //       
{$IFNDEF DCAD}
{$DEFINE IS_DLL_UNIT}
{$ENDIF}

{$IFDEF FPC}
 {$MODE Delphi}{$H+} 
{$ENDIF} 

interface

{$IFDEF UNIX}

  {$IFDEF IS_DLL_UNIT}
  uses cthreads, dl;
  {$ELSE}
  uses cthreads, fpcx64mm;
  {$ENDIF}

{$ELSE}
uses  FastMM5;
{$ENDIF}

implementation

{$IFDEF UNIX}
{$IFDEF IS_DLL_UNIT}
  var
     NewMM,
     OldMM:      TMemoryManager;
     MainHandle: Pointer;
     GetCommonMemoryManager: procedure(var aMemMgr: TMemoryManager);
{$ENDIF}
{$ENDIF}

initialization

  {$IFDEF UNIX}
  {$IFDEF IS_DLL_UNIT}

    MainHandle:=dlopen(nil, RTLD_LAZY);
    GetCommonMemoryManager:=dlsym(MainHandle,'GetMemoryManager');
    GetCommonMemoryManager(NewMM);
    GetMemoryManager(OldMM);
    SetMemoryManager(NewMM);

  {$ENDIF}
  {$ELSE}

  //  
  if IsLibrary then
     FastMM_AttemptToUseSharedMemoryManager
  else
     FastMM_ShareMemoryManager;
  {$ENDIF}

  {$IFDEF UNIX}
  {$IFDEF IS_DLL_UNIT}
finalization
    SetMemoryManager(OldMM);
  {$ENDIF}
  {$ENDIF}
end.

      
      







DCAD , GetMemoryManager. dll\so   dlopen(nil, RTLD_LAZY) โ€“ , . simmm .





โ€“ , dll\so . Delphi . .. TForm.Create, . Lazarus , .. , , so- :





  โ€ฆ..
  Classes,
  {$IFDEF FPC}
  Interfaces,
  {$ENDIF}
  Forms,  

      
      







Application initialization finalization:





{$IFDEF FPC}
initialization
  Application.Initialize;
finalization
  Application.Terminate;
end.
{$ENDIF}

      
      







,   so.





, Lazarus. , UNIX- so , cthreads:





  {$IFDEF UNIX}
  cthreads,
  {$ENDIF}

      
      







dpr- , , dprโ€‘ :





{$IFDEF FPC}
  {$MODE Delphi}   //  ,   Free Pascal  
{$ENDIF}                  //  Delphi.
                               
library mbtylib;
uses
  simmm,
  {$IFDEF UNIX}
  cthreads, //     simm.pas        
  {$ENDIF}  
  Classes,
  {$IFDEF FPC}
  Interfaces,
  {$ENDIF}
  Forms,  
  MBTYTools in 'MBTYTools.pas',
  MBTYObjts in 'MBTYObjts.pas',
  uMBTYThread in 'uMBTYThread.pas',
  SpecBlocks in 'SpecBlocks.pas',
  InfoUnit in 'InfoUnit.pas' {MBTYInfoForm},
  MBTYtranslate in 'MBTYtranslate.pas',
  uDebugBlockForm in 'uDebugBlockForm.pas' {DebugBlockForm};

{$R *.res}

//   ,         
{$R mbtybuttons.res}

  //     DllInfo
function  GetEntry:Pointer;
begin
  Result:=@DllInfo;
end;

exports
  GetEntry name 'GetEntry',         //    DllInfo
  CreateObject name 'CreateObject'; //  

{$IFDEF FPC}
initialization
  Application.Initialize;
finalization
  Application.Terminate;
end.
{$ENDIF}
begin
end.

      
      







2 Linux. DLL โ€“ . .so , , intel fortran gfortran , , DLL\SO. , FORTRAN:





Windows - INTEL FORTRAN, stdcall:





  TSbros = procedure(
    Nuzl,Nu,Ngran,Nmat,Nko,idmdt0,iadiab0: integer;       // +++ 31.03.2014 (iadiab0)
    var El,Iel,Uzel,Iuzel,
      NYZL,G,Nnas,Nzad,Nelu,
      Gran,Granu,Ngu,Ngut,Propm,Nelm,
      Zadv,Pump,Nzadp;
    Dtau,DtauG,Htau,TauE: TPPRealType;
โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ..
    );stdcall;

      
      







  Linux gfortran cdecl:





   //       GFortran	
  TSbros = procedure(
    var Nuzl,Nu,Ngran,Nmat,Nko,idmdt0,iadiab0: integer;       // +++ 31.03.2014 (iadiab0)
    var El,Iel,Uzel,Iuzel,
      NYZL,G,Nnas,Nzad,Nelu,
      Gran,Granu,Ngu,Ngut,Propm,Nelm,
      Zadv,Pump,Nzadp;
    var Dtau,DtauG,Htau,TauE: TPPRealType;
โ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆโ€ฆ.
    );cdecl;

      
      







, Intel FORTRAN , , gfortran . Intel FORRAN Windows โ€“ stdcall, gfortran, Windows Linux โ€“ cdecl.





DLL: Intel Fortran Windows , gfortran _  :





{$IFDEF Windows}'wwww'{$ELSE}'wwww_'{$ENDIF}





. gcc. so- :





gcc -shared -fPIC -o ../../bin/libcommonclibs.so -s nn.c prime.c r_keygen.c rc4c.c rsa.c md5c.c -fpack-struct=1 -Wconversion





, , Pascal.





CodeTyphon Studio, , . , .













Delphi





CodeTyphon Studio\ Lazarus





TButton





+





+





Tedit





+





+





TjvComponentPanel





+





+





TactionList





+





+





TjvFormMagnet





+





-





TcontrolBar





+





+





TtoolBar





+





+





TjvOfficeColorPanel





+





- ThexaColorPicker





TcheckBox





+





+





TcomboBox





+





+





TjvListBox





+





- TListBox





TeeChart Pro





+





-





TjvSpinEdit





+





- TspinEdit





TjvFontComboBox





+





- TplFontComboBox





TBCEditor





+





- TsynEdit





TvirtualStringTree





+





+





TPageControl





+





+





TTabControl





+





+





TPanel





+





+





TBitBtn





+





+





TJvButton





+





-          TBitBtn





TScrollBar





+





+





TFrame





+





+





TJvListView





+





-          TListView





TSpeedButton





+





+









+





+





GLScenes





+





+





DSPack





+





-         





Indy





+





+





TPngImage





+





+ TPortableNetworkGraphic









JVCL , . , , Linux , TeeChart Pro, , .





CodeTyphon Studio Windows Linux . git SmartGit, altlinux.





Lazarus\CodeTyphon (pas, dpr include-) UTF8 BOM ! , ! Delphi .









 โ€“ (ctpr) .









ctpr-, CodeTyphon Studio xml- . ctpr .





โ€“ , . , ctpr-, Code Typhon, , dpr- ( ) โ€“ :





  simmm,
  {$IFDEF UNIX}
  cthreads,
  {$ENDIF }
  {$IFDEF FPC}
  Interfaces,
  {$ENDIF}

      
      







:





{$IFDEF FPC}
exports
  GetMemoryManager;  //        SO-
{$ENDIF}

      
      







COM- Excel - -.





ยซยป . โ€“ , :





{$IFDEF FPC}
 {$MODE Delphi}{$H+}
{$ELSE}
 {$DEFINE Windows}
{$ENDIF}

      
      







CodeTyphon Studio, .





- uses โ€“ Windows Messages:





{$IFDEF FPC} FileUtil,{$ELSE} Windows,{$ENDIF}
      
      







(DataTypes.pas) :





  {$IFDEF FPC}
  PRect = ^TRect;
  {$ENDIF}
TWindowsPointArray = array of {$IFNDEF FPC}Windows.{$ENDIF}TPoint;

      
      







, , Delphi Free Pascal :





Delphi โ€“ 1 , FreePascal โ€“ 4, , , :





  //   
 SizeOfTColor      = 4;
 SizeOfTPenStyle   = 1;    //SizeOf(TPenStyle);     // FPC  enum 4  !
 SizeOfTBrushStyle = 1;   //SizeOf(TBrushStyle);
SizeOfTDataMode   = 1;  //SizeOf(TDataMode);

      
      







SizeOf !





, Windows:





{$IfDef FPC}
procedure ZeroMemory(const Data: pointer; Size: integer); inline;
begin
  FillChar(Data^,Size,0);
end;
{$EndIf}

      
      







, , Windows - :





{$IfDef fpc}CreateDir(newdir){$else}CreateDirectory(PChar(newdir),nil) and (GetLastError <> ERROR_ALREADY_EXISTS){$endif}
      
      







Windows , .. Lazarus\CodeTyphon โ€“ UTF8 , Delphi โ€“ UTF16:





{$IFDEF FPC}
procedure   SaveStr(const S:string;Stream:TStream);
  var N,c: cardinal;
      UniString: UnicodeString;
begin
 UniString:=UTF8Decode(S);
 N:=Length(UniString);
 with Stream do begin
   c:=N or $80000000;
   Write(c,SizeOfInt);
   if N > 0 then begin
      Write(Pointer(UniString)^,N*2);
   end;
 end
end;

procedure   LoadStr(var   S:string;Stream:TStream);
  var N: cardinal;
      UniString: UnicodeString;
  procedure DoLoadAsAnsi;
   var tmps: ansistring;
  begin
     //  - ansi
     SetLength(tmps,N);
     if N>0 then Stream.Read(Pointer(tmps)^, N);
     S:=tmps;
  end;
begin
 with Stream do begin
   Read(N,SizeOfInt);
   if (N and $80000000) <> 0 then begin
     //
     N:=N and (not $80000000);
     SetLength(S,N);
     SetLength(UniString,N);
     if N > 0 then begin
        Stream.Read(Pointer(UniString)^, N*2);
        S:=UTF8Encode(UniString);
     end;
   end
   else
     DoLoadAsAnsi;
 end
end;
{$ELSE}
.......
      
      







, - Delphi, , 4- . 1 2- UTF16, 0 โ€“ ANSI .





, {$MODE Delphi}.





, :





, :





{$IFDEF FPC}
 {$MODE Delphi}{$H+}
{$ENDIF}

      
      







uses - :





{$IFDEF FPC} LCLType, LCLIntf, LMessages, GraphType,{$ELSE}Windows, Messages,{$ENDIF}
      
      







:





SysUtils, Classes, Graphics, Controls, Forms, Dialogs,





, VCL.  โ€“ !





implementation dfm-,   {$R *.dfm} , CodeTyphon frm ( ):





{$IFDEF ENG}
{$IFnDEF FPC}
{$R *.eng.dfm}
{$ELSE}
{$R *.eng.frm}
{$ENDIF}
{$ELSE}
{$IFnDEF FPC}
  {$R *.dfm}
{$ELSE}
  {$R *.frm}
{$ENDIF}
{$ENDIF}

      
      







Delphi (dfm) CodeTyphon (frm). Lazarus\Code Typhon dfm-, ( ).





, โ€“ dfm- :









dfm . ยซยป .





frm - , ยซ \ (F12)ยป frm-. 2 : โ€“ - - โ€“ frm- ยซ \ (F12)ยป :









, frm- FormCreate, . , \ \ GTK2 Lazarus\Code Typhon , .





โ€“ , :





    cProgressBar: {$IFDEF FPC}TProgressBar{$ELSE}TJvGradientProgressBar{$ENDIF};
    cMsgView:  {$IFDEF FPC}TListBox{$ELSE}TJvListBox{$ENDIF};

      
      







, . โ€“ , , , API, :





- LoadLibrary โ€“ WinAPI  DynLibs . Windows, โ€“ *.dll lib*.so .





SO , /bin PATH, :





fLibHandle:=LoadLibrary({$IFNDEF FPC}PChar{$ENDIF}(ExtractFilePath({$IFDEF FPC} ParamStr(0) {$ELSE} GetModuleName(HInstance) {$ENDIF})+rsalib_name));
      
      







SO\DLL THandle TLibHandle, .. :





Var fLibHandle: TLibHandle; \\  THandle
      
      











- (InitializeCriticalSection, CreateEvent ..) โ€“ syncobjs, Free Pascal Delphi ( TCriticalSection TEvent ):





WinAPI









RTL_CRITICAL_SECTION





TCriticalSection





InitializeCriticalSection





TCriticalSection.Create





DeleteCriticalSection





TCriticalSection.Free





EnterCriticalSection





TCriticalSection.Enter





LeaveCriticalSection





TCriticalSection.Leave





hEvent





TEvent





CreateEvent





TEvent.Create





CloseHandle(hEvent)





TEvent.Free





SetEvent





TEvent.SetEvent





ResetEvent





TEvent.ResetEvent





WaitForSingleObjects





TEvent.WaitFor





EnterCriticalSectionโ€ฆ TCriticalSection   .. ! LCL, !





- โ€“ . Linux system, exec :





uses {$IFDEF Windows} Windows, {$ELSE} LCLType, unix, Baseunix,{$ENDIF} Classes, SysUtils;
โ€ฆโ€ฆโ€ฆ
  //   
function  WinExecAndWait32(const FileName:string; Visibility : integer = 0;
                          TimeOut: cardinal = {$IFDEF Windows}INFINITE{$ELSE}maxLongInt{$ENDIF}):longword; var ss: AnsiString;
begin
  ss := FileName;
  Result:=fpSystem( ss );
end;

function  MyWinExec(const S: string;aShowMode: cardinal):cardinal;
 var ss : ansistring;
begin
  {$IFDEF Windows}
     ss:=S;
     Result:=Windows.WinExec(PAnsiChar(ss),aShowMode);
  {$ELSE}
     //       -      &
     // :      fpSystem     
     //          .
     ss := S + ' &';
     Result:=fpSystem( ss );
  {$ENDIF}
end;

      
      







- Direct2D.





Windows GDI โ€“ GDI+ , ( Windows 7) Direct2D API, . . Linux 2 โ€“ TCanvas โ€“ . 2d- Linux ORCA2d     TD2Canvas   TDirect2Canvas . TD2Canvas  cairo Linux. API-, . , - Free . - 1.





, TPaintBox, Direct2D :





   :





ShemePanel: {$IFDEF FPC}TD2Scene{$ELSE}TPanel{$ENDIF};
PaintBox: {$IFDEF FPC}TD2Image{$ELSE}TPaintBox{$ENDIF};                          // 

      
      







:





    {$IFDEF FPC}
    PaintBox.Bitmap.SetSize(ShemePanel.Width,ShemePanel.Height);
    PaintBox.OnPaint:=DoPaintPB;
    Canvas:=TDirect2DCanvas.Create(PaintBox.Bitmap.Canvas);
    Canvas.FBaseImageObject:=PaintBox;
    {$ELSE}
    Canvas:=TMyD2Canvas.Create(ShemePanel.Handle);
    {$ENDIF}

      
      







, ORCA2D single.





, Linux Direct2D , , TD2Image OnPaint , .. . ShemePanel.Repaint Direct2D .





4: Linux

, , โ€“ (.. ).  .. , . . - 2 . . - 2 5. .   - common . - 15 . DLL   try except finally  2 . Linux ( Windows ) , try except threadvar except.inc RTL . - threadvar- SO cthreads. SO . - , threadvar- var  -  . . cthreads  .  cthreads simm .





except.inc RTL Free Pascal:





{$ifdef FPC_HAS_FEATURE_THREADING}
ThreadVar
{$else FPC_HAS_FEATURE_THREADING}
Var
{$endif FPC_HAS_FEATURE_THREADING}
  ExceptAddrStack   : PExceptAddr;
  ExceptObjectStack : PExceptObject;
  ExceptTryLevel    : ObjpasInt;

......

Function fpc_PushExceptAddr (Ft: {$ifdef CPU16}SmallInt{$else}Longint{$endif};_buf,_newaddr : pointer): PJmp_buf ;
  [Public, Alias : 'FPC_PUSHEXCEPTADDR'];compilerproc;
var
  _ExceptAddrstack : ^PExceptAddr;
begin
{$ifdef excdebug}
  writeln ('In PushExceptAddr');
{$endif}
  _ExceptAddrstack:=@ExceptAddrstack;
  PExceptAddr(_newaddr)^.Next:=_ExceptAddrstack^;
  _ExceptAddrStack^:=PExceptAddr(_newaddr);
  PExceptAddr(_newaddr)^.Buf:=PJmp_Buf(_buf);
  PExceptAddr(_newaddr)^.FrameType:=ft;
  result:=PJmp_Buf(_buf);
end;

      
      











, cthreads   threadvar- , , , . - .





5.

, FreePascal โ€“ , . - FreeLibrary . , - . fpc_ansistr_decr_ref, . โ€“ Delphi Windows . โ€“ , . Init, . , , Init TMain.AddMenuItem (TMain , , , . InterfaceUnit.pas).





:





AddMenuItem:function(Parent: Pointer;const Caption:string;OnClick: TNotifyEvent;Tag:NativeInt):Pointer;









DllInfo.Main.AddMenuItem(DllInfo.Main.Menu,txtTppTools,nil,0);





txtTppTools โ€“





AddMenuItem Caption Caption TMenuItem. โ€“ !





:





FreePascal   โ€“ .. - = - 1 , - - 1. shared object . โ€“ , (.. ). string - PChar. PChar , .. , , .





, PChar :





AddMenuItem:function(Parent: Pointer;Caption:PChar;OnClick: TNotifyEvent;Tag:NativeInt):Pointer;







InsertMenuItem:function(Parent: Pointer;Caption:PChar;OnClick: TNotifyEvent;Tag,AIndex:integer):Pointer;







InsertMenuItem:function(Parent: Pointer;Caption:PChar;OnClick: TNotifyEvent;Tag,AIndex:integer):Pointer;







SetAlias: function(aAlias,aAliasValue: PChar;fReplace: boolean):boolean;







:





SetComponentName:  procedure(aComponentPtr: Pointer;aName: PChar);







TComponent(aComponentPtr).Name := aName





const โ€ฆ : string PChar .





6. Linux LCL

LCL VCL, .





TTabControl LCL , TTabControl.Tabs.Objects LCL VCL ! Objects Tabs TTabControl   LCL ! , FPC Delphi :





         {$IFDEF FPC}
         TCComps.Tabs.Add( TranslationEngine.TranslateWordFunc(  MainLibrary.Tabs[i], TID_PANELBUTTONS) );
         TShowedTabList.Add(Tab);
         {$ELSE}
         TCComps.Tabs.AddObject( TranslationEngine.TranslateWordFunc(MainLibrary.Tabs[i],TID_PANELBUTTONS ),Tab);
         {$ENDIF}

      
      



TControlBar TToolBar โ€“ frm-. TControlBar GTK2 .





( ) :





        {$IFDEF FPC}
        ActiveEditor.DefRect:=ActiveEditor.BoundsRect;
        ActiveEditor.PaintTimer.Enabled:=False;
        {$ENDIF}

        ActiveEditor.BorderStyle:=bsNone;

        {$IFDEF FPC}
        RecreateWnd(ActiveEditor);   //        
        {$ENDIF}

      
      







LCL ( bsSizeable bsNone), frm- , . override CreateParams :





procedure TEditForm.CreateParams(var Params :TCreateParams);
begin
  //          ,       !
  if global_projects_window_no_border then begin
     {$IFDEF FPC}
     FFormBorderStyle:=bsNone;
     {$ELSE}
     //    FBorderStyle   RecreateWindow    
     TFormBorderStyle((@BorderStyle)^):=bsNone;
     {$ENDIF}
  end;

      
      







\ , .. .





  {$IFDEF FPC}
  // Linux   , ..     
  PostMessage(Handle,WM_PaintSheme,0,0) ;
  {$ELSE}
  RepaintFormAll;    //   , ..      !!!
  {$ENDIF}

      
      







SO (DLL) , , โ€“ Action:=caFree ! OnClose Free โ€“ .





procedure TDebugBlockForm.FormClose(Sender: TObject; var Action: TCloseAction);
 var i: integer;
begin

  if aBlockPtr <> nil then begin
    StopShowData;
    TMBTYBlock(aBlockPtr).fBlockDebugForm:=nil;
    for I := 0 to Length(aInputsDataList) - 1 do
      aInputsDataList[i].fReplaceArray.Free;
    for I := 0 to Length(aOutputsDataList) - 1 do
      aOutputsDataList[i].fReplaceArray.Free;
  end;

  {$IFDEF FPC}
  Free;
  {$ELSE}
  Action:=caFree;
  {$ENDIF}
end;

      
      







7. Linux?

(2- 3- ). , . Delphi  Windows TeeChart Pro Steema software , . 100 Windows 2017 .   .





Linux Lazarus , . -  TAChart, . IFDEF- , TChart- Delphi ( ).





TeeChart Pro :





:





! ! - LCL - !





,   Code Typhon:





-          Source .pas, .lpr, .lfm UTF8+BOM Linux.





-          .lfm  .frm  CodeTyphon .





-          teechart.lpk teechart.ctpkg  





-          lfm- IFDEF:





Windows- Code Typhon. !





, , .





Linux โ€“ usr\local\codetyphon\typhon\components  my_TeeChartPro.





  teechart.ctpkg  teechartlinux.ctpkg.  ยซยป. . ,   ,   OpenGLLinux :





, ( OpenGL ). . .. OpenGL .





TeCanvas.pas , Windows:





.





. IFDEF- Linux TeeChart Pro Linux .





, โ˜น . FPC , .





, :





IsWindowsNT True . Linux Windows, 2- :





1.       .





2.       , .





, Linux. ,   TeCanvas.pas ( ).





TeeChart Pro LCL , . .





1.       Delphi Linux . . Excel COM- COM- .





2.       , , . , .





3.       Java ( C++) - . , 3. , , .. , Windows-.





4.       Code Typhon , Delphi. Lazarus .





5.       Code Typhon\Lazarus , , Delphi . 90 % . Delphi Windows , .





6.       , UTF8+BOM.





7.       VCL LCL, FMX, .





8.       Delphi , .. Win32 , Linux . Free Pascal Linux, FORTRAN โ€“ RTL .





:





Fragment of a dynamic model of a gas turbine plant under Alt Linux 9
Alt Linux 9
Fragment of a model of an intermediate cooling circuit of a nuclear power plant with a VVER-type reactor under Astra Linux Orel
Astra Linux Orel








All Articles