2022-05-13 13:36:37 +00:00
|
|
|
print(colored(colorama.Fore.GREEN,"\nSetting up launcher variables..."))
|
|
|
|
launcherVariables["auth_player_name"] = lv["name"]
|
2022-07-05 08:05:25 +00:00
|
|
|
launcherVariables["version_name"] = lv["version"]
|
2022-05-13 13:36:37 +00:00
|
|
|
launcherVariables["game_directory"] = lv["gamePath"]
|
|
|
|
launcherVariables["assets_root"] = assetsPath
|
2022-05-13 22:51:47 +00:00
|
|
|
launcherVariables["game_assets"] = launcherVariables["assets_root"]
|
2022-05-13 13:36:37 +00:00
|
|
|
launcherVariables["auth_access_token"] = "-"
|
|
|
|
launcherVariables["auth_uuid"] = hashlib.md5(lv["name"].encode('utf-8')).hexdigest()
|
|
|
|
launcherVariables["user_type"] = "offline"
|
|
|
|
launcherVariables["version_type"] = clientJson["type"]
|
|
|
|
launcherVariables["natives_directory"] = nativesOutPath
|
|
|
|
launcherVariables["launcher_name"] = "offline-minecraft-launcher"
|
|
|
|
launcherVariables["launcher_version"] = "0.0"
|
|
|
|
launcherVariables["classpath"] = libraryList
|
|
|
|
launcherVariables["auth_session"] = "-"
|
|
|
|
launcherVariables["user_properties"] = "{}"
|
|
|
|
|
|
|
|
if lv["profileFolder"] == "1":
|
|
|
|
profilePath = p(lv["gamePath"],"profiles")
|
|
|
|
launcherVariables["game_directory"] = p(profilePath,lv["name"],lv["version"],".minecraft")
|
|
|
|
if not os.path.isdir(launcherVariables["game_directory"]): os.makedirs(launcherVariables["game_directory"])
|
|
|
|
os.chdir(launcherVariables["game_directory"])
|
|
|
|
|
|
|
|
if launcherVariables["game_directory"].replace(pUp(launcherVariables["game_directory"]) + os.sep,"",1) == ".minecraft":
|
|
|
|
print(colored(colorama.Fore.MAGENTA,"> game_directory is called .minecraft, setting APPDATA/HOME environment variables to parent directory."))
|
|
|
|
os.environ["APPDATA"] = pUp(launcherVariables["game_directory"])
|
2022-05-13 22:51:47 +00:00
|
|
|
os.environ["HOME"] = os.environ["APPDATA"]
|