简体   繁体   English

如何在Linux中制作MSI?

[英]How to make msi in linux?

I have a msi installer created on windows, I put the msi into linux platform and I use 7z to extract content of msi installer, after that I used lcab command for extract and change some files, also using lcab command I put all files that I modified into cab. 我在Windows上创建了一个msi安装程序,我将msi放入linux平台中,并使用7z提取了msi安装程序的内容,之后,我使用lcab命令提取并更改了一些文件,也使用lcab命令将所有文件改装成驾驶室。 Now I need to restore msi, any idea? 现在我需要还原MSI,知道吗?

You can use msi-packager . 您可以使用msi-packager Can be installed on Ubuntu/Debian using: 可以使用以下命令在Ubuntu / Debian上安装:

sudo apt-get install msitools nodejs npm
sudo npm install -g msi-packager

https://www.npmjs.com/package/msi-packager https://www.npmjs.com/package/msi-packager

Here is the full procedure to manipulate MSI files under Linux. 这是在Linux下操作MSI文件的完整过程。 The idea is export the MSI content to XML, modify the XML and then repack de MSI file, you can modify even the EXE files, not only tables: 想法是将MSI内容导出为XML,修改XML,然后重新打包MSI文件,您甚至可以修改EXE文件,而不仅限于表:

  1. Install WINE 32 bits version 安装WINE 32位版本
  2. Install WineTricks , you need it for DLL and frameworks installation. 安装WineTricks ,您需要它来安装DLL和框架。
  3. Install .NET2.0, .NET4.0, MSXML6, VCRUN6 with winetricks (easy as ./winetricks dotnet20 dotnet40 msxml6 vcrun6) 安装带有winetricks的.NET2.0,.NET4.0,MSXML6,VCRUN6(很容易使用./winetricks dotnet20 dotnet40 msxml6 vcrun6)
  4. Download MSI2XML & XML2MSI executables from the [official project page( https://msi2xml.sourceforge.io/ ) 从[官方项目页面( https://msi2xml.sourceforge.io/ )下载MSI2XML和XML2MSI可执行文件。
  5. Execute wine msi2xml installer.msi 执行wine msi2xml installer.msi
  6. Edit the XML file, then, pack again with wine xml2msi installer.xml 编辑XML文件,然后再次添加wine xml2msi installer.xml
  7. You are done, here is your MSI file! 完成,这是您的MSI文件!

Hope that helps, with MSI2XML & XML2MSI you can manipulate MSI files under Windows but also under Linux with WINE and it's 100% working solution. 希望对您有帮助,借助MSI2XML和XML2MSI,您可以在Windows下,也可以在Linux下使用WINE操作MSI文件,这是100%有效的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM