Developing windows applications in linux

Developing Windows applications on Linux? [closed]

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

  • g++ for compilation and cross-compilation.
  • CMake
  • WxWidgets
  • . for making windows installer packages
  • wine for testing of the windows version
  1. What are some free (or even better open source) installers for Windows that I might use to create the final package? It would help if the package could be prepared from Linux.
  2. Will Wine be enough to test the cross compiled version (after all the logic is tested in the Linux version)?
  3. Is this a good idea? 🙂

If you have a copy of Windows handy, running a VirtualBox instance of it couldn’t hurt for testing either.

For testing at least Virtual Box is good, of course the best is a Windows installation it self.. Try writing that app in Windows. I like linux my self. but if your Building for Windows. Programming in windows its the best you can do (for windows applications of course).

7 Answers 7

Check Qt too. It’s a very rich cross-platform framework.

As for installers I’d highly recommend WiX.

For testing it will be much better to use some kind of virtualization like Sun Microsystems’s VirtualBox. I believe you could use a trial version of Windows or Windows 7 RC, which is free to use until March 2010.

Qt sucks. Application written in Qt will definitely not look like Windows one and the licensing is not very good. One will have to pay for commercial license some big money to Qt supporting company. This will be the case for linking statically as well. So doing Qt application cross-platform where one needs to pay vs create a native looking application for free. You hopefully get the idea. 😉

First of all, yes it is a good idea. I have several projects where I maintain their Windows version in this way.

In any case, I suggest you test the final product on a Windows machine. If you have a license for Windows OS, you may use virtualization to do final tests.

I suggest using Autotools which has very good cross-compilation support and works «natively» with a cross-compiler.

Under Debian for example, running

./configure --host=i586-mingw32msvc 

This would create the correct cross-compilation makefile as if this was a Unix project.

In any case, I would recommend developing a cross-platform version and a time-to-time test native Windows version with Wine/Windows by cross-compiling them.

Is it a disadvantage that we won’t be able to use profilers? And more over if I understand correctly the optimization procedures vary considerably from one OS to other. How could I tackle this? Or is it better to get something working and bother about optimization at the final testing in Windows , as you have mentioned.

Читайте также:  Основные команды для линукс

You imply that the applications are for Windows only and not cross-platform, in which case I think the answer to 3. — This is really not a good idea — trumps the rest.

The reason being you are going to have to extensively test the application under Windows anyway, either directly or in a virtual instance. That being so you’re better to develop under the target OS because you’re more likely to produce a better application — both from catching the bugs earlier and more thoroughly and ensuring your application ‘works’ for your users. I certainly wouldn’t trust just Wine.

I’m not a big fan of cross-platform widgets. Like Java applications you generally end up with something that doesn’t quite look right, and like the uncanny gap that can be enough to make your application smell bad to a large section of your users. Even at the slightly more abstract level, each OS’s applications have a slightly different feel as to how they work and you’ll most likely end up with a Windows application that feels like a, say, KDE one, which will again put your users off.

So yes, certainly possible to do this, but probably not the optimal approach from point of view of the quality of the end product. To do so will give yourself something of a handicap with what you produce and I’d say that’s likely to offset the convenience to you of using a Linux platform. Actually I’d be surprised if you manage even that because I’d bet you’ll spend more time messing around with the widgets trying to fine-tune them so they work right under real Windows than you’ll gain from using an unfamiliar Windows toolset.

Источник

It is possible to run winforms app in ubuntu?

I have an application written on top of .Net framework 4.5 and C# using Visual Studio 2015 Community . I created it in Win10 OS in 64 bit machine. Is there any possibilities to run this application in Ubuntu ? Then how can I compile the application to make it compatible for ubuntu machine? I would like to deploy it as a cross-platform application but I have a hard time figuring out the best way. I heard about Mono but I am not yet familliar with the IDE. Please help.

I think it’s impossible, becouse WinForms is a wrapper over WinAPI functions, which may have no analog in Ubuntu.

That’s bad to hear, but i found winforms application created in Mono and they say that it can also run in ubuntu. My problem for this approach is i dont know how to compile my application in Mono to work in ubuntu.

Читайте также:  Find file in linux with text

But it refers that you can create a winforms application using Mono but i dont want to start from the beginning. The biggest of my problem encounter is how can i compile my application to make it compatible for ubuntu. tsk

