我py2exe使用Windows 7上的Inno Setup 创建我的应用程序并将其打包到安装程序exe中.然后可以在Windows 7和Windows 10系统上安装以这种方式创建的安装程序.当它工作时,安装程序按顺序显示以下屏幕:
这是Inno Setup 5.5.5或更低版本的行为.
使用Inno Setup 5.5.7及更高版本(未尝试5.5.6),安装程序正常创建,可以在Windows 7上进行如上设置.但是,相同的安装程序在安装过程中无法从上面的列表中显示屏幕1和3 Windows 10:安装程序直接从EULA屏幕开始,然后跳转到确认安装位置.确认屏幕甚至不显示安装将在哪个目录中完成.
继续允许安装在默认位置进行,并且应用程序正常工作.不知道安装位置是非常烦人和不受欢迎的.
.iss我使用的文件(见下文)在我尝试过的不同Inno Setup版本中是相同的.在文件中,DefaultDirName显式设置(基于应用程序的版本).
; WARNING: This script has been created by py2exe. Changes to this script
; will be overwritten the next time py2exe is run!
[Setup]
AppName=MyApp
AppVersion=2.0.1
AppVerName=MyApp 2.0.1
AppPublisher=Company, Inc.
AppPublisherURL=www.company.com
AppContact=support@company.com
AppCopyright=Copyright (C) 2010-2016, Company, Inc.
LicenseFile=license\MyAppEULA.rtf
SetupIconFile=icons\CompanyScreeningProgram.ico
WizardImageFile=icons\MyAppImage.bmp
WizardSmallImageFile=icons\MyAppSmallImage.bmp
DefaultDirName=C:\MyApp_v2.0.1
DefaultGroupName=MyApp
Compression=lzma
OutputDir=F:\Python\dist\
OutputBaseFilename=MyApp_2.0.1_Setup
[Files]
Source: …Run Code Online (Sandbox Code Playgroud) inno-setup ×1