Coder Social home page Coder Social logo

Can you compile a Linux release? about macad3d HOT 7 OPEN

macad3d avatar macad3d commented on June 7, 2024 1
Can you compile a Linux release?

from macad3d.

Comments (7)

dipts avatar dipts commented on June 7, 2024 3

The core functionality - the model, interactive tools, exchange, etc. - have no dependency on Windows. As far as I can see, there are two major areas that need to be ported:

  • The UI is based on WPF, which is currently only available on Windows. This would have to be changed to another framework. Avalonia would be a good choice, as it is also XAML-based and very similar to WPF. With this, the majority of XAMLs and code-behind should be able to be transferred.

  • There is currently no Linux compiler that compiles C++/CLI. The wrapping for OCCT (and Macad's own CPP components) must be converted to P/Invoke. The wrapper generation is already automated, so only the generator has to be adapted, not the consuming code.

The rest should be peanuts. Some OS dependent functions have to be encapsulated and implemented for Linux, the build system needs to be enhanced, such things.

All in all doable, just a lot of work. If this can be distributed on a few shoulders it becomes realistic.

from macad3d.

cactushydrocodone avatar cactushydrocodone commented on June 7, 2024 1

I understand that native ports for linux are most of the time superior to wine, but in this case, i tried wine and was actually surprised:

Ive got Macad3D to start (show me the start selection screen, show gui) with the following steps.
Keep in mind i reconstructed this out of my head after trying several things, some steps might not be necessary.

As an example, i use /wine/prefix as wine prefix path here.

  1. install wine-staging and winetricks
  2. Run winetricks the following way: WINEPREFIX=/wine/prefix winetricks (This prefix will be created with winetricks)
    2.1. Set windows version to windows 10
    2.2. Install dxvk so wpf support is given
    2.3. install some basic windows fonts like arial, tahoma, etc
  3. Download and install the 6.0.12 dotnet runtime (windowsdesktop-runtime-6.0.12-win-x64.exe) using WINEPREFIX=/wine/prefix ~/Downloads/windowsdesktop-runtime-6.0.12-win-x64.exe (Mark the file as executable first using chmod +x)
  4. Download the Macad3D installer from the releases page (dont forget, mark as executable)
  5. Start the Macad3D installer using WINEPREFIX=/wine/prefix ~/Downloads/Macad3D_2.3_Setup.exe
  6. Click it through, do NOT run it at the end, e.g. untick the checkbox.
  7. Now, for whatever reason, wine defaults to searching for libraries on the wine host instead in the prefix. To make macad actually run, use the following command: WINEPREFIX=/wine/prefix DOTNET_ROOT="C:\Program Files\dotnet" /wine/prefix/drive_c/Program\ Files/Macad3D/Macad.exe

This will make the program start.

Most functions work out of the box, except some flaws:

  • I have a giant black cross in the center of the window that blocks me a bit. Weird
  • Raytracing mode, whatever that is, "works" (It does not crash)
  • Rightclicking brings a weird coloroed but usable context menu (Wine does not seem to like transparency and just replaces it with black)
  • The program does not lag (Not a flaw but important to mention)
  • By dragging those black bars away, i can see that they are "floating components" that are either part of the ui or show some modal information, idk i dont have windows i dont know how it supposed to look like
  • The coordinations of the menu buttons is a bit fucked up, sometimes you need to click a little above buttons / ribbons to activate them.
  • Running the tool in fullscreen mitigates some of the issues, in particular, the coordinates and the window sizing.
  • Im pretty sure the scripting feature will not work and, as a comment, its kinda weird to use c# as a scripting language in a 3d modeling tool...

Some of the issues i expierenced might be due to the fact that this was run in a tiling window manager, in a "normal" window manager, those issues might not exist.

A screenshot from the tool running (I tried to extrude the object but i dont know what im doing):
image

Following software versions were used:
Operating System: Arch Linux x86_64
wine-staging: 8.13-1
winetricks-git: 20230212

from macad3d.

dipts avatar dipts commented on June 7, 2024

Sorry, there is currently no linux port. Although basically feasible, there is a lot of work behind it. Since I don't use linux as desktop I won't make the port myself. But I'm happy to support anyone who wants to try.

from macad3d.

app4soft avatar app4soft commented on June 7, 2024

Sorry, there is currently no linux port.

As .NET 6 available for Linux and Mac (and there is Mono Runtime too), what else needs to be ported?

Has Macad3D any Windows-specific dependency?

from macad3d.

cactushydrocodone avatar cactushydrocodone commented on June 7, 2024

image
This is what i mean by "weird black windows"

Most important test, can i look at the about window:
image

from macad3d.

dipts avatar dipts commented on June 7, 2024

Interesting experiment, that doesn't look so bad indeed.

The "weird black window" is a transparent window that holds UI over the viewport. This actually arranges itself automatically over the entire viewport area and should not be movable. The black frame around the about window is also transparent and contains the shadow effect.

The coordinate deviation may be due to the fact that under Windows an offset must be included if you want to paint the window over the entire window area (and not only within the client area). This calculation depends on how large the OS Window Manager creates the window frame. This explains the improvement in fullscreen mode. Maybe a compatibility mode could be added here, if Wine is detected, which restricts the rendering to the client area or uses different window settings.

Scripting might work, it just needs the .Net runtime.

from macad3d.

xyont avatar xyont commented on June 7, 2024

indeed, Linux versions will attract large user and programmer also, maybe an improvement and plugins.

from macad3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.