Add support for getting runelite launcher version
Propagate RuneLite launcher version to client via system property and add this property to RuneLite properties file. Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -27,10 +27,9 @@ package net.runelite.client;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Singleton
|
||||
@Slf4j
|
||||
@@ -43,13 +42,15 @@ public class RuneLiteProperties
|
||||
private static final String DISCORD_INVITE = "runelite.discord.invite";
|
||||
private static final String GITHUB_LINK = "runelite.github.link";
|
||||
private static final String PATREON_LINK = "runelite.patreon.link";
|
||||
private static final String LAUNCHER_VERSION_PROPERTY = "runelite.launcher.version";
|
||||
|
||||
private final Properties properties = new Properties();
|
||||
|
||||
@Inject
|
||||
public RuneLiteProperties()
|
||||
{
|
||||
InputStream in = getClass().getResourceAsStream("runelite.properties");
|
||||
final InputStream in = getClass().getResourceAsStream("runelite.properties");
|
||||
|
||||
try
|
||||
{
|
||||
properties.load(in);
|
||||
@@ -94,4 +95,9 @@ public class RuneLiteProperties
|
||||
{
|
||||
return properties.getProperty(PATREON_LINK);
|
||||
}
|
||||
|
||||
public String getLauncherVersion()
|
||||
{
|
||||
return System.getProperty(LAUNCHER_VERSION_PROPERTY);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user