Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking to help out, SW2022 up and running! #29

Open
ripxorip opened this issue Dec 30, 2022 · 40 comments
Open

Looking to help out, SW2022 up and running! #29

ripxorip opened this issue Dec 30, 2022 · 40 comments
Labels
bug Something isn't working question Further information is requested

Comments

@ripxorip
Copy link

Hi @cryinkfly , I have been spending my xmas getting sw2022 up and running on wine. Wanted to share some points/ask some questions.

  • I never managed to get the normal setup.exe working no matter what. Ended up installing using swwi/data/solidworks.msi which went fine. However, as mono is missing regasm.exe I had to use winetricks to install native dotnet instead. Have you ever been able to run 2022 without native dotnet? There is no wintricks for dotnet in your installers.
  • It seems to be important to chose the right wine version, I have tried 7.22, 6.8, 8(rc2) and finally 7.8 and it is only 7.8 that works on my system (otherwise I get page faults in mfc140u.dll).
  • My current setup works for parts and small assemblies. As soon as I load a larger step file for instance I get a page fault. (+seh logging). Is this something you have observed as well? Seems to be related to msxml6, but it wont save/open files without it for obvious reasons.
  • Debugging the app is hard, when starting the debugger I get a crash before the app has loaded sldappu -> mfc140u (pagefault). And I cant attach the debugger. Running with +trace seems also to break the app.

I really want to contribute to get this software working as it runs really smooth on my system when it actually is working. Just want to iron out the 'final' bugs. Do you think you can point me in the right direction?

Happy new year!

@cryinkfly cryinkfly added the bug Something isn't working label Dec 31, 2022
@cryinkfly
Copy link
Owner

Hey @ripxorip , Yes, there are still some problems with the package dependencies at the moment. Because the combination of Wine and Wintricks as well as certain DLL's play an important role in the porting of SolidWorks to Linux.

Because not only "mfc140u.dl" causes such problems, but also VBA 7.x itself!

Because this version is now being used in more and more programs and it is not yet properly supported under Wine.

But it is precisely these problems that I would like to get rid of next year!

Anyway, I'm glad you're offering to help me.

There will soon be a DoDo list where you can take a look.

Otherwise, I wish you a happy new year!

Cheers Steve

@ripxorip
Copy link
Author

ripxorip commented Jan 1, 2023

I managed to get large assemblies working now as well, after some debugging I concluded that it actually crashed in the native msxml6.dll. I went back to the builtin msxml and now it errored out in that code instead. Managed to dump some of the memory before the crash and It mangled the attribute for some elements when writing the XML to string.

Wrote this patch for the 7.8 release which makes it work, (remove the msxml6* from winetricks obviously).
msxml_7.8_patch.txt

I still have some bugs left to smash, the most prominent one seems to be that the app crashes after closing all documents and then opening new ones. Seems fine as long as there is always one document open. But I can live with that :)

Will also try to make my spacemouse play nice with Wine.

@iblue
Copy link

iblue commented Jan 28, 2023

@ripxorip Could you give me a hint on how to install it? The solidworks.msi installation finishes, but doesn't produce any .exe files while the setup.exe hangs at the "Checking for client installations..." stage. I'm using wine 7.8 on Arch linux.

@maikramer
Copy link

Where is this msi file? Can you provide a way to download or find it?

@iblue
Copy link

iblue commented Jan 29, 2023

It is swwi/data/solidworks.msi on the Solidworks DVD.

@nathaneltitane
Copy link

nathaneltitane commented Feb 22, 2023

@ripxorip were you able to refresh the installer pages and options prior to getting the install done? having a hard time selecting components... in process of installing the whole 2022 premium suite. could'nt deselct items as the setup window interface was not changing or showing selections when prompted.

@iblue
Copy link

iblue commented Feb 22, 2023

@nathaneltitane You can switch to another window and then back to refresh the window. At least on my machine.

@nathaneltitane
Copy link

nathaneltitane commented Feb 22, 2023

@nathaneltitane You can switch to another window and then back to refresh the window. At least on my machine.

that's what I had been doing, but still no refresh for the 'change' submenu on component selections...

EDIT:

For anyone having the same issue with the installer: click on the little pencil, not the link!

Fixed.

@nathaneltitane
Copy link

@ripxorip

It seems to be important to chose the right wine version, I have tried 7.22, 6.8, 8(rc2) and finally 7.8 and it is only 7.8 that works on my system (otherwise I get page faults in mfc140u.dll).

could you please provide clear steps as to how to make sure only 7.8 components are installed?
manual install? apt install? package download?

Thank you

@ripxorip
Copy link
Author

Sorry for the delay guys, I fixed several "bugs" to get solidworks running smooth. Made my own wine-fork with the fixes, compile that and give it a try. I just need to go through it once more and make it public. Currently some hacky debug prints all over, I based it on Wine 8 RC3 (I think). Some fixes I got upstreamed and some needs to be fixed in libxml.

@ripxorip
Copy link
Author

