-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move installScript.vdf to \Backup folder This means that when steam launches the game, it doesn't keep re-applying compatiblity mode settings * Custom welcome screen - and remove compat on game.exe, gamemd.exe * Add important notice from CCHyper
- Loading branch information
1 parent
aab020d
commit 9ce25e5
Showing
3 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...ler/inno/bin/Examples/MyDll/C#/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttributes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// <autogenerated /> | ||
using System; | ||
using System.Reflection; | ||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = "")] |
Binary file added
BIN
+6.76 KB
...build-installer/inno/bin/Examples/MyDll/C#/obj/Debug/MyDll.csproj.AssemblyReference.cache
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,9 +108,19 @@ Type: filesandordirs; Name: "{app}\Client" | |
[Registry] | ||
Root: HKLM; Subkey: SOFTWARE\Classes\CLSID\{{'{{1440AD10-6AA8-11D1-B6F9-00A024DDAFD1}'}}\InprocServer32; ValueType: string; ValueData: "blowfish.dll"; | ||
|
||
Root: HKCU; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\Ra2.exe; Flags: deletevalue | ||
Root: HKLM; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\Ra2.exe; Flags: deletevalue | ||
Root: HKCU64; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\Ra2.exe; Flags: deletevalue; Check: IsWin64 | ||
Root: HKCU; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\gamemd.exe; Flags: deletevalue | ||
Root: HKLM; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\gamemd.exe; Flags: deletevalue | ||
Root: HKCU64; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\gamemd.exe; Flags: deletevalue; Check: IsWin64 | ||
Root: HKLM64; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\gamemd.exe; Flags: deletevalue; Check: IsWin64 | ||
|
||
Root: HKCU; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\game.exe; Flags: deletevalue | ||
Root: HKLM; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\game.exe; Flags: deletevalue | ||
Root: HKCU64; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\game.exe; Flags: deletevalue; Check: IsWin64 | ||
Root: HKLM64; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\game.exe; Flags: deletevalue; Check: IsWin64 | ||
|
||
Root: HKCU; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\Ra2.exe; Flags: deletevalue | ||
Root: HKLM; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\Ra2.exe; Flags: deletevalue | ||
Root: HKCU64; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\Ra2.exe; Flags: deletevalue; Check: IsWin64 | ||
Root: HKLM64; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\Ra2.exe; Flags: deletevalue; Check: IsWin64 | ||
|
||
Root: HKCU; Subkey: Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers; ValueName: {app}\RA2MD.exe; Flags: deletevalue | ||
|
@@ -140,7 +150,58 @@ Root: HKCU; Subkey: Software\Wine\AppDefaults\game.exe\DllOverrides; ValueType: | |
;Root: HKLM; Subkey: Software\Westwood\Yuri's Revenge; ValueType: String; ValueName: Serial; ValueData: "{code:RandomString}"; Flags: createvalueifdoesntexist | ||
;Root: HKLM; Subkey: Software\Westwood\Red Alert 2; ValueType: String; ValueName: Serial; ValueData: "{code:RandomString}"; Flags: createvalueifdoesntexist | ||
|
||
[Code] | ||
[Code] | ||
var | ||
CustomPage: TWizardPage; | ||
|
||
procedure InitializeWizard(); | ||
var | ||
Memo: TRichEditViewer; | ||
begin | ||
CustomPage := CreateCustomPage(wpWelcome, 'Welcome to the CnCNet Red Alert 2 Yuri''s Revenge Setup', 'Need help? Join our Discord: cncnet.org/discord'); | ||
|
||
Memo := TRichEditViewer.Create(WizardForm); | ||
Memo.Parent := CustomPage.Surface; | ||
Memo.SetBounds(0, 0, CustomPage.SurfaceWidth, CustomPage.SurfaceHeight); | ||
Memo.ReadOnly := True; | ||
Memo.ScrollBars := ssVertical; | ||
Memo.WordWrap := True; | ||
Memo.Text := 'Important info, please read!'#13#10#13#10'If you have installed Red Alert 2 and Yuri''s Revenge via the C&C The Ultimate Collection on Steam, please launch the game once before running the CnCNet installer so Steam can write the correct registry keys.'#13#10#13#10'This installer will also move Steams "installScript.vdf" to "Backup\installScript.vdf", this is done to ensure the correct compatibility flags are set for the CnCNet Client to function correctly.'; | ||
end; | ||
|
||
procedure CurStepChanged(CurStep: TSetupStep); | ||
var | ||
SteamInstallScript, SteamInstallScriptDest: String; | ||
begin | ||
if CurStep = ssInstall then | ||
begin | ||
// Define the paths for the source and destination files | ||
SteamInstallScript := ExpandConstant('{app}\installScript.vdf'); | ||
SteamInstallScriptDest := ExpandConstant('{app}\Backup\installScript.vdf'); | ||
|
||
// Ensure the destination directory exists before attempting to move the file | ||
if not DirExists(ExtractFilePath(SteamInstallScriptDest)) then | ||
begin | ||
// Try to create the backup directory if it doesn't exist | ||
if not ForceDirectories(ExtractFilePath(SteamInstallScriptDest)) then | ||
begin | ||
MsgBox('Failed to create backup directory for Steam install script.', mbError, MB_OK); | ||
Exit; | ||
end; | ||
end; | ||
|
||
// Check if the source file exists and attempt to move it | ||
if FileExists(SteamInstallScript) then | ||
begin | ||
if not RenameFile(SteamInstallScript, SteamInstallScriptDest) then | ||
begin | ||
MsgBox('Failed to move the file from ' + SteamInstallScript + ' to ' + SteamInstallScriptDest, mbError, MB_OK); | ||
// Optionally, you can handle the failure here, for example, by logging the error | ||
end; | ||
end; | ||
end; | ||
end; | ||
|
||
function GetModuleHandleA(lpLibFileName: PAnsiChar): THandle; | ||
external '[email protected] stdcall'; | ||
function GetProcAddress(Module: THandle; ProcName: PAnsiChar): Longword; | ||
|
@@ -201,6 +262,7 @@ begin | |
end | ||
else Result:=true; | ||
end | ||
|
||
else result:=true; | ||
end; | ||
|
||
|
@@ -222,6 +284,7 @@ end; | |
function InitializeSetup(): Boolean; | ||
var | ||
Version: TWindowsVersion; | ||
|
||
begin | ||
// This will trigger net7 x64 to auto download and install - uncomment following line when net7 client is released | ||
// Dependency_AddDotNet70Desktop | ||
|