Skip to content

Commit

Permalink
v0.2.6 - MD5 checks and log file
Browse files Browse the repository at this point in the history
New installer version, v0.2.6

Changes:
- lsao_cached.pad MD5 check moved to occur during the main installation step of the installer (instead of when user checks box when selecting which components to install).
- homefront exe MD5 check also moved to occur in main installation. (fileExists check still happens earlier, as does with lsao_cached)
- Setup process now logs useful debugging information to a text file. That text file is located BOTH in the user's Temp folder (%UserProfile%\AppData\Local\Temp\) and a copy is saved right next to the installer exe for convenience. Example log filename: TS2-Redux-Setup Log 2022-01-15.txt
- Minor tweaks to messages
  • Loading branch information
GoTeamScotch committed Jan 16, 2022
1 parent 1e390c8 commit 279cfe5
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 46 deletions.
20 changes: 20 additions & 0 deletions Install/Setup-Files/TS2-downloader/223103-content.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
gamehf2\bundle.pak
gamehf2\chunkmap.pak
gamehf2\content
gamehf2\core_patch.pak
gamehf2\gamedata.pak
gamehf2\levels
gamehf2\lsao_cached.pak
gamehf2\prefabs.pak
gamehf2\scripts.pak
gamehf2\texturesui.pak
gamehf2\_activitycache
gamehf2\_fastload
gamehf2\_levelcache
gamehf2\levels\philly
gamehf2\levels\philly\level.pak
gamehf2\levels\philly\levelmm.pak
gamehf2\_fastload\engineboot.pak
gamehf2\_fastload\frontend.pak
gamehf2\_fastload\intromovies.pak
localization\english_xml.pak
17 changes: 17 additions & 0 deletions Install/Setup-Files/TS2-downloader/ts2-downloader.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@echo off

if "%~1"=="" echo Missing install path && exit /b 1
set "installpath=%~1"
if "%~2"=="" echo Missing Steam username && exit /b 1
set "steamuser=%~2"
if "%~3"=="" echo Missing Steam password && exit /b 1
set "steampass=%~3"

%~dp0DepotDownloader.exe -app 223100 -depot 223101 -manifest 103344760119053156 -username %steamuser% -password %steampass% -dir "%installpath%"
%~dp0DepotDownloader.exe -app 223100 -depot 223102 -manifest 3243358074883441516 -username %steamuser% -password %steampass% -dir "%installpath%"
%~dp0DepotDownloader.exe -app 223100 -depot 223103 -manifest 8582653993015227315 -username %steamuser% -password %steampass% -dir "%installpath%" -filelist %~dp0223103-content.txt
%~dp0DepotDownloader.exe -app 223100 -depot 223106 -manifest 1385625310001200108 -username %steamuser% -password %steampass% -dir "%installpath%"

