Mecway on Linux

I've discovered that Mecway runs well on Linux under Wine with minimal workarounds (use `winetricks dotnet20sp1 tahoma` in a fresh WINEPREFIX beforehand). The winehq.org page is as follows: https://appdb.winehq.org/objectManager.php?sClass=application&iId=17181

It actually runs much better than on VirtualBox (as described in http://mecway.com/forum/discussion/86/mecway-on-mac-osx-using-virtualbox#latest); rendering is very fast and there are no graphical glitches.

I suspect that it would also run on OS X using the same workaround but I did not try it.
«1

Comments

  • Great news!
  • Thanks for reporting on Wine whitequark, that's great news. From what I can tell, Wine already comes with its own version of Tahoma. Was it not displaying properly until you installed the Microsoft Tahoma?
  • No. In fact it crashed with a fairly obscure message box that did not mention Tahoma (but did mention fonts)... I had to figure out that it wanted the Microsoft one by trial and error.
  • Wow. Thanks for all the effort. I need to track down what's happening.
  • hi, without understanding anything of this I tried a bit, and for me the next seems to work (on linux mint 17.2 , 64 bit):

    rm -rf ~/.wine
    export WINEARCH=win32; export WINEPREFIX=~/.wine; winecfg
    winetricks dotnet20sp1 tahoma
    misexec /i mecway40.msi

    But please correct me if it is wrong or so.
  • i get this error message frequently, don't know yet when it is triggered
  • I'm flying blind here, but that error message indicates a .Net class (GraphicsPath) which is used by the graphing library in Mecway (ZedGraph) but apparently not fully implemented in Mono. So it might be happening whenever it tries to display a graph in the timeline. I'll have a go with Linux myself at some stage and try to isolate the problem.
  • I've heard that the product key isn't reliably recognized on Wine so just a caution for anyone who might buy it hoping to use Linux that it could be limited to the 1000 node free version. Hopefully I can get a more compatible update done later.
  • I've had a go with Wine on 32 bit Ubuntu and found this:

    - Without installing .Net 2.0 as whitequark suggested, the toolbars are partly hidden and most things don't work. So that's important. I used SP2 though. Not sure if that's worse than SP1.

    - The 3D graphics, solver and automesher appear to work OK.

    - Toolbar icons need a double click instead of a single click.

    - The NotImplementedException pop up reported by dennis happens when you mouse over a graph such as on the timeline or the in nonlinear solver window. To avoid it, don't put the mouse there. If it does happen, just dismiss the box and it seems to keep working OK.

    - It won't recognize product keys. This is a biggie and I hope to find some workaround for a future version. It seems to be caused by Wine not implementing some cryptographic functions as described in Wine bug 10506 https://www.winehq.org/pipermail/wine-bugs/2007-November/076831.html

    - CCX 2.8p2 for Windows from bConverged installs and runs OK but some the solution values at some nodes are imported wrongly. CCX is writing negative numbers to the .frd file in an unexpected format with too many characters (13 instead of 12). Mecway also crashed sometimes when solving the pipeclip.liml sample through CCX but I can't reproduce this anymore.

    In summary, the free 1000 node edition without CCX seems OK, but the full edition doesn't work so please don't buy Mecway to use on Linux.
  • First, a comment I seem to have forgot to post earlier: "Oh, and it does run under Mono, but the same apparent problem manifests as under VirtualBox, there is no 3D rendering at all. .NET Framework 2.0 SP1 is the earliest one that renders properly."

    As for the rest... Yes, anything after .NET 2.0 SP1 will work fine--I've bisected the version of the .NET framework to be completely sure.

    I have also noticed the issue with the mouse over the graph--hopefully that should be an easy enough source fix.

    Toolbar icons work with a single click for me, not sure what's up about that.
  • Just a follow-up. Version 5 fixes these problems on Wine so it should be fully usable now:
    - NotImplementedException when mousing over a graph
    - Recognizing product keys
    - CCX (2.8p2 and probably others) works correctly
  • Hi,

    In respect to running ccx.exe on Linux (wine).

    The picture below shows the results of the lavffcyc compressor example stress distribution, but the left image is evaluated by the Windows version on Linux (wine), while the right was done by the native Linux version.

    I sent a mail to a person who makes ccx builds for Windows, and he confirmed that his results (the Windows build on Windows) gave identical results to the right image (Linux version).

    This means that either the Windows version of ccx.exe on Linux (running by wine) makes an error, or there is something wrong on my system.

    Could someone verify this? If the results are identical to the right image then everything is good. (This is made on a Ubuntu system)

    I've included the files but cgx may be needed to check the results.

    Rgds,
    Akos
  • Although I haven't checked this case on Linux, the difference might not be anything to worry about. It could be that two same-frequency modes switched order or that they're physically the same mode but rotated one segment around the axis.

    Do you see significant differences like qualitatively different mode shapes or frequencies? When two modes have the same frequency each one can end up being a mixture of both so they might look quite different on different runs and it can be hard to tell without adding them together and scaling them to see if both results are consistent with each other.

    In Mecway, the modal solver can produce give slightly different results on each run and that's OK. I think it's because the eigenvalue solver uses a random initial state to iterate on. CCX's solver might be doing that too.
  • edited June 2016
    Yes, It is rotated by one segment. The rotation is go away if I change the line feed from 'lf' to 'crlf' (.msh files). 'crlf' feeds should by used for Windows inp files.

    Although there are rounding errors (differences in the mantissa), only small values seem to be affected.
    I tested this on a simple displacement example as well. (first two images, overall results OK)

    I just noticed the difference.
  • So this is a CCX bug in reading .inp files with CRLF vs LF?
  • Hi,
    I can't tell. According to the guy, who makes builds, his build worked correctly on Windows. I think it's caused by something that is messed up in wine.
    I don't really want to comment it further, as this is related to CalculiX, not Mecway.
    The 'lf' vs 'crlf' difference comes from the difference between Win and Iinux, but it depends on how ccx.exe was built. I'd prefer the cygwin builds, and use 'lf' line feeds.
  • I installed Mecway using PLayonLInux and while it runs right after installation, I get this error any subsequent times when trying to run it. 

    Installed it as 64 bit on a 64 bit ubuntu system. 

    Doesn't even open...

    I tried copying and pasting tahoma.ttf into the fonts folder but that doesn't fix anything.

    Any thoughts?
  • I remember seeing this happen on Wine - it would work when installing but not the next time it's run. But I can't remember what fixed it. Maybe make sure .Net 2.0 is enabled? Or this could be a new problem with Mecway 7.
  • Hi,

    I am trying to install Mecway on Ubuntu 18.04.3 64bit with PlayOnLinux (which is an interface for wine used above) using the indications of whitequark of 2015 for Mecway 4.

    Unfortunatly, the current windows installer that can be downloaded (Mecway 12 -> mecway120.msi) is 64 bit only, and dotnet20sp1 does not work in 64 bit (see https://www.playonlinux.com/en/app-1071-POL_Install_dotnet20sp1.html). I tried to use a more recent version of wine (4.0.3) and dotnet480 which might work in 64 bit (see https://www.playonlinux.com/en/app-3637-POL_Install_dotnet480.html), but the installation of dotnet480 failed.

    So I have a couple of questions questions :
    • Does anyone use a more recent version of Mecway than version 4 ? Which combinaison of mecway / wine / dotnet ?
    • Where the older 32bit version of Mecway can be found ?
    • Is there any plans to distribute a linux version of Mecway ? Or indicate on the download page how the current version might work with wine/winetricks or playonlinux ?
    Thanks for your help
  • Older versions are currently available at:

    1 https://mecway.com/download/oldversions/mecway11.msi
    2 https://mecway.com/download/oldversions/mecway20.msi
    ...
    9 https://mecway.com/download/oldversions/mecway90.msi
    10 https://mecway.com/download/oldversions/mecway100.msi
    11 https://mecway.com/download/oldversions/mecway110.msi

    32-bit versions are
    1-7 above and
    8 https://mecway.com/download/oldversions/mecway80_32bit.cab
    9 https://mecway.com/download/oldversions/mecway90_32bit.cab

    Version 5 should work on Linux and I think I've tested it but don't know what versions of other software.

    I don't plan to actively support Mecway on Linux but can make small changes to help if I know what to do.
  • Hi Victor,

    Thank you for your help. I managed to install Mecway9 32 bit and run it with minimal workarounds using PlayOnLinux. I did some quick checks :
    - enter license key for full version : OK
    - opening existing liml file : OK
    - solve static model : OK
    - saving file : OK
    - using CCX : no, it is not included in the cab file

    So that's a very good news, thank you for the 32 bit installations files. I will do another post with the installation workflow I used.

    I have some new questions :
    - is it feasable to create a 32 bit version of Mecway12 ? Or too much work ?
    - I have no clue regarding the versions of dotnet and it's usage. It seems that there is ongoing devlopment to bring 64bit version of dotnet4.7.1 in winehq (). Does Mecway12 work with a specific version of dotnet in windows ? I ask to know if I manage to install dotnet in 64 bit if there is a chance that Mecway12 will work.
    - which ccx version should be used with Mecway ? Can I use a newer version of ccx with an older mecway ? I've not have time yet to install ccx

    Thanks
  • Here are the workflow I used to install Mecway 9. I used wine with PlayOnLinux :
    Versions :
    • Ubuntu 18.04.3 with kernel 5.3.0
    • Wine 3.0.5
    • PlayOnLinux 4.3.4
    • Windows version in wine : Windows XP (choosen automatically by PlayOnLinux)
    Installation :
    • Launch installation of an unknown program in PlayOnLinux
    • Choose install in new virtual disk
    • Choose the following components
    • Pol_Install_DotNet35 (Mecway 9 does not work on my computer with DotNet20 only)
    • Pol_Install_Tahoma
    • Choose a 32 bit installation
    • You cannot install directly a cab file, so when prompted for the installation file, I choose a previous version of mecway (mecway70.msi)
    • Side note : It is necessary to manually create the shortcut for the 32 bit version of mecway (both 32 and 64 bit are installed in Program Files/Mecway/Mecway7 - Choose /x86/mecway.exe and not /x64/mecway.exe)
    • I did not use Mecway7 but it seems to run
    • Proceed to install Mecway 9 : unzip mecway90_32bit.cab directly in the directory Program Files/Mecway/Mecway9 of wine virtual drive
    • Create a shortcut for Mecway9 : Click on configure button in the main menu, and then create a new shorcut for Program Files/Mecway/Mecway9/mecway.exe
    Note for Pol_Install_DotNet35
  • Thanks for working that all out.

    For your questions:

    I don't intend to release any more 32 bit versions of Mecway. It'll be difficult now because I've removed some of the 32 bit code.

    Mecway is supposed to work with .NET 3.5. However, on Windows at least, you can tell it to use .NET 4.0-4.8 if 3.5 is not available. Add the mecway.exe.config file (attached here, rename to remove .txt) in the same directory as mecway.exe. There's a risk that doing that might cause some bugs though, because it wasn't tested against 4.0+.

    The next version (Mecway 13) will probably require .Net 4.5 or higher.

    So far, Mecway seems to be compatible with all later versions of CCX, but not earlier ones. So the latest CCX (now 2.16) should be fine in Mecway 9.
  • Hi Viktor,

    I've managed to install mecway12 x64 with wine. I could not do it using PlayOnLinux because the installation of x64 .Net Framework is not supported yet. However there is a script on reddit to do so using only wine (https://www.reddit.com/r/wine_gaming/comments/8r6low/guide_how_to_install_net_45_on_64bit_prefixes/). I adapted this script to install .Net and then mecway (see below). Your mecway.exe.config file is essential to run mecway witout errors.

    Disclaimer : I do not understand all the process, I just gathered existing informations to make it work (existing tutorial and try and errors). It works with wine 4.0.3 but not with wine 4.15. There is no need to install the tahoma font for mecway12. I've had no time to test mecway12 fully under wine, but activation key, loading file, solving with ccx seems to work. I got an error message before the end of the installation (I did not write it down, maybe something about D3D), but the installation did not abort.

    For the future versions of mecway, it would be useful if you could release some informations about the dependencies (.net framework version and/or other ?) that are necessary for installation. So that the correct .Net Framework can be installed in wineprefix.


    #!/bin/bash
    # -------------------
    # -------------------
    # -------------------
    # This script :
    # - creates a 64-bit wineprefix with dotnet 4.7.1 64-bit
    # - installs Mecway
    # - launches Mecway
    #
    # This script is based on a tutorial by I_Got_2_Pickles on reddit : https://www.reddit.com/r/wine_gaming/comments/8r6low/guide_how_to_install_net_45_on_64bit_prefixes/
    #
    # This worked (once) to install and run mecway using :
    # - Ubuntu 18.04.3 (kernel 5.3)
    # - Wine 4.0.3 x64 (downloaded through PlayOnLinux)
    # - Mecway12
    # Use it at your own risks

    # Use instructions :
    # -------------------
    # Launch this script from ~/.winep
    # copy in ~/.winep the following files (see reddit tutorial for the links for .NET Framework installers)
    # dotNetFx40_Full_x86_x64.exe
    # NDP471-KB4033342-x86-x64-AllOS-ENU.exe
    # mecway120.msi
    # mecway.exe.config - see post above by Viktor

    # options
    # -------------------
    wdir=~/.PlayOnLinux/wine/linux-amd64/4.0.3/bin # directory with wine
    wpref=~/.winep/mecway_x64 # wineprefix directory

    # create new wineprefix directory
    # -------------------
    mkdir "$wpref/"

    # create wineprefix
    # -------------------
    # When asked, refuse to install mono
    WINEPREFIX=$wpref $wdir/wineboot --init

    # Remove mono if it's installed
    # -------------------
    # the following step from reddit tutorial does not work, but perhaps is not necessary
    # WINEPREFIX=$wpref $wdir/wine64 uninstaller --remove '{E45D8920-A758-4088-B6C6-31DBB276992E}'

    # Switch the prefix to Windows XP
    # -------------------
    # -> choose windows XP in the GUI
    WINEPREFIX=$wpref $wdir/winecfg

    # Install .NET Framework 4.0 (required for newer .NET Framework installation to work on wine):
    # -------------------
    WINEPREFIX=$wpref $wdir/wine dotNetFx40_Full_x86_x64.exe /q && WINEPREFIX=$wpref $wdir/wineserver -k

    # Change the prefix back to Windows 7 and mscoree dll overide
    # -------------------
    # -> choose windows 7 in the GUI
    # -> set mscoree to native in the dll overrides in the GUI
    WINEPREFIX=$wpref $wdir/winecfg

    # Install .NET Framework 4.7.1
    # -------------------
    WINEPREFIX=$wpref $wdir/wine NDP471-KB4033342-x86-x64-AllOS-ENU.exe /q && WINEPREFIX=$wpref $wdir/wineserver -k

    # launch mecway msi installer
    # -------------------
    WINEPREFIX=$wpref $wdir/wine msiexec /i "mecway120.msi"

    # launch mecway
    # -------------------
    # copy the file mecway.exe.config file given by Viktor in C:/Program Files/Mecway/Mecway12
    cp "mecway.exe.config" "/home/mathias/.winep/mecway_x64/drive_c/Program Files/Mecway/Mecway12"
    # launch the exe
    WINEPREFIX=$wpref $wdir/wine start "C:/Program Files/Mecway/Mecway12/mecway.exe"


  • Hi Viktor,

    Can you release the mecway.exe.config file needed to use Mecway 13 with wine ? I tried to use the file you gave previously for Mecway 12 with Mecway 13 but it did not work. I do not know yet if it is related to a change in this file or not.

    Thanks for your help
  • Version 13 has a mecway.exe.config installed with it. A difference is that it now requires .Net Framework 4.5 and probably no longer works with .Net Framework 3.5 because it includes IronPython which has that dependency.

    A minimal version of the file would look like:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
    </startup>
    </configuration>
    
    To allow higher versions like 4.7, which is probably OK, remove the sku attribute.
  • Hi Victor,

    I've managed to install mecway13 x64 with wine. In the end, I did not need to modify the Mecway.exe.config file. I share the script I used below for other users that might be interested to use Mecway 13 on linux.

    By the way, using Mecway 13 makes no difference with Mecway 12 for the problem I have with modal effective mass and density (https://mecway.com/forum/discussion/972/ccx-modal-mass-with-density-with-lumped-masses)

    Note about the script :
    - the previous script given above in 2019 for Mecway13 fails for Mecway12 (Mecway13 launches if mscoree is not set as native, but then it crashes)
    - the installation of dotnet is quite long (~15min)
    - during the installation of dotnet there will be frequent warning messages saying that dotnet can not execute correctly, but in the end it executes correctly all the same (warning message : "Le programme d'installation peut ne pas s'exécuter correctement, car le programme d'installation pour les modules Windows n'est pas installé sur cet ordinateur.")
    - I chose "restart later" when prompted by dotnet installation programs
    - the script can hang for a long time when the following message shows : "Running /usr/bin/wineserver -w. This will hang until all wine processes in prefix=/home/.../.winep/mecway13_x64 terminate". Just wait.


    #!/bin/bash
    # -------------------
    # -------------------
    # -------------------
    # This script :
    # - creates a 64-bit wineprefix with dotnet 4.7.1 64-bit
    # - installs Mecway
    # - launches Mecway
    #
    # This worked to install and run mecway using :
    # - Ubuntu 20.04
    # - Wine 5.0.3
    # - Mecway13 64 bits
    # Use it at your own risks
    #
    # Use instructions :
    # -------------------
    # Launch this script from ~/.winep
    # copy in ~/.winep the following files
    # mecway130.msi

    # options
    # -------------------
    wdir=/opt/wine-stable/bin # directory with wine
    wpref=~/.winep/mecway13_x64 # wineprefix directory

    # create new wineprefix directory
    # -------------------
    mkdir "$wpref/"
    export WINEPREFIX=$wpref

    # create wineprefix
    # -------------------
    # If asked, refuse to install mono
    $wdir/wineboot --init

    # Install .NET Framework 4.7.1
    # -------------------
    winetricks --force dotnet471

    # launch mecway msi installer
    # -------------------
    winetricks win7
    $wdir/wine msiexec /i "mecway130.msi"

    # launch mecway
    # -------------------
    $wdir/wine start "C:/Program Files/Mecway/Mecway13/mecway.exe"
  • edited July 2022
    New user here.

    I can report that running Mecway 15 on Ubuntu 22.04 through wine 7 is running smooth.

    I simply installed wine and installed the mecway .msi file with it, and launch it through the dashboard.

    terminal commands (leave out comments and $):
    # enable 32 bit architecture
    $ sudo dpkg --add-architecture i386

    # add wine repository
    $ wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
    $ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ impish main'

    # update repositories
    $ sudo apt update

    # install wine
    $ sudo apt install --install-recommends winehq-stable

    # wine configuration. confirm installation of wine mono. I set mine to run Windows 10. I had to scale the resolution DPI on the slider to make everything a readable size. Depending on your resolution, you can fiddle with this too
    $ winecfg

    # begin installation
    $ wine start mecway150.msi

    Follow the simple installation, and voila - mecway 15 is installed and can easily be run directly from the Ubuntu dashboard.
  • Thanks for confirming this, @traemand, and especially the detailed steps. I don't test on Linux with each release so it's good to hear it still works!
  • Confirmed: works perfectly well under ubuntu 22.10 and mecway18. Phil.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!