Пользователь
Сообщения: 75
Благодарности: 6
|
Профиль
|
Отправить PM
| Цитировать
Цитата Serega:
Видимо, что-то не так делаете, я даже не буду ничего спрашивать, скажу лишь одно, покажите скрипт »
|
читать дальше »
Код: 
; Скрипт создан в Inno Setup Script Wizard
#define Components
#define MyAppName "Test Drive Unlimited 2"
#define MyAppVersion "v097 build 5"
#define MyAppPublisher "Eden Games,Atari."
#define MyAppURL "http://www.testdriveunlimited2.com/"
#define MyAppExeName "UpLauncher.exe"
[Setup]
; ПРИМЕЧАНИЕ: Значение AppId является уникальным для каждой программы.
; Не используйте одинаковые значения для разных программ.
; (Для создания уникальных значений используйте Инструменты | Генерация GUID.)
AppId={{24132856-6BC2-47AD-9551-C72EBCFE929B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=D:\Games\{#MyAppName}
DefaultGroupName=Eden Games
OutputDir=F:\111111111111111_install
WizardStyle=modern
OutputBaseFilename=setup
Compression=lzma2/ultra64
InternalCompressLevel=ultra64
LZMANumBlockThreads=2
LZMAUseSeparateProcess=yes
CompressionThreads=auto
SolidCompression=no
;Разбиение на диски
DiskSpanning=true
SlicesPerDisk=2
;Размер тома в байтах (здесь 1400 мегабайт)
DiskSliceSize=1540200000
ShowLanguageDialog=no
WizardImageBackColor=clBlack
TimeStampsInUTC=no
FlatComponentsList=false
AlwaysShowDirOnReadyPage=true
AlwaysShowGroupOnReadyPage=true
LanguageDetectionMethod=locale
UninstallDisplayIcon={app}\TDU2.ico
UninstallDisplayName=Test_Drive_Unlimited_2_v097_build_5_DEN
RestartIfNeededByRun=no
PrivilegesRequired=none
EnableDirDoesntExistWarning=no
DirExistsWarning=auto
ShowTasksTreeLines=yes
SetupIconFile=C:\Users\Den\Desktop\TDU2.ico
UsePreviousAppDir=false
ShowComponentSizes=yes
UserInfoPage=false
WindowVisible=false
WindowShowCaption=false
WindowResizable=false
WizardImageFile=C:\Users\Den\Desktop\covers_376.bmp
WizardSmallImageFile=C:\Users\Den\Desktop\logo-paul.bmp
UsePreviousGroup=no
UsePreviousSetupType=no
UsePreviousTasks=no
UsePreviousUserInfo=no
[Languages]
Name: russian; MessagesFile: compiler:Languages\Russian.isl
[LangOptions]
LanguageName=russian
LanguageID=$0409
LanguageCodePage=0
DialogFontName=Arial
DialogFontSize=9
WelcomeFontName=Arial
WelcomeFontSize=16
TitleFontName=Arial
TitleFontSize=29
CopyrightFontName=Arial
CopyrightFontSize=8
RightToLeft=no
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: checkablealone
[Files]
Source: C:\Users\Den\Desktop\innocallback.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression solidbreak
Source: F:\Test Drive Unlimited 2\*; DestDir: {app}; AfterInstall: Progress() ; Flags: ignoreversion recursesubdirs createallsubdirs
; ВАЖНО: Не используйте "Flags: ignoreversion" для системных файлов
[Icons]
Name: {group}\Test Drive Unlimited 2\{#MyAppName}; Filename: {app}\{#MyAppExeName}; IconFilename: {app}\TDU2.ico
Name: {group}\Test Drive Unlimited 2\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe}
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon; IconFilename: {app}\TDU2.ico; WorkingDir: {app}; Languages:
[Messages]
BeveledLabel=DEN 2011г.:%nhttp://3den.milivepage.ru/
[CustomMessages]
russian.Bt=Бт
russian.Kb=Кб
russian.Mb=Мб
russian.Gb=Гб
russian.Tb=Тб
russian.Pb=Пб
russian.Eb=Эб
[Registry]
; файл создан программой Converter v.0.1.3: 19 апреля 2011 г., в 10 час. 57 мин. 46 сек.
Root: HKLM; SubKey: SOFTWARE\Atari; Flags: uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: AudioLib; ValueData: DirectSound; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: GUID; ValueData: ; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: InstallDir; ValueData: {app}; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: ExePath; ValueData: {app}\TestDrive2.exe; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: LauncherPat; ValueData: {app}\UpLauncher.exe; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: Language; ValueData: Eng; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: UninstallExePath; ValueData: {{uninstallexe}; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: GameProductVersion; ValueData: TDU2 v097; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: GameBuildVersion; ValueData: 5; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Atari\TDU2; ValueType: string; ValueName: NetworkNatType; ValueData: Strict:UdpBlocked; Flags: uninsdeletevalue uninsdeletekeyifempty
; затраченное время: 4 мсек.
[UninstallDelete]
Type: files; Name: {group}\{#MyAppName}
Type: files; Name: {group}\УДАЛИТЬ ИГРУ
Type: files; Name: {commondesktop}\{#MyAppName}; Tasks: desktopicon
[Code]
var
ProgressLabel, SizeLabel: TLabel;
function BytesToReadable(Bytes: Extended; Signs: Integer): string;
{ Перевод числа в значение Бт/Кб/Мб/Гб/Тб/Пб/Эб (Signs - количество знаков после запятой)}
var
ABytes: Extended;
i: Integer;
begin
i := 0;
ABytes := Bytes;
while Int(ABytes) >= 1024 do
begin
ABytes := ABytes/1024;
i := i + 1;
end;
case i of
0: Result := FloatToStr(Int(ABytes)) + Padl(ExpandConstant('{cm:Bt}'), 1); // Байт
1: Result := Format('%.' + IntToStr(Signs) + 'n ' + ExpandConstant('{cm:Kb}'), [ABytes]); // Килобайт
2: Result := Format('%.' + IntToStr(Signs) + 'n ' + ExpandConstant('{cm:Mb}'), [ABytes]); // Мегабайт
3: Result := Format('%.' + IntToStr(Signs) + 'n ' + ExpandConstant('{cm:Gb}'), [ABytes]); // Гигабайт
4: Result := Format('%.' + IntToStr(Signs) + 'n ' + ExpandConstant('{cm:Tb}'), [ABytes]); // Терабайт
// больше Терабайта конечно не пригодится, покрайней мере в ближайшее время, но всё же...
5: Result := Format('%.' + IntToStr(Signs) + 'n ' + ExpandConstant('{cm:Pb}'), [ABytes]); // Петабайт
6: Result := Format('%.' + IntToStr(Signs) + 'n ' + ExpandConstant('{cm:Eb}'), [ABytes]); // Эксабайт
end;
StringChange(Result, ',', '.');
end;
procedure Progress();
var
size: Integer;
begin
with WizardForm.ProgressGauge do
ProgressLabel.Caption := IntToStr((Position-Min)/((Max - Min)/100)) + '%';
FileSize(ExpandConstant(CurrentFileName), size);
SizeLabel.Caption := BytesToReadable(size, 1);
end;
procedure InitializeWizard();
begin
ProgressLabel := TLabel.Create(WizardForm);
with WizardForm.ProgressGauge do
begin
ProgressLabel.Top := Top + Height + ScaleY(8);
ProgressLabel.Left := Left + Width/2 - ScaleX(8);
ProgressLabel.AutoSize := True;
ProgressLabel.Parent := WizardForm.InstallingPage;
end;
SizeLabel := TLabel.Create(WizardForm);
with WizardForm.ProgressGauge do
begin
SizeLabel.Top := Top + Height + ScaleY(8);
SizeLabel.Left := Left;
SizeLabel.AutoSize := True;
SizeLabel.Parent := WizardForm.InstallingPage;
end;
end;
|
Последний раз редактировалось FX-DENIS, 18-03-2012 в 23:24.
Причина: опечатки
Отправлено: 23:21, 18-03-2012
| #1164
|