Skip to content

Commit

Permalink
add runelite maven profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Aug 20, 2024
1 parent 882173e commit 1ce0f10
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 12 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: CI

on: [ push, pull_request ]

env:
RUNELITE_PROFILE: ${{ vars.RUNELITE_PROFILE }}

jobs:
windows:
runs-on: windows-2022
Expand Down Expand Up @@ -48,7 +51,7 @@ jobs:
cd detours/src
nmake
- name: build launcher
run: mvn verify -B
run: mvn verify -B -P $env:RUNELITE_PROFILE
- name: x64 installer
shell: bash
run: ./build-win64.sh
Expand Down Expand Up @@ -88,7 +91,7 @@ jobs:
java-version: 11
distribution: temurin
- name: build
run: mvn verify -B
run: mvn verify -B -P $RUNELITE_PROFILE
- name: linux-x64
run: ./build-linux-x86_64.sh
- name: linux-aarch64
Expand Down Expand Up @@ -128,7 +131,7 @@ jobs:
java-version: 11
distribution: temurin
- name: build
run: mvn verify -B
run: mvn verify -B -P $RUNELITE_PROFILE
- name: clone create-dmg
run: git clone https://github.com/runelite/create-dmg -b runelite-1.0
- name: build create-dmg
Expand Down
11 changes: 11 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -392,4 +392,15 @@
</extension>
</extensions>
</build>

<profiles>
<profile>
<id>runelite</id>
<properties>
<runelite.net>runelite.net</runelite.net>
<runelite.128>runelite_128.png</runelite.128>
<runelite.splash>runelite_splash.png</runelite.splash>
</properties>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private ConfigurationFrame(LauncherSettings settings)
setTitle("RuneLite Launcher Configuration");

BufferedImage iconImage;
try (var in = ConfigurationFrame.class.getResourceAsStream("runelite_128.png"))
try (var in = ConfigurationFrame.class.getResourceAsStream(LauncherProperties.getRuneLite128()))
{
iconImage = ImageIO.read(in);
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/runelite/launcher/FatalErrorDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ public FatalErrorDialog(String message)

UIManager.put("Button.select", DARKER_GRAY_COLOR);

try (var in = FatalErrorDialog.class.getResourceAsStream("runelite_128.png"))
try (var in = FatalErrorDialog.class.getResourceAsStream(LauncherProperties.getRuneLite128()))
{
setIconImage(ImageIO.read(in));
}
catch (IOException e)
{
}

try (var in = FatalErrorDialog.class.getResourceAsStream("runelite_splash.png"))
try (var in = FatalErrorDialog.class.getResourceAsStream(LauncherProperties.getRuneLiteSplash()))
{
BufferedImage logo = ImageIO.read(in);
JLabel runelite = new JLabel();
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/net/runelite/launcher/LauncherProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public class LauncherProperties
private static final String BOOTSTRAP = "runelite.bootstrap";
private static final String BOOTSTRAPSIG = "runelite.bootstrapsig";
private static final String MAIN = "runelite.main";
private static final String RUNELITE_128 = "runelite.128";
private static final String RUNELITE_SPLASH = "runelite.splash";

private static final Properties properties = new Properties();

Expand Down Expand Up @@ -101,4 +103,14 @@ public static String getMain()
{
return properties.getProperty(MAIN);
}

public static String getRuneLite128()
{
return properties.getProperty(RUNELITE_128);
}

public static String getRuneLiteSplash()
{
return properties.getProperty(RUNELITE_SPLASH);
}
}
4 changes: 2 additions & 2 deletions src/main/java/net/runelite/launcher/SplashScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private SplashScreen() throws IOException

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setUndecorated(true);
try (var in = SplashScreen.class.getResourceAsStream("runelite_128.png"))
try (var in = SplashScreen.class.getResourceAsStream(LauncherProperties.getRuneLite128()))
{
setIconImage(ImageIO.read(in));
}
Expand All @@ -84,7 +84,7 @@ private SplashScreen() throws IOException
Font font = new Font(Font.DIALOG, Font.PLAIN, 12);

BufferedImage logo;
try (var in = SplashScreen.class.getResourceAsStream("runelite_splash.png"))
try (var in = SplashScreen.class.getResourceAsStream(LauncherProperties.getRuneLiteSplash()))
{
logo = ImageIO.read(in);
}
Expand Down
10 changes: 6 additions & 4 deletions src/main/resources/net/runelite/launcher/launcher.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
runelite.launcher.version=${project.version}
runelite.discord.invite=https://runelite.net/redirect/launcher/discord
runelite.wiki.troubleshooting.link=https://runelite.net/redirect/launcher/troubleshooting
runelite.discord.invite=https://${runelite.net}/redirect/launcher/discord
runelite.wiki.troubleshooting.link=https://${runelite.net}/redirect/launcher/troubleshooting
runelite.dnschange.link=https://1.1.1.1/dns/#setup-instructions
runelite.download.link=https://runelite.net/
runelite.download.link=https://${runelite.net}/
runelite.bootstrap=https://static.runelite.net/bootstrap.json
runelite.bootstrapsig=https://static.runelite.net/bootstrap.json.sha256
runelite.main=net.runelite.client.RuneLite
runelite.main=net.runelite.client.RuneLite
runelite.128=${runelite.128}
runelite.splash=${runelite.splash}

0 comments on commit 1ce0f10

Please sign in to comment.