Skip to content

Commit e3846a9

Browse files
committed
Begin work on components, convert into general Flashpoint installer
1 parent b89affd commit e3846a9

9 files changed

Lines changed: 563 additions & 56 deletions

Finish.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Finish.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ private void Exit(object sender, EventArgs e)
1717
flashpointProcess.StartInfo.UseShellExecute = true;
1818
flashpointProcess.StartInfo.FileName = "Flashpoint.exe";
1919
flashpointProcess.StartInfo.WorkingDirectory = Path.Combine(
20-
((Main)Application.OpenForms["Main"]).FolderTextBox.Text,
21-
@"Flashpoint 11 Infinity\Launcher"
20+
((Main)Application.OpenForms["Main"]).FolderTextBox.Text, @"Launcher"
2221
);
2322
flashpointProcess.Start();
2423
}

FlashpointInstaller.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1515
<Deterministic>true</Deterministic>
1616
<IsWebBootstrapper>false</IsWebBootstrapper>
17+
<NuGetPackageImportStamp>
18+
</NuGetPackageImportStamp>
1719
<PublishUrl>publish\</PublishUrl>
1820
<Install>true</Install>
1921
<InstallFrom>Disk</InstallFrom>
@@ -29,8 +31,6 @@
2931
<UseApplicationTrust>false</UseApplicationTrust>
3032
<PublishWizardCompleted>true</PublishWizardCompleted>
3133
<BootstrapperEnabled>true</BootstrapperEnabled>
32-
<NuGetPackageImportStamp>
33-
</NuGetPackageImportStamp>
3434
</PropertyGroup>
3535
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3636
<PlatformTarget>x86</PlatformTarget>
@@ -284,6 +284,9 @@
284284
</Compile>
285285
<Compile Include="Program.cs" />
286286
<Compile Include="Properties\AssemblyInfo.cs" />
287+
<Compile Include="TriStateTreeView.cs">
288+
<SubType>Component</SubType>
289+
</Compile>
287290
<EmbeddedResource Include="Finish.resx">
288291
<DependentUpon>Finish.cs</DependentUpon>
289292
</EmbeddedResource>

Install.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Install.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ private async void Install_Load(object sender, EventArgs e)
2929
{
3030
downloader.DownloadProgressChanged += OnDownloadProgressChanged;
3131

32-
stream = await downloader.DownloadFileTaskAsync("https://bluepload.unstable.life/selif/flashpointdummy.zip");
32+
//stream = await downloader.DownloadFileTaskAsync("https://bluepload.unstable.life/selif/flashpointdummy.zip");
33+
stream = await downloader.DownloadFileTaskAsync("http://localhost/flashpointdummy.zip");
3334
//stream = System.IO.File.OpenRead(@"E:\flashpointdummy.zip");
3435

3536
if (!downloader.IsCancelled)
3637
{
38+
Directory.CreateDirectory(mainForm.FolderTextBox.Text);
39+
3740
await Task.Run(ExtractTask);
3841
}
3942
}
@@ -67,7 +70,9 @@ private void ExtractTask()
6770
continue;
6871
}
6972

70-
reader.WriteEntryToDirectory(mainForm.FolderTextBox.Text, new ExtractionOptions { ExtractFullPath = true, Overwrite = true });
73+
reader.WriteEntryToDirectory(
74+
mainForm.FolderTextBox.Text, new ExtractionOptions { ExtractFullPath = true, Overwrite = true }
75+
);
7176

7277
extractedSize += reader.Entry.Size;
7378

@@ -88,7 +93,7 @@ private void ExtractTask()
8893

8994
if (reader.Cancelled)
9095
{
91-
Directory.Delete(Path.Combine(mainForm.FolderTextBox.Text, "Flashpoint 11 Infinity"), true);
96+
Directory.Delete(mainForm.FolderTextBox.Text, true);
9297

9398
doneCancelling = true;
9499
}
@@ -106,11 +111,11 @@ private void FinishInstallation()
106111
{
107112
IWshShortcut shortcut = new WshShell().CreateShortcut(Path.Combine(
108113
Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
109-
"Flashpoint Infinity.lnk"
114+
"Flashpoint.lnk"
110115
));
111-
shortcut.TargetPath = Path.Combine(mainForm.FolderTextBox.Text, @"Flashpoint 11 Infinity\Launcher\Flashpoint.exe");
112-
shortcut.WorkingDirectory = Path.Combine(mainForm.FolderTextBox.Text, @"Flashpoint 11 Infinity\Launcher");
113-
shortcut.Description = "Shortcut to Flashpoint Infinity";
116+
shortcut.TargetPath = Path.Combine(mainForm.FolderTextBox.Text, @"Launcher\Flashpoint.exe");
117+
shortcut.WorkingDirectory = Path.Combine(mainForm.FolderTextBox.Text, @"Launcher");
118+
shortcut.Description = "Shortcut to Flashpoint";
114119
shortcut.Save();
115120
}
116121

Main.Designer.cs

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

0 commit comments

Comments
 (0)