Run on macOS #1765
Replies: 9 comments 3 replies
-
I would like to give LaserGRBL a try but do not have Windows OS handy. My laptop is a MacBook Air so PlayOnMac is ideal for me but I might resort to PlayOnLinux under Docker as a backup. Here is what I have done so far. I started with PlayOnMac 4.4.3 and downloaded install.exe for LaserGRBL v4.8.0. I read over POL_LaserGRBL_setup.sh in GitHub and performed its steps manually using PlayOnMac GUI; mostly requesting to install gdiplus and msxml3 and using a win32 prefix. I ran into this issue downloading gdiplus and used its work around to continue: https://www.playonmac.com/en/app-518-POL_Install_gdiplus.html After installing and running, I got an error message that wine-mono was not installed. I'm not sure why but a common search result recommends installing manually as a work around. I downloaded wine-mono-7.1.1-x86.msi and installed it into same wineprefix from here: https://dl.winehq.org/wine/wine-mono/7.1.1/ Now I am able to get further into running but it crashes. The crash looks related to gdiplus and msxml3 dependencies. I'm not familiar with syswow64 but perhaps its mixing 32-bit and 64-bit libraries? That is the hardest part with using Wine on current Mac's since ability to launch 32-bit executables was removed in Mac Catalina and Wine developers is having to do some kind of work arounds to recover from that.
|
Beta Was this translation helpful? Give feedback.
-
I reinstalled LaserGRBL using same instructions except this time I skipped installing gdiplus and msxml3. This time the GUI comes all the way up. The COM port drop down is empty but I'm guessing I can follow PlayOnLinux instructions to fix that part. I browsed around and most menus seemed to work. It wasn't until I attempted to load a small jpeg that I had an issue. An Import Raster Image window pops up and in lower right hand corner I see a bouncing status bar but the image never finishes loading. At same instance, I get this printed to wine debug log which I assume means that image imports is likely the reason for switching to external gidplus in the first place. 0134:fixme:gdiplus:GdipSetImageAttributesThreshold not implemented So now I'm back to trying to use external gdiplus. Some initial internet searches make me think that I need to "brew install mono-libgdiplus" to resolve the "System.DllNotFoundException: gdiplus assembly:<unknown " issue when using external gdiplus but it didn't seem to help. I need to figure out how to enable more mono debug prints to confirm if its attempting to use or doesn't find /usr/local/lib/libgdiplus.dylib. |
Beta Was this translation helpful? Give feedback.
-
By using export MONO_LOG_LEVEL=debug, it looks like it couldn't find the installed gdiplus.dll even though I see it was installed into drive_c/windows/syswow64. If I copied from that directory and renamed to libgdiplus.dll over to LaserGRBL directory then its found and app loads. Behavior wise, it seems to work same as when I just don't install gdiplus and rely on default behavior... that is when I load a jpeg image, the app GUI spins for ever waiting for the load to finish. |
Beta Was this translation helpful? Give feedback.
-
Hi @cbagwell, thanks for your effort and your contribution! |
Beta Was this translation helpful? Give feedback.
-
I hit lots of dead ends so I decided to download and try the 14 day trail of crossover to see if it worked any better. I installed the app under crossover and it launched without me needing to manually install wine-mono or any other override software. When I loaded a jpeg, it still had the problem where it didn't display the image and a infinite status bouncer in lower right corner. I decided to go into all menus and toggle most options just to get a feel for what all didn't work. Serial port list being empty had some side effects related to not connected to machine but otherwise everything seemed fine. In the Import Raster Image screen that appeared to not be working, I started toggling things. Then I realized it is working for most part. If I select 1bt BW Dither or Passthrough then the image displays and status bar goes away. The issue is limited to Line to Line Tracing and Vectorizel conversions tools and since the default option doesn't work the screen appeared broke to me. Centerline also complains about only working on 32-bit windows and so make sense since I create a 32bit wineprefix. All the image processing options then appeared to work and I was able to create a burnable image using 1bt BW Dither. After this, I went back to my PlayOnMac install where I used LaserGRL+wine-mono-7.1.1 and no overrides and it works exactly the same as crossover. So I hope that means we are close to working with PlayOnMac. BTW, Nice app now that I get to test drive. I'm motivated to continue for a while longer to get this app in my toolbox. |
Beta Was this translation helpful? Give feedback.
-
I've not previous messed with C# but I'm happy to report I successfully recompiled LaserGRBL using Mono on Mac using "xbuild LaserGRBL.lsn". I can not run the result on Mac directly because WinForms is only supported with mono32 and Mac's removal of 32-bit support broke that support. I can copy the result to my PlayOnMac install though and do some good old fashion WriteLine debugging within Wine quickly. I can confirm my Import Image lockup is its never returning from Threshold() function in ImageTransform.cs: And also makes sense from debug print from wine itself: 0118:fixme:gdiplus:GdipSetImageAttributesThreshold not implemented So for sure there is an issue with internal version of gdiplus in at least wine-6.0 that PlayOnMac is using. |
Beta Was this translation helpful? Give feedback.
-
Some good news. Now that I know for sure my main issue is with wine's internal gdiplus, I installed the external gdiplus and it failed working with it but I figured out what's wrong. I don't exactly know why the install is going wrong but I figured out a way to get it working. I created a new win64 winprefix (you'll see LaserGRBL64 to reflect this since previously I tried win32... I don't know if it matters yet) and installed LaserGRBL+wine-mono+gdiplus. For what ever reason, the gdiplus installed a 32-bit DLL in the 64-bit directory (yeah, windows is weird with system32 meaning 64-bit and syswow64 meaning 32-bit) and it leaves what I think is original wine version under the 32-bit directory. If I copy Window's real gdiplus over to the correct location then when I run LaserGRBL, I have no issues with importing jpegs. cp ~/Library/PlayOnMac/wineprefix/LaserGRBL64/drive_/windows/system32/gdiplus.dll ~/Library/PlayOnMac/wineprefix/LaserGRBL64/drive_c/windows/syswow64/gdiplus.dll Now I get to move on to talking over the serial port and actually burning images. |
Beta Was this translation helpful? Give feedback.
-
That's a great news! About COM port i think you should be able to see it in your macos system first, than map the port in wine. Most usb-serial chipset need driver installed in windows to make the OS able to see them as a COM, don't know if it's the same in macos. |
Beta Was this translation helpful? Give feedback.
-
I decided to do a bit more investigating on why gdiplus install is any issue. It looks like an issue unique to PlayOnMac and/or the wine32on64version of wine its using. When you request a win32 wineprefix to be created, its still creates a win64. Easy way to confirm is you'll see "Program Files (x86)" directory created. I compared with crossover-21 and it does correctly create a win32 wineprefix. If you use its GUI to install "GDI+" (as opposed to gdiplus") into the LaserGRBL Bottle then its installed in correct location and jpegs can be loaded. I looked around at other free options and looks like using homebrew and working from CLI using Linux instructions is pretty good option (it can create win32 wineprefix). Install 2 main wine items. It has to be this special cask version to get win32 support on recent Mac's.
Now to create a win32 wineprefix at ~/.wine32 as part of installing LaserGRBL, install gdiplus as well as wine-mono, and then run it:
Testing wise, both the PlayOnMac and wine-crossover from homebrew work about the same. I loaded a wider range of jpeg and found several that crash LaserGRBL though. Something about commercial Crossover-21 is able to handle more images without crashing. |
Beta Was this translation helpful? Give feedback.
-
I have opened this thread for ones who like to collaborate in running LaserGRBL under macOS using PlayOnMac as it was done in Linux.
This thread could be a good starting point: #1764 but please write here about macOS howto.
Beta Was this translation helpful? Give feedback.
All reactions