Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Prestarter/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ internal class Config
public static string Version = "0.1.0";

public static string LauncherDownloadUrl = null;

public static bool DownloadQuestionEnabled = true;

public static bool UseGlobalJava = true;
public static IRuntimeDownloader JavaDownloader = new CompositeDownloader(new AdoptiumJavaDownloader(), new OpenJFXDownloader(true));
}
Expand Down
5 changes: 0 additions & 5 deletions Prestarter/Downloaders/AdoptiumJavaDownloader.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using Prestarter.Helpers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;

namespace Prestarter.Downloaders
{
Expand Down
2 changes: 0 additions & 2 deletions Prestarter/Downloaders/BellsoftJavaDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Threading.Tasks;

namespace Prestarter.Downloaders
{
Expand Down
6 changes: 1 addition & 5 deletions Prestarter/Downloaders/CompositeDownloader.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Linq;

namespace Prestarter.Downloaders
{
Expand Down
5 changes: 1 addition & 4 deletions Prestarter/Downloaders/IRuntimeDownloader.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Threading.Tasks;

namespace Prestarter.Downloaders
namespace Prestarter.Downloaders
{
internal interface IRuntimeDownloader
{
Expand Down
16 changes: 6 additions & 10 deletions Prestarter/Downloaders/OpenJFXDownloader.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
using Prestarter.Helpers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace Prestarter.Downloaders
{
internal class OpenJFXDownloader : IRuntimeDownloader
{
private const string x64OriginalUrl = "https://download2.gluonhq.com/openjfx/23.0.1/openjfx-23.0.1_windows-x64_bin-sdk.zip";
private const string x86OriginalUrl = "https://download2.gluonhq.com/openjfx/17.0.8/openjfx-17.0.8_windows-x86_bin-sdk.zip";
private const string x64OriginalUrl = "https://download2.gluonhq.com/openjfx/23.0.2/openjfx-23.0.2_windows-x64_bin-sdk.zip";
private const string x86OriginalUrl = "https://download2.gluonhq.com/openjfx/17.0.15/openjfx-17.0.15_windows-x86_bin-sdk.zip";

private const string x64MirrorUrl = "https://gravit-jvm-mirror.re146.dev/openjfx-23.0.1_windows-x64_bin-sdk.zip";
private const string x86MirrorUrl = "https://gravit-jvm-mirror.re146.dev/openjfx-17.0.8_windows-x86_bin-sdk.zip";
private const string x64MirrorUrl = "https://gravit-jvm-mirror.re146.dev/openjfx-23.0.2_windows-x64_bin-sdk.zip";
private const string x86MirrorUrl = "https://gravit-jvm-mirror.re146.dev/openjfx-17.0.15_windows-x86_bin-sdk.zip";

// private const string x64ChecksumUrl = "https://download2.gluonhq.com/openjfx/23.0.1/openjfx-23.0.1_windows-x64_bin-sdk.zip.sha256";
// private const string x64ChecksumUrl = "https://download2.gluonhq.com/openjfx/23.0.2/openjfx-23.0.2_windows-x64_bin-sdk.zip.sha256";
private const string x64Checksum = "0f4d58b15a7148a203ab72ce376f1fa17b243e38e6d66e29d04a0177ae5dc3d3";
// private const string x86ChechsumUrl = "https://download2.gluonhq.com/openjfx/17.0.8/openjfx-17.0.8_windows-x86_bin-sdk.zip.sha256";
// private const string x86ChechsumUrl = "https://download2.gluonhq.com/openjfx/17.0.15/openjfx-17.0.15_windows-x86_bin-sdk.zip.sha256";
private const string x86Checksum = "c3a56d545f2614465664b66cb4c178ddd7fe37d4ec7b53d2248a2d80f4a04ed7";

private const string x64Name = "OpenJFX 21 (x86_64)";
Expand Down
8 changes: 1 addition & 7 deletions Prestarter/Helpers/DownloaderHelper.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.IO;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;

namespace Prestarter.Helpers
{
Expand Down
2 changes: 0 additions & 2 deletions Prestarter/Helpers/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography;
using System.Threading;
using System.Threading.Tasks;

namespace Prestarter.Helpers
{
Expand Down
2 changes: 1 addition & 1 deletion Prestarter/Helpers/HashProxyStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal class HashProxyStream : Stream

public override long Position { get => throw new InvalidOperationException(); set => throw new InvalidOperationException(); }

public HashProxyStream(Stream baseStream, HashAlgorithm hashAlgorithm)
public HashProxyStream(Stream baseStream, HashAlgorithm hashAlgorithm)
{
this.baseStream = baseStream;
this.hashAlgorithm = hashAlgorithm;
Expand Down
8 changes: 0 additions & 8 deletions Prestarter/I18n.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using Prestarter.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Resources;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace Prestarter
{
Expand Down
6 changes: 1 addition & 5 deletions Prestarter/L10n/L10nManager.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Prestarter.Helpers
{
Expand Down
2 changes: 1 addition & 1 deletion Prestarter/L10n/Locales/EnUsLocale.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Prestarter.Helpers
{
internal class EnUsLocale : ILocale
internal class EnUsLocale : ILocale
{
public string JavaUpdateAvailableMessage => @"Java update available. Would you like us to update it?";
public string ForLauncherStartupSoftwareIsRequiredMessage => @"To launch {0} A speciffic Java version required. Download now {1}?";
Expand Down
4 changes: 2 additions & 2 deletions Prestarter/Prestarter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private static JavaStatus CheckJavaUpdateDate(string path)
private enum JavaStatus
{
Ok,
NotInstalled,
NotInstalled,
NeedUpdate
}

Expand Down Expand Up @@ -87,7 +87,7 @@ private string VerifyAndDownloadJava(string basePath)
}
else
{
var dialog = MessageBox.Show(string.Format(I18n.ForLauncherStartupSoftwareIsRequiredMessage, Config.Project, Config.JavaDownloader.GetName()),
var dialog = MessageBox.Show(string.Format(I18n.ForLauncherStartupSoftwareIsRequiredMessage, Config.Project, Config.JavaDownloader.GetName()),
"Prestarter", MessageBoxButtons.OKCancel);
if (dialog != DialogResult.OK)
{
Expand Down
4 changes: 2 additions & 2 deletions Prestarter/PrestarterForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Prestarter
internal partial class PrestarterForm : Form, IUIReporter
{
private bool dragging = false;

private Point dragCursorPoint;
private Point dragFormPoint;

Expand Down Expand Up @@ -71,7 +71,7 @@ public void SetStatus(string status)

public void SetProgress(float value)
{
Invoke(new Action(() => mainProgressBar.Value = (int) Math.Round(value * 100)));
Invoke(new Action(() => mainProgressBar.Value = (int)Math.Round(value * 100)));
}

public void ShowForm()
Expand Down
4 changes: 1 addition & 3 deletions Prestarter/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Globalization;
using System.Windows.Forms;
using System.Windows.Forms;

namespace Prestarter
{
Expand Down