How can I compile my exe to ensure compatability with wine?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
chepetico
Level 1
Level 1
Posts: 8
Joined: Thu Sep 04, 2014 10:40 pm

How can I compile my exe to ensure compatability with wine?

Post by chepetico »

Hello Everyone!

I just launched my own website at http://www.chepetico.info/pages/home.aspx where I'm offering my C# programs for download. I've recommended Wine for those with Ubuntu and OSX so they can download and try them out if interested. I attempted to install one of the programs with Wine and after installing the exe it won't run. Is there a way I can compile my C# programs to ensure they can be installed by Wine?

Thanks!

Joe King :mrgreen:
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: How can I compile my exe to ensure compatability with wi

Post by dimesio »

According to your website, your apps require .NET 4.0 and WPF. Mono does not implement WPF and is unlikely ever to do so, so your apps as written are probably not going to ever run out of the box in Wine. https://bugs.winehq.org/show_bug.cgi?id=24501

I did download and try your My Sudoku 3.0, and winetricks dotnet40 seems to make it work. (I didn't play a full game.)
chepetico
Level 1
Level 1
Posts: 8
Joined: Thu Sep 04, 2014 10:40 pm

Re: How can I compile my exe to ensure compatability with wi

Post by chepetico »

Hello dimesio,

I'm surprise My Sudoku 3.0 worked, the front end is written in WPF. After I submitted this post I obsessively searched for the issue and noted that Wine does not support WPF applications :oops: . One work around I was considering was attaching a portable class library targeting my WPF application for Silverlight and recommending that Linux users install Moonlight along with Wine but if dotnet40 works...

Thanks you for your help, I truly appreciate you taking the time to try to run one of my apps! I'm running a 64 bit version of Ubuntu and Wine. I was trying to install dotnet40 last night but was getting an error, sorry I do not have my computer with me at the moment, stuck at my day :cry:, so I do not recall the specific error but you may hear more from me later tonight.

However, even if this works I'm still considering attaching a portable class libary to my projects so that the GUI can run on Silverlight if WPF is not available. Do any former .Net programmers have any experience with the portable class library?

Thank you,
Joe
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: How can I compile my exe to ensure compatability with wi

Post by dimesio »

Moonlight is a dead project, and Wine never used it. There has been some ongoing work to get Silverlight working better in Wine, but there are still bugs. You might want to take a look at the Pipelight project, which uses a patched version of Wine to run Silverlight in native Linux browsers. Or just tell your users to install winetricks dotnet40.
I'm running a 64 bit version of Ubuntu and Wine. I was trying to install dotnet40 last night but was getting an error,
It was probably about the architecture of the wineprefix. You need to create a 32 bit wineprefix and install to that. http://wiki.winehq.org/FAQ#32_bit_wineprefix
chepetico
Level 1
Level 1
Posts: 8
Joined: Thu Sep 04, 2014 10:40 pm

Re: How can I compile my exe to ensure compatability with wi

Post by chepetico »

Hi dimesio

I've tried to download wine 1.4-1386 and dotnet40 and I'm running into the following issues. With wine 1.4-i386 I can download and run My Sudoku 2.0 which is a console application. Once I download dotnet40 I cannot run My Sudoku 3.0 and My Debtonator or My Sudoku 2.0. Which version of wine and dotnet40 are you using as you mention My Sudoku 3.0 is running on your system?

Thanks,
Joe King
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: How can I compile my exe to ensure compatability with wi

Post by dimesio »

Wine 1.4 is over two years old and no longer supported. I originally tested in 1.7.25 and just retested in 1.7.26, and it still works. I used winetricks to install dotnet40. As I mentioned above, this is in a 32 bit wineprefix; winetricks dotnet40 won't work in a 64 bit wineprefix.
chepetico
Level 1
Level 1
Posts: 8
Joined: Thu Sep 04, 2014 10:40 pm

Re: How can I compile my exe to ensure compatability with wi

Post by chepetico »

Hi dimesio!

I downloaded Wine 1.7-i386 and Winetricks DotNet40 and My Sudoku 3.0 and My Debtonator are now working!

Thanks again!
Joe
Locked