Skip to content

Commit

Permalink
just because i can
Browse files Browse the repository at this point in the history
Co-Authored-By: Bogdan <[email protected]>
  • Loading branch information
dima-dencep and Asek3 committed Apr 28, 2024
1 parent 8552860 commit 840aacd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ version = project.mod_version
group = project.maven_group

sourceSets {
desktop {
}

vendored {
java {
compileClasspath += main.compileClasspath
Expand All @@ -65,6 +68,7 @@ loom {
client {
mods {
oculus {
sourceSet sourceSets.desktop
sourceSet sourceSets.main
sourceSet sourceSets.vendored
sourceSet sourceSets.sodiumCompatibility
Expand Down Expand Up @@ -131,7 +135,7 @@ shadowJar {

manifest {
attributes(
'Main-Class': 'net.coderbot.iris.LaunchWarn'
'Main-Class': 'net.irisshaders.iris.LaunchWarn'
)
}
}
Expand All @@ -144,6 +148,7 @@ remapJar {
jar {
from sourceSets.sodiumCompatibility.output
from sourceSets.vendored.output
from sourceSets.desktop.output
}

java {
Expand All @@ -153,6 +158,7 @@ java {
sourcesJar {
from sourceSets.sodiumCompatibility.allSource
from sourceSets.vendored.allSource
from sourceSets.desktop.allSource
}

publishing {
Expand Down
5 changes: 5 additions & 0 deletions src/desktop/java/net/irisshaders/iris/DesktopBuildConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package net.irisshaders.iris;

public class DesktopBuildConfig {
public static final boolean IS_SHARED_BETA = false;
}
12 changes: 6 additions & 6 deletions src/desktop/java/net/irisshaders/iris/LaunchWarn.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public class LaunchWarn {
public static void main(String[] args) {
// TODO: make this translatable
String message = DesktopBuildConfig.IS_SHARED_BETA
? "If you're seeing this, you didn't read instructions.\n (Hint: This isn't a installer or a Forge mod. It's a Fabric mod.)"
: "This file is the Fabric version of Iris, meant to be installed as a mod. Would you like to get the Iris Installer instead?";
? "If you're seeing this, you didn't read instructions.\n (Hint: This isn't a installer or a Fabric mod. It's a (Neo)Forge mod.)"
: "This file is the Forge version of Oculus, meant to be installed as a mod. Would you like to get the NeoForge Installer instead?";
String fallback = DesktopBuildConfig.IS_SHARED_BETA
? "If you're seeing this, you didn't read instructions.\n (Hint: This isn't a installer or a Forge mod. It's a Fabric mod.)"
: "This file is the Fabric version of Iris, meant to be installed as a mod. Please download the Iris Installer from https://irisshaders.dev.";
? "If you're seeing this, you didn't read instructions.\n (Hint: This isn't a installer or a Fabric mod. It's a (Neo)Forge mod.)"
: "This file is the Forge version of Oculus, meant to be installed as a mod. Please download the NeoForge Installer from https://neoforged.net.";
if (GraphicsEnvironment.isHeadless()) {
System.err.println(fallback);
} else {
Expand All @@ -24,11 +24,11 @@ public static void main(String[] args) {
}

if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
int option = JOptionPane.showOptionDialog(null, message, "Iris Installer", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);
int option = JOptionPane.showOptionDialog(null, message, "Oculus Installer", JOptionPane.YES_NO_OPTION, JOptionPane.INFORMATION_MESSAGE, null, null, null);

if (option == JOptionPane.YES_OPTION) {
try {
Desktop.getDesktop().browse(URI.create("https://irisshaders.dev"));
Desktop.getDesktop().browse(URI.create("https://neoforged.net"));
} catch (IOException e) {
System.out.println("Welp; we're screwed.");
e.printStackTrace();
Expand Down

0 comments on commit 840aacd

Please sign in to comment.