使用wine为Python包构建MSI

时间:2016-01-26 00:14:20

标签: python windows-installer setuptools

我正在尝试使用wine使用bdist_msi将python包交叉编译为msi。生成的msi文件将使用wine安装,但似乎无法在Windows机器上运行。

我正在投放:wine C:/python27/python.exe setup.py bdist_msi

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

我大致遵循以下指示:https://github.com/iaz3/Http-Console/blob/358d4b0bc6dcf329ee5792def4a5712d83bd7041/.travis.yml

以下是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

在使用lessmsi.exe l -t Property的Wine上,我看到了:

Property,Value
UpgradeCode,{9089B45A-754D-11E5-A79D-C03496548060}
ProductName,alex
ProductCode,{955278E8-44FB-41C9-A956-734231F430C1}
ProductVersion,1.0.0
Manufacturer,Alex Rothberg
ProductLanguage,1033
DistVersion,1.0.0
DefaultUIFont,DlgFont8
ErrorDialog,ErrorDlg
Progress1,Install
Progress2,installs
MaintenanceForm_Action,Repair
ALLUSERS,1

但在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文件:https://bugs.winehq.org/show_bug.cgi?id=40129

0 个答案:

没有答案