MacOS LDCad on Wine (for Mac)-revisited


LDCad on Wine (for Mac)-revisited
#1
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.
Reply
RE: LDCad on Wine (for Mac)-revisited
#2
(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.
Reply
RE: LDCad on Wine (for Mac)-revisited
#3
(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.)
Reply
RE: LDCad on Wine (for Mac)-revisited
#4
(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.
Reply
RE: LDCad on Wine (for Mac)-revisited
#5
(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
Reply
RE: LDCad on Wine (for Mac)-revisited
#6
(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).
Reply
RE: LDCad on Wine (for Mac)-revisited
#7
(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.)
Reply
RE: LDCad on Wine (for Mac)-revisited
#10
(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.
Reply
RE: LDCad on Wine (for Mac)-revisited
#11
(2021-04-15, 19:15)Manfred Kern Wrote: 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.

Interesting; so you'd say the way it worked under 4.0.3 was actually the "bug", and now it behaves "correctly"? (In which case I'll take the bug, but that's another matter!)

What happens if you open some other windows in the same space as LDCad? Say another app, or a Finder window? In 4.0.3, whichever window is at the front when I switch spaces will be at the front when I switch back. I'm curious whether the LDCad window is actually being moved to the back, or just acting like it?

Incidentally, the LDCad window is actually a program window in "wine64-preloader", which is an executable but not an app bundle (app bundles always have an executable file somewhere inside them). So, I also wonder if any program running in a preloader window would have the same behavior? On my system, they do behave the same way, except for LDDP, which is always sent to the back for some reason. But I really don't know enough about window management to understand why.
Reply
RE: LDCad on Wine (for Mac)-revisited
#8
(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
Reply
RE: LDCad on Wine (for Mac)-revisited
#9
(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.)
Reply
RE: LDCad on Wine (for Mac)-revisited
#12
I'd like to get this written up before much longer, but I wanted to put out one more call for anyone willing to test out the proposed configuration, particularly under a recent OS. Thanks!
Reply
RE: LDCad on Wine (for Mac)-revisited
#13
Here is the proposed installation process. I've written it up here briefly for those who are willing to test it out. Please let me know if I've missed any steps, or if you encounter issues I'm not aware of.

This was tested under 10.15.7 Catalina and will presumably work just as well under Big Sur. (Mojave users can skip parts V and VI, as they can directly open .exe files via Wine Stable.app.)

I. Install XQuartz
  1. Download the installer disk image from xquartz.org: XQuartz-2.8.1.dmg
    NOTE: XQuartz 2.7.9 also works, but not 2.7.11 or 2.8.0.
  2. Open the disk image, and then open the installer package from the resulting virtual disk
  3. Follow the installer prompts, including your administrator password when asked
  4. Log out when finished (trash the installer if wanted), then log back in
  5. XQuartz is now installed in Applications/Utilities
II. Install Wine
  1. Download the installer package from winehq.org:
    Version 4.0.3: winehq-stable-4.0.3.pkg
    I am recommending 4.0.3 because it avoids the desktop switching issue. But the latest stable version with a pkg available is:
    Version 5.0: winehq-stable-5.0.pkg
  2. Open the installer package; you will get a "can't be opened" error message, click “OK”
  3. In System Preferences–>Security & Privacy, click “Open Anyway”
  4. Open the installer package again; the same error message will appear, but you can now click “Open”
  5. Follow the installer prompts, being sure to check “64 bit support”
  6. Wine Stable.app is now installed in Applications, but can’t be opened as it is a 32 bit app bundle. However, Wine is installed inside of it and the wine64 executable can be run from the command line.
III. Install LDCad
  1. Download the Windows archive (not setup) package from melkert.net: archive
  2. Extract the archive file, which creates the LDCad folder with 32 and 64 bit versions
IV: Install GUI fonts
  1. Download DejaVu fonts: dejavu-fonts-ttf-2.37.zip
  2. Locate hidden “.wine” folder in your user folder (⌘⇧. to show hidden items)
  3. In ~/.wine/drive_c/windows/Fonts, place the downloaded DejaVu fonts folder
V. Launch LDCad
  1. Open Terminal, run command:
    /Applications/Wine\ Stable.app/Contents/Resources/wine/bin/wine64 /Users/yourusername/Downloads/LDCad-1-6d-Win/LDCad64.exe
  2. Adjust the path to LDCad64.exe if it isn't in "Downloads".
  3. Wine will update the .wine prefix, and will ask to install Mono and Gecko (but LDCad will continue to launch in the background).
    Clicking "Cancel" for both of these does not appear to be a problem.
  4. Accept LDCad license agreement
  5. Enter path to your LDraw library when prompted, replacing “/“ with “\” where appropriate
  6. LDCad now opens
VI. Create a launcher app
  1. Open Script Editor (from Applications/Utilities)
  2. Enter code:
    tell application "Terminal"do script "/Applications/Wine\\ Stable.app/Contents/Resources/wine/bin/wine64 /Users/yourusername/Downloads/LDCad-1-6d-Win/LDCad64.exe"end tell
  3. Save the script as “Application” file format, name the app
  4. Open the launcher app; give permission to control Terminal if prompted
Reply
RE: LDCad on Wine (for Mac)-revisited
#14
(2021-06-02, 5:14)N. W. Perry Wrote:
  1. Open the installer package; you will get a "can't be opened" error message, click “OK”
  2. In System Preferences–>Security & Privacy, click “Open Anyway”

You should be able to ctrl-click a downloaded installer/program and choose "Open" to bypass the gatekeeper check.
Reply
RE: LDCad on Wine (for Mac)-revisited
#15
(2021-06-02, 5:32)Orion Pobursky Wrote: You should be able to ctrl-click a downloaded installer/program and choose "Open" to bypass the gatekeeper check.

You're right, I'd forgotten about that method. I wonder if it has the same effect as going through System Preferences, which prevents further error messages for that developer, or is it just a one-time thing?
Reply
RE: LDCad on Wine (for Mac)-revisited
#16
(2021-06-02, 5:14)N. W. Perry Wrote: Here is the proposed installation process. I've written it up here briefly for those who are willing to test it out. Please let me know if I've missed any steps, or if you encounter issues I'm not aware of.

This was tested under 10.15.7 Catalina and will presumably work just as well under Big Sur. (Mojave users can skip parts V and VI, as they can directly open .exe files via Wine Stable.app.)

I. Install XQuartz
  1. Download the installer disk image from xquartz.org: XQuartz-2.8.1.dmg
    NOTE: XQuartz 2.7.9 also works, but not 2.7.11 or 2.8.0.
  2. Open the disk image, and then open the installer package from the resulting virtual disk
  3. Follow the installer prompts, including your administrator password when asked
  4. Log out when finished (trash the installer if wanted), then log back in
  5. XQuartz is now installed in Applications/Utilities
II. Install Wine
  1. Download the installer package from winehq.org:
    Version 4.0.3: winehq-stable-4.0.3.pkg
    I am recommending 4.0.3 because it avoids the desktop switching issue. But the latest stable version with a pkg available is:
    Version 5.0: winehq-stable-5.0.pkg
  2. Open the installer package; you will get a "can't be opened" error message, click “OK”
  3. In System Preferences–>Security & Privacy, click “Open Anyway”
  4. Open the installer package again; the same error message will appear, but you can now click “Open”
  5. Follow the installer prompts, being sure to check “64 bit support”
  6. Wine Stable.app is now installed in Applications, but can’t be opened as it is a 32 bit app bundle. However, Wine is installed inside of it and the wine64 executable can be run from the command line.
III. Install LDCad
  1. Download the Windows archive (not setup) package from melkert.net: archive
  2. Extract the archive file, which creates the LDCad folder with 32 and 64 bit versions
IV: Install GUI fonts
  1. Download DejaVu fonts: dejavu-fonts-ttf-2.37.zip
  2. Locate hidden “.wine” folder in your user folder (⌘⇧. to show hidden items)
  3. In ~/.wine/drive_c/windows/Fonts, place the downloaded DejaVu fonts folder
V. Launch LDCad
  1. Open Terminal, run command:
    /Applications/Wine\ Stable.app/Contents/Resources/wine/bin/wine64 /Users/yourusername/Downloads/LDCad-1-6d-Win/LDCad64.exe
  2. Adjust the path to LDCad64.exe if it isn't in "Downloads".
  3. Wine will update the .wine prefix, and will ask to install Mono and Gecko (but LDCad will continue to launch in the background).
    Clicking "Cancel" for both of these does not appear to be a problem.
  4. Accept LDCad license agreement
  5. Enter path to your LDraw library when prompted, replacing “/“ with “\” where appropriate
  6. LDCad now opens
VI. Create a launcher app
  1. Open Script Editor (from Applications/Utilities)
  2. Enter code:
    tell application "Terminal"do script "/Applications/Wine\\ Stable.app/Contents/Resources/wine/bin/wine64 /Users/yourusername/Downloads/LDCad-1-6d-Win/LDCad64.exe"end tell
  3. Save the script as “Application” file format, name the app
  4. Open the launcher app; give permission to control Terminal if prompted

Thanks Perry! I will test this too!
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: LDCad on Wine (for Mac)-revisited
#17
(2021-06-04, 6:48)Jaco van der Molen Wrote: Thanks Perry! I will test this too!

OK, I got LDCad to work!
It took a while before the LDraw Libary was loaded.
Opening a model and Loading and prepping takes a while too, but then it runs smoothly!

What didn't work was this part of your workflow (of course with my username and correct path to LDCad ;-)

V. Launch LDCad

    Open Terminal, run command:
    /Applications/Wine\ Stable.app/Contents/Resources/wine/bin/wine64 /Users/yourusername/Downloads/LDCad-1-6d-Win/LDCad64.exe

I had to just click Wine Stable in my Programs folder and then run

wine /Users/jaco/Downloads/LDCad-1-6d-Win/LDCad64.exe

Where later I found out that I could just click LDCad64.exe and say Open with and then choose Wine Stable
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: LDCad on Wine (for Mac)-revisited
#18
(2021-06-04, 10:39)Jaco van der Molen Wrote: What didn't work was this part of your workflow (of course with my username and correct path to LDCad ;-)

V. Launch LDCad

    Open Terminal, run command:
    /Applications/Wine\ Stable.app/Contents/Resources/wine/bin/wine64 /Users/yourusername/Downloads/LDCad-1-6d-Win/LDCad64.exe

I had to just click Wine Stable in my Programs folder and then run

wine /Users/jaco/Downloads/LDCad-1-6d-Win/LDCad64.exe

Where later I found out that I could just click LDCad64.exe and say Open with and then choose Wine Stable

If you're on Mojave (10.14) or earlier that should work, and I'll be including that as an option on the help page). Trouble is that with Catalina, the Wine Stable app itself cannot be opened because it's 32-bit. Same happens if you try to open the wine executable from the command line, hence why we use the wine64 instead. (I wonder if it's possible to change the Wine Stable app to launch wine64 instead of wine?)

Or do you mean you were able to do this under Catalina or Big Sur?
Reply
RE: LDCad on Wine (for Mac)-revisited
#23
I have a new Macbook with OS Monterey 12.0.1.
Any thoughts on how to (if possible) get LDCad to run on it?
The current stable version of Wine does not work and the latest dev is to OS 10.14.
Jaco van der Molen
lpub.binarybricks.nl
Reply
RE: LDCad on Wine (for Mac)-revisited
#24
(53 minutes ago)Jaco van der Molen Wrote: I have a new Macbook with OS Monterey 12.0.1.
Any thoughts on how to (if possible) get LDCad to run on it?
The current stable version of Wine does not work and the latest dev is to OS 10.14.

If it has an M1 chip, I don't think it's current possible.
Reply
RE: LDCad on Wine (for Mac)-revisited
#19
Thanks for the detailed procedure! Now I have started my tests under Catalina.

First I was not able to do step IV: Install GUI fonts before step V. Launch LDCad because at that moment the .wine folder did not exist yet. So I had to do a first launch of wine64 to be able to do so.

And now I'm stuck on step V... After I accept LDCad license agreement I get an error message due to an exception:
Code:
0038:fixme:commdlg:IServiceProvider_fnQueryService Interface {e07010ec-bc17-44c0-97b0-46c7c95b9edc} requested from unknown service {e07010ec-bc17-44c0-97b0-46c7c95b9edc}
0038:fixme:shell:ViewModeToListStyle ViewMode 0 not implemented
0038:err:virtual:map_file_into_view failed to set PROT_EXEC on file map, noexec filesystem?
0038:err:virtual:virtual_map_section mapping 0x2120000 1000 000000000 failed
wine: Unhandled page fault on write access to 0x00000000 at address 0x7fff70f1495d (thread 0038), starting debugger...
Unhandled exception: page fault on write access to 0x00000000 in 64-bit code (0x00007fff70f1495d).
Register dump:
rip:00007fff70f1495d rsp:000000000032c980 rbp:000000000032c980 eflags:00010206 (  R- --  I  - -P- )
rax:0000000000000000 rbx:0000000000000000 rcx:0000000000000000 rdx:0000000000000024
rsi:0000000002273f40 rdi:0000000000000000  r8:00000000000100a8  r9:0000000000005342 r10:0000000000000000
r11:fffffffffdd8c0c0 r12:0000000000000000 r13:0000000000000044 r14:0000000000093220 r15:000000000003006c
Stack dump:
0x000000000032c980:  000000000032cac0 000000006c31aec9
0x000000000032c990:  919ff0639c660314 8f18f69fd0943427
0x000000000032c9a0:  03aa4f5b17b48852 a5e1b88763816e40
0x000000000032c9b0:  0000000000000044 0000000000000000
0x000000000032c9c0:  0000000000000104 00000000000c4320
0x000000000032c9d0:  00000037a6f8aef8 00000000000c4362
0x000000000032c9e0:  22dae3b80e2c4939 e4b09873c972484f
0x000000000032c9f0:  12b632dc9c8a2453 4304a829cb56e92d
0x000000000032ca00:  79b788fb11446793 987705637cea2046
0x000000000032ca10:  c6fda51c7540906e d27dff28eed83cc5
0x000000000032ca20:  f8c1cf5c0d82616d 1e8706fc4cf23733
0x000000000032ca30:  a2c425b1a6f8aef8 e1c08d986dae47d5
Backtrace:
=>0 0x00007fff70f1495d (0x000000000032c980)
0x00007fff70f1495d: ldsl %esp,%edi
Modules:
Module Address Debug info Name (26 modules)
PE           400000-        1027000 Deferred        ldcad64
PE         6a840000-        6a844000 Deferred        advapi32
PE         6a8d0000-        6a922000 Deferred        comctl32
PE         6aa30000-        6ab18000 Deferred        user32
PE         6ac90000-        6ac97000 Deferred        gdi32
PE         6ae20000-        6ae24000 Deferred        version
PE         6ae30000-        6ae33000 Deferred        usp10
PE         6ae80000-        6ae84000 Deferred        imm32
PE         6aeb0000-        6af57000 Deferred        comdlg32
PE         6afd0000-        6afd3000 Deferred        shcore
PE         6b810000-        6c0e3000 Deferred        shell32
PE         6c230000-        6c238000 Deferred        shlwapi
PE         6c2d0000-        6c2f8000 Deferred        ole32
PE         6c470000-        6c474000 Deferred        rpcrt4
PE         6c520000-        6c52b000 Deferred        winspool
PE         6c570000-        6c573000 Deferred        glu32
PE         6c5b0000-        6c5b4000 Deferred        msvcrt
PE         6c690000-        6c698000 Deferred        oleaut32
PE         6c810000-        6c888000 Deferred        winmm
PE         6c8e0000-        6c8e9000 Deferred        msacm32
PE         6c9b0000-        6c9b6000 Deferred        winemac
PE         6f560000-        6f564000 Deferred        uxtheme
PE         7a810000-        7a814000 Deferred        opengl32
PE         7b410000-        7b5c2000 Deferred        kernel32
PE         7bc10000-        7bc14000 Deferred        ntdll
ELF         7c400000-        7c405000 Deferred        <wine-loader>
Threads:
process  tid      prio (all id:s are in hex)
0000000e services.exe
00000020    0
0000001b    0
00000013    0
00000010    0
0000000f    0
00000011 winedevice.exe
00000018    0
00000017    0
00000016    0
00000012    0
00000019 plugplay.exe
0000001d    0
0000001c    0
0000001a    0
0000001e winedevice.exe
00000025    0
00000022    0
00000021    0
0000001f    0
00000037 (D) Z:\Users\chenzo\Downloads\LDCad-1-6d-Win\LDCad64.exe
00000044    0
00000043    0
00000042    0
00000041    0
00000040    0
0000003f    0
0000003e    0
00000038    0 <==
00000039 explorer.exe
0000003d    0
0000003c    0
0000003b    0
0000003a    0
System information:
    Wine build: wine-4.0.3
    Platform: x86_64
    Version: Windows 7
    Host system: Darwin
    Host version: 19.6.0
I don't really know what to do...
Reply
RE: LDCad on Wine (for Mac)-revisited
#20
(2021-06-05, 7:02)Vincent Messenet Wrote: Thanks for the detailed procedure! Now I have started my tests under Catalina.

First I was not able to do step IV: Install GUI fonts before step V. Launch LDCad because at that moment the .wine folder did not exist yet. So I had to do a first launch of wine64 to be able to do so.

Ah, good catch. I was naughty and did my test out of order, so I missed that. (I launched LDCad first because I wanted a screen shot of what happens when the fonts aren't installed, but I assumed the user would want to install them first.)

Quote:And now I'm stuck on step V... After I accept LDCad license agreement I get an error message due to an exception:
[…]
I don't really know what to do...

Huh boy…that'll be beyond my know-how. Maybe it means something to Roland? Or the folks at WineHQ…

I will say that a lot of those fixmes appear in my terminal too, and it works out just fine. So it's a little hard to tell which of these is actually the problem!
Reply
RE: LDCad on Wine (for Mac)-revisited
#21
(2021-06-05, 21:00)N. W. Perry Wrote: Huh boy…that'll be beyond my know-how. Maybe it means something to Roland? Or the folks at WineHQ…

It looks like it is crashing while opening the directory browser. I'm no wine expert but "ViewModeToListStyle ViewMode 0 not implemented" sounds like it fails to convert the dialog LDCad asks for to the local way of presenting things.

As a last resort you could manually edit main.cfg to set the location of the LDraw library to avoid the dialog.

But it might still crash when trying to open or save files, as those are similar dialogs.
Reply
RE: LDCad on Wine (for Mac)-revisited
#22
(2021-06-07, 18:45)Roland Melkert Wrote: It looks like it is crashing while opening the directory browser. I'm no wine expert but "ViewModeToListStyle ViewMode 0 not implemented" sounds like it fails to convert the dialog LDCad asks for to the local way of presenting things.

As a last resort you could manually edit main.cfg to set the location of the LDraw library to avoid the dialog.

But it might still crash when trying to open or save files, as those are similar dialogs.

Aha, that's interesting because in my test, the directory dialog does comes up, but looks funny. It has only a text field to input the library path, but there is no file browser visible (just a big empty space).

This definitely didn't happen in my previous install. Vincent, what if you try it with Wine 4.0.3 instead of Wine 5.0? Or could it have anything to do with XQuartz, which relates to the GUI? Maybe an earlier version would work.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Invisible User(s), 1 Guest(s)