lessmsi
lessmsi copied to clipboard
Make it work on Mac/Linux
from https://code.google.com/p/lessmsi/issues/detail?id=5
Why would you want an MSI tool to work on a platform that doesn't support MSI?
to get the files out of the msi
@activescott Thanks -- I am definitely interested in Linux support. Is there anything you need done in particular? I have a need and can probably throw some time at the problem.
Though I think CI calls it passing, at the moment, I'm seeing the following for lessmsi/src/LessMsi/LessMsi.csproj: Error initializing task ItemGroup: Not registered task ItemGroup.
That said, I could certainly be missing something obvious. Any suggestions?
@smaresca Now that the cab support was recently done in a linux-compatible way, the next work area for linux support is really the wixcab calls that interact with the msi API. WINE has at least some if not all of the calls already done, just need to find a good way to extract/package them and keep the install light. If you want to work on this area with me, let me know and I'll dig out some notes on the topic and try to give some direction. A partner in crime on something like this will motivate me!
The ItemGroup task in MSBuild should definitely be valid (http://msdn.microsoft.com/en-us/library/vstudio/646dk05y.aspx). What version of VS/MSBuild are you using?
@activescott Ah I wasn't using visual studio at all -- was trying to compile with xbuild and the rest of the mono toolchain natively in Linux (gmcs, v 2.10.8.1).
re: API coverage, sure dig out the notes and we'll see where it goes.
xbuild works in 3.x or newer. I forget the exact version. Maybe 3.1 or 3.2 was required. It only compiles though I never tried to actually run it on mono. Obviously the wix/MSI native libraries that I'm calling into are windows-specific.
is is possible to use lessmsi on linux.
Not yet, but the cab extraction code does all work on Linux now. So we're half way there. The part that need some work is the MSI code which is a combination of OLE Compound Files (aka Structured Storage) and a special MSI-specific database. I think the most reasonable thing to do is to use the WINE libraries (or their source?) to get the last part done.
Always glad to help you along if you're interested in contributing!
On Feb 27, 2015, at 01:12, john550 [email protected] wrote:
is is possible to use lessmsi on linux.
— Reply to this email directly or view it on GitHub.
I have a very specific use case in which I need to get the MSI ProductVersion from the Property table of an MSI file using the command line on OS X.
all of the following approaches give errors on the command line, but seem to work regardless.
lessmsi command line using wine
My coworker figured out how to use lessmsi on the command line using wine: (this example uses the wine.app that comes with winebottler)
/Applications/Wine.app/Contents/Resources/bin/wine /Users/username/Downloads/lessmsi-v1.2.0/lessmsi.exe v /Users/username/Downloads/msi2xml-2.2.1.957.msi
lessmsi GUI using wine
I have the lessmsi GUI working with WineBottler. http://winebottler.kronenberg.org/
You can download the zip compressed .app I made here: https://dl.dropboxusercontent.com/u/640753/lessmsi.zip
You can make it yourself using the following screenshot & winebottler:
References:
http://wiki.winehq.org/WineBottler https://github.com/activescott/lessmsi/wiki/Command-Line http://superuser.com/questions/543159/how-to-run-a-windows-bat-script-with-wine-from-command-line http://www.quora.com/How-do-I-suppress-the-stderr-output-of-a-shell-command http://www.tldp.org/LDP/abs/html/io-redirection.html
Just want to throw it out there that I've been able to use Less MSIerables in linux with wine after doing winetricks dotnet40
. It's probable that wine's version of mono works as well - I can get a GUI to come up in the linux-native version but can't open MSI files due to the windows-specific code.
I think it's quite probable that it could be compiled with libwine, but don't have the hard disk space on this laptop to verify.
I am able to use it on a Mac, and it doesn't have any windows-specific code outside of whatever is in Wine.
well as wine consists of alternative API's for windows-only code, you're saying the wine team has done it's job well - not that it's actually a portable program. Right?
Yes, Wine's code is windows specific, just not written by Microsoft.
LessMSI is not a portable program, but it works through Wine on the Mac, which doesn't have anything to help it run other than Wine and anything installed with Winetricks.
On my side I would be interested to have command-line only native (no wine required) way to build & run on Linux and Mac in addition to Windows, to add support for a better MSI extraction in https://github.com/nexB/scancode-toolkit beside the 7z-based extraction I have today.
I haven't explored this option, but since lessmsi appears to be written in C# then it might be able to run on Mono or .NET core which would make it portable without requiring WINE.
- http://www.mono-project.com/
- https://www.microsoft.com/net/core
From some quick reading, it seems like it is possible for the GUI and everything to run on MONO while only a command line option to run on .NET core, but the degree of difficulty would not be able to be determined without actually trying it. http://stackoverflow.com/questions/37738106/net-core-vs-mono
Has anyone tried compiling with winelib
? That should fill in all of the Win-specific functions.
@activescott wrote:
The part that need some work is the MSI code which is a combination of OLE Compound Files (aka Structured Storage)
Gnome msitools
uses GNOME/libgsf which is partially influenced by Wine.
and a special MSI-specific database. I think the most reasonable thing to do is to use the WINE libraries (or their source?) to get the last part done.
GNOME/msitools used the same approach in their libmsi
, IIUC.
Both libs are under LGPL-2 or 2.1.
For MIT-licensed project it would be hard to reuse LGPL code (coming from Wine) directly. But the dynamic linking should be easy.
I've actually switched to using https://github.com/GNOME/msitools for my non-windows use cases for this. That said, I wish I had the time to experiment with lessmsi to see how easy it would be to get it to work with winelib and/or mono.
I've actually switched to using https://github.com/GNOME/msitools for my non-windows use cases for this. That said, I wish I had the time to experiment with lessmsi to see how easy it would be to get it to work with winelib and/or mono.
@jgstew thanks for your share. can you show me how to deploy msitools on linux?