Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup - создание инсталляционных пакетов (Часть 15)

Модерирует : gyra, Maz

 Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

Открыть новую тему     Написать ответ в эту тему

artemabu

Junior Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору

Цитата:
Tima182  
У Вас константа MyAppName стоит на обоих ярлыках, а это значит что они имеют одинаковое название и будет создан только один. Вот как надо..  
 
Код:
 
[Icons]  
Name: {commondesktop}\{#MyAppName}; Filename: {app}\SpinTires.exe; Tasks: desktopicon; WorkingDir: {app}  
Name: {commondesktop}\Другое название; Filename: {app}\spmmm.exe; Tasks: desktopicon; WorkingDir: {app}; IconIndex: 0  

 
я уже третьи раз  спрашиваю как добавить кнопку стоп воспроизведение музыки в инсталятор  
 
вот код  
 
#define MyAppName "The SIMS 4 Deluxe Edition"
#define MyAppVersion "1.5"
#define MyAppPublisher "саmоdelкiн"
#define NeedSize "5000000000"
 
#define NeedMem 512
 
#define SecondProgressBar
 
#define records
 
 
[Setup]
AppId={{8CC9C439-58E0-4745-BB8A-9210BAFAAE38}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=саmоdelкiн/{#MyAppName}
OutputBaseFilename=the sims 4
Compression=lzma/ultra64
SolidCompression=true
WizardImageFile=image/1.bmp
WizardSmallImageFile=image/2.bmp
SetupIconFile=icon.ico
DiskSpanning=true
 
 
[UninstallDelete]
Type: filesandordirs; Name: {app}
 
[Languages]
Name: rus; MessagesFile: compiler:Languages\Russian.isl
 
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
 
[Files]
#ifdef records
Source: records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
Source: ISDone.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\ISSkin.dll; DestDir: {tmp}; Flags: dontcopy
Source: Include\1.cjstyles; DestDir: {tmp}; Flags: dontcopy
Source: image\logo.bmp; DestDir: {tmp}; Flags: dontcopy
Source: Include\CallbackCtrl.dll; DestDir: {tmp}; Flags: dontcopy
Source: BASS.dll; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
Source: sound.mp3; DestDir: {tmp}; Flags: dontcopy noencryption nocompression
 
[CustomMessages]
rus.FinishedLabel=Программа {#MyAppName} установлена на Ваш компьютер. Приложение можно запустить с помощью соответствующего значка.%n%nНажмите «Завершить», чтобы выйти из программы установки.
rus.Error2=Установка %n{#MyAppName} %nне завершена.
rus.Error3=%nВо время установки произошла ошибка, пожалуйста отключите сторонние программы и повторите попытку установки.%n%n%nНажмите «Завершить», чтобы выйти.
rus.WelcomeLabel1=Программа установит игру {#MyAppName} на Ваш компьютер.
rus.WelcomeLabel2=Нажмите «Далее», чтобы продолжить, или «Отмена», чтобы выйти
rus.FinisLabel1=Игра %n{#MyAppName}%n установлена на Ваш%n компьютер.
rus.FinisLabel2=%n%nДля ее запуска выберите%n соотвествующий ярлык%n в меню "Пуск" или на Рабочем столе. %n%nНажмите «Завершить», %nчтобы выйти из программы установки.
rus.ExtractedFile=Извлекается файл:
rus.Extracted=Распаковка архивов...
rus.CancelButton=Отменить распаковку
rus.Error=Ошибка распаковки!
rus.ElapsedTime=Прошло:
rus.RemainingTime=Осталось времени:
rus.EstimatedTime=Всего:
rus.AllElapsedTime=Время установки:
 
 
[Code]
procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall';
procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall';
 
var
PageNameLabel, PageDescriptionLabel, WelcomeLabel1,WelcomeLabel2,FLabel1, FLabel2, WLabel1, WLabel2, WelcomeLabel4,FinishedHeadingLabel, FinishedHeadingLabel1,WelcomeLabel3: TLabel;
 LabelPct1,LabelCurrFileName,LabelTime1,LabelTime2,LabelTime3: TLabel;
  ISDoneProgressBar1: TNewProgressBar;
#ifdef SecondProgressBar
  LabelPct2: TLabel;
  ISDoneProgressBar2:TNewProgressBar;
#endif
  MyCancelButton: TButton;
  ISDoneCancel:integer;
  ISDoneError:boolean;
  PCFVer:double;
 
 
  mp3Handle: HWND;
  mp3Name: String;
   const
  BASS_SAMPLE_LOOP = 4;
   
/////////////////конец музыки////////
 PCFonFLY=true;
  notPCFonFLY=false;
 
 
 
function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; external 'BASS_Init@files:BASS.dll stdcall delayload';
function BASS_StreamCreateFile(mem: BOOL; f: PAnsiChar; offset1: DWORD; offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): DWORD; external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';
function BASS_Start: Boolean; external 'BASS_Start@files:BASS.dll stdcall delayload';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';
function BASS_Stop: Boolean; external 'BASS_Stop@files:BASS.dll stdcall delayload';
function BASS_Free: Boolean; external 'BASS_Free@files:BASS.dll stdcall delayload';
 
function InitializeSetup(): Boolean;
begin
  ExtractTemporaryFile('BASS.dll');
  ExtractTemporaryFile('sound.mp3');
  mp3Name := ExpandConstant('{tmp}\sound.mp3');
  BASS_Init(-1, 44100, 0, 0, 0);
  mp3Handle := BASS_StreamCreateFile(FALSE, PAnsiChar(mp3Name), 0, 0, 0, 0, BASS_SAMPLE_LOOP);
  BASS_Start();
  BASS_ChannelPlay(mp3Handle, False);
  Result := True;
end;
 
procedure DeinitializeSetup();
begin
  BASS_Stop();
  BASS_Free();
end;
 
///////////////////конец музыки/////////////////
 
 
type
   TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
 
function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';
 
function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';
 
function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';
 
function SrepInit(TmpFile:PAnsiChar;VirtMem,MaxSave:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(PrecompVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
 
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
  if OveralPct<=1000 then ISDoneProgressBar1.Position := OveralPct;
  LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
#ifdef SecondProgressBar
  if CurrentPct<=1000 then ISDoneProgressBar2.Position := CurrentPct;
  LabelPct2.Caption := IntToStr(CurrentPct div 10)+'.'+chr(48 + CurrentPct mod 10)+'%';
#endif
  LabelCurrFileName.Caption:=ExpandConstant('{cm:ExtractedFile} ')+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));
  LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
  LabelTime2.Caption:=ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
  LabelTime3.Caption:=ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
  Result := ISDoneCancel;
end;
 
procedure CancelButtonOnClick(Sender: TObject);
begin
  if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
end;
 
 
 
procedure HideControls();
begin
  WizardForm.FileNamelabel.Hide;
  ISDoneProgressBar1.Hide;
  LabelPct1.Hide;
  LabelCurrFileName.Hide;
  LabelTime1.Hide;
  LabelTime2.Hide;
  MyCancelButton.Hide;
#ifdef SecondProgressBar
  ISDoneProgressBar2.Hide;
  LabelPct2.Hide;
#endif
end;
 
procedure CreateControls();
var PBTop:integer;
begin
  PBTop:=ScaleY(50);
  ISDoneProgressBar1 := TNewProgressBar.Create(WizardForm);
  with ISDoneProgressBar1 do begin
    Parent   := WizardForm.InstallingPage;
    Height   := WizardForm.ProgressGauge.Height;
    Left     := ScaleX(0);
    Top      := PBTop;
    Width    := ScaleX(365);
    Max      := 1000;
  end;
  LabelPct1 := TLabel.Create(WizardForm);
  with LabelPct1 do begin
    Parent    := WizardForm.InstallingPage;
    AutoSize  := False;
    Left      := ISDoneProgressBar1.Width+ScaleX(5);
    Top       := ISDoneProgressBar1.Top + ScaleY(2);
    Width     := ScaleX(80);
  end;
  LabelCurrFileName := TLabel.Create(WizardForm);
  with LabelCurrFileName do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Width    := ISDoneProgressBar1.Width+ScaleX(30);
    Left     := ScaleX(0);
    Top      := ScaleY(30);
  end;
#ifdef SecondProgressBar
  PBTop:=PBTop+ScaleY(25);
  ISDoneProgressBar2 := TNewProgressBar.Create(WizardForm);
  with ISDoneProgressBar2 do begin
    Parent   := WizardForm.InstallingPage;
    Left     := ScaleX(0);
    Top      := PBTop+ScaleY(8);
    Width    := ISDoneProgressBar1.Width;
    Max      := 1000;
    Height   := WizardForm.ProgressGauge.Height;
  end;
  LabelPct2 := TLabel.Create(WizardForm);
  with LabelPct2 do begin
    Parent    := WizardForm.InstallingPage;
    AutoSize  := False;
    Left      := ISDoneProgressBar2.Width+ScaleX(5);
    Top       := ISDoneProgressBar2.Top + ScaleY(2);
    Width     := ScaleX(80);
  end;
#endif
  LabelTime1 := TLabel.Create(WizardForm);
  with LabelTime1 do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Width    := ISDoneProgressBar1.Width div 2;
    Left     := ScaleX(0);
    Top      := PBTop + ScaleY(35);
  end;
  LabelTime2 := TLabel.Create(WizardForm);
  with LabelTime2 do begin
    Parent   := WizardForm.InstallingPage;
    AutoSize := False;
    Width    := LabelTime1.Width+ScaleX(40);
    Left     := ISDoneProgressBar1.Width div 2;
    Top      := LabelTime1.Top;
  end;
  LabelTime3 := TLabel.Create(WizardForm);
  with LabelTime3 do begin
    Parent   := WizardForm.FinishedPage;
    AutoSize := False;
    Width    := 300;
    Left     := 180;
    Top      := 200;
  end;
  MyCancelButton:=TButton.Create(WizardForm);
  with MyCancelButton do begin
    Parent:=WizardForm;
    Width:=ScaleX(135);
    Caption:=ExpandConstant('{cm:CancelButton}');
    Left:=ScaleX(360);
    Top:=WizardForm.cancelbutton.top;
    OnClick:=@CancelButtonOnClick;
  end;
end;
 
 
Procedure CurPageChanged(CurPageID: Integer);
Begin
  if (CurPageID = wpFinished) and ISDoneError then
  begin
    LabelTime3.Hide;
    WizardForm.Caption:= ExpandConstant('{cm:Error}');
    WizardForm.FinishedLabel.Font.Color:= clRed;
    WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
  end;
end;
 
function CheckError:boolean;
begin
  result:= not ISDoneError;
end;
 
procedure CurStepChanged(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
    FindHandle1,ColFiles1,CurIndex1,tmp:integer;
    ExecError:boolean;
    InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
  if CurStep = ssInstall then begin  //Если необходимо, можно поменять на ssPostInstall
    WizardForm.ProgressGauge.Hide;
    WizardForm.CancelButton.Hide;
    CreateControls;
    WizardForm.StatusLabel.Caption:=ExpandConstant('{cm:Extracted}');
    ISDoneCancel:=0;
 
 
#ifdef records
    ExtractTemporaryFile('records.inf');
#endif
 
    ISDoneError:=true;
    if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, {#NeedMem}, @ProgressCallback) then begin
      repeat
        if not SrepInit('',512,0) then break;
        if not PrecompInit(PCFVer) then break;
        if not FileSearchInit(false) then break;
 
        if not ISArcExtract ( 0, 0, ExpandConstant('{src}\The SIMS 4 Deluxe Edition.arc'), ExpandConstant('{app}\'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
 
 
 
        FindHandle1:=ISFindFiles(0,ExpandConstant('{app}\*.ogg'),ColFiles1);
        ExecError:=false;
        while not ExecError and ISPickFilename(FindHandle1,ExpandConstant('{app}\'),CurIndex1,true) do begin
          InFilePath:=ISGetName(0);
          OutFilePath:=ISGetName(1);
          OutFileName:=ISGetName(2);
          ExecError:=not ISExec(0, 0, 0, ExpandConstant('{tmp}\oggdec.exe'), '"'+InFilePath+'" "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName);
        end;
        ISFindFree(FindHandle1);
        if ExecError then break;
 
 
        ISDoneError:=false;
      until true;
      ISDoneStop;
    end;
    HideControls;
    WizardForm.CancelButton.Visible:=true;
    WizardForm.CancelButton.Enabled:=false;
  end;
  if (CurStep=ssPostInstall) and ISDoneError then begin
    Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
  end;
end;
 
 
 
 
 
 
 
 
procedure WizardImage();
begin
  WizardForm.WizardBitmapImage.Width:= ScaleX(497);
  WizardForm.WizardBitmapImage2.Width:= ScaleX(497);
 
  WelcomeLabel1:= TLabel.Create(WizardForm);
  WelcomeLabel1.Left := ScaleX(36);
  WelcomeLabel1.Top := ScaleY(89);
  WelcomeLabel1.Width := ScaleX(205);
  WelcomeLabel1.Height := ScaleY(219);
  WelcomeLabel1.AutoSize := False;
  WelcomeLabel1.WordWrap := True;
  WelcomeLabel1.Alignment := taCenter;
  WelcomeLabel1.Font.Size := 12;
  WelcomeLabel1.Font.Color:= clblack;
  WelcomeLabel1.Font.Style:= [fsBold]
  WelcomeLabel1.Font.Name:= 'Georgia'
  WelcomeLabel1.ShowAccelChar := False;
  WelcomeLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
  WelcomeLabel1.Transparent := True;
  WelcomeLabel1.Parent := WizardForm.WelcomePage;
 
  WLabel1 := TLabel.Create(WizardForm);
  WLabel1.Left := ScaleX(36);
  WLabel1.Top := ScaleY(90);
  WLabel1.Width := ScaleX(205);
  WLabel1.Height := ScaleY(219);
  WLabel1.AutoSize := False;
  WLabel1.WordWrap := True;
  WLabel1.Alignment := taCenter;
  WLabel1.Font.Size := 12;
  WLabel1.Font.Color:= clwhite;
  WLabel1.Font.Style:= [fsBold]
  WLabel1.Font.Name:= 'Georgia'
  WLabel1.ShowAccelChar := False;
  WLabel1.Caption :=ExpandConstant('{cm:WelcomeLabel1}');
  WLabel1.Transparent := True;
  WLabel1.Parent := WizardForm.WelcomePage;
 
  WelcomeLabel2:= TLabel.Create(WizardForm);
  WelcomeLabel2.Left := ScaleX(36);
  WelcomeLabel2.Top := ScaleY(160);
  WelcomeLabel2.Width := ScaleX(210);
  WelcomeLabel2.Height := ScaleY(234);
  WelcomeLabel2.AutoSize := False;
  WelcomeLabel2.WordWrap := True;
  WelcomeLabel2.Alignment := taCenter;
  WelcomeLabel2.Font.Size := 12;
  WelcomeLabel2.Font.Color:= clblack;
  WelcomeLabel2.Font.Style:= [fsBold]
  WelcomeLabel2.Font.Name:= 'Georgia'
  WelcomeLabel2.ShowAccelChar := False;
  WelcomeLabel2.Caption :=ExpandConstant('{cm:WelcomeLabel2}');
  WelcomeLabel2.Transparent := True;
  WelcomeLabel2.Parent := WizardForm.WelcomePage;
 
  WLabel2 :=TLabel.Create(WizardForm);
  WLabel2.Left := ScaleX(36);
  WLabel2.Top := ScaleY(159);
  WLabel2.Width := ScaleX(210);
  WLabel2.Height := ScaleY(234);
  WLabel2.AutoSize := False;
  WLabel2.WordWrap := True;
  WLabel2.Alignment := taCenter;
  WLabel2.Font.Size := 12;
  WLabel2.Font.Style:= [fsBold]
  WLabel2.Font.Color:= clwhite;
  WLabel2.Font.Name:= 'Georgia'
  WLabel2.ShowAccelChar := False;
  WLabel2.Caption := ExpandConstant('{cm:WelcomeLabel2}');
  WLabel2.Transparent := True;
  WLabel2.Parent := WizardForm.WelcomePage;
 
  FinishedHeadingLabel:= TLabel.Create(WizardForm);
  FinishedHeadingLabel.Left := ScaleX(36);
  FinishedHeadingLabel.Top := ScaleY(89);
  FinishedHeadingLabel.Width := ScaleX(210);
  FinishedHeadingLabel.Height := ScaleY(100);
  FinishedHeadingLabel.AutoSize := False;
  FinishedHeadingLabel.WordWrap := True;
  FinishedHeadingLabel.Alignment := taCenter;
  FinishedHeadingLabel.Font.Size := 12;
  FinishedHeadingLabel.Font.Color:= clblack;
  FinishedHeadingLabel.Font.Style:= [fsBold]
  FinishedHeadingLabel.Font.Name:= 'Georgia'
  FinishedHeadingLabel.ShowAccelChar := False;
  FinishedHeadingLabel.Caption :=ExpandConstant('{cm:FinisLabel1}');
  FinishedHeadingLabel.Transparent := True;
  FinishedHeadingLabel.Parent := WizardForm.FinishedPage;
 
  FLabel1 := TLabel.Create(WizardForm);
  FLabel1.Left := ScaleX(36);
  FLabel1.Top := ScaleY(36);
  FLabel1.Width := ScaleX(210);
  FLabel1.Height := ScaleY(100);
  FLabel1.AutoSize := False;
  FLabel1.Alignment := taCenter;
  FLabel1.WordWrap := True;
  FLabel1.Font.Size := 12;
  FLabel1.Font.Name := 'Georgia'
  FLabel1.Font.Color:= clwhite;
  FLabel1.Font.Style:= [fsBold]
  FLabel1.ShowAccelChar := False;
  FLabel1.Caption := ExpandConstant('{cm:FinisLabel1}');
  FLabel1.Transparent := True;
  FLabel1.Parent := WizardForm.FinishedPage;
 
  FinishedHeadingLabel1:= TLabel.Create(WizardForm);
  FinishedHeadingLabel1.Left := ScaleX(36);
  FinishedHeadingLabel1.Top := ScaleY(36);
  FinishedHeadingLabel1.Width := ScaleX(210);
  FinishedHeadingLabel1.Height := ScaleY(234);
  FinishedHeadingLabel1.AutoSize := False;
  FinishedHeadingLabel1.WordWrap := True;
  FinishedHeadingLabel1.Alignment := taCenter;
  FinishedHeadingLabel1.Font.Size := 12;
  FinishedHeadingLabel1.Font.Color:= clblack;
  FinishedHeadingLabel1.Font.Style:= [fsBold]
  FinishedHeadingLabel1.Font.Name:= 'Georgia'
  FinishedHeadingLabel1.ShowAccelChar := False;
  FinishedHeadingLabel1.Caption :=ExpandConstant('{cm:FinisLabel2}');
  FinishedHeadingLabel1.Transparent := True;
  FinishedHeadingLabel1.Parent := WizardForm.FinishedPage;
 
  FLabel2 :=TLabel.Create(WizardForm);
  FLabel2.Top := ScaleY(36);
  FLabel2.Left := ScaleX(36);
  FLabel2.Width := ScaleX(210);
  FLabel2.Height := ScaleY(234);
  FLabel2.AutoSize := False;
  FLabel2.WordWrap := True;
  FLabel2.Alignment := taCenter;
  FLabel2.Font.Size := 12;
  FLabel2.Font.Name := 'Georgia'
  FLabel2.Font.Style:= [fsBold]
  FLabel2.Font.Color:= clwhite;
  FLabel2.ShowAccelChar := False;
  FLabel2.Caption := ExpandConstant('{cm:FinisLabel2}');
  FLabel2.Transparent := True;
  FLabel2.Parent := WizardForm.FinishedPage;
 
  WizardForm.WelcomeLabel1.Hide;
  WizardForm.WelcomeLabel2.Hide;
 
  WizardForm.FinishedLabel.Hide;
  WizardForm.FinishedHeadingLabel.Hide;
end;
 
procedure WizardSmallImage();
begin
  WizardForm.WizardSmallBitmapImage.SetBounds(ScaleX(0), ScaleY(0), WizardForm.MainPanel.Width, WizardForm.MainPanel.Height);
 
  PageNameLabel:= TLabel.Create(WizardForm)
  with WizardForm.PageNameLabel do
  PageNameLabel.SetBounds(Left, Top, Width, Height);
  PageNameLabel.Transparent:= True;
  PageNameLabel.Font:= WizardForm.PageNameLabel.Font;
  PageNameLabel.Font.Color:= clblack;
  PageNameLabel.Parent:= WizardForm.MainPanel;
 
  PageDescriptionLabel:= TLabel.Create(WizardForm);
  with PageDescriptionLabel do
  begin
  Left:= WizardForm.PageDescriptionLabel.Left-12;
  Top:= WizardForm.PageDescriptionLabel.Top;
  Height:= WizardForm.PageDescriptionLabel.Height;
  Width:= ScaleX(280);
  AutoSize:= False;
  WordWrap:= True;
  Font.Name:= WizardForm.PageDescriptionLabel.Font.Name;
  Transparent:= True;
  Parent:= WizardForm.MainPanel;
  end;
 
  WizardForm.PageNameLabel.Hide;
  WizardForm.PageDescriptionLabel.Hide;
end;
 
 
function skinsdll(): Boolean;
begin
ExtractTemporaryFile('1.cjstyles');
LoadSkin(ExpandConstant('{tmp}\1.cjstyles'), '');
Result := True;
end;
 
procedure LogoOnClick(Sender: TObject);
var ResCode: Integer;
begin
  ShellExec('', 'http://vk.com/mr.mass', '' , '', SW_SHOW, ewNoWait, ResCode)
end;
 
procedure Logo();
var
  BtnPanel: TPanel;
  BtnImage: TBitmapImage;
begin
  ExtractTemporaryFile('logo.bmp')
 
  BtnPanel:=TPanel.Create(WizardForm)
  with BtnPanel do begin
    Left:=20
    Top:=325
    Width:=132
    Height:=27
    Cursor:=crHand
    OnClick:=@logoOnClick
    Parent:=WizardForm
  end;
  BtnImage:=TBitmapImage.Create(WizardForm)
  with BtnImage do begin
    AutoSize:=True;
    Enabled:=False;
    Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp')
    Parent:=BtnPanel
  end;
 
  end;
 
 procedure InitializeWizard;
  begin
  Logo();
  WizardImage();
  WizardSmallImage();
  end;
 
 
[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\Game\Bin\The.Sims.4.Launcher.exe
Name: {commondesktop}\{#MyAppName}; Filename: {app}\Game\Bin\The.Sims.4.Launcher.exe; Tasks: desktopicon
 
 
[Registry]
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Setup Version; ValueData: 5.4.2.ee2 (a)
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: App Path; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: InstallLocation; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Icon Group; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: User; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Selected Tasks; ValueData: icons,icons\desktopicon,icons\quicklaunchicon,soft,soft\directx,soft\vccheck,soft\physxcheck
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Deselected Tasks; ValueData:  
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Inno Setup: Language; ValueData: russian
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: DisplayName; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: DisplayIcon; ValueData: (app)\Game\Bin\TS4.exe
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: UninstallString; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: UninstallDataFile; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: QuietUninstallString; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: Publisher; ValueData: License by T_ONG_BAK_J
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: dword; ValueName: NoModify; ValueData: $00000001
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: dword; ValueName: NoRepair; ValueData: $00000001
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\The SIMS 4 Deluxe Edition_is1; ValueType: string; ValueName: InstallDate; ValueData: 20140928
Root: HKLM; SubKey: SOFTWARE\\Maxis\The Sims 4; ValueType: string; ValueName: GDFBinary; ValueData: (app)\__Installer\GDFBinary_ru_RU.dll
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: GameExplorer; ValueData: {{46F1375C-3A8C-42E1-9A27-0CE809AD35AC}
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: DisplayName; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Locale; ValueData: ru_RU
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Product GUID; ValueData: {{48EBEBBF-B9F8-4520-A3CF-89A730721917}
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletekey
Root: HKLM; SubKey: SOFTWARE\Maxis\The Sims 4\InstallOptSelect; ValueType: string; ValueName: ; ValueData: 1
 

Всего записей: 56 | Зарегистр. 27-09-2014 | Отправлено: 08:56 05-10-2014
Открыть новую тему     Написать ответ в эту тему

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » Программы » Inno Setup - создание инсталляционных пакетов (Часть 15)


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru