diff --git a/GENESYSLauncher/GENESYSLauncher/Program.cs b/GENESYSLauncher/GENESYSLauncher/Program.cs index 23084ff..1c6bf8b 100644 --- a/GENESYSLauncher/GENESYSLauncher/Program.cs +++ b/GENESYSLauncher/GENESYSLauncher/Program.cs @@ -38,7 +38,14 @@ private static void Main(string[] args) { if (Launcher.CreateGame(Launcher.GameType.HL2S).ValidateGamePath()) { - Launcher.LaunchGame(Launcher.GameType.HL2S); + if (!Launcher.IsSteamAppInstalled(243730) || !Launcher.IsSteamAppInstalled(243750) || !Launcher.IsSteamAppInstalled(220)) + { + MessageBox.Show("You must own and install a copy of Half-Life 2 or the Source SDK 2013 Base Singleplayer or Multiplayer in order to run " + Launcher.CreateGame(Launcher.GameType.HL2S).Name, Text, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else + { + Launcher.LaunchGame(Launcher.GameType.HL2S); + } } else { @@ -51,7 +58,14 @@ private static void Main(string[] args) { if (Launcher.CreateGame(Launcher.GameType.CyberDiver_v1_00).ValidateGamePath()) { - Launcher.LaunchGame(Launcher.GameType.CyberDiver_v1_00); + if (!Launcher.IsSteamAppInstalled(243730) || !Launcher.IsSteamAppInstalled(243750) || (!Launcher.IsSteamAppInstalled(220) && !Launcher.IsSteamAppInstalled(380) && !Launcher.IsSteamAppInstalled(420))) + { + MessageBox.Show("You must own and install a copy of Half-Life 2, Half-Life 2 Episode One, and Half-Life 2 Episode Two, or the Source SDK 2013 Base Singleplayer or Multiplayer in order to run " + Launcher.CreateGame(Launcher.GameType.CyberDiver_v1_00).Name, Text, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else + { + Launcher.LaunchGame(Launcher.GameType.CyberDiver_v1_00); + } } else { @@ -64,7 +78,14 @@ private static void Main(string[] args) { if (Launcher.CreateGame(Launcher.GameType.CyberDiver_v1_20j).ValidateGamePath()) { - Launcher.LaunchGame(Launcher.GameType.CyberDiver_v1_20j); + if (!Launcher.IsSteamAppInstalled(243730) || !Launcher.IsSteamAppInstalled(243750) || (!Launcher.IsSteamAppInstalled(220) && !Launcher.IsSteamAppInstalled(380) && !Launcher.IsSteamAppInstalled(420))) + { + MessageBox.Show("You must own and install a copy of Half-Life 2, Half-Life 2 Episode One, and Half-Life 2 Episode Two, or the Source SDK 2013 Base Singleplayer or Multiplayer in order to run " + Launcher.CreateGame(Launcher.GameType.CyberDiver_v1_20j).Name, Text, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else + { + Launcher.LaunchGame(Launcher.GameType.CyberDiver_v1_20j); + } } else { @@ -77,7 +98,14 @@ private static void Main(string[] args) { if (Launcher.CreateGame(Launcher.GameType.L4DS).ValidateGamePath()) { - Launcher.LaunchGame(Launcher.GameType.L4DS); + if (!Launcher.IsSteamAppInstalled(550)) + { + MessageBox.Show("You must own and install a copy of Left 4 Dead 2 in order to run " + Launcher.CreateGame(Launcher.GameType.L4DS).Name, Text, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else + { + Launcher.LaunchGame(Launcher.GameType.L4DS); + } } else { diff --git a/GENESYSLauncher/GENESYSLauncher/changelog.txt b/GENESYSLauncher/GENESYSLauncher/changelog.txt index 81144d4..42045db 100644 --- a/GENESYSLauncher/GENESYSLauncher/changelog.txt +++ b/GENESYSLauncher/GENESYSLauncher/changelog.txt @@ -1,3 +1,5 @@ +v2.0.1: +- Fixed a security issue involving the command line arguments. v2.0: - Redid the settings system to use Visual Studio's setting system. - Rewrote the code behind the scenes for better efficency.