echo Done!
pause
exit /b 0
124 changes: 78 additions & 46 deletions Install/TS2-Redux-Installer.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MyAppName "TS2 Redux"
#define MyAppVersion "0.2.5"
#define MyAppVersion "0.2.6"
#define MyAppPublisher "Redux Tech Team"
#define GitHubURL "https://github.com/HFTSRedux/TS2Redux"
#define DiscordURL "https://discord.gg/fBnFZBYht5"
Expand Down Expand Up @@ -41,6 +41,7 @@ DisableWelcomePage=no
DirExistsWarning=no
DisableProgramGroupPage=yes
UninstallFilesDir={app}\Bin64\TS2Redux\Setup
SetupLogging=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Expand Down Expand Up @@ -74,7 +75,6 @@ Name: "ui\textures"; Description: "Install High-Resolution Textures"; Flags:; T
Name: "fix"; Description: "Bugfixes"; Flags:; Types: main extended
Name: "fix\reaprain"; Description: "ReaperSplitter Spawn + Rain-on-Camera Fixes"; Flags: checkablealone; Types: main extended
Name: "fix\invisible"; Description: "Invisibility Glitch Fix"; Flags: checkablealone; Types: main extended
Name: "fix\breathe"; Description: "Disable Character Breathing Effect"; Flags: checkablealone; Types: main extended
Name: "fix\neopatch"; Description: "NeoTokyo Cutscene Fix"; Flags:; Types: main extended
;Name: "theme\compress"; Description: "Compress TS2 Game Files (saves 1.1GB)"; Flags:; Types: main extended
; mods + cheats
Expand All @@ -83,6 +83,7 @@ Name: "mod\ddkcheats"; Description: "DDK Cheats - Experimental cheats and tweaks
Name: "mod\yosremix"; Description: "Yossarian's Remix Mod - Story overhaul, provides a new experience in story missions"; Flags:; Types: extended
Name: "mod\yosmods"; Description: "Yossarian's Cheats - Cheats + mods, press SHIFT+F1 in-game for list of commands"; Flags:; Types: extended
Name: "mod\minigames"; Description: "Minigames Unlock - Unlocks 3 arcade games in Temporal Uplink weapon"; Flags:; Types: extended
Name: "mod\breathe"; Description: "Disable Character Breathing Effect"; Flags: checkablealone; Types: main extended

;[Tasks]
;Name: "task"; Description: "Task";
Expand All @@ -96,32 +97,32 @@ Name: "mod\minigames"; Description: "Minigames Unlock - Unlocks 3 arcade games i
[Files]
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
; DLLs
Source: "App-DLLs\dinput8.dll"; DestDir: "{app}\Bin64"; Flags: ignoreversion; Components: core\loader
Source: "App-DLLs\TS2Redux\DDK.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: mod\ddkcheats
Source: "App-DLLs\TS2Redux\DevilDwarfMenu.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: ui\menu
Source: "App-DLLs\TS2Redux\DevilDwarfUI.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: ui\display
Source: "App-DLLs\TS2Redux\DisableBreathingByDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: fix\breathe
Source: "App-DLLs\TS2Redux\DisablePreferences.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: menu\optsave
Source: "App-DLLs\TS2Redux\FanotoMenu.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: menu\optsave
Source: "App-DLLs\TS2Redux\GameFixesByFanotoAndDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: fix\reaprain
Source: "App-DLLs\TS2Redux\InvisibleFixByDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: fix\invisible
Source: "App-DLLs\TS2Redux\MinigamesByDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: mod\minigames
Source: "App-DLLs\TS2Redux\mods.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: core\anypak
Source: "App-DLLs\TS2Redux\StraightIntoTS2byDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: theme\launcher
Source: "App-DLLs\TS2Redux\UnlockArcadeAndChallengeByFanoto.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: menu\archal
Source: "App-DLLs\TS2Redux\YossarianRemix.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: mod\yosremix
Source: "App-DLLs\TS2Redux\YossariansMods.dll"; DestDir: "{app}\Bin64\TS2Redux"; Flags: ignoreversion; Components: mod\yosmods
Source: "App-DLLs\dinput8.dll"; DestDir: "{app}\Bin64"; Components: core\loader
Source: "App-DLLs\TS2Redux\DDK.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: mod\ddkcheats
Source: "App-DLLs\TS2Redux\DevilDwarfMenu.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: ui\menu
Source: "App-DLLs\TS2Redux\DevilDwarfUI.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: ui\display
Source: "App-DLLs\TS2Redux\DisableBreathingByDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: mod\breathe
Source: "App-DLLs\TS2Redux\DisablePreferences.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: menu\optsave
Source: "App-DLLs\TS2Redux\FanotoMenu.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: menu\optsave
Source: "App-DLLs\TS2Redux\GameFixesByFanotoAndDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: fix\reaprain
Source: "App-DLLs\TS2Redux\InvisibleFixByDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: fix\invisible
Source: "App-DLLs\TS2Redux\MinigamesByDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: mod\minigames
Source: "App-DLLs\TS2Redux\mods.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: core\anypak
Source: "App-DLLs\TS2Redux\StraightIntoTS2byDevilDwarf.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: theme\launcher
Source: "App-DLLs\TS2Redux\UnlockArcadeAndChallengeByFanoto.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: menu\archal
Source: "App-DLLs\TS2Redux\YossarianRemix.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: mod\yosremix
Source: "App-DLLs\TS2Redux\YossariansMods.dll"; DestDir: "{app}\Bin64\TS2Redux"; Components: mod\yosmods
; EXE
Source: "EXE-Appearence\Win-TileIcons\TimeSplitters2.VisualElementsManifest.xml"; DestDir: "{app}\Bin64"; Flags: ignoreversion; Components: theme\launcher
Source: "EXE-Appearence\Win-TileIcons\tileicons\*"; DestDir: "{app}\Bin64\tileicons"; Flags: ignoreversion; Components: theme\launcher
Source: "Setup-Files\homefront_ripper.bat"; DestDir: "{tmp}"; Flags: ignoreversion; Components: theme\ripper
Source: "EXE-Appearence\Win-TileIcons\TimeSplitters2.VisualElementsManifest.xml"; DestDir: "{app}\Bin64"; Components: theme\launcher
Source: "EXE-Appearence\Win-TileIcons\tileicons\*"; DestDir: "{app}\Bin64\tileicons"; Components: theme\launcher
Source: "Setup-Files\homefront_ripper.bat"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: theme\ripper
; textures PAK
Source: "Texture-Mods\ts2_redux.pak"; DestDir: "{app}\gamehf2"; Flags: ignoreversion; Components: ui\textures
Source: "Texture-Mods\ts2_redux.pak"; DestDir: "{app}\gamehf2"; Components: ui\textures
; Jdiff - jojodiff.sourceforge.net
Source: "Setup-Files\jptch.exe"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall; Components: theme\launcher fix\neopatch
Source: "Setup-Files\jptch.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: theme\launcher fix\neopatch
; patch data
Source: "NeoTokyo-PatchV2\NeoTokyo-PatchV2.data"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall; Components: fix\neopatch
Source: "EXE-Appearence\TS2-EXE-Appearence-Patch.pat"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall; Components: theme\launcher
Source: "NeoTokyo-PatchV2\NeoTokyo-PatchV2.data"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: fix\neopatch
Source: "EXE-Appearence\TS2-EXE-Appearence-Patch.pat"; DestDir: "{tmp}"; Flags: deleteafterinstall; Components: theme\launcher

[UninstallDelete]
Type: files; Name: "{app}\Bin64\TimeSplitters2.exe"; Components: theme\launcher
Expand All @@ -131,14 +132,14 @@ Type: files; Name: "{app}\gamehf2\ts2_neotokyo_fix.pak"; Components: fix\neopatc
Name: "{group}\TimeSplitters 2"; Filename: "{app}\Bin64\TimeSplitters2.exe"; WorkingDir: "{app}"; Components: theme\shortcut1;
Name: "{group}\TimeSplitters Online Discord Server"; Filename: "{#DiscordURL}"; Components: theme\shortcut1;
Name: "{group}\TS2 Redux GitHub Page"; Filename: "{#GitHubURL}"; Components: theme\shortcut1;
Name: "{commondesktop}\TimeSplitters 2"; Filename: "{app}\Bin64\TimeSplitters2.exe"; WorkingDir: "{app}"; Flags: createonlyiffileexists; Components: theme\shortcut2;
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; Components: theme\shortcut1;
Name: "{commondesktop}\TimeSplitters 2"; Filename: "{app}\Bin64\TimeSplitters2.exe"; WorkingDir: "{app}"; Flags: createonlyiffileexists; Components: theme\shortcut2;

[Run]
Filename: "{#DiscordURL}"; Description: "Join TimeSplitters Online Discord Server"; Flags: postinstall shellexec runasoriginaluser;
Filename: "{tmp}\jptch.exe"; Parameters:" ""{app}\Bin64\Homefront2_Release.exe"" ""{tmp}\TS2-EXE-Appearence-Patch.pat"" ""{app}\Bin64\TimeSplitters2.exe"" "; StatusMsg: "Creating TS2 Launcher..."; Flags: skipifsilent; Components: theme\launcher;
Filename: "{tmp}\jptch.exe"; Parameters:" ""{app}\gamehf2\lsao_cached.pak"" ""{tmp}\NeoTokyo-PatchV2.data"" ""{app}\gamehf2\ts2_neotokyo_fix.pak"" "; StatusMsg: "Fixing NeoTokyo..."; Flags: skipifsilent; Components: fix\neopatch;
Filename: "{tmp}\homefront_ripper.bat"; Parameters:" ""{app}"" "; StatusMsg: "Running Homefront Ripper..."; Flags: skipifsilent; Components: theme\ripper;
Filename: "{tmp}\homefront_ripper.bat"; Parameters:" ""{app}"" "; StatusMsg: "Running Homefront Ripper..."; Components: theme\ripper;
Filename: "{cmd}"; Parameters:"/c rd /s /q ""{app}\ripped"""; Description: "Delete Ripped Homefront files"; Flags: postinstall; Components: theme\ripper;

