Eivind Bakkestuen unread, Jun 1, 2020, 5:56:00 AM

38 views
Skip to first unread message

Repacker mapcgx

unread,
May 23, 2021, 3:10:39 AM5/23/21
to innosetup-test
#define GameSize 915
#include "Include\XTime.iss"

[Setup]
WizardSmallImageFile=Splash\smallbitmap.bmp
WizardImageFile=Splash\Capture.bmp
AppName=Call of Duty
AppPublisher=Activison
AppVersion=5.0
DefaultDirName={pf}\Call of Duty
Setupiconfile=Setup.ico
LicenseFile=Licence_en-US.txt
Outputdir=Output
SolidCompression=True
Compression=lzma2/ultra64
InternalCompressLevel=ultra64
CompressionThreads=2

//[Files]
//;{ ISFormDesignerFilesBegin } // Don't remove this line!
//;// Don't modify this section. It is generated automatically.
//DestName: "WizardForm.PreparingErrorBitmapImage.bmp"; Source: "Splash\PNG120.bmp"; Flags: dontcopy solidbreak
//DestName: "WizardForm.BitmapImage1.bmp"; Source: "Splash\Activision.bmp"; Flags: dontcopy solidbreak
//;// Don't modify this section. It is generated automatically.
//;{ ISFormDesignerFilesEnd } // Don't remove this line!
[Files]
Source: "Output\Redist\dxwebsetup.exe"; DestDir: "{app}\Redist"; Flags: ignoreversion
Source: "QSFVUNST.EXE"; DestDir: "{app}"; Flags: ignoreversion
Source: "QuickSFV.EXE"; DestDir: "{app}"; Flags: ignoreversion
Source: "QuickSFV.ini"; DestDir: "{app}"
//Source: "1.md5"; DestDir: "{app}" ignoreversion
Source: "XTime.dll"; DestDir: "{tmp}"; Flags: dontcopy ignoreversion 
Source: "Include\arc.ini"; DestDir: "{tmp}"; Flags: dontcopy
Source: "Include\english.ini"; DestDir: "{tmp}"; Flags: dontcopy
Source: "Include\ISDone.dll"; DestDir: "{tmp}"; Flags: dontcopy 
Source: "Include\unarc.dll"; DestDir: "{tmp}"; Flags: dontcopy 
Source: "Include\XTime.dll"; DestDir: "{tmp}"; Flags: dontcopy 
Source: "Include\XTime.dll"; DestDir: "{tmp}"; Flags: dontcopy ignoreversion 
Source: "Music\Music.mp3"; DestDir: "{tmp}"; Flags: dontcopy
Source: "Skin\*"; DestDir: "{tmp}"; Flags:  dontcopy
Source: "Splash\*"; DestDir: "{tmp}"; Flags:  dontcopy
Source: "Music\*"; DestDir: "{tmp}"; Flags:  dontcopy
Source: "Output\Redist\vcredist_x86.exe"; DestDir: "{app}\Redist"; Flags: ignoreversion
Source: "Slides\*"; DestDir: "{tmp}"; Flags: dontcopy
Source: "splash\Click.wav"; DestDir: {tmp}; Flags: dontcopy;
Source: "Include\isgsg.dll"; DestDir: {tmp}; Flags: dontcopy;
#define i 0
#ifexist "Slides\1.jpg"
#sub AddFile
Source: "Slides\{#i}.jpg"; DestDir: "{tmp}"; Flags: dontcopy
#endsub
#for {i = 1; FileExists(StringChange("Slides\FileName.jpg", "FileName", Str(i))) != 0; i++} AddFile
#endif

[CustomMessages]
Message1=Extracting...
Message2=Checking: %1    (%2 of %3)   :  %4
Message3=Total files: %1  Files processed: %2    Ok: %3  Missing: %4  Bad: %5   :  %6
Message4=Installation cancelled!
Message5=Decompression failed with error code %1
Message6=Error occured while extracting archives. Please contact the author of this program.
Message7=Compression method "%1" of the acrhive "%2" is not supported by the current version of unarc.dll.
Message8=Output block is too small for the archive "%1".
Message9=Not enough memory to unpack "%1" archive.
Message10=Archive "%1" data read error.
Message11=Data can't be extracted from the archive "%1".
Message12=Required action isn't supported by the current version of unarc.dll.
Message13=Data block of the archive "%1" is already decompressed.
Message14=User cancelled the operation.
Message15=Error occured while processing the archive "%1".
Message16=Bad CRC in the archive "%1".
Message17=Applied password for archive "%1" isn't correct.
Message18=Header of the archive "%1" is corrupted.
Message19=Raised a code exception. Please contact the author of this program.
Message20=Not enough free space to unpack "%1".
Message21=Extracting FreeArc archives...
Message22=Files: %1%2, progress %3%%, remaining time %4
Message23=Disk %1 of %2, archive %3 of %4, %5%% of archive processed
Message24=Unpacked archives: %1, received files: %2 [%3]
Message25=Please insert disk ¹ %1 with file "%2" and press OK.
Message26=%1%%, %2 remains
Message27=Ending
Message28=Unknown
Message29= hours
Message30= mins
Message31= secs
Message32=Browse directories
Message33=OK
Message34=Cancel
Message35=The file with such filename does not exists in directory!

[Languages]
Name: "eng"; MessagesFile: "compiler:Default.isl"
//Name: "basque"; MessagesFile: "compiler:Languages\Basque.isl"
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl"
Name: "corsican"; MessagesFile: "compiler:Languages\Corsican.isl"
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl"
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
//Name: "greek"; MessagesFile: "compiler:Languages\Greek.isl"
Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl"
//Name: "hungarian"; MessagesFile: "compiler:Languages\Hungarian.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
//Name: "scottishgaelic"; MessagesFile: "compiler:Languages\ScottishGaelic.isl"
//Name: "serbiancyrillic"; MessagesFile: "compiler:Languages\SerbianCyrillic.isl"
//Name: "serbianlatin"; MessagesFile: "compiler:Languages\SerbianLatin.isl"
Name: "slovak"; MessagesFile: "compiler:Languages\Slovak.isl"
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl"



[Run]
Filename: "{app}\Redist\dxwebsetup.exe"; WorkingDir: "{app}\Redist"
Filename: "{app}\QuickSFV.EXE"; Parameters: "1.md5"; WorkingDir: "{app}"
Filename: "{app}\QuickSFV.ini"; Parameters: "1.md5"; WorkingDir: "{app}"
Filename: "{app}\game.md5"
Filename: "{app}\vcredist_x86.exe"; WorkingDir: "{app}\Redist"


[code]
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const
  BASS_SAMPLE_LOOP = 4;
  BASS_UNICODE = $80000000;
  BASS_CONFIG_GVOL_STREAM = 5;
const
  #ifndef UNICODE
    EncodingFlag = 0;
  #else
    EncodingFlag = BASS_UNICODE;
  #endif
type
  HSTREAM = DWORD;
  var
  SoundStream: HSTREAM;
  Background, Logo: TBitmapImage;
  CurrentPicture:integer;
  PicList: TStringlist;
  BackgroundForm: TForm;
  TimerID: LongWord;
  ResultCode:integer;
function BASS_Init(device: LongInt; freq, flags: DWORD;
  win: HWND; clsid: Cardinal): BOOL;
  external 'BASS_Init@files:bass.dll stdcall';
function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD;
  offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
  external 'BASS_StreamCreateFile@files:bass.dll stdcall';
function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL;
  external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
  external 'BASS_SetConfig@files:bass.dll stdcall';
function BASS_Free: BOOL;
  external 'BASS_Free@files:bass.dll stdcall';


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
type
 TProc=procedure(HandleW, msg, idEvent, TimeSys: LongWord);
 TTimerProc = procedure(HandleW, Msg, idEvent, TimeSys: LongWord);
 TCallback2 = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
 TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
var
  ISDoneCancel: Integer;
  //---------- XTime -----------\\
  StartTime: Integer;
  ArcDir: string;
  //---------- XTime -----------\\
  ISDoneError: Boolean;
  PercentageLB, RemainingLB, ElapsedLB, InstallingSpeed: TLabel;


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 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 ChangeLanguage(Language:AnsiString):boolean;
  external 'ChangeLanguage@files:ISDone.dll stdcall delayload';           
function SuspendProc:boolean;                                                             
  external 'SuspendProc@files:ISDone.dll stdcall';                                                    
function ResumeProc:boolean;                                                            
  external 'ResumeProc@files:ISDone.dll stdcall';
 
