Build MSI in Wine

喜你入骨 提交于 2019-11-30 21:47:31

问题


Hoping this is still on-topic for StackOverflow.

I'm doing all my development on a Linux machine, but the code will be run by both Linux and Windows machines.

I'd like to use Linux to compile the code, and I have mingw-32 and mingw-w64 for that.

But I'd like to package the resulting executables into a nice MSI installation file. Is it possible to do this using utilities in Linux or running under Wine?

Thanks!


回答1:


You can use a combination of Wine, Mono and WiX to create .msi packages on Linux.

For openSUSE, I have created a wrapper package called wixwine which gives you the 'candle' and 'light' commands from the Windows Installer XML (WiX) toolset ready to use on Linux.

You can find my wixwine package here




回答2:


I just released v0.01 of msitools, a collection of utilities to inspect and create Windows Installer files. It is based on the Wine code, but ported to POSIX.

You can find the source and binary packages at http://bonzini.fedorapeople.org/ - unfortunately you will need to build libgsf from git, because I found a bug and no released version has the fix as of now. The linked page has Fedora RPMs with the fix.

$ msiinfo streams ~/download/Firefox-16.0.2-it.msi 
Binary.New
Binary.Up
Binary.info
Binary.dlgbmp
Binary.CustomBin
Binary.bannrbmp
Binary.completi
Binary.custicon
Binary.exclamic
Binary.insticon
Binary.removico
Binary.repairic
_MAKEMSI_Cabs.MM01.cab
Binary.BannerGraphic.BMP
Icon.firefox.16.0.2.0.ico.exe
DigitalSignature
SummaryInformation
$ msiinfo extract ~/download/Firefox-16.0.2-it.msi _MAKEMSI_Cabs.MM01.cab > firefox.cab
$ cabextract -l firefox.cab
Viewing cabinet: firefox.cab
 File size | Date       Time     | Name
-----------+---------------------+-------------
    917984 | 24.10.2012 12:50:38 | firefox.exe
     18912 | 24.10.2012 12:50:38 | AccessibleMarshal.dll

There is a companion utility msibuild to build MSIs. It is very low-level, but you can use the two tools together to make small changes to an MSI you already made on Windows.

update: now hosted at https://live.gnome.org/msitools, it also has a tool (wixl) that supports a subset of the WiX XML. Requires libgsf 1.14.25 or newer. Fedora 18 and newer have it packaged.



来源:https://stackoverflow.com/questions/10240484/build-msi-in-wine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!