2019-10-12 07:31:50 +02:00
|
|
|
#!/usr/bin/python2
|
|
|
|
|
|
|
|
#proposed launcher startup sequence
|
|
|
|
#
|
|
|
|
# - look at command line arguments
|
|
|
|
# possible arguments:
|
|
|
|
# --ui:gui, --ui:cli-interactive, --ui:args-only, --ui:auto (default: auto)
|
|
|
|
# --update:if-available, --update:force, --update:noupdate (default: if-available)
|
|
|
|
# --launch, -l (default: not present)
|
2019-10-12 07:34:00 +02:00
|
|
|
# --silent, --quiet, -s, -q (default: only present in interactive cli mode)
|
2019-10-12 07:31:50 +02:00
|
|
|
#
|
|
|
|
# - decide whether to launch the GUI or not (either by command line argument
|
|
|
|
# or by determining if running from terminal)
|
|
|
|
#
|
|
|
|
# - if updating: install update and restart if in GUI mode or interactive CLI mode,
|
|
|
|
# update and exit in args-only mode
|
|
|
|
#
|
|
|
|
# - launch GUI or launch interactive CLI or follow instructions from the
|
|
|
|
# command line:
|
|
|
|
# If --ui:args-only is present, the default actions are update:if-available
|
|
|
|
# and exit without launching. If -l is present, the GUI or
|
|
|
|
# interactive CLI are only shown while updating and Minecraft will launch
|
|
|
|
# automatically.
|
|
|
|
#
|
|
|
|
# - load configuration
|
|
|
|
#
|
|
|
|
# - handle user actions (only in GUI or interactive mode, skipped with -l)
|
|
|
|
# - update and store configuration
|
|
|
|
# - GUI interaction
|
|
|
|
# - wait for launch or close actions
|
|
|
|
#
|
|
|
|
# - launch the game or exit
|
2019-10-12 11:58:46 +02:00
|
|
|
|
2019-10-22 14:20:32 +02:00
|
|
|
# import standard libraries
|
|
|
|
import sys
|
|
|
|
# adjust path
|
|
|
|
sys.path.append("./lib/launcher/python")
|
2019-10-23 09:04:34 +02:00
|
|
|
# import libraries from new path
|
|
|
|
import yggdrasil, cfghandler, mchandler
|
2019-10-12 11:58:46 +02:00
|
|
|
|
|
|
|
# temporary test stuff
|
2019-10-22 14:20:32 +02:00
|
|
|
a,b = yggdrasil.authenticateUser(raw_input("Username: "), raw_input("Password: "))
|
|
|
|
if a:
|
|
|
|
print b["accessToken"]
|