Skip to content

Commit b0ff723

Browse files
committed
v1.2.9
- Upgraded from .NET 7.0 to .NET 8.0, which will require you to download the new runtime just like you did for .NET 7.0. - Added more files and extra logging info for the crash dump exporter. - Fixed not finding a folder path bug on first install, which would require restarting the launcher. - Fixed the manual inject button not working sometimes, as well as it ignoring the "prevent injection when out of date" setting.
1 parent 92af23b commit b0ff723

8 files changed

Lines changed: 162 additions & 114 deletions

File tree

CodeRedLauncher.csproj

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net7.0-windows10.0.17763.0</TargetFramework>
5+
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
66
<UseWindowsForms>true</UseWindowsForms>
77
<Platforms>AnyCPU;x64</Platforms>
88
<ApplicationIcon>Icon.ico</ApplicationIcon>
99
<StartupObject>CodeRedLauncher.Program</StartupObject>
1010
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
1111
<NoWin32Manifest>true</NoWin32Manifest>
1212
<ImplicitUsings>disable</ImplicitUsings>
13+
<Description>Manages the CodeRed Module for Rocket League.</Description>
14+
<Copyright>CodeRedModding 2023</Copyright>
15+
<PackageProjectUrl>https://coderedmodding.github.io/</PackageProjectUrl>
16+
<PackageIcon>Icon.png</PackageIcon>
17+
<RepositoryUrl>https://github.com/CodeRedModding/CodeRed-Launcher</RepositoryUrl>
18+
<Title>CodeRedLauncher</Title>
1319
</PropertyGroup>
1420

1521
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -55,4 +61,11 @@
5561
<Folder Include="Forms\" />
5662
</ItemGroup>
5763

64+
<ItemGroup>
65+
<None Include="..\..\Discord\CodeRed\Logos\Icon.png">
66+
<Pack>True</Pack>
67+
<PackagePath>\</PackagePath>
68+
</None>
69+
</ItemGroup>
70+
5871
</Project>

Forms/MainFrm.Designer.cs

Lines changed: 103 additions & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Forms/MainFrm.cs

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,23 @@ private void LaunchBtn_OnButtonClick(object sender, EventArgs e)
126126
}
127127
}
128128