2 Answers 2

Unless you’re using special .NET classes or native libraries it should be possible and easy.

Since the .NET compiled executables are built on bytecode, they aren’t linked to a specific platform and Mono has been designed with this in mind.

Supposing you’ve just tested an application named «WindowsApplication», try to follow these steps:

Check under your Visual Studio projects folder, try to locate your WindowsApplication.exe. Check «C:\Users\YourName\Documents\Visual Studio\Projects\WindowsApplication\WindowsApplication\bin\Debug (or Release)

After installing Mono on your Ubuntu system check if the mono command is available in your folder (for this test just use your home dir):

username@locahost ~ $ mono —version Mono JIT compiler version 5.0.1 (Visual Studio built mono) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: normal SIGSEGV: normal (more output)

Copy your program executable from Windows into the Ubuntu folder, let’s suppose you copied to the directory where you just tested mono.

Launch it by typing: mono ./WindowsApplication1.exe (if it’s in your current directory) or mono //WindowsAppliction.exe

In case it didn’t run you can download the «Mono Migration Analyzer» (MoMA), which is a tool specifically designed to identify unresolved dependencies and help you solve the problem.

Источник

Developing Windows applications on Linux?

Check Qt too. It’s a very rich cross-platform framework.

As for installers I’d highly recommend WiX.

For testing it will be much better to use some kind of virtualization like Sun Microsystems’s VirtualBox. I believe you could use a trial version of Windows or Windows 7 RC, which is free to use until March 2010.

Solution 2

First of all, yes it is good idea. I have several projects that I maintain their Windows version in this way.

In any case, I suggest you test the final product on Windows machine. If you have a license for Windows OS, you may use virtualization to do final tests.

I suggest to use Autotools that has very good cross compilation support and works «natively» with a cross compiler.

Under Debian for example running

./configure --host=i586-mingw32msvc 

This would create the correct cross compilation makefile as if this was Unix project.

In any case, I would recommend to develop a cross platform version and time-to-time test native Windows version with Wine/Windows by cross compiling them.

Solution 3

    • InstallJammer allows you to create installers for *nix and Windows. I am not sure if it allows cross creation of installers (i.e. creating Windows installers from *nix). A commercial option with demo available to try is the Bitrock InstallBuilder.
    • Maybe. If you have a Windows license, Dav’s suggestion would be better.
    • If it helps you work better/more efficiently & effectively, sure.
Читайте также:  Создать efi разделы linux

Keep us posted on how you get on — this is interesting.

Solution 4

You imply that the applications are for Windows only and not cross-platform, in which case I think the answer to 3. — This is really not a good idea — trumps the rest.

The reason being you are going to have to extensively test the application under Windows anyway, either directly or in a virtual instance. That being so you’re better to develop under the target OS because you’re more likely to produce a better application — both from catching the bugs earlier and more thoroughly and ensuring your application ‘works’ for your users. I certainly wouldn’t trust just Wine.

I’m not a big fan of cross-platform widgets. Like Java applications you generally end up with something that doesn’t quite look right, and like the uncanny gap that can be enough to make your application smell bad to a large section of your users. Even at the slightly more abstract level, each OS’s applications have a slightly different feel as to how they work and you’ll most likely end up with a Windows application that feels like a, say, KDE one, which will again put your users off.

So yes, certainly possible to do this, but probably not the optimal approach from point of view of the quality of the end product. To do so will give yourself something of a handicap with what you produce and I’d say that’s likely to offset the convenience to you of using a Linux platform. Actually I’d be surprised if you manage even that because I’d bet you’ll spend more time messing around with the widgets trying to fine-tune them so they work right under real Windows than you’ll gain from using an unfamiliar Windows toolset.

Solution 5

You will need an MSDN licence anyway to get access to all the multitude of versions of Windows you’ll want to test on.

You’ll want to install the test OSs on VMs. This could be on your Linux desktop, but a dedicated box might be better.

I don’t know how many versions of Windows you plan on supporting, but you should definitely test on all of them. Wine is not Windows, nor is Windows XP the same as Windows Vista, Windows 7, etc. There are also a lot of different distributions and languages of Windows, some of which you should undoubtedly test on.

By all means, develop on Linux. By all means, use cross-platform widgets (yes, these are good). But you’ll still need your MSDN licence so you can install test OSes.

Источник

Оцените статью
Adblock
detector