Dan*_*Dan 11 windows-xp inno-setup
我已经设置了一个安装我的应用程序的inno安装脚本.生成的setup.exe将在Windows vista/7上正确安装,但在Windows XP上出现零错误失败.inno示例脚本适用于Windows XP,因此它必须是我正在做的事情.谁能看到我做错了什么?
; Script generated by the Inno Setup Script Wizard.
#define app_src_path "..\MyApp"
#define app_exe_path "..\bin"
#define file_ver GetFileVersion(app_exe_path + "\win32\MyApp.exe")
#define app_ver Delete(file_ver, 6, 2)
[Setup]
AppId={{BBB40316-958C-446B-A08D-311273214AA6}
AppName=MyApp
AppVersion={#app_ver}
UninstallDisplayName=MyApp
AppPublisher=My Company US
DefaultDirName={pf}\My Company\MyApp
DisableDirPage=yes
DefaultGroupName=My Company
DisableProgramGroupPage=yes
#emit 'OutputBaseFilename="MyApp-Setup-' + app_ver + '"'
#emit 'SetupIconFile="' + app_src_path + '\rc\MyAppIcon.ico"'
Compression=lzma
SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64
WizardImageFile=ZDS.bmp
WizardSmallImageFile=ZDSsmall.bmp
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[InstallDelete]
Type: filesandordirs; Name: "{app}\MyApp";
[Files]
; x64 files
Source: "{#app_exe_path}\x64\MyApp.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: Is64BitInstallMode
; win32 files
Source: "{#app_exe_path}\win32\MyApp.exe"; DestDir: "{app}"; Flags: ignoreversion; Check: not Is64BitInstallMode
; platform independent
Source: "{#app_src_path}\rc\pic1-24.png"; DestDir: "{app}\rc"; Flags: ignoreversion nocompression
Source: "{#app_src_path}\rc\pic2-24.png"; DestDir: "{app}\rc"; Flags: ignoreversion nocompression
Source: "{#app_src_path}\rc\pic3-24.png"; DestDir: "{app}\rc"; Flags: ignoreversion nocompression
[Icons]
Name: "{group}\MyApp"; Filename: "{app}\MyApp.exe"
Name: "{commondesktop}\MyApp"; Filename: "{app}\MyApp.exe"; Tasks: desktopicon
Name: "{group}\{cm:UninstallProgram,MyApp}"; Filename: "{uninstallexe}"
[Run]
Filename: "{app}\MyApp.exe"; Description: "{cm:LaunchProgram,MyApp}"; Flags: nowait postinstall skipifsilent
Run Code Online (Sandbox Code Playgroud)
编辑: 这是/ LOG的输出
2012-07-14 10:07:50.855 Log opened. (Time zone: UTC-04:00)
2012-07-14 10:07:50.855 Setup version: Inno Setup version 5.5.1 (u)
2012-07-14 10:07:50.855 Original Setup EXE: E:\MyApp-Setup-0.0.0.exe
2012-07-14 10:07:50.855 Setup command line: /SL5="$801DE,623918,137216,E:\MyApp-Setup-0.0.0.exe" /LOG
2012-07-14 10:07:50.855 Windows version: 5.1.2600 SP3 (NT platform: Yes)
2012-07-14 10:07:50.855 64-bit Windows: No
2012-07-14 10:07:50.870 Processor architecture: x86
2012-07-14 10:07:50.870 User privileges: Administrative
2012-07-14 10:07:50.885 Exception message:
2012-07-14 10:07:50.885 Message box (OK):
Floating point division by zero.
2012-07-14 10:07:51.654 User chose OK.
2012-07-14 10:07:51.654 Deinitializing Setup.
2012-07-14 10:07:51.654 Log closed.
Run Code Online (Sandbox Code Playgroud)
我没有[code]部分,所以我很困惑MessageBox(OK)消息的来源.
Ste*_*bob 18
丹的答案补充不适合评论......
对于向导图像文件,我使用GIMP 2.8作为图像编辑器,尝试了几乎所有可能的颜色深度和操作系统(Windows 7和Windows XP)的排列.我想出了以下结果:
你使用的颜色深度并不重要; 8位,16位,24位或32位.当你考虑它时,这是有道理的,因为Windows XP确实支持桌面上的32位图标. 见下面的编辑
当他谈到位图中的"腐败"标题时,丹把它钉在头上.事实证明它并没有腐败.默认情况下,GIMP 2.8将"颜色空间信息"保存在位图文件的标题中.Innosetup或Windows XP(我不确定哪个)不知道如何正确解释这些信息.
关键是要确保此颜色空间信息不保存在位图文件中.从GIMP 2.8导出位图时,您可以选中"不写颜色空间信息"选项,如下图所示.

编辑 2014年3月20日
一些更新的信息:在InnoSetup版本5.5.4(在Windows 7 64位操作系统上运行和安装)中,使用上述方法和32位图像bitmap image is not valid时,在运行编译的安装文件时会出错.
更改为24位图像,仍然没有颜色空间信息,解决了这个问题.
| 归档时间: |
|
| 查看次数: |
4089 次 |
| 最近记录: |