Fixed Dropdowns using raw class and possibly returning null

This commit is contained in:
Steven Tracey 2022-04-05 21:46:14 -04:00
parent aa4a911f0b
commit 5869805980
6 changed files with 64 additions and 7 deletions

View File

@ -7,8 +7,8 @@ plugins {
}
group 'tech.nevets.jaml'
version '0.7.0'
def build = 'stable'
version '0.7.1'
def build = 'dev'
repositories {
mavenCentral()

60
jaml-installer.iss Normal file
View File

@ -0,0 +1,60 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "JAML"
#define MyAppPublisher "SteveO718"
#define MyAppURL "https://git.nevets.tech/Steven/JAML"
#define MyAppExeName "JAML.exe"
#define MyAppAssocName MyAppName + " File"
#define MyAppAssocExt ".jml"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{E0FCA533-713D-42DB-884C-94A856D9E220}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={userappdata}\.jaml
ChangesAssociations=yes
DisableProgramGroupPage=yes
LicenseFile=/opt/Licenses/GPL.txt
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=./installer
OutputBaseFilename=JAML-Installer
SetupIconFile=./src/main/resources/assets/icon.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "./build/launch4j/{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "./jre/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Registry]
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".jml"; ValueData: ""
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

View File

@ -66,7 +66,7 @@ public class FirstLoginGui extends JFrame {
loaderLabel.setBounds(10, 140, 84, 31);
contentPane.add(loaderLabel);
JComboBox loaderDropdown = new JComboBox(LoaderUtils.loaders);
JComboBox<String> loaderDropdown = new JComboBox<>(LoaderUtils.getLoaders());
loaderDropdown.setBounds(94, 144, 231, 23);
contentPane.add(loaderDropdown);

View File

@ -69,7 +69,7 @@ public class NewProfileGui extends JFrame {
loaderLabel.setBounds(10, 140, 84, 31);
contentPane.add(loaderLabel);
JComboBox loaderDropdown = new JComboBox(LoaderUtils.loaders);
JComboBox<String> loaderDropdown = new JComboBox<>(LoaderUtils.getLoaders());
loaderDropdown.setBounds(94, 144, 231, 23);
contentPane.add(loaderDropdown);

View File

@ -62,7 +62,6 @@ public class StartupGui extends JFrame {
makeDirs();
smoothIncrease(progressBar, 20);
currentTaskLabel.setText("Loading Config...");
currentTaskLabel.repaint();
Config.loadConfig();
smoothIncrease(progressBar, 40);
currentTaskLabel.setText("Loading Profiles...");

View File

@ -13,7 +13,6 @@ import java.net.URL;
import java.nio.charset.StandardCharsets;
public class LoaderUtils {
public static String[] loaders;
public static String[] getLoaders() {
try {
@ -28,7 +27,6 @@ public class LoaderUtils {
loadersArrayList[i] = loadersArray[i].getId();
}
loaders = loadersArrayList;
return loadersArrayList;
} catch (IOException e) {