129-
private void ManualInjectBtn_Click(object sender, EventArgs e)
129+
private void ManualInjectBtn_OnButtonClick(object sender, EventArgs e)
130130
{
131+
if (Updator.IsOutdated() && Configuration.ShouldPreventInjection())
132+
{
133+
Logger.Write("Prevented injection, updator returned out of date!");
134+
ProcessStatusCtrl.DisplayType = StatusTypes.Process_Outdated;
135+
InjectTmr.Stop();
136+
return;
137+
}
138+
131139
if (!Configuration.ShouldInjectAll())
132140
{
133141
List<Process> processes = ProcessManager.GetFilteredProcesses(LibraryManager.Settings.ProcessName);
134142

135143
if (processes.Count > 0)
136144
{
145+
Logger.Write("Process found!");
137146
LogInjectionResult(LibraryManager.TryLoadIndividual(processes[0], Storage.GetLibraryFile()));
138147
}
139148
}
@@ -143,6 +152,8 @@ private void ManualInjectBtn_Click(object sender, EventArgs e)
143152

144153
if (results.Count > 0)
145154
{
155+
Logger.Write("Process found!");
156+
146157
foreach (InjectionResults result in results)
147158
{
148159
LogInjectionResult(result);
@@ -175,6 +186,11 @@ private void AutoInstallBx_OnCheckChanged(object sender, EventArgs e)
175186
private void PreventInjectionBx_OnCheckChanged(object sender, EventArgs e)
176187
{
177188
Configuration.PreventInjection.SetValue(PreventInjectionBx.BoxChecked).Save();
189+
190+
if (AutoCheckUpdatesBx.BoxChecked)
191+
{
192+
CheckForUpdates(true);
193+
}
178194
}
179195

180196
private void RunOnStartupBx_OnCheckChanged(object sender, EventArgs e)
@@ -329,6 +345,7 @@ private void OpenFolderBtn_OnButtonClick(object sender, EventArgs e)
329345
private void ExportLogsBtn_OnButtonClick(object sender, EventArgs e)
330346
{
331347
Architecture.Path modulePath = Storage.GetModulePath();
348+
Architecture.Path launchPath = (modulePath / "Settings" / "Launcher.cr");
332349
Architecture.Path variablesPath = (modulePath / "Settings" / "Variables.cr");
333350
Architecture.Path logsPath = (Storage.GetGamesPath() / "TAGame" / "Logs");
334351

@@ -357,6 +374,11 @@ private void ExportLogsBtn_OnButtonClick(object sender, EventArgs e)
357374
}
358375
}
359376

377+
if (launchPath.Exists())
378+
{
379+
filesToExport.Add(launchPath.GetPath());
380+
}
381+
360382
if (variablesPath.Exists())
361383
{
362384
filesToExport.Add(variablesPath.GetPath());
@@ -462,6 +484,8 @@ private void ProcessTmr_Tick(object sender, EventArgs e)
462484

463485
if ((ProcessStatusCtrl.DisplayType != StatusTypes.Process_Injecting) && (ProcessStatusCtrl.DisplayType != StatusTypes.Process_Manual))
464486
{
487+
Logger.Write("Process is running!");
488+
465489
if (!Updator.IsOutdated())
466490
{
467491
CheckForUpdates(true, false);
@@ -474,6 +498,7 @@ private void ProcessTmr_Tick(object sender, EventArgs e)
474498

475499
if (Updator.IsOutdated() && Configuration.ShouldPreventInjection())
476500
{
501+
Logger.Write("Prevented injection, updator returned out of date!");
477502
ProcessStatusCtrl.DisplayType = StatusTypes.Process_Outdated;
478503
InjectTmr.Stop();
479504
}
@@ -542,6 +567,7 @@ private void InjectTmr_Tick(object sender, EventArgs e)
542567

543568
if (processes.Count > 0)
544569
{
570+
Logger.Write("Process found!");
545571
LogInjectionResult(LibraryManager.TryLoadIndividual(processes[0], Storage.GetLibraryFile()));
546572
}
547573

@@ -553,6 +579,8 @@ private void InjectTmr_Tick(object sender, EventArgs e)
553579

554580
if (results.Count > 0)
555581
{
582+
Logger.Write("Process found!");
583+
556584
foreach (InjectionResults result in results)
557585
{
558586
LogInjectionResult(result);
@@ -1091,8 +1119,9 @@ private async Task<bool> CheckForUpdates(bool bInvalidate, bool bShowPrompt = tr
10911119
{
10921120
List<Process> processes = ProcessManager.GetFilteredProcesses(LibraryManager.Settings.ProcessName);
10931121

1094-
if (processes.Count > 0 && LibraryManager.IsModuleLoaded(processes[0], true))
1122+
if ((processes.Count > 0) && LibraryManager.IsModuleLoaded(processes[0], true))
10951123
{
1124+
Logger.Write("Process found!");
10961125
UpdatePopup.UpdateType = CRUpdate.UpdateLayouts.Running;
10971126
}
10981127
else

Forms/MainFrm.resx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@
174174
<metadata name="ChangelogCtrl.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
175175
<value>True</value>
176176
</metadata>
177-
<metadata name="LaunchBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
178-
<value>True</value>
179-
</metadata>
180177
<metadata name="DashboardArtTwo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
181178
<value>True</value>
182179
</metadata>
@@ -186,6 +183,9 @@
186183
<metadata name="ManualInjectBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
187184
<value>True</value>
188185
</metadata>
186+
<metadata name="LaunchBtn.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
187+
<value>True</value>
188+
</metadata>
189189
<metadata name="NewsCtrl.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
190190
<value>True</value>
191191
</metadata>

Framework/Assembly.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ namespace CodeRedLauncher
55
public static class Assembly
66
{
77
private static readonly string _title = "CodeRed Launcher";
8-
private static readonly string _description = "Manages the CodeRed Module for Rocket League.";
8+
private static readonly string _description = "Manages and injects the CodeRed module for Rocket League. ";
99
private static readonly string _company = "CodeRedModding";
1010
private static readonly string _product = "CodeRedLauncher";
1111
private static readonly string _copyright = "CodeRedModding 2023";
1212
private static readonly string _license = "MIT License";
13-
private static readonly string _version = "1.2.8";
13+
private static readonly string _version = "1.2.9";
1414
private static readonly bool _termsOfUse = false;
1515
private static readonly bool _privatePolicy = false;
1616

Framework/Configuration.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ public static bool CheckInitialized()
220220
else
221221
{
222222
SetDefaultSettings(true);
223+
_initialized = true;
223224
}
224225
}
225226

@@ -228,6 +229,7 @@ public static bool CheckInitialized()
228229

229230
public static void SetDefaultSettings(bool bSaveChanges = false)
230231
{
232+
_storageFile = (Storage.GetModulePath() / "Settings" / "Launcher.cr");
231233
PrivacyPolicy.ResetToDefault();
232234
TermsOfUse.ResetToDefault();
233235
PrivacyHash.ResetToDefault();
@@ -284,6 +286,10 @@ public async static void SaveChanges()
284286
File.AppendAllText(file, InjectionTimeout.Name + " " + InjectionTimeout.GetStringValue() + "\n");
285287
File.AppendAllText(file, LightMode.Name + " " + LightMode.GetStringValue());
286288
}
289+
else
290+
{
291+
Logger.Write("Launcher settings folder doesn't exist, failed to save settings!");
292+
}
287293
}
288294

289295
public static string HashMD5(string str)

Properties/PublishProfiles/FolderProfile.pubxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
66
<PropertyGroup>
77
<Configuration>Release</Configuration>
88
<Platform>x64</Platform>
9-
<PublishDir>bin\Release\net7.0-windows10.0.17763.0\publish\win-x64\</PublishDir>
9+
<PublishDir>bin\Release\net8.0\publish\win-x64\</PublishDir>
1010
<PublishProtocol>FileSystem</PublishProtocol>
1111
<_TargetId>Folder</_TargetId>
12-
<TargetFramework>net7.0-windows10.0.17763.0</TargetFramework>
12+
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
1313
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
1414
<SelfContained>false</SelfContained>
1515
<PublishSingleFile>true</PublishSingleFile>

Properties/PublishProfiles/FolderProfile.pubxml.user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
44
-->
55
<Project>
66
<PropertyGroup>
7-
<History>True|2023-10-25T22:05:44.6144276Z;True|2023-10-19T21:35:47.3332415-04:00;True|2023-09-29T15:21:56.0574702-04:00;True|2023-09-16T19:07:06.5515071-04:00;True|2023-09-16T19:06:08.9803131-04:00;True|2023-09-13T19:11:25.4534084-04:00;True|2023-09-12T15:15:53.5080335-04:00;True|2023-09-12T11:21:47.2201303-04:00;True|2023-09-11T17:53:54.1085377-04:00;True|2023-07-03T19:19:37.2984651-04:00;True|2023-06-23T12:19:10.5480937-04:00;True|2023-06-07T16:24:13.6686440-04:00;True|2023-06-07T16:19:33.2384233-04:00;True|2023-06-02T14:20:34.8667609-04:00;True|2023-06-02T14:19:16.9938932-04:00;True|2023-05-17T17:31:36.2391578-04:00;True|2023-05-13T13:56:01.0765277-04:00;True|2023-04-26T17:18:01.3003846-04:00;True|2023-04-17T18:09:22.0218857-04:00;True|2023-04-15T08:12:25.4751548-04:00;True|2023-02-23T17:42:55.3711325-05:00;True|2023-01-26T05:55:54.7338406-05:00;True|2023-01-14T16:37:43.9661254-05:00;True|2023-01-11T15:04:57.9184587-05:00;True|2023-01-01T06:51:43.9653309-05:00;True|2022-12-29T03:28:57.5161186-05:00;True|2022-12-25T20:55:07.0626032-05:00;True|2022-12-24T18:45:18.2492814-05:00;True|2022-12-24T17:58:05.8108440-05:00;True|2022-12-23T00:36:55.2356565-05:00;True|2022-12-22T20:46:31.3667454-05:00;True|2022-12-22T20:36:59.8978942-05:00;True|2022-12-22T20:32:40.9627042-05:00;True|2022-12-22T20:27:45.7845417-05:00;True|2022-12-22T20:08:26.4442830-05:00;True|2022-12-22T20:07:06.2254198-05:00;True|2022-12-22T20:01:04.3986967-05:00;True|2022-12-22T19:57:34.6741553-05:00;True|2022-12-22T19:46:09.3566048-05:00;True|2022-12-22T19:45:03.2884935-05:00;True|2022-12-22T19:36:42.2434776-05:00;True|2022-12-22T19:31:21.4738973-05:00;True|2022-12-22T19:27:34.9406205-05:00;False|2022-12-22T19:27:27.7152676-05:00;True|2022-12-22T19:14:05.9421852-05:00;True|2022-12-22T18:02:42.2130135-05:00;</History>
7+
<History>True|2023-11-17T03:32:34.0407922Z;True|2023-10-25T18:05:44.6144276-04:00;True|2023-10-19T21:35:47.3332415-04:00;True|2023-09-29T15:21:56.0574702-04:00;True|2023-09-16T19:07:06.5515071-04:00;True|2023-09-16T19:06:08.9803131-04:00;True|2023-09-13T19:11:25.4534084-04:00;True|2023-09-12T15:15:53.5080335-04:00;True|2023-09-12T11:21:47.2201303-04:00;True|2023-09-11T17:53:54.1085377-04:00;True|2023-07-03T19:19:37.2984651-04:00;True|2023-06-23T12:19:10.5480937-04:00;True|2023-06-07T16:24:13.6686440-04:00;True|2023-06-07T16:19:33.2384233-04:00;True|2023-06-02T14:20:34.8667609-04:00;True|2023-06-02T14:19:16.9938932-04:00;True|2023-05-17T17:31:36.2391578-04:00;True|2023-05-13T13:56:01.0765277-04:00;True|2023-04-26T17:18:01.3003846-04:00;True|2023-04-17T18:09:22.0218857-04:00;True|2023-04-15T08:12:25.4751548-04:00;True|2023-02-23T17:42:55.3711325-05:00;True|2023-01-26T05:55:54.7338406-05:00;True|2023-01-14T16:37:43.9661254-05:00;True|2023-01-11T15:04:57.9184587-05:00;True|2023-01-01T06:51:43.9653309-05:00;True|2022-12-29T03:28:57.5161186-05:00;True|2022-12-25T20:55:07.0626032-05:00;True|2022-12-24T18:45:18.2492814-05:00;True|2022-12-24T17:58:05.8108440-05:00;True|2022-12-23T00:36:55.2356565-05:00;True|2022-12-22T20:46:31.3667454-05:00;True|2022-12-22T20:36:59.8978942-05:00;True|2022-12-22T20:32:40.9627042-05:00;True|2022-12-22T20:27:45.7845417-05:00;True|2022-12-22T20:08:26.4442830-05:00;True|2022-12-22T20:07:06.2254198-05:00;True|2022-12-22T20:01:04.3986967-05:00;True|2022-12-22T19:57:34.6741553-05:00;True|2022-12-22T19:46:09.3566048-05:00;True|2022-12-22T19:45:03.2884935-05:00;True|2022-12-22T19:36:42.2434776-05:00;True|2022-12-22T19:31:21.4738973-05:00;True|2022-12-22T19:27:34.9406205-05:00;False|2022-12-22T19:27:27.7152676-05:00;True|2022-12-22T19:14:05.9421852-05:00;True|2022-12-22T18:02:42.2130135-05:00;</History>
88
<LastFailureDetails />
99
</PropertyGroup>
1010
</Project>

0 commit comments

Comments
 (0)