views:

400

answers:

5

My Windows application runs under Wine, but the installation is a bit of a headache for laymen, and the wrappers I've seen online (PlayOnLinux, Wine Doors) require even more packages to be installed. Is there a way to make a package that will install Wine if the user needs it to be installed, install the application and shortcuts, all with minimal user hassle?

+4  A: 

I don't believe there's any pre-made way to do this, but you could probably make a Debian package pretty easily that would depend on Wine, copy an MSI onto the machine, then run Wine's msiexec /i /q as the post-install script

Edit: Make sure to think about the uninstall case too! I.e. in the pre-uninstall script, run msiexec again as well.

Paul Betts
A: 

As a user of Windows applications (mostly under Windows), I really wish that most of them just came as a zip file and not an installer executable. You never know what it's doing to your system, and most of them don't uninstall cleanly. The worst case I've seen was InterVideo Home Theater - upon uninstall my optical drive stopped working. The stupid program not only installed drivers without warning, it removed them on uninstall without removing the registry entries pointing to them, thus breaking my system in a hard-to-diagnose way (a layman would have resorted to reinstalling Windows).

Also, I suspect installing Wine should be up to the user - it's a rather large thing to "bundle" with a program, and anyway the best way to install it depends on their distro.

Hugh Allen
-1 Although I agree with you, this is a rant, not an answer to the question.
Piskvor
That is correct :)
Hugh Allen
+4  A: 

You can bundle Wine -- that's what Picasa does -- or you can just make your package list Wine as a dependency; then the user's package manager will automatically install Wine for the user when they install your package.

Ideally your Linux package wouldn't run the Windows installer, but rather have all the files already unpacked.

The trick is to arrange for the files your package installs in /usr to show up in each user's .wine directory. You can look at how Picasa does this, but really the Wine community needs to document how to do this much better.

As always, ask at winehq.org if you need more info.

A: 

Answer is simple:

    1. Create Elf installer
    2. Pack Elf installer onto Exe installer resources
    3. Exe installer should unpack Elf installer on startup
    4. Exe installer must tries to run Elf installer after unpack(system call or some think)
    5. If operation fail, we do normal install
    6. If operation didn't fail, we close Exe installer
+1  A: 

If you'd like to target the Mac OS, you can use WineBottler: http://winebottler.kronenberg.org/

This project exists just for bundling Wine into a native Mac .app bundle in a way that's fairly hidden from the user.

Troy
Will take a look, thanks.
zaratustra