Page 1 of 1

Wine under Mac with FWH app

PostPosted: Fri May 13, 2022 3:28 pm
by reinaldocrespo
Hello everyone;

Wine --https://www.winehq.org-- allows you to run windows applications on Unix like OS like Linux, BSD and Mac.

I'm testing Wine for Mac to run my Windows applications. I'm using a specific implementation called "CrossOver". My FWH application launches perfectly and dialogs and FastReports are shown as expected. However, when opening a window that contains a TExplorerBar I get a runtime error:

Structured Systems Corp Error Sys
-----------------------------------------
c:\PMSys\PMSys.exe
Version Info :Build #1562 Built on: 04.11.2022 @ 15:58:45
Size :5,871,616 bytes
Maximum files : 0
Time since start:0 hours 11 mins 44 secs
Date and Time :05/13/2022, 11:00:18
Network :IMAC
OS User : crossover
ADS DD User :rcb

Details
----------
Error BASE/1004 No exported method: NTOP
Parameter :
[ 1] = U

Stack List
----------
Called from:NTOP(0)
Called from:TEXPLORERBAR:CHECKSCROLL(153)
Called from:TEXPLORERBAR:RESIZE(250)
Called from:TWINDOW:HANDLEEVENT(0)
Called from:TEXPLORERBAR:HANDLEEVENT(1731)
Called from:_FWH(3325)
Called from:SETSCROLLRANGE(0)
Called from:(b)TSCROLLBAR(88)
Called from:TSCROLLBAR:SETRANGE(0)
Called from:TSCROLLBAR:WINNEW(198)
Called from:TEXPLORERBAR:NEW(97)
Called from:TCONTRACTORSTBLBRW:VTASKBARMENU(172)
Called from:(b)TTABLEBROWSER_DEFINEDLG(173)
Called from:TDIALOG:INITIATE(714)
Called from:TDIALOG:ACTIVATE(331)
Called from:TCONTRACTORSTBLBRW:DEFINEDLG(173)
Called from:(b)TTABLEBROWSER_SHOW(183)
Called from:TWINDOW:ACTIVATE(1022)
Called from:TMDICHILD:ACTIVATE(262)
Called from:TCONTRACTORSTBLBRW:SHOW(183)
Called from:PMSYS:CONTRACTORSMAINTENANCE(640)
Called from:(b)PMSYS_FRAMEBAR(759)
Called from:TBTNBMP:CLICK(683)
Called from:TBTNBMP:LBUTTONUP(919)
Called from:TCONTROL:HANDLEEVENT(1721)
Called from:TBTNBMP:HANDLEEVENT(1866)
Called from:_FWH(3325)
Called from:WINRUN(0)
Called from:TMDIFRAME:ACTIVATE(1036)
Called from:PMSYS:ACTIVATE(243)
Called from:MAIN(53)
CPU type: VirtualApple @ 2.50GHz 2400 Mhz


The error cannot be reproduced under Windows. it only happens under Wine. Any ideas?

Thank you.


Reinaldo.

Re: Wine under Mac with FWH app

PostPosted: Fri May 13, 2022 4:36 pm
by Antonio Linares
Dear Reinaldo,

Not sure what FWH version you are using, as current TExplorerBar has different lines than yours.

Anyhow, the error that you get comes from TEXPLORERBAR:CHECKSCROLL() and the only place where nTop is used is here:

oLastItem = ATail( ::aPanels )
... oLastItem:nTop

so it seems as oLastItem is nil. If you could post a screenshot of your explorerBar then it may be easier to spot why oLastItem is coming as nil.

Re: Wine under Mac with FWH app

PostPosted: Fri May 13, 2022 4:45 pm
by James Bott
Hmm, the error says:

Error BASE/1004 No exported method: NTOP

Apparently, it is trying to call the nTop method which doesn't exist--at least in my old version from 7/2018.

Re: Wine under Mac with FWH app

PostPosted: Fri May 13, 2022 7:20 pm
by reinaldocrespo
Right, the error does come from Texplorerbar class and yes, the line being quoted on the error log is addressing the nTop property of an TPanel object. BUT, the code executes perfectly under windows and therefore I was hoping not having to touch method CheckScroll() on the TExplorerBar class. Being that the app executes just fine under windows, I was hoping someone here had seen this before and would recommend some special wine bottle configuration.

So, I went back and made some changes to TexplBar.prg and things are now working just fine.

BTW -- I'm impressed with how well this native windows app executes with wine on a Mac. It is using very many 3rd party APIS such as Zillow api, Advantage database API, Twain, SSL, Topaz, FastReports... and now i get to run it on my M1 Mac with MacOS Monterey version 12.2.1. I remind you that not even virtual box with any version of windows currently runs under the M1 chip. With Wine it works flawlessly (so far).

Thank you,

Reinaldo.

Re: Wine under Mac with FWH app

PostPosted: Fri May 13, 2022 7:33 pm
by hmpaquito
James Bott wrote:Hmm, the error says:

Error BASE/1004 No exported method: NTOP

Apparently, it is trying to call the nTop method which doesn't exist--at least in my old version from 7/2018.


That Is derived data from TControl class

Re: Wine under Mac with FWH app

PostPosted: Sat May 14, 2022 1:07 am
by cnavarro
Dear Reinaldo
If you use a Dialog as a container for the TExplorerBar and not a window, I advise you to create the controls, including the TExplorerBar, in a separate function that you will call from the bInit of the Dialog. You will tell me

Estimado Reinaldo
Si usas como contenedor del TExplorerBar un Dialog y no una ventana, te aconsejo que la creación de los controles, incluído el TExplorerBar lo hagas en una function aparte que llamarás desde el bInit del Dialog. Ya me contarás

Re: Wine under Mac with FWH app

PostPosted: Sat May 14, 2022 5:41 am
by Antonio Linares
Dear Reinaldo,

Finally let me remind you that you can use FiveMac to build a true Apple app, without the need for wine, etc

Re: Wine under Mac with FWH app

PostPosted: Mon May 16, 2022 5:46 pm
by TimStone
Antonio,

Please remember that FiveMac does not support some essential Windows functions, because MacOS does not have them. It also does not support ADS.