added existing files
parent
d6a8c0c569
commit
ee1a8c87ad
|
@ -0,0 +1,8 @@
|
|||
ram=4
|
||||
#The multipiler for RAM amount (G, M, K or nothing)
|
||||
alignTo=G
|
||||
#Files
|
||||
assets=../res/
|
||||
gameDir=../run/
|
||||
libs=../lib/
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/python2
|
||||
|
||||
import urllib2, json, os, sys
|
||||
print "LinuxMint4Ever's EarlyLauncher version BETA 2.0_001"
|
||||
if os.path.isfile(os.path.join(os.path.getcwd(), "earlylauncher.py")):
|
||||
pass
|
||||
else:
|
||||
print "Error: Not running from the EarlyLauncher Directory"
|
||||
sys.exit(1)
|
||||
|
||||
#TODO: rename everything to make the code self-explanatory
|
||||
def gettoken(username, password):
|
||||
data = {
|
||||
"agent": {
|
||||
"name": "Minecraft",
|
||||
"version": 1
|
||||
},
|
||||
"username": username,
|
||||
"password": password
|
||||
}
|
||||
try:
|
||||
req = urllib2.Request(url='https://authserver.mojang.com/authenticate', data=json.dumps(data).encode(), headers={"Content-Type": "application/json"})
|
||||
code = json.loads(urllib2.urlopen(req).read().decode())
|
||||
except:
|
||||
#TODO: Replace with proper error handling
|
||||
return False, False, False
|
||||
|
||||
username = code['selectedProfile']['name']
|
||||
access_token = code['accessToken']
|
||||
profile_id = code['selectedProfile']['id']
|
||||
|
||||
|
||||
return access_token, profile_id, username
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
#TODO: Read a config file
|
||||
ram=2
|
||||
alignTo="G"
|
||||
|
||||
name=raw_input("Nutzername: ")
|
||||
pw=raw_input("Passwort: ")
|
||||
accessToken, uuid, username = gettoken(str(name), str(pw))
|
||||
#TODO: use config values
|
||||
os.system("java -Xmx"+str(ram)+alignTo+" -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -Djava.library.path=runningDir/1.7.10-Forge10.13.4.1614-1.7.10-natives-6365946440842 -cp runningDir/libraries/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10/forge-1.7.10-10.13.4.1614-1.7.10.jar;runningDir/libraries/net/minecraft/launchwrapper/1.12/launchwrapper-1.12.jar;runningDir/libraries/org/ow2/asm/asm-all/5.0.3/asm-all-5.0.3.jar;runningDir/libraries/com/typesafe/akka/akka-actor_2.11/2.3.3/akka-actor_2.11-2.3.3.jar;runningDir/libraries/com/typesafe/config/1.2.1/config-1.2.1.jar;runningDir/libraries/org/scala-lang/scala-actors-migration_2.11/1.1.0/scala-actors-migration_2.11-1.1.0.jar;runningDir/libraries/org/scala-lang/scala-compiler/2.11.1/scala-compiler-2.11.1.jar;runningDir/libraries/org/scala-lang/plugins/scala-continuations-library_2.11/1.0.2/scala-continuations-library_2.11-1.0.2.jar;runningDir/libraries/org/scala-lang/plugins/scala-continuations-plugin_2.11.1/1.0.2/scala-continuations-plugin_2.11.1-1.0.2.jar;runningDir/libraries/org/scala-lang/scala-library/2.11.1/scala-library-2.11.1.jar;runningDir/libraries/org/scala-lang/scala-parser-combinators_2.11/1.0.1/scala-parser-combinators_2.11-1.0.1.jar;runningDir/libraries/org/scala-lang/scala-reflect/2.11.1/scala-reflect-2.11.1.jar;runningDir/libraries/org/scala-lang/scala-swing_2.11/1.0.1/scala-swing_2.11-1.0.1.jar;runningDir/libraries/org/scala-lang/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar;runningDir/libraries/lzma/lzma/0.0.1/lzma-0.0.1.jar;runningDir/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar;runningDir/libraries/com/google/guava/guava/17.0/guava-17.0.jar;runningDir/libraries/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar;runningDir/libraries/com/mojang/netty/1.6/netty-1.6.jar;runningDir/libraries/com/mojang/realms/1.3.5/realms-1.3.5.jar;runningDir/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar;runningDir/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar;runningDir/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar;runningDir/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar;runningDir/libraries/java3d/vecmath/1.3.1/vecmath-1.3.1.jar;runningDir/libraries/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar;runningDir/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar;runningDir/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar;runningDir/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar;runningDir/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar;runningDir/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar;runningDir/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar;runningDir/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar;runningDir/libraries/io/netty/netty-all/4.0.10.Final/netty-all-4.0.10.Final.jar;runningDir/libraries/com/google/guava/guava/15.0/guava-15.0.jar;runningDir/libraries/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar;runningDir/libraries/commons-io/commons-io/2.4/commons-io-2.4.jar;runningDir/libraries/commons-codec/commons-codec/1.9/commons-codec-1.9.jar;runningDir/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar;runningDir/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar;runningDir/libraries/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar;runningDir/libraries/com/mojang/authlib/1.5.21/authlib-1.5.21.jar;runningDir/libraries/org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar;runningDir/libraries/org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar;runningDir/libraries/org/lwjgl/lwjgl/lwjgl/2.9.1/lwjgl-2.9.1.jar;runningDir/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.1/lwjgl_util-2.9.1.jar;runningDir/libraries/tv/twitch/twitch/5.16/twitch-5.16.jar;runningDir/1.7.10.jar net.minecraft.launchwrapper.Launch --username "+username+" --version 1.7.10-Forge10.13.4.1614-1.7.10 --gameDir runningDir --assetsDir runningDir/assets --assetIndex 1.7.10 --uuid "+str(uuid)+" --accessToken "+str(accessToken)+" --userProperties {} --userType mojang --tweakClass cpw.mods.fml.common.launcher.FMLTweaker")
|
|
@ -0,0 +1,2 @@
|
|||
Put all libs and the version jar here
|
||||
rework launcher to use "[...] -cp lib/*.jar [...]"
|
|
@ -0,0 +1,2 @@
|
|||
extract natives to this folder
|
||||
|
|
@ -0,0 +1,444 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Launcher</class>
|
||||
<widget class="QWidget" name="Launcher">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>401</width>
|
||||
<height>302</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>401</width>
|
||||
<height>302</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>401</width>
|
||||
<height>302</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Jan’s Minecraft Mod Pack Launcher</string>
|
||||
</property>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>401</width>
|
||||
<height>251</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="tabShape">
|
||||
<enum>QTabWidget::Rounded</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabUpdates">
|
||||
<attribute name="title">
|
||||
<string>News && Updates</string>
|
||||
</attribute>
|
||||
<widget class="QWebView" name="webUpdates">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>401</width>
|
||||
<height>221</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="url">
|
||||
<url>
|
||||
<string>about:blank</string>
|
||||
</url>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabMods">
|
||||
<attribute name="title">
|
||||
<string>Mod Infos && Credits</string>
|
||||
</attribute>
|
||||
<widget class="QWebView" name="webMods">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-1</x>
|
||||
<y>-1</y>
|
||||
<width>401</width>
|
||||
<height>221</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="url">
|
||||
<url>
|
||||
<string>about:blank</string>
|
||||
</url>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabServer">
|
||||
<attribute name="title">
|
||||
<string>Server Info</string>
|
||||
</attribute>
|
||||
<widget class="QWebView" name="webServerInfo">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<width>401</width>
|
||||
<height>221</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="url">
|
||||
<url>
|
||||
<string>about:blank</string>
|
||||
</url>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabPreferences">
|
||||
<attribute name="title">
|
||||
<string>Preferences</string>
|
||||
</attribute>
|
||||
<widget class="QGroupBox" name="groupLogin">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>0</y>
|
||||
<width>381</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Login Information</string>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="lineUsername">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>20</y>
|
||||
<width>381</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><previously entered></string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>e-Mail or username</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="linePassword">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>50</y>
|
||||
<width>381</width>
|
||||
<height>29</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>You fool!</string>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonSaveUser">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>80</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save!</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonLogout">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>80</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Logout :(</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupPerformance">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>110</y>
|
||||
<width>381</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Performance Settings</string>
|
||||
</property>
|
||||
<widget class="QComboBox" name="dropdownCPU">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>20</y>
|
||||
<width>111</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string><Type of CPU></string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Daddy's old laptop</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Modern Laptop</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Generic Single Core</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Modern Single Core (Seriously!? Why?)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Generic Dual Core</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Modern Dual Core or Threaded</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Generic Multi Core</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Modern Multi Core</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Extremely too many cores</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>NO LIMITS!</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="dropdownGPU">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>20</y>
|
||||
<width>111</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string><Type of GPU></string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Daddy's old laptop</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Generic laptop dedicated</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Modern laptop integrated</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Modern Laptop dedicated</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Generic Integrated (or low-power office PC graphics card)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Modern Integrated (or modern office PC ... 1030? I am looking at you.)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Generic Dedicated</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Modern Dedicated</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>GAMING!!!</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>When will RayTracing be available?</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="dropdownRAM">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>20</y>
|
||||
<width>111</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string><Ram amount></string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonSavePerformance">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>50</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save!</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonAutoDetectPerformance">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>50</y>
|
||||
<width>101</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Try auto-detect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="labelServerStatus">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>310</x>
|
||||
<y>260</y>
|
||||
<width>81</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Server: Offline</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonServerStartup">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>300</x>
|
||||
<y>280</y>
|
||||
<width>101</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Request Startup</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QProgressBar" name="progressUpdate">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>250</y>
|
||||
<width>101</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
<property name="format">
|
||||
<string>Updating...</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="buttonPlay">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>250</y>
|
||||
<width>201</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PLAY! :)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>QWebView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>QtWebKitWidgets/QWebView</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1 @@
|
|||
this folder would be called assets in vanilla MC
|
|
@ -0,0 +1,2 @@
|
|||
this will be the gameDir
|
||||
|
Reference in New Issue