function GetMessage(MsgNum: Integer; Var1, Var2: String): String;
begin
  Result:=ExpandConstant('{cm:Message'+IntToStr(MsgNum)+'}');
  StringChange(Result,'%1',Var1);
  StringChange(Result,'%2',Var2);
end;

#ifdef Unicode
#define A "W"
#else
#define A "A"
#endif

function sndPlaySound(lpszSoundName: string; uFlags: cardinal):integer;
external 'sndPlaySound{#A}@winmm.dll stdcall';

function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:Innocallback.dll stdcall';
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external 'SetT...@user32.dll stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'Kill...@user32.dll stdcall';

procedure InitializeSlideShow(Hwnd:Thandle; l,t,w,h:integer;Animate:boolean; Stretch:integer); external 'InitializeSlideShow@files:isslideshow.dll stdcall';
procedure DeinitializeSlideShow; external 'DeinitializeSlideShow@files:isslideshow.dll stdcall';
procedure ShowImage(ipath:PAnsiChar; Effect:integer); external 'ShowImage@files:isslideshow.dll stdcall';
function GetSystemMetrics(nIndex : Integer): Integer;  external 'GetSystemMetrics@user32 stdcall';

procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord);
begin
CurrentPicture:=CurrentPicture+1;
  if CurrentPicture=piclist.count+1 then CurrentPicture:=1;
  ShowImage(piclist.strings[CurrentPicture - 1], 1);
end;

procedure ProgressLabels(Status, CurrentFile: String);
begin
  WizardForm.StatusLabel.Caption:=Status;
  with WizardForm.FilenameLabel do
    Caption := MinimizePathName(CurrentFile, Font, Width);
end;



function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
var
  //---------- XTime -----------\\
  TimeNow, TimeDiff: Integer;
  z1, z2: LongInt;
  //---------- XTime -----------\\