Also, I will try to make a PR with a new bash script that I use for the install. Works reliably with my wine fork and Arch, but that shouldnt matter if you use my fork. :)

@nathaneltitane
Copy link

nathaneltitane commented Feb 22, 2023

Also, I will try to make a PR with a new bash script that I use for the install. Works reliably with my wine fork and Arch, but that shouldnt matter if you use my fork. :)

cool, thanks - last question: is your install standalone or flexnet?

EDIT: @ripxorip - I've tried every combination I could of setups and none of them has worked for me. This is becoming increasingly annoying.

Are you sure 7.8 was the only way to get it in?

@cryinkfly cryinkfly added the question Further information is requested label Mar 12, 2023
@dzervas
Copy link
Contributor

dzervas commented Mar 30, 2023

@ripxorip I see that you made a PR to upstream wine. Was that the problem?

Also can you please provide your script to be able to install sw?

EDIT: I got it working by using wine-git (AUR) and winetricks -q vcrun2019 dotnet48 win10! Wow!

The msi installer did not finish though.
And I have a standing issue where the pointer is not in sync with solidworks. Solidworks needs to be either fullscreen and/or in virtual desktop, otherwise the pointer is some pixels below from what I see on the screen. Maybe i3wm problem?

EDIT 2: I'm trying the normal installer to play nice and cabextract 1.10 is buggy. remain in 1.9 till 1.11 is released
I installed msxml6 msxml4 msxml3 without luck but ie8 fixed a lot of bugs.
I'd like to try the msxml7.8 patch of @ripxorip as it's not upstream yet, it's still applicable

@ripxorip
Copy link
Author

Hi @dzervas the msxml people didnt wanna merge the PR because they thought the issue was in Wine. The WINE PR is merged. You need to press enter a few times when the installer freezes. I have been getting RSI in my fingers lately, but will try to clean up my wine fork and make it public as soon as possible. I also have a working bash script that always succeeds installing SW (and believe me many times it has been...). Just need to clean that one a bit too as my keys are there now.

@ripxorip
Copy link
Author

Check the msi log when running that one standalone, will give you a hint what you need to patch.

@ripxorip
Copy link
Author

Here is the patch I am using when compiling my wine fork: https://gist.github.com/ripxorip/b8ec337319bfda0e930d887839351fce

@ripxorip
Copy link
Author

ripxorip commented Mar 30, 2023

This is the (not so clean) script I am using to setup the prefix:

#!/bin/bash

source environment.sh

rm -rf $WINEPREFIX
mkdir -p $WINEPREFIX

mkdir tmp
cd tmp

cp ../files/VBA/vba7.1.zip ./
unzip vba7.1.zip
cp -r vba7.1/Program*s $WINEPREFIX/drive_c
cp -r vba7.1/Program*x86* $WINEPREFIX/drive_c
cp -r vba7.1/windows $WINEPREFIX/drive_c
cd ..

winetricks dotnet48 vcrun2019 d3dcompiler_47 corefonts

cd tmp
cp ../files/VBA/vba71-kb2783832-x64.msp ./
msiexec /p vba71-kb2783832-x64.msp REINSTALL=ALL REINSTALLMODE=omus /qn
cd ..

rm -rf tmp

$WINE winecfg -v win10

@ripxorip
Copy link
Author

Here are the important bits of the install script:

$WINE msiexec /i _solidworks/mnt/swwi/data/solidworks.msi /L*V sw_install_log.txt
cp files/glu/glu32.dll $WINEPREFIX/drive_c/Program\ Files/SOLIDWORKS/

@ripxorip
Copy link
Author

You need to run it in Windowed mode otherwise the pointer is off, same for me. I think it has with something to do with the compositor you are using. Im on Plasma with the same behavior.

@ripxorip
Copy link
Author

ripxorip commented Mar 30, 2023

I also have an alpha ready for Spacemouse integration, that was crazy hard due to all the dotnot crazyness of Solidworks. Hard to find good documentation/support from Dassault also...

@ripxorip
Copy link
Author

ripxorip commented Mar 30, 2023

@nathaneltitane See my gist, compile wine after checking out d059dd1cd07 (7.8) and applying that patch. The create the prefix like my previous comment.

@dzervas
Copy link
Contributor

dzervas commented Apr 1, 2023

wooo, thank you! will test it soon!

@ripxorip
Copy link
Author

ripxorip commented Apr 2, 2023

No problems, hope it works for you as well!

I also plan to try to make a flatpak of my changes.

@dzervas
Copy link
Contributor

dzervas commented Apr 2, 2023

there’s no possibility to run in a bottle right? needs the specific wine version with the patch (maybe we can use soda, lutris or wine-ge?)

@dzervas
Copy link
Contributor

dzervas commented Apr 5, 2023

I installed the msi successfully!
I’m currently working on steamdeck (I’m not at home) and I used the following:

https://github.com/flathub/org.winehq.Wine branch stable-22.08

diff --git a/org.winehq.Wine.yml b/org.winehq.Wine.yml
index 4702344..ad2be8e 100644
--- a/org.winehq.Wine.yml
+++ b/org.winehq.Wine.yml
@@ -393,9 +393,13 @@ modules:
       - UPDATE_DESKTOP_DATABASE=/bin/true
       - INSTALL_PROGRAM_FLAGS=-s
     sources: &wine-sources
-      - type: archive
-        url: https://dl.winehq.org/wine/source/8.0/wine-8.0.tar.xz
-        sha256: 0272c20938f8721ae4510afaa8b36037457dd57661e4d664231079b9e91c792e
+    #- type: archive
+      - type: git
+        url: https://gitlab.winehq.org/wine/wine.git/
+        commit: d059dd1cd0770e9c63da33562f6bcba4ef52846b
+
+        #url: https://dl.winehq.org/wine/source/8.0/wine-8.0.tar.xz
+        #sha256: 0272c20938f8721ae4510afaa8b36037457dd57661e4d664231079b9e91c792e
         x-addons-url: &wine-addons-url >-
           https://source.winehq.org/git/wine.git/blob_plain/refs/heads/stable:/dlls/appwiz.cpl/addons.c
         x-checker-data:
@@ -407,6 +411,7 @@ modules:
       - type: patch
         paths:
           - patches/wine/loader-prefer-winedllpath.patch
+          - patches/wine/ripxorip_wine_patches.patch
 
   # 32-bit compatibility build

the file patches/wine/ripxorip_wine_patches.patch is your gist

@ripxorip
Copy link
Author

ripxorip commented Apr 5, 2023

Wow! Excellent, Ive got a steam deck as well, are you rebuilding the wine flatpak?

@dzervas
Copy link
Contributor

dzervas commented Apr 7, 2023

oh yes yes, git clone, apply the patch and flatpak-builder. (side note: steam deck does not come with a flatpak builder so you'll have to install it from flatpak 😂 )

@dzervas
Copy link
Contributor

dzervas commented May 29, 2023

On a side note: you can 7z x PreReqs/VBA/vba71.msi -o$WINEPREFIX/drive_c/Program\ Files/Common\ Files/Microsoft\ Shared/VBA/VBA7.1/

@dzervas
Copy link
Contributor

dzervas commented May 29, 2023

also @ripxorip I see that you use a glu32.dll. What is it? where did you find it? Why did you need it?

I see that it lives under C:\Windows\SysWow64\glu32.dll (it's also in system32 but that's 32-bit I imagine) on a normal Windows installation. I copied it and set winecfg to native then builtin
Didn't see any difference

@ripxorip
Copy link
Author

On a side note: you can 7z x PreReqs/VBA/vba71.msi -o$WINEPREFIX/drive_c/Program\ Files/Common\ Files/Microsoft\ Shared/VBA/VBA7.1/

Great gonna try that! :)

@ripxorip
Copy link
Author

also @ripxorip I see that you use a glu32.dll. What is it? where did you find it? Why did you need it?

I see that it lives under C:\Windows\SysWow64\glu32.dll (it's also in system32 but that's 32-bit I imagine) on a normal Windows installation. I copied it and set winecfg to native then builtin Didn't see any difference

GLU is needed when sketching as far I can remember.

@dzervas
Copy link
Contributor

dzervas commented Jun 2, 2023

Welp, when I try to make any kind of curve on a sketch I get a crash from glu. I did the above but nothing worked

Where did you find your glu32.dll? is it under system32 or syswow64?
I have both glu and lib32-glu linux packages installed

image

@dzervas
Copy link
Contributor

dzervas commented Jun 2, 2023

AHA!
Just copying C:\Windows\System32\glu32.dll from a windows installation worked! No DLL overrides needed either

@CRT-HAO
Copy link

CRT-HAO commented Aug 5, 2023

I successfully installed and running using the same way on my Apple Silicon Mac with CrossOver.
截圖 2023-07-08 上午1 55 59

@ripxorip
Copy link
Author

ripxorip commented Aug 6, 2023

Thats so cool! 👍

@thuvasooriya
Copy link

thuvasooriya commented Oct 19, 2023

#29 (comment)

@CRT-HAO Hi, I'm also trying to do this via crossover but finding it difficult to make it work, could you please give a rundown of the steps you followed.

@silikonz
Copy link

#29 (comment)

@thuvasooriya If it crashes with error in concrt140.dll just set it to Native, builtin in DLL overrides in wine configuration. This fixed it for me.

@thuvasooriya
Copy link

#29 (comment)

@thuvasooriya If it crashes with error in concrt140.dll just set it to Native, builtin in DLL overrides in wine configuration. This fixed it for me.

Sorry I find this hard to follow, can you please point me to which steps did you follow exactly

@nathaneltitane
Copy link

anyone get past this dialog? did anyone manage to setup winetricks to show dialogs appropriately?

image

@dzervas
Copy link
Contributor

dzervas commented Nov 29, 2023

Can't get sldIM to work properly - tried 2022 through 2024, nothing
The only way to install is to do an offline download from windows and run swwi/data/solidworks.msi in wine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants