简体   繁体   中英

Can a desktop application written for Windows run on Linux?

Can a desktop application designed for the Windows platform (for example, using MS Visual Studio ) run on a Linux platform too? If so, please give some suggestions on what should be done to prepare for this.

Given your tags, I assume it's a .NET application. With that assumption, you should look at the Mono project . Your app may run without change; it may run after minor changes; it may fundamentally need bits of .NET which haven't been implemented in Mono yet.

To consolidate and extend some above answers...

If you are careful about the "library" classes that you've used, it may run under Mono.

Failing that, the next easiest choice, WiNE may allow you to run the application directly on Linux.

If all else fails, it's always possible to create a virtual machine (using VirtualBox or something similar) and do a full Windows install on the Linux machine to run your software.

If you are going to use Mono, you should check MoMA . It's a tool that can help you identify compatibility issues.

It might work with wine . But not all applications are supported.

The easiest way to do this is to write your application using the GTK# controls exclusively.

Also, make sure you are compiling and running your code using Mono on Windows to ensure you don't use any functions or libraries that the Mono runtime does not support or hasn't yet duplicated all the functionality.

您也可以使用trolltech的Qt。

If you built it using .net it can run with mono. There are other possibilities as well, but we would need more details. UI, libraries, threading, other stuff.

You can run with Mono, but there are some compatibility problems when you get into Winforms. If you are Using WPF, then I don't think there is adequate support in Mono yet to even attempt this. The best way, although probably not an option for already coded projects, is to use GTK, which is supported very well by Mono, and will run in both Windows and Linux.

另一个添加到答案堆中的跨平台工具包是wxWidgets

If you have enough flexibility in terms of the platform/language you can choose you may have many options that are not .Net specific.

  • Java (I'd say the easiest to pick up and the most mature platform in the list because of it's huge user base and the number of books and documents available)
  • Python/TkInter
  • Ruby (has many GUI toolkits)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM