Skip to content

Commit 3c72824

Browse files
committed
Comp Installer - 1.0.1
1 parent f45d4ce commit 3c72824

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
org.gradle.jvmargs=-Xmx1G
33

44
# Version and packaging info
5-
version=1.0.0
5+
version=1.0.1
66
maven_group=
77
archives_base_name=Complementary-Installer
88

src/main/java/net/hypercubemc/iris_installer/NewInstaller.form

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
<Color blue="0" green="cc" red="ff" type="rgb"/>
102102
</Property>
103103
<Property name="horizontalAlignment" type="int" value="0"/>
104-
<Property name="text" type="java.lang.String" value="Warning: Iris shader loader have ended support for &lt;version&gt;."/>
104+
<Property name="text" type="java.lang.String" value="Warning: Iris shader loader has ended support for &lt;version&gt;."/>
105105
<Property name="horizontalTextPosition" type="int" value="0"/>
106106
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
107107
<Dimension value="[400, 21]"/>

src/main/java/net/hypercubemc/iris_installer/NewInstaller.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class NewInstaller extends JFrame {
3434

3535
private static boolean dark = false;
3636
private boolean installAsMod;
37-
private String outdatedPlaceholder = "Warning: Iris shader loader have ended support for <version>.";
37+
private String outdatedPlaceholder = "Warning: Iris shader loader has ended support for <version>.";
3838
private String snapshotPlaceholder = "Warning: <version> is a snapshot build and may";
3939
private String BASE_URL = "https://raw.githubusercontent.com/IrisShaders/Iris-Installer-Files/master/";
4040
private boolean finishedSuccessfulInstall;
@@ -262,7 +262,7 @@ private void initComponents() {
262262
outdatedText1.setFont(outdatedText1.getFont().deriveFont((float)16));
263263
outdatedText1.setForeground(new java.awt.Color(255, 204, 0));
264264
outdatedText1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
265-
outdatedText1.setText("Warning: Iris shader loader have ended support for <version>.");
265+
outdatedText1.setText("Warning: Iris shader loader has ended support for <version>.");
266266
outdatedText1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
267267
outdatedText1.setMaximumSize(new java.awt.Dimension(400, 21));
268268
outdatedText1.setMinimumSize(new java.awt.Dimension(310, 21));
@@ -466,6 +466,11 @@ private void fabricTypeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:
466466
}//GEN-LAST:event_fabricTypeMouseClicked
467467

468468
private void installButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_installButtonMouseClicked
469+
installButton.setText("Downloading...");
470+
installButton.setEnabled(false);
471+
progressBar.setForeground(new Color(76, 135, 200));
472+
progressBar.setValue(0);
473+
469474
String loaderName = installAsMod ? "fabric-loader" : "iris-fabric-loader";
470475

471476
try {
@@ -490,21 +495,14 @@ private void installButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIR
490495
storageDir.mkdir();
491496
}
492497

493-
installButton.setText("Downloading...");
494-
//installButton.setMargin(new java.awt.Insets(10, 90, 10, 90));
495-
496-
installButton.setEnabled(false);
497-
progressBar.setForeground(new Color(76, 135, 200));
498-
progressBar.setValue(0);
499-
500498
String zipName = (betaSelection.isSelected() ? "Iris-Sodium-Beta" : "Iris-Sodium") + "-" + selectedVersion.name + ".zip";
501499
String irisDownURL = "https://github.com/IrisShaders/Iris-Installer-Files/releases/latest/download/" + zipName;
502500
File saveLocation = getStorageDirectory().resolve(zipName).toFile();
503501

504502
final Downloader downloaderI = new Downloader(irisDownURL, saveLocation);
505503
downloaderI.addPropertyChangeListener(eventI -> {
506504
if ("progress".equals(eventI.getPropertyName())) {
507-
progressBar.setValue(((Integer) eventI.getNewValue() ) * 3 / 4);
505+
progressBar.setValue(((Integer) eventI.getNewValue() ) / 2);
508506
} else if (eventI.getNewValue() == SwingWorker.StateValue.DONE) {
509507
try {
510508
downloaderI.get();
@@ -639,7 +637,7 @@ private void installButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIR
639637
String finalShaderName = shaderName;
640638
downloaderC.addPropertyChangeListener(eventC -> {
641639
if ("progress".equals(eventC.getPropertyName())) {
642-
progressBar.setValue(285 + ((Integer) eventC.getNewValue() ) / 4);
640+
progressBar.setValue(50 + ((Integer) eventC.getNewValue() ) / 2);
643641
} else if (eventC.getNewValue() == SwingWorker.StateValue.DONE) {
644642
try {
645643
downloaderC.get();
@@ -684,10 +682,10 @@ private void installButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIR
684682
installButton.setEnabled(false);
685683
finishedSuccessfulInstall = true;
686684
System.out.println("Finished Successful Install");
687-
String loaderMsg = installAsMod ? "fabric-loader" : "iris-fabric-loader";
685+
String loaderSt = installAsMod ? "fabric-loader" : "iris-fabric-loader";
688686
String msg = "Successfully installed Iris, Sodium, and "
689-
+finalShaderName+
690-
"\nYou can launch the game by selecting the "+loaderMsg+" installation in your Minecraft launcher.";
687+
+finalShaderName+"."+
688+
"\nYou can run the game by selecting "+loaderSt+" in your Minecraft launcher.";
691689
JOptionPane.showMessageDialog(this,
692690
msg, "Installation Complete!", JOptionPane.PLAIN_MESSAGE, new ImageIcon(Objects.requireNonNull(Utils.class.getClassLoader().getResource("green_tick.png"))));
693691
System.exit(0);

0 commit comments

Comments
 (0)