使用wine构建MSI for Python包

使用wine构建MSI for Python包,python,windows-installer,setuptools,Python,Windows Installer,Setuptools,我试图使用wine使用bdist_msi交叉编译一个python包作为msi。生成的msi文件将使用wine安装,但在Windows计算机上似乎不起作用 我正在运行:wine C:/python27/python.exe setup.py bdist_msi 当我尝试在windows上安装MSI时,我得到:“此操作仅对当前安装的产品有效。” 我大致遵循以下方向: 以下是MSI安装的详细日志: MSI (c) (18:08) [08:28:03:378]: Machine policy value

我试图使用
wine
使用
bdist_msi
交叉编译一个python包作为msi。生成的msi文件将使用wine安装,但在Windows计算机上似乎不起作用

我正在运行:
wine C:/python27/python.exe setup.py bdist_msi

当我尝试在windows上安装MSI时,我得到:“此操作仅对当前安装的产品有效。”

我大致遵循以下方向:

以下是MSI安装的详细日志:

MSI (c) (18:08) [08:28:03:378]: Machine policy value 'DisableUserInstalls' is 0
MSI (c) (18:08) [08:28:03:378]: Note: 1: 1402 2: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer 3: 2 
MSI (c) (18:08) [08:28:03:378]: SOFTWARE RESTRICTION POLICY: Verifying package --> 'C:\Users\IEUser\Desktop\alex-1.0.0-win32.msi' against software restriction policy
MSI (c) (18:08) [08:28:03:378]: Note: 1: 2262 2: DigitalSignature 3: -2147287038 
MSI (c) (18:08) [08:28:03:378]: SOFTWARE RESTRICTION POLICY: C:\Users\IEUser\Desktop\alex-1.0.0-win32.msi is not digitally signed
MSI (c) (18:08) [08:28:03:378]: SOFTWARE RESTRICTION POLICY: C:\Users\IEUser\Desktop\alex-1.0.0-win32.msi is permitted to run at the 'unrestricted' authorization level.
MSI (c) (18:08) [08:28:03:454]: Cloaking enabled.
MSI (c) (18:08) [08:28:03:454]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (18:08) [08:28:03:454]: End dialog not enabled
MSI (c) (18:08) [08:28:03:454]: Original package ==> C:\Users\IEUser\Desktop\alex-1.0.0-win32.msi
MSI (c) (18:08) [08:28:03:454]: Package we're running from ==> C:\Users\IEUser\Desktop\alex-1.0.0-win32.msi
MSI (c) (18:08) [08:28:03:454]: Note: 1: 2211 2:  3: Property 
MSI (c) (18:08) [08:28:03:454]: MSI_DBG: Provided descriptor less than minimum size
MSI (c) (18:08) [08:28:03:454]: APPCOMPAT: Compatibility mode property overrides found.
MSI (c) (18:08) [08:28:03:454]: APPCOMPAT: looking for appcompat database entry with ProductCode ''.
MSI (c) (18:08) [08:28:03:454]: APPCOMPAT: no matching ProductCode found in database.
MSI (c) (18:08) [08:28:03:454]: MSCOREE not loaded loading copy from system32
MSI (c) (18:08) [08:28:03:454]: Machine policy value 'TransformsSecure' is 0
MSI (c) (18:08) [08:28:03:454]: User policy value 'TransformsAtSource' is 0
MSI (c) (18:08) [08:28:03:454]: APPCOMPAT: looking for appcompat database entry with ProductCode ''.
MSI (c) (18:08) [08:28:03:454]: APPCOMPAT: no matching ProductCode found in database.
MSI (c) (18:08) [08:28:03:454]: Transforms are not secure.
MSI (c) (18:08) [08:28:03:454]: Note: 1: 2211 2:  3: Property 
MSI (c) (18:08) [08:28:03:454]: Note: 1: 2211 2:  3: Control 
MSI (c) (18:08) [08:28:03:454]: PROPERTY CHANGE: Adding MsiLogFileLocation property. Its value is 'C:\Users\IEUser\Desktop\verbose2.log'.
MSI (c) (18:08) [08:28:03:454]: Command Line: CURRENTDIRECTORY=C:\Users\IEUser\Desktop CLIENTUILEVEL=0 CLIENTPROCESSID=792 
MSI (c) (18:08) [08:28:03:454]: PROPERTY CHANGE: Adding PackageCode property. Its value is '{7D7271AA-2C61-4752-8690-7D4F8EBD57B0}'.
MSI (c) (18:08) [08:28:03:454]: Product Code passed to Engine.Initialize:           ''
MSI (c) (18:08) [08:28:03:454]: Product Code from property table before transforms: ''
MSI (c) (18:08) [08:28:03:454]: Product Code from property table after transforms:  ''
MSI (c) (18:08) [08:28:03:454]: Failing install, missing product code
This action is only valid for products that are currently installed.
C:\Users\IEUser\Desktop\alex-1.0.0-win32.msi
MSI (c) (18:08) [08:28:03:454]: Note: 1: 1708 
MSI (c) (18:08) [08:28:03:454]: Product:  -- Installation failed.

MSI (c) (18:08) [08:28:03:497]: Windows Installer installed the product. Product Name: . Product Version: . Product Language: . Manufacturer: . Installation success or error status: 1605.

MSI (c) (18:08) [08:28:03:573]: MainEngineThread is returning 1605
关于葡萄酒的使用,我看到:

但在Windows上:

Error: System.Runtime.InteropServices.ExternalException: Failed to create view with query: SELECT * FROM `Property`
   at Microsoft.Tools.WindowsInstallerXml.Msi.View..ctor(Database db, String query)
   at Microsoft.Tools.WindowsInstallerXml.Msi.Database.OpenExecuteView(String query)
   at LessMsi.Cli.ShowVersionCommand.Run(List`1 args)
   at LessMsi.Cli.Program.Main(String[] args)

在此处使用Wine文件:

检查详细的日志可能会有所帮助,以确保您正在诊断正确症状的原因。如果“尝试安装”是指双击.msi文件,则这相当于
msiexec/i.msi
。打开一个
/l*v verbose.log
,看看您能找到什么。看起来.msi缺少几个关键属性,特别是在日志的第二行到最后一行中引用的ProductCode。因为这是Windows Installer识别软件包的核心,所以它失败并不奇怪。但不知道构建过程为什么不起作用;也许这是wine实现中的一个限制。
Error: System.Runtime.InteropServices.ExternalException: Failed to create view with query: SELECT * FROM `Property`
   at Microsoft.Tools.WindowsInstallerXml.Msi.View..ctor(Database db, String query)
   at Microsoft.Tools.WindowsInstallerXml.Msi.Database.OpenExecuteView(String query)
   at LessMsi.Cli.ShowVersionCommand.Run(List`1 args)
   at LessMsi.Cli.Program.Main(String[] args)