LDraw.org Discussion Forums

Full Version: LDCad on Wine (for Mac)-revisited
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Following the original thread, I want to revisit this topic as I'm working on a how-to guide for using LDCad (and other LDraw utilities) under Wine. I would love to know what experiences some of you have had.

Here's what I have successfully running:
  • OS 10.14.6 Mojave on a 2012 Intel MacBook
  • Wine (stable) 4.0.3
  • XQuartz 2.7.9 (required dependency)
Here's what works:
  • LDCad (flawlessly)
  • LDDP (good, one minor window management issue)
  • DATHeader (fine, a little jaggy-looking)
  • Img4Dat (usable, some wonky GUI issues)
  • LD Pattern Creator (seems fine, but I really haven't tested it)
  • MPDCenter (fairly good, also jaggy-looking, glitchy in general)
  • LDView (nope, it doesn't render anything in the viewport)
Also, in general any polling between external programs doesn't seem to work, but maybe I just don't know how to set it up.

I did have to manually place the fonts FreeSans and FreeMono into my drive_c\windows\Fonts folder for LDCad (as previously reported).

I just did some tinkering to see if I could update anything, but to be honest any newer configuration than the one I have seems to break something. You cannot use XQuartz 2.7.11 because it results in ugly, chunky fonts, and the current XQuartz 2.8.0 just pain doesn't work at all. (I believe there is a fix in the works for 2.8.1, though.)

I tried upgrading to Wine 5.0, but it results in a minor but annoying issue with LDCad, where the app window acts like it isn't in the front after desktop switching (even though it is). Sounds trivial, but desktop switching is such a big part of my workflow that it becomes quite irritating. So I reverted to 4.0.3, the previous stable release. (Installer packages aren't out yet for Wine 6.0.)

I would very much like to know if anyone has had success with any newer configuration? Specifically, has anybody tried Catalina or Big Sur with Wine yet? Official Wine doesn't support them, but CrossOver (paid Wine) reputedly does. But then, I don't know if it has the same issues as newer versions of Wine—and if so, whether they're fixable.
(2021-04-13, 4:53)N. W. Perry Wrote: [ -> ]Following the original thread, I want to revisit this topic as I'm working on a how-to guide for using LDCad (and other LDraw utilities) under Wine. I would love to know what experiences some of you have had.

Here's what I have successfully running:
  • OS 10.14.6 Mojave on a 2012 Intel MacBook
  • Wine (stable) 4.0.3
  • XQuartz 2.7.9 (required dependency)
Here's what works:
  • LDCad (flawlessly)
  • LDDP (good, one minor window management issue)
  • DATHeader (fine, a little jaggy-looking)
  • Img4Dat (usable, some wonky GUI issues)
  • LD Pattern Creator (seems fine, but I really haven't tested it)
  • MPDCenter (fairly good, also jaggy-looking, glitchy in general)
  • LDView (nope, it doesn't render anything in the viewport)
Also, in general any polling between external programs doesn't seem to work, but maybe I just don't know how to set it up.

I did have to manually place the fonts FreeSans and FreeMono into my drive_c\windows\Fonts folder for LDCad (as previously reported).

I just did some tinkering to see if I could update anything, but to be honest any newer configuration than the one I have seems to break something. You cannot use XQuartz 2.7.11 because it results in ugly, chunky fonts, and the current XQuartz 2.8.0 just pain doesn't work at all. (I believe there is a fix in the works for 2.8.1, though.)

I tried upgrading to Wine 5.0, but it results in a minor but annoying issue with LDCad, where the app window acts like it isn't in the front after desktop switching (even though it is). Sounds trivial, but desktop switching is such a big part of my workflow that it becomes quite irritating. So I reverted to 4.0.3, the previous stable release. (Installer packages aren't out yet for Wine 6.0.)

I would very much like to know if anyone has had success with any newer configuration? Specifically, has anybody tried Catalina or Big Sur with Wine yet? Official Wine doesn't support them, but CrossOver (paid Wine) reputedly does. But then, I don't know if it has the same issues as newer versions of Wine—and if so, whether they're fixable.

I don't want to disappoint you, but since MacOS 10.15 (Catalina) 32bit is no longer supported. So, Wine will not run (at least for 32 bit programs). So whatever you do, will either be temporary or will not work at all.
What I found is https://github.com/Gcenx/WineskinServer. I do not know if this really helps.

Currently, if you want an LDraw editor, the only ones running out of the box is LeoCad and Stud.io (to my knowledge).
Bricksmith has problems with OpenGL on MacOS (Apple changed something under the hood). If you can compile the version from GitHub, I think it will work (at least on my MacOS - Big Sur). They fixed something. But this is not available as a binary from the bricksmith web page.

Another choice is running a Windows version in a virtual box such as Parallels, VMWare or Virtualbox.
I think a no cost option could be VirtualBox (which is free) and Windows. To my knowledge you can use an unregistered Windows 10 version (you will not be able to tweak the look of Windows). From a license perspective I do not know if this is legal, but technically it is working. Well to be honest, Virtualbox is not running on MacOS Big Sur either.

The last option which comes into my mind is using BootCamp if you have enough disc space. Not very comfortable having to reboot only for using LDraw editors.

It is really a sad state. I love Bricksmith because it offers more variety for flexible parts as LeoCad and Stud.io.
(2021-04-13, 11:58)Manfred Kern Wrote: [ -> ]I don't want to disappoint you, but since MacOS 10.15 (Catalina) 32bit is no longer supported. So, Wine will not run (at least for 32 bit programs). So whatever you do, will either be temporary or will not work at all.

Yes, that's the major known issue, and why I'd like to hear from anyone who may have tried it. But all reports are that CrossOver does solve the problem…and CrossOver is essentially Wine; it's just that this particular bit of code isn't officially supported in Wine, for reasons that are way over my head. And LDCad, at least, is 64-bit, so right now that's the major motivation for a lot of people who may want to try this.

Quote:What I found is https://github.com/Gcenx/WineskinServer. I do not know if this really helps.

What does it do, that Wine by itself doesn't?

Quote:Currently, if you want an LDraw editor, the only ones running out of the box is LeoCad and Stud.io (to my knowledge).
Bricksmith has problems with OpenGL on MacOS (Apple changed something under the hood). If you can compile the version from GitHub, I think it will work (at least on my MacOS - Big Sur). They fixed something. But this is not available as a binary from the bricksmith web page.

Another choice is running a Windows version in a virtual box such as Parallels, VMWare or Virtualbox.
I think a no cost option could be VirtualBox (which is free) and Windows. To my knowledge you can use an unregistered Windows 10 version (you will not be able to tweak the look of Windows). From a license perspective I do not know if this is legal, but technically it is working. Well to be honest, Virtualbox is not running on MacOS Big Sur either.

The last option which comes into my mind is using BootCamp if you have enough disc space. Not very comfortable having to reboot only for using LDraw editors.

It is really a sad state. I love Bricksmith because it offers more variety for flexible parts as LeoCad and Stud.io.

It is too bad, I agree. But LDCad works so well under Wine that I think it's fair to say this is still the best option by far. So we can at least get some kind of guide together for that process. The key component at this point is whether users really can't go beyond Mojave. If there is Wine or a Wine-like solution that works for the current OS, that's ideal. (Even if they just have to deal with that one quirk of LDCad under Wine 5 and up.)
(2021-04-13, 12:56)N. W. Perry Wrote: [ -> ]Yes, that's the major known issue, and why I'd like to hear from anyone who may have tried it. But all reports are that CrossOver does solve the problem…and CrossOver is essentially Wine; it's just that this particular bit of code isn't officially supported in Wine, for reasons that are way over my head. And LDCad, at least, is 64-bit, so right now that's the major motivation for a lot of people who may want to try this.


What does it do, that Wine by itself doesn't?


It is too bad, I agree. But LDCad works so well under Wine that I think it's fair to say this is still the best option by far. So we can at least get some kind of guide together for that process. The key component at this point is whether users really can't go beyond Mojave. If there is Wine or a Wine-like solution that works for the current OS, that's ideal. (Even if they just have to deal with that one quirk of LDCad under Wine 5 and up.)

As for wineskin, I never used it. I was only surprised, that it should run on MacOS 11 (Big Sur).
On Windows and Linux, LDCad is my favorite. I once had it run on an earlier version of MacOS with wine.
But MacOS is continually steeling my apps (by removing 32 bit --> death of wine and some others), deprecating OpenGL and adding additional layers (death of bricksmith). And with the new M11 chip I think I will not buy a new Mac anymore. It is not sufficient to only have a good look. Continuity of apps is more important.
(2021-04-13, 14:52)Manfred Kern Wrote: [ -> ]As for wineskin, I never used it. I was only surprised, that it should run on MacOS 11 (Big Sur).
On Windows and Linux, LDCad is my favorite. I once had it run on an earlier version of MacOS with wine.
But MacOS is continually steeling my apps (by removing 32 bit --> death of wine and some others), deprecating OpenGL and adding additional layers (death of bricksmith). And with the new M11 chip I think I will not buy a new Mac anymore. It is not sufficient to only have a good look. Continuity of apps is more important.

Well, if you do have a newer Mac setup than mine and would be willing to try out a few things, it would be most helpful. Even if you decide this is not the way to go for you, it would be instructive to know why.

Or if you have other systems available and have decided to use those exclusively, that's fine as well. Of course it would be assumed that anyone using this guide will have already decided that it's worth giving Wine a try, or at least that it's their only possible option, so that question won't really be on the table. This is just an effort to fill in some of the documentation for new users on the LDraw web site, and I've offered to tackle it since it's something I'd love to have known sooner! Smile
(2021-04-13, 17:19)N. W. Perry Wrote: [ -> ]Well, if you do have a newer Mac setup than mine and would be willing to try out a few things, it would be most helpful. Even if you decide this is not the way to go for you, it would be instructive to know why.

Or if you have other systems available and have decided to use those exclusively, that's fine as well. Of course it would be assumed that anyone using this guide will have already decided that it's worth giving Wine a try, or at least that it's their only possible option, so that question won't really be on the table. This is just an effort to fill in some of the documentation for new users on the LDraw web site, and I've offered to tackle it since it's something I'd love to have known sooner! Smile

Well, the minute Apple dropped 32 bit support, wine didn't work anymore. So, I removed it.

But now I gave it a new try.
1. Just for a test I installed wine 5.0 via brew. Installation worked
2. Downloaded the archive file of LDCad for Windows
3. Unarchive and cd to the LDCad folder
4. Ran wine64 LDCad64.exe --> LDCad starts. When it asks for LDraw-Directory enter Z:\<full path to LDraw directory> using backslashes 
5. Fonts are missing, so needs to be grabbed from somewhere (e.g. a working windows installation). You need the verdana*.ttf fonts
6. Put those fonts into the $HOME/.wine/drive_c/windows/Fonts folder

Restart wine64 LDCad64 and it is working. I loaded some of the models shipped with LDCad. They work, but it is kinda slow.

Side remark about installing fonts: forget winetricks. This only works in a 32bit environment. Some System programs provided by wine , like regedit.exe don't work. They are 32bit.  You may mess around  with the main.gui file (located in LDCad/gui/default), but for me it is too complicated to match MacOS fonts into main.gui.

Now it works. But it is a hack. I wonder when it will break again.
Another side note: I am running MacOS11 (Big Sur) on a MacBook Air 2016 (Intel).
(2021-04-14, 14:07)Manfred Kern Wrote: [ -> ]Well, the minute Apple dropped 32 bit support, wine didn't work anymore. So, I removed it.

But now I gave it a new try.
1. Just for a test I installed wine 5.0 via brew. Installation worked
2. Downloaded the archive file of LDCad for Windows
3. Unarchive and cd to the LDCad folder
4. Ran wine64 LDCad64.exe --> LDCad starts. When it asks for LDraw-Directory enter Z:\<full path to LDraw directory> using backslashes 
5. Fonts are missing, so needs to be grabbed from somewhere (e.g. a working windows installation). You need the verdana*.ttf fonts
6. Put those fonts into the $HOME/.wine/drive_c/windows/Fonts folder

Restart wine64 LDCad64 and it is working. I loaded some of the models shipped with LDCad. They work, but it is kinda slow.

Side remark about installing fonts: forget winetricks. This only works in a 32bit environment. Some System programs provided by wine , like regedit.exe don't work. They are 32bit.  You may mess around  with the main.gui file (located in LDCad/gui/default), but for me it is too complicated to match MacOS fonts into main.gui.

Now it works. But it is a hack. I wonder when it will break again.
Another side note: I am running MacOS11 (Big Sur) on a MacBook Air 2016 (Intel).

Thanks, that is very helpful! So we can at least say that Wine itself will run under Big Sur, but only 64-bit programs will work, confirming the rumors. For users who only really want to get LDCad working, that may be enough. (There seem to be a lot of Studio users on macOS who would like to be able to work in LDCad, for example.)

If you (or anyone) have Mission Control enabled with multiple desktop spaces, could you try something else?

1. Open LDCad in a desktop space with no other windows or apps in it
2. Switch to another desktop (this one can have windows open, or not; it doesn't seem to matter)
3. Switch back to the LDCad space
— Does the LDCad window appear to be the front window (even thought it's the only window)?
—Without clicking the mouse/trackpad, does anything in the LDCad window respond to mouse-over? Menu highlights, part highlights, source window entries, etc.?
—Without clicking the mouse/trackpad, does LDCad respond to any keyboard input? For example, ctrl-N for a new file?
4. Now click in the LDCad window, as if to make it active.
—Does the window now respond normally to mouse-over or keyboard inputs?

This is the issue I found with LDCad specifically, starting in Wine 5.0. The issue is not present in Wine 4.0.3. To me, it's a deal breaker, but other users might find it acceptable and thus be okay with current versions of Wine. (But I haven't tested other LDraw apps in 5.0.)
(2021-04-14, 14:07)Manfred Kern Wrote: [ -> ]They are 32bit.  You may mess around  with the main.gui file (located in LDCad/gui/default), but for me it is too complicated to match MacOS fonts into main.gui.

Currently it will search for:
DejaVuSans
FreeSans
verdana

and when mono space is needed:
DejaVuSansMono
FreeMono
cour
FreeSans

LDCad will use the first (recursively) found one, so you can just add the apple ones to the list (filename without the .ttf )

If anyone has the filenames of suitable fonts nativily available on mac I could add them to the default gui template.

Or you could just grab the free /open source font 'freesans' and 'freemono' font files from the net and put them in the .../gui/default folder
(2021-04-14, 18:05)Roland Melkert Wrote: [ -> ]Currently it will search for:
DejaVuSans
FreeSans
verdana

and when mono space is needed:
DejaVuSansMono
FreeMono
cour
FreeSans

LDCad will use the first (recursively) found one, so you can just add the apple ones to the list (filename without the .ttf )

If anyone has the filenames of suitable fonts nativily available on mac I could add them to the default gui template.

Or you could just grab the free /open source font 'freesans' and 'freemono' font files from the net and put them in the .../gui/default folder

Any of these should be suitable as-is. I had the free ones installed, but I just now downloaded DejaVu, and now they load into the GUI just fine. (I just copied the two .ttf files for DejaVuSans and DejaVuSansMono, not the entire directory.)
(2021-04-14, 16:23)N. W. Perry Wrote: [ -> ]Thanks, that is very helpful! So we can at least say that Wine itself will run under Big Sur, but only 64-bit programs will work, confirming the rumors. For users who only really want to get LDCad working, that may be enough. (There seem to be a lot of Studio users on macOS who would like to be able to work in LDCad, for example.)

If you (or anyone) have Mission Control enabled with multiple desktop spaces, could you try something else?

1. Open LDCad in a desktop space with no other windows or apps in it
2. Switch to another desktop (this one can have windows open, or not; it doesn't seem to matter)
3. Switch back to the LDCad space
— Does the LDCad window appear to be the front window (even thought it's the only window)?
—Without clicking the mouse/trackpad, does anything in the LDCad window respond to mouse-over? Menu highlights, part highlights, source window entries, etc.?
—Without clicking the mouse/trackpad, does LDCad respond to any keyboard input? For example, ctrl-N for a new file?
4. Now click in the LDCad window, as if to make it active.
—Does the window now respond normally to mouse-over or keyboard inputs?

This is the issue I found with LDCad specifically, starting in Wine 5.0. The issue is not present in Wine 4.0.3. To me, it's a deal breaker, but other users might find it acceptable and thus be okay with current versions of Wine. (But I haven't tested other LDraw apps in 5.0.)

I can confirm, that you must first select LDCad in order that mouse over , ... is working. When you select the app it will work.
But in my opinion, this is natural to MacOS, since LDCad is not an app bundle. If you e.g. develop a program with wxWidgets (a cross platform C++ Gui framework) you have the same result. After compiling and launching the program it will not have the focus. As soon as you create an app bundle, it will behave as a "normal" MacOS app. Also Cmd-Q does not work for closing the app. You need to close the window.
Pages: 1 2 3