WiX.Py: we collect MSI package "in three lines"
No time and no desire to learn kilometer WiX files to assemble an MSI installer for your project, while plunging into the abyss of MSDN? Want to build an installer, describing it in simple and understandable terms, in a few lines? Is there a clinical tendency to cross-platform and build on Linux & Docker? Well then, you under the cut!
our project is cross-platform vector graphics editor and encountered a couple of months ago.
We knew about WiX Toolset (Windows Installer XML), but even a cursory review of the tutorials on the official site brought sadness and despondency - without serious immersion in XML descriptions, installers can not be avoided. We used a simpler MakeMsi, but it had a lot of flaws. Again, all these tools were not suitable for building MSI for Linux.
Searches led to project wixl , which collected MSI in Linux, but suffered a serious flaw in the functionality and required the same XML files of monstrous sizes as the WiX.
As a result, in order to acquire the necessary tool for assembly, we re-integrated the wixl logic into python, correcting many shortcomings and adding the necessary functionality, and made the project cross-platform. So WIX.Py appeared - an MSI assembler with a very low entry threshold.
How does WiX.Py work
The process of creating an MSI package is simplified to the limit:
In an arbitrary folder (eg
build ), Create the content for the installation as it will be on the target computer.
We fill in a small JSON file. For example:
"Manufacturer": "My Company",
"Description": "MyApp 0.1 Installer",
"Comments": "Licensed under GPLv3 +",
"Keywords": "wxs, xml, build",
"_AppIcon": "resources /myapp.ico",
"_ProgramMenuFolder": "My Company",
"OpenWith":[".xml", ".wxs", ".yml"]
"_SourceDir": "build /",
Generate the MSI package with the command:
wix.py <имя_файла> .json
Yes, this is a fully working example of an MSI package that will test before installing that Windows 64bit will install the application in
Program Files , add the application to the program menu and the desktop, and bind the specified file formats to the application being installed. No magic and shamanism with the register.
You can further reduce the example to 5-6 lines, but then the installer's functionality will be pretty tight.
Using WiX.Py, the MSI can be compiled in both Windows and Linux, incl. in Docker containers. Since the base libmsi can be compiled on many other UNIX-based systems (eg macOS), WiX.Py can be formally used on them, only it does not make sense.
A description of the various nuances can be found in project documentation .
If you are suitable for WiX.Py for solving problems on creating MSI packages, but lacking any functionality, please visit our site https://wix.sk1project.net and create a request to expand the functionality. The same applies to detected bugs - report and we will fight them. There you will also find the source code and ready packages for different platforms on the site.
If there is a desire to compare with the WiX, then on Habr already many times there were articles devoted to WiX: 1 , 2 , 3 , 4 .
It may be interesting
I am overwhelmed by your post with such a nice topic. Usually I visit your blogs and get updated through the information you include but today’s blog would be the most appreciable. Well done!
Took me time to understand all of the comments, but I seriously enjoyed the write-up. It proved being really helpful to me and Im positive to all of the commenters right here! Its constantly nice when you can not only be informed, but also entertained! I am certain you had enjoyable writing this write-up.