[UninstallRun]
Expand All @@ -161,13 +162,6 @@ begin
if not FileExists(ExpandConstant('{app}\Bin64\Homefront2_Release.exe')) then begin
MsgBox('Warning: Could not find Homefront game EXE within the selected folder. Please check your install path and try again.', mbCriticalError, MB_OK);
Result := False;
end else begin
MD5_HomefrontTarget := GetMD5OfFile(ExpandConstant('{app}\Bin64\Homefront2_Release.exe'));
if Result and (MD5_HomefrontTarget <> MD5_HomefrontStock) then begin
if MsgBox('Warning: MD5 Check Failed! The game EXE you are using is different than what was expected. Proceed anyway? Generated checksum: ' + MD5_HomefrontTarget, mbConfirmation, MB_YESNO) = IDNO then begin
Result := False;
end;
end;
end;
end;
Expand All @@ -176,16 +170,6 @@ begin
if not FileExists(ExpandConstant('{app}\gamehf2\lsao_cached.pak')) then begin
MsgBox('Warning: Could not find file "lsao_cached.pak" within the given folder. This file contains important TS2 game files and is required in order to continue. Please check your install path and try again.', mbCriticalError, MB_OK);
Result := False;
end else begin
MsgBox('Setup needs to verify your TS2 game files. This may take a moment.', mbInformation, MB_OK);
MD5_LsaoTarget := GetMD5OfFile(ExpandConstant('{app}\gamehf2\lsao_cached.pak'));
if Result and (MD5_LsaoTarget <> MD5_LsaoStock) then begin
if MsgBox('Warning: MD5 Check Failed! The game data file "lsao_cached.pak" you are using is different than what was expected. Proceed anyway? Generated checksum: ' + MD5_LsaoTarget, mbConfirmation, MB_YESNO) = IDNO then begin
Result := False;
end;
end else begin
MsgBox('File verification complete. Game files are compatible and ready to be patched.', mbInformation, MB_OK);
end;
end;
end;
end;
Expand Down Expand Up @@ -227,6 +211,8 @@ var
function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
Result := '';
CFGFile := ExpandConstant('{usersavedgames}') + '\homefront2\game.cfg';
if (FileExists(CFGFile)) then begin
Log('Config file found at: ' + CFGFile);
Expand All @@ -249,16 +235,62 @@ begin
Log('Warning: Homefront CFG file not found. Cannot check supersampling value.');
end;
Result := '';
MD5_HomefrontTarget := GetMD5OfFile(ExpandConstant('{app}\Bin64\Homefront2_Release.exe'));
if (Result = '') and (MD5_HomefrontTarget <> MD5_HomefrontStock) then begin
if MsgBox('Warning: The game EXE you are using is different than what was expected. Proceed anyway? Generated checksum: ' + MD5_HomefrontTarget, mbConfirmation, MB_YESNO) = IDNO then begin
Result := 'MD5 Check Failed for "Homefront2_Release.exe". Generated checksum: ' + MD5_HomefrontTarget;
Log('User chose to cancel setup due to incompatible Homefront2_Release.exe file. Generated checksum: ' + MD5_HomefrontTarget);
end;
end else begin;
Log('Homefront2_Release.exe checksum verification passed.');
end;
if IsComponentSelected('fix\neopatch') then begin
MD5_LsaoTarget := GetMD5OfFile(ExpandConstant('{app}\gamehf2\lsao_cached.pak'));
if (Result = '') and (MD5_LsaoTarget <> MD5_LsaoStock) then begin
Log('lsao_cached.pak checksum verification did NOT pass.');
if MsgBox('Warning: The game data file "lsao_cached.pak" you are using is different than what was expected. Proceed anyway? Generated checksum: ' + MD5_LsaoTarget, mbConfirmation, MB_YESNO) = IDNO then begin
Result := 'MD5 Check Failed for "lsao_cached.pak". Generated checksum: ' + MD5_LsaoTarget;
Log('User chose to cancel setup due to incompatible laso_cached.pak file. Generated checksum: ' + MD5_LsaoTarget);
end;
end else begin;
Log('lsao_cached.pak checksum verification passed.');
end;
end;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep = ssInstall) then begin
end;
end;
// Credit: Martin Prikryl - via stackoverflow.com
procedure DeinitializeSetup();
var
logfilepathname, logfilename, newfilepathname: string;
begin
logfilepathname := ExpandConstant('{log}');
logfilename := ExtractFileName(logfilepathname);
// Set the new target path as the directory where the installer is being run from
newfilepathname := ExpandConstant('{src}\') + 'TS2-Redux-' + logfilename;
FileCopy(logfilepathname, newfilepathname, false);
end;
[Messages]
BeveledLabel=Redux Tech Team
WelcomeLabel1=[name] Setup Wizard
WelcomeLabel2=This will install [name/ver] for Homefront: The Revolution.%n%nTS2 Redux is a fan-made project which aims to fix and enhance the port of TimeSplitters 2 (TS2) contained in Homefront: The Revolution. This project does NOT allow you to play Homefront or TS2 without owning a copy of Homefront: The Revolution. If you do not have Homefront yet, you must purchase it before using this installer.
WelcomeLabel2=This will install [name/ver] for Homefront: The Revolution.%n%nTS2 Redux is a fan-made project which aims to fix and enhance the port of TimeSplitters 2 (TS2) contained in Homefront: The Revolution. This project does NOT allow you to play Homefront or TS2 without owning a copy of Homefront: The Revolution. If you do not have Homefront yet, you must purchase it before using this installer.%n%nThis project was built using the Steam version of Homefront. If you are using a version other than the Steam version, you may continue, but TS2 Redux may or may not work properly.
FinishedHeadingLabel=Thanks for using [name]!
FinishedLabelNoIcons=Setup has finished installing [name] into your installed copy of Homefront.
FinishedLabel=Setup has finished installing [name] into your installed copy of Homefront: The Revolution. The mod will be active the next time you launch Homefront.%n%nTo launch straight into TS2 (bypassing Homefront's menus), use the TimeSplitters 2 launcher in your start menu.
FinishedLabel=Setup has finished installing [name] into your installed copy of Homefront: The Revolution. The mod will be active the next time you launch Homefront.%n%nTo launch straight into TS2 (bypassing Homefront's menus), use the TimeSplitters 2 launcher in your start menu (if chosen during installation).
ClickFinish=Click Finish to exit Setup.
LicenseLabel=TS2 Redux is an open-source project. The agreement below defines how the software provided can be used.
WizardSelectDir=Select Homefront Game Folder
Expand Down

0 comments on commit 279cfe5

Please sign in to comment.