简体   繁体   English

Inno安装程序创建的安装游戏期间出现随机错误

[英]Random error during installation game created by Inno setup

Hi when I use instalation that will install game it is OK. 嗨,当我使用将安装游戏的安装时,就可以了。 But sometime I will get this error: 但有时我会收到此错误:

C\\game\\ Scared2\\pad\\graphics02,zip An error occurred while trying to copy a file: the suource file is corrupted. C \\ game \\ Scared2 \\ pad \\ graphics02,zip尝试复制文件时发生错误:suource文件已损坏。

It can be different file. 它可以是不同的文件。 But always it is big file. 但始终都是大文件。

Here is my script: 这是我的脚本:

[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}

Where is the bug? 错误在哪里? Thank you for help. 谢谢你的帮助。 Note: The first .bin file have 2 099 610 368 the second have 2 100 000 000. Last file is small. 注意:第一个.bin文件具有2 099 610 368,第二个文件具有2 100 000000。最后一个文件很小。

I know what is causing the problem,it's SolidCompression which is causing the problem. 我知道是什么原因引起的,这是导致问题的SolidCompression

How do I know that,because it already happened to me,and i solve this problem by reading some posts about DiskSpanning and compression in internet. 我怎么知道的,因为它已经发生在我身上了,我通过阅读一些有关DiskSpanning和压缩的帖子解决了这个问题。

U can use script like this one to get best compression inside inno-setup.Just change the name and files etc. 您可以使用这样的脚本在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

Note the SolidCompression=false . 请注意SolidCompression=false

You can modify the size of Setup-*.bin by changeing this 您可以通过更改此设置来修改Setup-*。bin的大小

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

Description:This specifies the maximum number of bytes per disk slice (SETUP-*.BIN file). 说明:这指定每个磁盘片(SETUP-*。BIN文件)的最大字节数。 Normally, this should be set to the total number of bytes available on the disk media divided by the value of the SlicesPerDisk [Setup] section directive, which defaults to 1. 通常,应将其设置为磁盘介质上可用的字节总数除以SlicesPerDisk [Setup]节指令的值,该值默认为1。

This directive is ignored if disk spanning is not enabled using the DiskSpanning [Setup] section directive. 如果未使用DiskSpanning [Setup]节伪指令启用磁盘跨越,则忽略此伪指令。

To optimally fill 4.7 GB recordable DVDs, use: 要最佳地填充4.7 GB可录制DVD,请使用:

SlicesPerDisk=3
DiskSliceSize=1566000000

To optimally fill 8.5 GB (dual-layer) recordable DVDs, use: 要最佳地填充8.5 GB(双层)可录制DVD,请使用:

SlicesPerDisk=5
DiskSliceSize=1708200000

To optimally fill 700 MB (80-minute) recordable CDs, use: 要最佳地填充700 MB(80分钟)的可录制CD,请使用:

SlicesPerDisk=1
DiskSliceSize=736000000

To optimally fill 1.44MB floppy disks, use: 要最佳地填充1.44MB的软盘,请使用:

SlicesPerDisk=1
DiskSliceSize=1457664

(Taken from the inno setup documentation). (摘自inno设置文档)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM