#1 2015-07-14 09:40:50

alexdmatveev
Member
Registered: 2014-09-12
Posts: 87

mORMot project to OSX

For our project we use: Xe7 + Firemonkey + mORMot.

I have tryed to compile our project for OSX via PAServer on my Mac.
It looks like not trivial task... SynCommons.pas causes lot of questions.

Have we any any guide for this task?

Thanks a lot.

Offline

#2 2015-07-14 11:31:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: mORMot project to OSX

SynCommons and mORMot units are not OSX compatible.
(there is limited Darwin support, but only for FPC, not Delphi)

For OSX, you need to use the cross-platform clients units.
See http://synopse.info/files/html/Synopse% … ml#TITL_86

Offline

#3 2015-07-14 14:17:53

alexdmatveev
Member
Registered: 2014-09-12
Posts: 87

Re: mORMot project to OSX

thanks a lot.
yes, I studied the point some time ago.

I ask here about some guide or best practices using mORMot library in crossplatform code.
Maybe I am not quite clear...

I will explain my quiestion with other words.

For example I use in Win32:

uses
  SynCommons, SynCrypto;

What should I write in my crossplatform code?

{$IFDEF MSWINDOWS} 
uses
  SynCommons, SynCrypto;
{$ENDIF}
{$IFDEF MACOS} 
uses
  SynCrossPlatformSpecific, SynCrossPlatformCrypto;
{$ENDIF}

Right?

Second question:
in Win32 I use AES functions from SynCrypto.pas.
Have mORMot the functions for OSX?

I only see SHA functions in SynCrossPlatformCrypto.pas.

Thanks a lot!

Offline

#4 2015-07-15 08:34:17

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: mORMot project to OSX

1. Sounds fine.
But even if most of the TSQLRest methods would be the same on both sides, you may need some specific code...
Perhaps I would not use MACOS as conditional, but a custom USECROSS conditional, defined in a .inc file:

uses
{$ifdef USECROSS}
  SynCrossPlatformSpecific, SynCrossPlatformCrypto;
{$else}
  SynCommons, SynCrypto;
{$endif}

2. There is no AES in SynCrossPlatformCrypto by now.

Offline

Board footer

Powered by FluxBB