feat: add launcher brand and version props
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
cf33927f21
commit
db19362a97
@ -718,6 +718,12 @@ QString MinecraftInstance::createLaunchScript(AuthSessionPtr session, MinecraftS
|
||||
launchScript += "windowParams " + windowParams + "\n";
|
||||
}
|
||||
|
||||
// launcher info
|
||||
{
|
||||
launchScript += "launcherBrand " + BuildConfig.LAUNCHER_NAME + "\n";
|
||||
launchScript += "launcherVersion " + BuildConfig.printableVersionString() + "\n";
|
||||
}
|
||||
|
||||
// instance info
|
||||
{
|
||||
launchScript += "instanceName " + name() + "\n";
|
||||
|
@ -142,12 +142,19 @@ public final class EntryPoint {
|
||||
}
|
||||
|
||||
private static void setProperties(Parameters params) {
|
||||
String launcherBrand = params.getString("launcherBrand", null);
|
||||
String launcherVersion = params.getString("launcherVersion", null);
|
||||
String name = params.getString("instanceName", null);
|
||||
String iconId = params.getString("instanceIconKey", null);
|
||||
String iconPath = params.getString("instanceIconPath", null);
|
||||
String windowTitle = params.getString("windowTitle", null);
|
||||
String windowDimensions = params.getString("windowParams", null);
|
||||
|
||||
if (launcherBrand != null)
|
||||
System.setProperty("minecraft.launcher.brand", launcherBrand);
|
||||
if (launcherVersion != null)
|
||||
System.setProperty("minecraft.launcher.version", launcherVersion);
|
||||
|
||||
// set useful properties for mods
|
||||
if (name != null)
|
||||
System.setProperty("org.prismlauncher.instance.name", name);
|
||||
|
Loading…
Reference in New Issue
Block a user