added support for custom resolution ("default" 1366x768)

backup
LinuxMint4Ever 2019-08-07 22:43:34 +02:00
parent e51f323461
commit 4a001439d6
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
#why does the bang not work? #why does the bang not work?
import urllib2, json, os, sys import urllib2, json, os, sys
print "LinuxMint4Ever's EarlyLauncher version BETA 2.4" print "LinuxMint4Ever's EarlyLauncher version BETA 2.6"
#globally used variables #globally used variables
config = [] config = []
@ -110,10 +110,10 @@ def getToken(username, password):
def deRelative(cwd, path): def deRelative(cwd, path):
return os.path.join(cwd, path) return os.path.join(cwd, path)
def run(java_executable, ram, alignTo, libs, username, gameDir, assets, uuid, accessToken): def run(java_executable, ram, alignTo, libs, username, gameDir, assets, uuid, accessToken, width=1366, height=768):
cwd = os.getcwd() cwd = os.getcwd()
os.chdir(gameDir) os.chdir(gameDir)
exitCode = os.system(deRelative(cwd, java_executable)+" -Xmx"+ram+alignTo+" -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -Djava.library.path="+os.path.join(deRelative(cwd, libs), "natives")+" -cp "+os.path.join(deRelative(cwd, libs),"jar")+os.sep+(":"+os.path.join(deRelative(cwd,libs),"jar")+os.sep).join(os.listdir(os.path.join(deRelative(cwd, libs),"jar")))+" net.minecraft.launchwrapper.Launch --username "+username+" --version 1.7.10-Forge10.13.4.1614-1.7.10 --gameDir "+deRelative(cwd,gameDir)+" --assetsDir "+deRelative(cwd, assets)+" --assetIndex 1.7.10 --uuid "+str(uuid)+" --accessToken "+accessToken+" --userProperties {} --userType mojang --tweakClass cpw.mods.fml.common.launcher.FMLTweaker") exitCode = os.system(deRelative(cwd, java_executable)+" -Xmx"+ram+alignTo+" -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -Djava.library.path="+os.path.join(deRelative(cwd, libs), "natives")+" -cp "+os.path.join(deRelative(cwd, libs),"jar")+os.sep+(":"+os.path.join(deRelative(cwd,libs),"jar")+os.sep).join(os.listdir(os.path.join(deRelative(cwd, libs),"jar")))+" net.minecraft.launchwrapper.Launch --username "+username+" --version 1.7.10-Forge10.13.4.1614-1.7.10 --gameDir "+deRelative(cwd,gameDir)+" --assetsDir "+deRelative(cwd, assets)+" --assetIndex 1.7.10 --uuid "+str(uuid)+" --accessToken "+accessToken+" --userProperties {} --userType mojang --width "+str(width)+" --height "+str(height)+" --tweakClass cpw.mods.fml.common.launcher.FMLTweaker")
os.chdir(cwd) os.chdir(cwd)
return exitCode return exitCode