begin
  ProgressLabels(GetMessage(1,'',''), CurrentFile);
  if OveralPct <= WizardForm.ProgressGauge.Max then
    WizardForm.ProgressGauge.Position := OveralPct;

  //---------- XTime -----------\\
  TimeNow:= GetTime;
  TimeDiff:= TimeNow - StartTime;

  z1:= WizardForm.ProgressGauge.Max;
  z2:= WizardForm.ProgressGauge.Position;

  PercentageLB.Caption := GetPercentage(z1, z2, 2) + ' %';
  RemainingLB.Caption := 'Remaining: '  + GetRemainsTime(TimeDiff, 3, z1, z2);
  ElapsedLB.Caption   := 'Elapsed: '    + GetElapsedTime(TimeDiff, 3);
  InstallingSpeed.Caption := 'Speed: '  + GetInstallingSpeed({#GameSize}, TimeDiff, 2, z1, z2);
  //---------- XTime -----------\\

  Result := ISDoneCancel;                                                            
end;                                                                    
                                                                            
procedure Extract_Resources;
begin
  if not FileExists(ExpandConstant('{tmp}\arc.ini')) then ExtractTemporaryFile('arc.ini');
  if not FileExists(ExpandConstant('{tmp}\english.ini')) then ExtractTemporaryFile('english.ini');
  if not FileExists(ExpandConstant('{tmp}\unarc.dll')) then ExtractTemporaryFile('unarc.dll');
  if not FileExists(ExpandConstant('{tmp}\idone.dll')) then ExtractTemporaryFile('unarc.dll');

end;

//---------- XTime -----------\\
procedure CheckArcFile(ArcFile: String);
begin
  if not FileExists(ArcDir + ArcFile) then
    ArcDir:= GetArcFile(ArcDir + ArcFile);
end;
//---------- XTime -----------\\

procedure UnpackProgress;
begin
  Extract_Resources;
  ISDoneError:= False;
  ISDoneCancel:= 0;

  //---------- XTime -----------\\
  StartTime:= GetTime;
  //---------- XTime -----------\\

  if ISDoneInit(ExpandConstant('{tmp}\records.inf'), $F777, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then
  begin
    ChangeLanguage('English');
    if FileSearchInit(true) then
    begin
      //---------- XTime -----------\\
      WizardForm.ProgressGauge.Position := 0;   // Should be zero.
      Wizardform.ProgressGauge.Max := 2000;     // For 2 Archive[setup-1.bin, setup-2.bin] ==> (2 * 1000 = 2000).

      ArcDir:= ExpandConstant('{src}\');
      //---------- XTime -----------\\

      CheckArcFile('Data1.bf');  // XTime
      if not ISArcExtract(0, 0, ArcDir + 'Data1.bf', ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
      CheckArcFile('Data2.bf'); // XTime
      if not ISArcExtract(0, 0, ArcDir + 'Data2.bf', ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
            CheckArcFile('Data3.bf');  // XTime
      if not ISArcExtract(0, 0, ArcDir + 'Data3.bf', ExpandConstant('{app}'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), false) then
    end;
    ISDoneStop;
  end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
  Umsg: Integer;
begin                                                                                  
  case CurStep of
    ssInstall:
      UnpackProgress;
    ssPostInstall:
    begin
      if ISDoneError then
      begin
        PercentageLB.Visible := False;
        RemainingLB.Visible := False;
        ElapsedLB.Visible := False;
        InstallingSpeed.Visible := False;
        WizardForm.StatusLabel.Caption:= 'Rolling back Changes ...';
        Exec(ExpandConstant('{uninstallexe}'),'/verysilent','',SW_HIDE, ewWaitUntilTerminated, Umsg);
      end;
    end;
  end;
end;

Procedure CurPageChanged(CurPageID: Integer);
Begin
  if (CurPageID = wpFinished) and ISDoneError then
  begin
    WizardForm.Caption:= 'Setup completed with Errors !';
    WizardForm.FinishedLabel.Font.Color:= clRed;
    WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
  end;
end;

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
  if CurPageID = wpInstalling then
  begin
    SuspendProc;
    if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then
    begin
      ISDoneError := True;
      ISDoneCancel := 1;
    end;;
      XVerifyHashFromFileClose;
    ResumeProc;
  end;
end;

procedure CreateInatallingPageLB;
begin
  PercentageLB := TLabel.Create(WizardForm);
  with PercentageLB do
  begin
    Parent := WizardForm.InstallingPage;
    Caption := '0.0 %';
    Left := WizardForm.ProgressGauge.Left + (WizardForm.ProgressGauge.Width / 2) - (PercentageLB.Width / 2);
    Top := WizardForm.ProgressGauge.Top + WizardForm.ProgressGauge.Height + 15;
    Font.Color := clWhite;
    Font.Size := 20;
    Font.Name := 'HP Simplified';
    ParentFont := False;
  end;

  RemainingLB := TLabel.Create(WizardForm);
  with RemainingLB do
  begin
    Parent := WizardForm.InstallingPage;
    Caption := 'Remaining: ';
    Font.Color := clWhite;
    Font.Name := 'HP Simplified';
    ParentFont := False;
    Left := WizardForm.ProgressGauge.Left;
    Top := PercentageLB.Top + 0;
  end;

  ElapsedLB := TLabel.Create(WizardForm);
  with ElapsedLB do
  begin
    //Parent := WizardForm.InstallingPage;
   // Caption := 'Elapsed: ';
  //  Font.Color := clWhite;
   // Font.Name := 'HP Simplified';
   // ParentFont := False;
  //  Left := WizardForm.ProgressGauge.Left + (WizardForm.ProgressGauge.Width / 2) + 30;
  //  Top := PercentageLB.Top + 5;
  end;

  InstallingSpeed := TLabel.Create(WizardForm);
  with InstallingSpeed do
  begin
    Parent := WizardForm.InstallingPage;
    Caption := 'Speed: 0 mb\ sec';
    Font.Color := clWhite;
    Font.Name := 'HP Simplified';
    ParentFont := False;
    Left := WizardForm.ProgressGauge.Left;
    Top := PercentageLB.Top + 10;
  end;
end;
////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure ShowSplashScreen(p1:HWND;p2:AnsiString;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10 :integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const
  OCR_NORMAL = 32512;

function SetSystemCursor(hcur: LongWord; id: DWORD): BOOL;
  external 'SetSyst...@user32.dll stdcall';
function LoadCursorFromFile(lpFileName: string): LongWord;
  external 'LoadCurso...@user32.dll stdcall';
function CopyIcon(hIcon: LongWord): LongWord;
  external 'Copy...@user32.dll stdcall';
function LoadCursor(hInstance: LongWord; lpCursorName: LongWord): LongWord;
    external 'LoadC...@user32.dll stdcall';

var
  OriginalCursor: LongWord;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure MakeSlideShow();
var
i :integer;
begin
  BackgroundForm:= TForm.Create(nil);
  BackgroundForm.BorderStyle:= bsNone;
  BackgroundForm.Color:=clBlack;
  BackgroundForm.SetBounds(0, 0, GetSystemMetrics(0), GetSystemMetrics(1))
  BackgroundForm.Visible:=True;
  BackgroundForm.enabled:= False;
  PicList:=tstringlist.Create;
#ifexist "Slides\1.jpg"
#sub ExtractFile
ExtractTemporaryFile('{#i}.jpg');
#endsub
#for {i = 1; FileExists(StringChange("Slides\FileName.jpg", "FileName", Str(i))) != 0; i++} ExtractFile
#endif
i:=1;
repeat
  piclist.add(ExpandConstant('{tmp}\'+IntToStr(i)+'.jpg'));
  i:=i+1;
until FileExists(ExpandConstant('{tmp}\'+IntToStr(i)+'.jpg')) = False;
  BackgroundForm.show;
  InitializeSlideShow(BackgroundForm.Handle, 0, 0, GetSystemMetrics(0), GetSystemMetrics(1), true, 1);
  ShowImage(ExpandConstant('{tmp}') + '\1.jpg', 1);
end;

procedure Background1;
begin
BackgroundForm := TForm.Create(nil);
with BackgroundForm do
begin
Color := ClBlack
BorderStyle := bsnone;
Left := 0;
Top:= 0;
Enabled := False;
Width := GetSystemMetrics(0);
Height := GetSystemMetrics(1);
Show();
Repaint();
end;
end;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
procedure InitializeWizard();
var
  PathToCursorFile: string;
  Cursor: LongWord;
  StreamHandle: HSTREAM;
begin
  MakeSlideShow;
//  RedesignWizardForm;
  CreateInatallingPageLB;
  ExtractTemporaryFile('Music.mp3');
  if BASS_Init(-1, 44100, 0, 0, 0) then
  begin
  StreamHandle := BASS_StreamCreateFile(False,
  ExpandConstant('{tmp}\Music.mp3'), 0, 0, 0, 0,
  EncodingFlag or BASS_SAMPLE_LOOP);
  BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
  BASS_ChannelPlay(StreamHandle, False);
  ExtractTemporaryFile('Click.wav');
  ExtractTemporaryFile('isgsg.dll');
  ExtractTemporaryFile('1.gif');
  ExtractTemporaryFile('2.gif');
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\1.gif'),1000,3000,1000,0,255,True,$FFFFFF,10);
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\2.gif'),1000,3000,1000,0,255,True,$FFFFFF,10);
  // Remember the original custom
  OriginalCursor := CopyIcon(LoadCursor(0, OCR_NORMAL));
  // Load our cursor
  ExtractTemporaryFile('cursor.cur')
  PathToCursorFile := ExpandConstant('{tmp}\cursor.cur');
  Cursor := LoadCursorFromFile(PathToCursorFile);
  SetSystemCursor(Cursor, OCR_NORMAL);
end;
//TimerID:=SetTimer(0, 0, 2000, WrapTimerProc(@OnTimer, 4));
end;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Importing LoadSkin API from ISSkin.DLL
procedure LoadSkin(lpszPath: PAnsiChar; lpszIniFileName: PAnsiChar);
external 'LoadSkin@{tmp}\isskin.dll stdcall delayload';

// Importing UnloadSkin API from ISSkin.DLL
procedure UnloadSkin;
external 'UnloadSkin@{tmp}\isskin.dll stdcall delayload';

// Importing ShowWindow Windows API from User32.DLL
function ShowWindow(hWnd: Integer; uType: Integer): Integer;
external 'ShowW...@user32.dll stdcall';
////////////////////////////////////////////////////////////////////////////////
procedure LoadVCLStyle(VClStyleFile: String);
  external 'LoadVCLStyleW@files:VclStylesInno.dll stdcall';
procedure UnLoadVCLStyles;
  external 'UnLoadVCLStyles@files:VclStylesInno.dll stdcall';

function InitializeSetup(): Boolean;
begin
  ExtractTemporaryFile('Codex.vsf');
  LoadVCLStyle(ExpandConstant('{tmp}\Codex.vsf'));
  ExtractTemporaryFile('isskin.dll');
ExtractTemporaryFile('Skin.cjstyles');
LoadSkin(ExpandConstant('{tmp}\Skin.cjstyles'), '');
  Result:= True;
end;
/////////////////////////////////////////////////////////////////////////
procedure DeinitializeSetup();
begin
  SetSystemCursor(OriginalCursor, OCR_NORMAL);
  UnLoadVCLStyles;
  BASS_Free;
  //DeinitializeSlideShow;
//  KillTimer(0, TimerID);
end;
/////////////////////////////////////////////////////////////////////////////
function NextButtonClick(CurPageID: Integer): Boolean;
begin
//  sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0001);
  Result := True;
end;

function BackButtonClick(CurPageID: Integer): Boolean;
begin
//  sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0001);
  Result := True;
end;

procedure CancelButtonOnClick(Sender: TObject);
begin                                                                                         
//  sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0001);
end;



///////////////////////////////////////////////////////////////////////



[UninstallDelete]
Type: filesandordirs; Name: {app};
[ISFormDesigner]
WizardForm=FF0A005457495A415244464F524D003010360D000054504630F10B5457697A617264466F726D0A57697A617264466F726D0C436C69656E744865696768740368010B436C69656E74576964746803F101134F6E436F6E73747261696E6564526573697A6507125F43616E63656C427574746F6E436C69636B0C4578706C696369744C65667402000B4578706C69636974546F7002000D4578706C6963697457696474680301020E4578706C69636974486569676874038F010D506978656C73506572496E636802600A54657874486569676874020D00F202010C544269746D6170496D6167650C4269746D6170496D61676531044C656674020003546F70033F0105576964746803B9000648656967687402290A4269746D617046696C65061553706C6173685C41637469766973696F6E2E626D700000F10A544E6577427574746F6E0C43616E63656C427574746F6E044C65667403980103546F70033F01074F6E436C69636B07125F43616E63656C427574746F6E436C69636B0C4578706C696369744C6566740398010B4578706C69636974546F70033F010000F10A544E6577427574746F6E0A4E657874427574746F6E03546F70033F01074F6E436C69636B07105F4E657874427574746F6E436C69636B0B4578706C69636974546F70033F010000F10A544E6577427574746F6E0A4261636B427574746F6E03546F70033F01074F6E436C69636B07105F4261636B427574746F6E436C69636B0B4578706C69636974546F70033F010000F10C544E65774E6F7465626F6F6B0D4F757465724E6F7465626F6F6B00F110544E65774E6F7465626F6F6B506167650B57656C636F6D65506167650D4578706C69636974576964746803F1010E4578706C6963697448656967687403390100F10C544269746D6170496D6167651157697A6172644269746D6170496D616765044C65667402E003546F7002F9055769647468032602064865696768740340010C4578706C696369744C65667402E00B4578706C69636974546F7002F90D4578706C6963697457696474680326020E4578706C696369744865696768740340010000F10E544E6577537461746963546578740D57656C636F6D654C6162656C32044C65667403F00103546F70033701055769647468030D010648656967687403D7000C4578706C696369744C65667403F0010B4578706C69636974546F700337010D4578706C696369745769647468030D010E4578706C6963697448656967687403D7000000F10E544E6577537461746963546578740D57656C636F6D654C6162656C31044C65667403F00103546F700337010557696474680395000648656967687402280C4578706C696369744C65667403F0010B4578706C69636974546F700337010D4578706C6963697457696474680395000E4578706C696369744865696768740228000000F110544E65774E6F7465626F6F6B5061676509496E6E6572506167650D4578706C69636974576964746803F1010E4578706C6963697448656967687403390100F10C544E65774E6F7465626F6F6B0D496E6E65724E6F7465626F6F6B00F110544E65774E6F7465626F6F6B506167650D53656C656374446972506167650D4578706C69636974576964746803A1010E4578706C6963697448656967687403ED000000F110544E65774E6F7465626F6F6B506167651453656C656374436F6D706F6E656E7473506167650D4578706C69636974576964746803A1010E4578706C6963697448656967687403ED000000F110544E65774E6F7465626F6F6B50616765095265616479506167650D4578706C69636974576964746803A1010E4578706C6963697448656967687403ED000000F110544E65774E6F7465626F6F6B506167650D507265706172696E67506167650D4578706C69636974576964746803A1010E4578706C6963697448656967687403ED0000F10C544269746D6170496D61676519507265706172696E674572726F724269746D6170496D61676503546F70020805576964746802200648656967687402200A4269746D617046696C65061153706C6173685C504E473132302E626D700B4578706C69636974546F7002080D4578706C69636974576964746802200E4578706C6963697448656967687402200000F10E544E6577537461746963546578740E507265706172696E674C6162656C044C65667402200C4578706C696369744C65667402200000F108544E65774D656D6F0D507265706172696E674D656D6F03546F7002500B4578706C69636974546F700250000000F110544E65774E6F7465626F6F6B506167650E496E7374616C6C696E67506167650D4578706C69636974576964746803A1010E4578706C6963697448656967687403ED0000F10E544E6577537461746963546578740D46696C656E616D654C6162656C03546F7002280B4578706C69636974546F7002280000F10E544E6577537461746963546578740B5374617475734C6162656C03546F7002180B4578706C69636974546F7002180000F10F544E657750726F67726573734261720D50726F6772657373476175676503546F70023A0B4578706C69636974546F70023A000000F110544E65774E6F7465626F6F6B506167650D496E666F4166746572506167650D4578706C69636974576964746803A1010E4578706C6963697448656967687403ED00000000F1065450616E656C094D61696E50616E656C00F10C544269746D6170496D6167651657697A617264536D616C6C4269746D6170496D616765044C65667402F803546F7002F505576964746803F90106486569676874024B0C4578706C696369744C65667402F80B4578706C69636974546F7002F50D4578706C69636974576964746803F9010E4578706C69636974486569676874024B0000F10E544E65775374617469635465787414506167654465736372697074696F6E4C6162656C044C6566740328FF03546F70023A05576964746803D5000648656967687402110B5472616E73706172656E74090C4578706C696369744C6566740328FF0B4578706C69636974546F70023A0D4578706C69636974576964746803D5000E4578706C6963697448656967687402110000F10E544E6577537461746963546578740D506167654E616D654C6162656C044C65667403F00103546F70023A055769647468034D010648656967687402060B5472616E73706172656E74090C4578706C696369744C65667403F0010B4578706C69636974546F70023A0D4578706C696369745769647468034D010E4578706C69636974486569676874020600000000F110544E65774E6F7465626F6F6B506167650C46696E6973686564506167650D4578706C69636974576964746803F1010E4578706C6963697448656967687403390100F10C544269746D6170496D6167651257697A6172644269746D6170496D61676532044C65667402E003546F7002F9055769647468032602064865696768740340010C4578706C696369744C65667402E00B4578706C69636974546F7002F90D4578706C6963697457696474680326020E4578706C696369744865696768740340010000F110544E6577436865636B4C697374426F780752756E4C697374044C65667403F00103546F70033901055769647468032501064865696768740398000C4578706C696369744C65667403F0010B4578706C69636974546F700339010D4578706C6963697457696474680325010E4578706C696369744865696768740398000000F10F544E6577526164696F427574746F6E074E6F526164696F044C65667403F8FE03546F70033901055769647468030D010648656967687402090C4578706C696369744C65667403F8FE0B4578706C69636974546F700339010D4578706C696369745769647468030D010E4578706C6963697448656967687402090000F10F544E6577526164696F427574746F6E08596573526164696F044C65667403F8FE03546F70033901055769647468030D010648656967687402090C4578706C696369744C65667403F8FE0B4578706C69636974546F700339010D4578706C696369745769647468030D010E4578706C6963697448656967687402090000F10E544E6577537461746963546578740D46696E69736865644C6162656C044C65667403F00103546F7003390105576964746803BD0006486569676874022E0C4578706C696369744C65667403F0010B4578706C69636974546F700339010D4578706C69636974576964746803BD000E4578706C69636974486569676874022E0000F10E544E6577537461746963546578741446696E697368656448656164696E674C6162656C044C65667403F00103546F7003390105576964746803050106486569676874022E0C4578706C696369744C65667403F0010B4578706C69636974546F700339010D4578706C6963697457696474680305010E4578706C69636974486569676874022E00000000F10E544E6577537461746963546578740C426576656C65644C6162656C044C65667403F00103546F700362010C4578706C696369744C65667403F0010B4578706C69636974546F700362010000065450616E656C0650616E656C31044C656674020003546F70033F0105576964746803B900064865696768740229085461624F726465720205074F6E436C69636B070B50616E656C31436C69636B000000

Reply all
Reply to author
Forward
0 new messages