簡體   English   中英

Inno安裝程序創建的安裝游戲期間出現隨機錯誤

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

嗨,當我使用將安裝游戲的安裝時,就可以了。 但有時我會收到此錯誤:

C \\ game \\ Scared2 \\ pad \\ graphics02,zip嘗試復制文件時發生錯誤:suource文件已損壞。

它可以是不同的文件。 但始終都是大文件。

這是我的腳本:

[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 000000。最后一個文件很小。

我知道是什么原因引起的,這是導致問題的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設置文檔)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM