{$ifdef unix}
  {$ifdef darwin}
    //carbon
    procedure ErrorMessageBox(Title, Body: WideString);
    begin
      if Assigned(LockupGuard) then LockupGuard.Freeze;
      {$fatal Oopsie... Not implemented yet}

    end;

  {$else}
    //X
   procedure ErrorMessageBox(Title, Body: WideString);
   var
     MP: TCgeProcess;
     t: text;
     i: integer;
   begin
     if Assigned(LockupGuard) then LockupGuard.Freeze;
     Try
       AssignFile(t, '/tmp/' + AppNick + '-last-will.txt');
       Rewrite(t);
       WriteLn(t, StrReplace(Translit(Title + #10 + Body), #13, ''));
       CloseFile(t);
       MP:=TCgeProcess.Create('xmessage -center -buttons Ok -file /tmp/' + AppNick + '-last-will.txt');
       MP.Execute;
//       Result:=MP.ExitStatus;
       MP.Free;
     Except
     End;
   end;
  {$endif}
{$else}
  //win32
    function MessageBoxA(w1:longint;l1,l2:pointer;w2:longint):longint; stdcall; external 'user32' name 'MessageBoxA';
    function MessageBoxW(w1:longint;l1,l2:pointer;w2:longint):longint; stdcall; external 'user32' name 'MessageBoxW';
  procedure ErrorMessageBox(Title, Body: WideString);
  begin
     if Assigned(LockupGuard) then LockupGuard.Freeze;
     KillSplashWindow;
     Title+= #0;
     Body+= #0;
     if (MotherState.OS in [ostWin9x])
       and MotherState.Win98LacksUnicodeSupport
       then MessageBoxA(0, PAnsiChar(Translit(Body)), PAnsiChar(Translit(Title)), MB_ICONERROR + MB_OK)
       else MessageBoxW(0, @(Body[1]), @(Title[1]), MB_ICONERROR + MB_OK);
  end;
{$endif}
