1

嗨,当我使用将安装游戏的安装时,就可以了。但有时我会收到此错误:

C\game\ Scared2\pad\graphics02,zip 尝试复制文件时出错:源文件已损坏。

它可以是不同的文件。但总是它是大文件。

这是我的脚本:

[Setup]
InternalCompressLevel=ultra64
OutputDir=C:\SA
OutputBaseFilename=Instalace
VersionInfoVersion=2.65.1
VersionInfoCompany=Ascaron
Compression=lzma/ultra64
VersionInfoProductName=Sacred 2
VersionInfoProductVersion=2.65.1
DiskSpanning=true
AppName=Sacred 2
AppVerName=2.65.1
PrivilegesRequired=none
DefaultDirName={pf}\Sacred 2
DirExistsWarning=yes
DefaultGroupName=Sacred 2
AlwaysShowDirOnReadyPage=true
AlwaysShowGroupOnReadyPage=true
ShowTasksTreeLines=false
AppPublisher=Deep Silver
AppVersion=2.65.1
AppID={{EE72C138-0DFC-4C17-9859-EBC5A8AF7517}
UninstallDisplayName=Sacred 2
[Icons]
Name: {group}\Sacred 2; Filename: {app}\system\sacred2.exe; WorkingDir: {app}; IconFilename: {app}\system\sacred2.exe; IconIndex: 0
Name: {commondesktop}\Sacred 2; Filename: {app}\system\sacred2.exe; WorkingDir: {app}; IconFilename: {app}\system\sacred2.exe; IconIndex: 0
Name: {group}\{cm:UninstallProgram,Sacred 2}; Filename: {uninstallexe}

错误在哪里?谢谢你的帮助。 注意:第一个 .bin 文件有 2 099 610 368,第二个有 2 100 000 000。最后一个文件很小。

4

1 回答 1

1

我知道是什么导致了问题,SolidCompression这是导致问题的原因。

我怎么知道,因为它已经发生在我身上,我通过阅读一些关于DiskSpanning互联网压缩的帖子来解决这个问题。

你可以使用这样的脚本在 inno-setup 中获得最佳压缩。只需更改名称和文件等。

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppExeName "MyProg.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{53C82ABA-56A0-4366-B4D3-7624CDDB2BA0}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=true
OutputBaseFilename=Setup
Compression=lzma/ultra64
SolidCompression=false
InternalCompressLevel=ultra64
DiskSpanning=True
DiskSliceSize=1566000000
SlicesPerDisk=3
UninstallDisplayIcon={app}\MyProg.exe

[Languages]
Name: english; MessagesFile: compiler:Default.isl

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
Source: C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe; DestDir: {app}; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon

注意SolidCompression=false.

您可以通过更改此来修改 Setup-*.bin 的大小

[Setup]: DiskSliceSize
Valid values:
 262144 through 2100000000, or max  
Default value:
 max (2100000000)  

说明:这指定每个磁盘片(SETUP-*.BIN 文件)的最大字节数。通常,这应该设置为磁盘介质上可用的总字节数除以 SlicesPerDisk [Setup] 部分指令的值,默认为 1。

如果未使用 DiskSpanning [Setup] 部分指令启用磁盘跨越,则忽略此指令。

要以最佳方式填充 4.7 GB 可刻录 DVD,请使用:

SlicesPerDisk=3
DiskSliceSize=1566000000

要以最佳方式填充 8.5 GB(双层)可刻录 DVD,请使用:

SlicesPerDisk=5
DiskSliceSize=1708200000

要以最佳方式填充 700 MB(80 分钟)的可刻录 CD,请使用:

SlicesPerDisk=1
DiskSliceSize=736000000

要以最佳方式填充 1.44MB 软盘,请使用:

SlicesPerDisk=1
DiskSliceSize=1457664

(取自 inno setup 文档)。

于 2015-07-16T13:18:33.110 回答