nik1967
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Код: #define GameID "{9FB8AF2C-E42A-4BB7-8055-2A33FD3192B7}" //************************************************ [Название] ***************************************************//: ;Название игры #define GameName "Call of Duty - Modern Warfare 3" ;Название игры + версия #define GameVerName "Call of Duty - Modern Warfare 3 [V.1.0]" ;Название фаила Запуска (x32) #define GameUninstall "Call of Duty - Modern Warfare 3" ;Название фаила Запуска (x64) #define GameUninstall_x64 "*_х64" ;Название фаила Удаление (Без "х86" | "x64") #define GameUninstall_ "Call of Duty - Modern Warfare 3" ;Папка установки (Без \ / ? : * " > < |) #define Gamefolder "Call of Duty - Modern Warfare 3" ;Название exe фаила запуска установки #define SetupName "CODMW3" //************************************************ [Название] ***************************************************//. //************************************************ [Общая информация] ***************************************************//: ;------------------------------ [Издательство игры/RePacker] ------------------------------; ;Имя РеПакера #define RePacker "Timick" ;Разработчик\Издатель #define Company "Новый диск" ;------------------------------ [Издательство игры/RePacker] ------------------------------; ;------------------------------ [Работа с сохранениями] ------------------------------; ;Сохранения игры #define Saves "Test Drive Unlimited" ;Место сохранений (Мои документы = || {userdocs} ||) #define SavesDir "{userdocs}" ;------------------------------ [Работа с сохранениями] ------------------------------; ;------------------------------ [Фаилы/Папки запуска] ------------------------------; ;EXE Фаил запуска игры(x32), или если он один на обе разрядности. #define GameEXE_1 "iw5sp.exe" ;Папка с EXE Фаилом #define GameDir_1 "{app}" ;----------------------------------------------------------------------- ;EXE Фаил запуска игры(x64) #define GameEXE_2 "*.exe" ;Папка с EXE Фаилом #define GameDir_2 "{app}" ;------------------------------ [Фаилы/Папки запуска] ------------------------------; ;------------------------------ [Другое] ------------------------------; ;AutoRun скрипт ;#define Autorun ;Поиск и запрещение в пути Русских букв (Русофобия) ;#define Russophobia ;Splash(Вкл или Выкл) ;#define Splash ;Музыка (Вкл или Выкл) #define Music ;Ярлык (х64) ;#define Start_x64 ;Приоритет установки (По умолчанию - высокий) #define Priority ;WinTB #define WinTB ;------------------------------ [Другое] ------------------------------; //************************************************ [Общая информация] ***************************************************//. //************************************************ [Разное] ***************************************************//: ;------------------------------ [Размер игры] ------------------------------; ;Объём требуемого места #define NeedSize "14100" ;Место необходимое для распаковки #define TNeedSize "14100" ;------------------------------ [Размер игры] ------------------------------; ;------------------------------ [Системные требования] ------------------------------; ;Частота процессора #define Processor "3000" ;Объём видеопамяти #define VideoCard "256" ;Объём оперативной памяти #define RAM "1500" ;Объём оперативной памяти для распаковки #define NeedMem "512" ;Версия Windows 610 - Win 7 | 611 - Win 7 SP1 | 612 - Win 7 SP2 #define WinVerMajor "6" #define WinVerMinor "1" #define ServicePack "0" ;------------------------------ [Системные требования] ------------------------------; ;------------------------------ [Модуль FreeArc] ------------------------------; ;Включение и выключение модуля ;#define FreeArc ;Архивы Freearc (если используется модуль) #define ArcLocation "{src}\*.bin" ;------------------------------ [Модуль FreeArc] ------------------------------; ;------------------------------ [Слайдшоу] -------------------------------; ;Количество слайдов #define SlidesCount "1" ;Время показа слайда (Значение в МСек, 5000Мсек = 5сек.) #define SlidesSecond "100000" ;------------------------------ [Слайдшоу] -------------------------------; ;------------------------------ [Модуль ISDone] ------------------------------; ;Включение и выключение модуля #define ISDone #define records ;#define precomp04 #define precomp038 ;#define unrar ;Пароль для архивов (Работает только с таким методом шифрования: -hp -p1g2x3h7421 --encryption=aes:r100) #define Password "1g2x3h7421" ;------------------------------ [Модуль ISDone] ------------------------------ //************************************************ [Разное] ***************************************************//. [Setup] AppID={{#GameID}} ;Название игры AppName={#GameName} ;Название + версия AppVerName={#GameName} ;Издатель... VersionInfoCompany={#Company} | RePack by {#RePacker} AppCopyright=© {#Company} ;Версия VersionInfoDescription={#GameName} ;Путь установки DefaultDirName={pf}\RePack by Timick\{#Gamefolder} ;Меню Пуск DefaultGroupName=RePack by Timick\{#Gamefolder} ;Название выходного фаила OutputBaseFilename=Setup_{#SetupName} DirExistsWarning=auto ;Иконка SetupIconFile=Icons\Icon_1.ico ;Разделение архивов Inno DiskSpanning=true SlicesPerDisk=3 DiskSliceSize=1566000000 DisableReadyPage=true ;Разрешить изменять каталог установки (True - да | False - нет) ;CreateAppDir=true ;Папка фаилов удаления UninstallFilesDir={app}\Uninstall ;-------------------------------------------------------------------------------------------- #include "Modules_ISS\Files.iss" [Icons] //--------------------------------------------------------------------- [Меню "Пуск"] ---------------------------------------------------------------------// ;Запуск Name: {group}\{#GameUninstall}; Filename: {app}\{#GameEXE_1}; IconFilename: {app}\Icon_2.ico; WorkingDir: {#GameDir_1}; Comment: Запустить игру; Check: NoIcons #ifdef Start_x64 Name: {group}\{#GameUninstall_x64}; Filename: {app}\{#GameEXE_2}; IconFilename: {app}\Icon_2.ico; WorkingDir: {#GameDir_2}; Comment: Запустить игру; Check: NoIcons #endif ;Ссылки ;Name: {group}\Открыть файл ReadMe; Filename: {app}\ReadMe\Info.txt; WorkingDir: {app}\ReadMe; IconFilename: {app}\1.ico; Comment: Просмотреть файл ReadMe; Check: NoIcons ;Name: {group}\Поиск обновлений мода; Filename: {app}\URL\Update.url; WorkingDir: {app}\URL; IconFilename: {app}\2.ico; Comment: Поиск обновлений игры в интернете; Check: NoIcons ;Name: {group}\Техническая поддержка; Filename: {app}\URL\Support.url; WorkingDir: {app}\URL; IconFilename: {app}\3.ico; Comment: Техническая поддержка игры; Check: NoIcons Name: {group}\Веб-сайт игры; Filename: {app}\URL\publisher.url; WorkingDir: {app}\URL; IconFilename: {app}\2.ico; Comment: Посетить Веб-сайт игры; Check: NoIcons ;Удаление Name: {group}\Удалить {#GameUninstall_}; Filename: {uninstallexe}; IconFilename: {app}\5.ico; Comment: Удалить игру; Check: NoIcons //--------------------------------------------------------------------- [Меню "Пуск"] ---------------------------------------------------------------------// //--------------------------------------------------------------------- [Рабочий стол] ---------------------------------------------------------------------// ;Запуск Name: {userdesktop}\{#GameUninstall}; Filename: {app}\{#GameEXE_1}; IconFilename: {app}\Icon_2.ico; WorkingDir: {#GameDir_1}; Check: Desktop #ifdef Start_x64 Name: {userdesktop}\{#GameUninstall_x64}; Filename: {app}\{#GameEXE_2}; IconFilename: {app}\Icon_2.ico; WorkingDir: {#GameDir_2}; Check: Desktop #endif ;Дополнительно ;Name: {userdesktop}\Смена языка Озвучки (x32); Filename: {app}\Binaries\Win32\Language Selector.exe; WorkingDir: {app}\Binaries\Win32; Check: Desktop ;Name: {userdesktop}\Смена языка Озвучки (x64); Filename: {app}\Binaries\Win64\Language Selector.exe; WorkingDir: {app}\Binaries\Win64; Check: Desktop ;//--------------------------------------------------------------------- [Рабочий стол] ---------------------------------------------------------------------// //--------------------------------------------------------------------- [Панель "Быстрого запуска"] ---------------------------------------------------------------------// ;Запуск Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#GameUninstall}; Filename: {app}\{#GameEXE_1}; IconFilename: {app}\Icon_2.ico; WorkingDir: {#GameDir_1}; Check: QuickLaunch #ifdef Start_x64 Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#GameUninstall_x64}; Filename: {app}\{#GameEXE_2}; IconFilename: {app}\Icon_2.ico; WorkingDir: {#GameDir_2}; Check: QuickLaunch #endif //--------------------------------------------------------------------- [Панель "Быстрого запуска"] ---------------------------------------------------------------------// [INI] FileName: {app}\URL\Publisher.url; Section: InternetShortcut; Key: URL; String: http://www.testdriveunlimited.com/; Check: not Install ;FileName: {app}\URL\Support.url; Section: InternetShortcut; Key: URL; String: http://help.ea.com/ru/; Check: not Install ;FileName: {app}\URL\Update.url; Section: InternetShortcut; Key: URL; String: http://www.needforspeed.com/ru_RU/downloads; Check: not Install; [UninstallDelete] Type: filesandordirs; Name: "{app}" [Run] Filename: {app}\main\sound\decode.exe; WorkingDir: {app}\main\sound; Flags: waituntilterminated; BeforeInstall: Decode Filename: {app}\Soft\SetupSoft.bat; WorkingDir: {app}\Soft; Check: DirectX and not Install; Flags: waituntilterminated; BeforeInstall: DirectXProgress Filename: {app}\Soft\DelFiles.bat; WorkingDir: {app}\Soft; Flags: waituntilterminated [Registry] Root: HKLM; SubKey: SOFTWARE\Repack by Timick\Call of DutyMW3; ValueType: string; ValueName: Install Dir; ValueData: {app}; Flags: uninsdeletevalue uninsdeletekeyifempty [Code] var Init : boolean; #ifdef Splash 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'; #endif //================== Подключение модулей ==================\\ #include "Modules_ISS\Function.iss" #include "Modules_ISS\Messages.iss" #include "Modules_ISS\botva2.iss" #include "Modules_ISS\PB.iss" #include "Modules_ISS\Inserting images.iss" #include "Modules_ISS\Texture buttons.iss" #ifdef Music #include "Modules_ISS\Music_Modules.iss" #endif #include "Modules_ISS\Panel.iss" #ifdef Autorun #include "AutoRun.iss" #endif #ifdef ISDone #include "ISDone.iss" #endif #ifdef FreeArc #include "FreeArc.iss" #endif #include "Modules_ISS\Page.iss" #ifdef Russophobia #include "Modules_ISS\Russophobia.iss" #endif #ifdef WinTB #include "Modules_ISS\WinTB.iss" #endif #Include "Modules_ISS\MD5Check2.iss" //================== Подключение модулей ==================\\ function InitializeSetup: Boolean; begin if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll'); if not FileExists(ExpandConstant('{tmp}\innocallback.dll')) then ExtractTemporaryFile('innocallback.dll'); if not FileExists(ExpandConstant('{tmp}\Click.wav')) then ExtractTemporaryFile('Click.wav'); if not FileExists(ExpandConstant('{tmp}\isskin.dll')) then ExtractTemporaryFile('isskin.dll'); if not FileExists(ExpandConstant('{tmp}\Tiger.cjstyles')) then ExtractTemporaryFile('Tiger.cjstyles'); LoadSkin(ExpandConstant('{tmp}\Tiger.cjstyles'), ''); #ifdef Autorun Result:=AutoRunExec; #else Result:= true; #endif Result:= false; //*********************************** {MD5} ***********************************\\ MD5Form:= CreateCustomForm; with MD5Form do begin ClientWidth:= ScaleX(360); ClientHeight:= ScaleY(45); Caption:= ExpandConstant('{cm:Check}'); OnCloseQuery:= @MD5FormClose; Center; end; with TLabel.Create(MD5Form) do begin SetBounds(ScaleX(4),ScaleY(4),ScaleX(350),ScaleY(18)); Caption:= ExpandConstant('{cm:Wait}'); Transparent:= True; Parent:= MD5Form; end; MD5PB:= TNewProgressBar.Create(MD5Form); with MD5PB do begin Position:= 0; Max:= 1000; Min:= 0; SetBounds(ScaleX(5),ScaleY(22),ScaleX(350),ScaleY(15)); Parent:= MD5Form; end; MD5Form.Show; Error2:= true; repeat // Здесь прописываем файлы, у которых нужно проверить хэш-сумму и собственно сами хэш-суммы // //if FileExists(ExpandConstant('{src}\setup.exe')) and not CheckMD5(PAnsiChar(ExpandConstant('{src}\setup.exe')), {хэш-сумма}'68db7c4d2713b186744a9f73b004d981', @MD5Progress) then break; if FileExists(ExpandConstant('{src}\data-1.0.bin')) and not CheckMD5(PAnsiChar(ExpandConstant('{src}\data-1.0.bin')), {хэш-сумма}'9c00f97b15759a1b1129e1ee0b3918a0', @MD5Progress) then break; if FileExists(ExpandConstant('{src}\data-2.0.bin')) and not CheckMD5(PAnsiChar(ExpandConstant('{src}\data-2.0.bin')), {хэш-сумма}'9c1c84e47db4cc9d47bc8513cb7740b4', @MD5Progress) then break; Error2:=false; until true; if Close then Result:= true; if not Close and not Error2 then begin Result:= true; MD5Form.Hide; end; if not Close and Error2 then begin MD5Form.Hide; if MsgBoxEx(0, ExpandConstant('{cm:Error}'), ExpandConstant('{cm:Error1}'), MB_YESNO or MB_ICONERROR, 0, 0) = IDYES then Result:= true else Result:= false; end; end; //*********************************** {MD5} ***********************************\\ //============================================================================================================================================// //************************************************ [Начало - Приоритет установки] ***************************************************// #ifdef Priority const NORMAL_PRIORITY_CLASS = $00000020; IDLE_PRIORITY_CLASS = $00000040; HIGH_PRIORITY_CLASS = $00000080; REALTIME_PRIORITY_CLASS = $00000100; function SetPriorityClass(hProcess: THandle; dwPriorityClass: DWORD): BOOL; external 'SetPriorityClass@kernel32'; function GetCurrentProcess: THandle; external 'GetCurrentProcess@kernel32'; procedure Priority(); begin SetPriorityClass(GetCurrentProcess, HIGH_PRIORITY_CLASS); end; #endif //************************************************ [Конец - Приоритет установки] ***************************************************// //************************************************ [Начало - ПрогрессБары] ***************************************************// function PBProcUninst(h:hWnd;Msg,wParam,lParam:Longint):Longint; var pr,i1,i2:Extended; p:string; w : integer; begin if Msg=$2 then SetWindowLong(h,-4,PBOldProc); Result:=CallWindowProc(PBOldProc,h,Msg,wParam,lParam); if (Msg=$402) and (UninstallProgressForm.ProgressBar.Position>UninstallProgressForm.ProgressBar.Min) then begin i1:=UninstallProgressForm.ProgressBar.Position-UninstallProgressForm.ProgressBar.Min; i2:=UninstallProgressForm.ProgressBar.Max-UninstallProgressForm.ProgressBar.Min; pr:=i1*100/i2; p:=IntToStr(Round(pr))+' %'; ProgressInfoLabel.Caption:=ExpandConstant('{cm:AllProgressUninst} ')+p; w:=Round(558*pr/100); ImgSetPosition(PB3Img,120,302,w,21); ImgApplyChanges(UninstallProgressForm.Handle); end; end; procedure AllCancel; begin SetWindowLong(WizardForm.ProgressGauge.Handle,-4,PBOldProc); ImgSetVisibility(AImg[CurrentImage],False); ImgSetVisibility(WizardImg,True); ImgSetVisibility(PBImg,False); ImgSetVisibility(PBBkgImg,False); ImgApplyChanges(WizardForm.Handle); end; procedure CurStepChanged(CurStep: TSetupStep); begin #ifdef ISDone UnpackingISDone(CurStep); #endif #ifdef FreeArc UnpackingArc(CurStep); #endif case CurStep of ssInstall: begin if GetArrayLength(ADisk)>0 then begin KillTimer(WizardForm.Handle,WFDiskTimerID); SetArrayLength(ADisk,0); end; if GetArrayLength(ASysReq)>0 then begin KillTimer(WizardForm.Handle,WFSysReqTimerID); SetArrayLength(ASysReq,0); end; WizardForm.ProgressGauge.Visible:=False; OldPosition:=0; CurrentImage:=0; ImgSetVisibility(WizardImg,False); ImgSetVisibility(AImg[0],True); #ifndef ISDone #ifndef FreeArc //Прогрессбары создаются в скрипте\\ PBBkgImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressBackground.png'),119,300,560,25,True,True); ImgApplyChanges(WizardForm.Handle); PBImg:=ImgLoad(WizardForm.Handle,ExpandConstant('{tmp}\ProgressImg.png'),120,302,558,21,True,True); PBOldProc:=SetWindowLong(WizardForm.ProgressGauge.Handle,-4,CallBackProc(@PBProc,4)); #endif #endif sTime:=GetTickCount; eTime:=sTime; ProgressStep:=100 div GetArrayLength(AImg); end; ssPostInstall: AllCancel; end; end; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin DeleteSavedGames(CurUninstallStep); case CurUninstallStep of usUninstall: begin UninstallProgressForm.ProgressBar.Visible:=False; PB3Img:=ImgLoad(UninstallProgressForm.Handle,ExpandConstant('{tmp}\ProgressImg.png'),120,302,558,21,True,True); PBOldProc:=SetWindowLong(UninstallProgressForm.ProgressBar.Handle,-4,CallBackProc(@PBProcUninst,4)); end; end; end; procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean); begin if CurPageID=wpInstalling then begin Confirm:=False; Cancel:=ExitSetupMsgBox; if Cancel then begin AllCancel; StatusLabel.Caption:=SetupMessage(msgStatusRollback); FilenameLabel.Hide; ProgressInfoLabel.Hide; PageNameLabel.Hide; PageDescriptionLabel.Hide; WizardForm.CancelButton.Enabled:=False; end; end; end; //************************************************ [Конец - ПрогрессБары] ***************************************************// //============================================================================================================================================// procedure InitializeWizard; begin //Удаляем меню "О программе" WizardForm.Position:=poScreenCenter; Init := True; #ifdef Splash begin ExtractTemporaryFile('Splash.png'); ExtractTemporaryFile('isgsg.dll'); ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\Splash.png',1000,3000,1000,0,255,False,$FFFFFF,10); end; #endif CreateStatusPanel; CreateWizardImage; ButtonsTextures; #ifdef Music InsertMusic; #endif CreatePageComponents; #ifdef ISDone CreateISDoneComponents; #endif #ifdef FreeArc CreateArcComponents; #endif #ifdef WinTB WinTB(); #endif #ifdef Priority Priority(); #endif end; //------------------------------------------------------------------------------------\\ procedure CurPageChanged(CurPageID: Integer); begin SetStateNewButtons; Welcome.Font.Color := $FFFFFF; System.Font.Color := $FFFFFF; Catalogue.Font.Color := $FFFFFF; StartMenu.Font.Color := $FFFFFF; Tasks.Font.Color := $FFFFFF; Installing.Font.Color :=$FFFFFF; Finish.Font.Color := $FFFFFF; HideComponents; ImgSetVisibility(RequirementsPanel,False); ImgSetVisibility(Edit,False); ImgSetVisibility(DirFolder,False); BtnSetVisibility(hDirBrowseBtn,False); ImgSetVisibility(HardDrivePanel,False); ImgSetVisibility(HDD,False); ImgSetVisibility(GroupFolder,False); BtnSetVisibility(hGroupBrowseBtn,False); BtnSetVisibility(NoIconsCheck,False); BtnSetVisibility(DesktopCheck,False); BtnSetVisibility(QuickLaunchCheck,False); BtnSetVisibility(DirectXCheck,False); ShowComponents(CurPageID); ImgApplyChanges(WizardForm.Handle); #ifdef ISDone UnpackingISDoneFinished(CurPageID); #endif #ifdef FreeArc UnpackingArcFinished(CurPageID); #endif if GetArrayLength(ASysReq)>0 then if CurPageID=SystemPage.ID then SetTimer(WizardForm.Handle,WFSysReqTimerID,1000,WrapTimerProc(@SysReqFlashing,4)) else KillTimer(WizardForm.Handle,WFSysReqTimerID); if CurPageID=wpSelectDir then begin OldDisk:=''; GetFreeSpaceCaption(nil); end else if GetArrayLength(ADisk)>0 then KillTimer(WizardForm.Handle,WFDiskTimerID); end; //------------------------------------------------------------------------------------\\ procedure DeinitializeSetup; begin if Init <> False then begin #ifdef Autorun if ContinueInstall then begin #endif #ifdef Music BASS_Stop; BASS_Free; #endif WFButtonFont.Free; ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')),0); UnloadSkin; SetArrayLength(AImg,0); gdipShutdown; #ifdef Autorun end; #endif #ifdef WinTB WinTBDeinitializeSetup(); #endif end; end; //------------------------------------------------------------------------------------\\ procedure DeinitializeUninstall; begin gdipShutdown; UnloadSkin; if Assigned(UPFButtonFont) then UPFButtonFont.Free; end; | Код: [CustomMessages] rus.Wait=Подождите, идет проверка хеш-суммы установочных файлов... rus.Check=Проверка MD5 rus.Close=Вы действительно хотите отменить проверку MD5?%nЕсли хэш-суммы файлов не совпадут,%nто установка игры может пройти некорректно.%nОтменить проверку? rus.Close1=Отмена проверки MD5 rus.Error=Вы можете на свой страх и риск запустить установку, но лучше перехешировать торрент и скачать исправные файлы.%nПродолжить? rus.Error1=Хеш-сумма не совпадает! [code] var MD5Form: TSetupForm; MD5PB: TNewProgressBar; Res: Integer; Close,Error2: boolean; type TMD5Callback = function (Progress: Longword): Boolean; function CheckMD5(Filename: PAnsiChar; MD5: PAnsiChar; Callback: TMD5Callback): Boolean; external 'CheckMD5@files:ISMD5.dll stdcall'; function MD5Progress(Progress: Longword): Boolean; begin MD5PB.Position:= Progress; Application.ProcessMessages; if Close then Result:= false else Result:= True; end; procedure MD5FormClose(Sender: TObject; var CanClose: Boolean); begin CanClose:= false; MD5Form.Hide; if MsgBoxEx(0, ExpandConstant('{cm:Close}'), ExpandConstant('{cm:Close1}'), MB_YESNO or MB_ICONQUESTION, 0, 0) = IDYES then begin Close:= true; MD5Form.Hide; MD5Form.Free; end else MD5Form.Show; end; |
| Всего записей: 1076 | Зарегистр. 11-10-2006 | Отправлено: 22:16 04-01-2015 | Исправлено: nik1967, 23:03 04-01-2015 |
|