Skip to content

Commit

Permalink
Update to 1.1.14 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Kron4ek committed Aug 11, 2021
1 parent 7ef2c2a commit 7bd1610
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 64 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v1.1.14
* Fixed launching Forge with new client versions (1.17+). Hopefully, for sure this time.
---------------------------------------------------------------------
v1.1.13
* Fixed launching Forge with new client versions (1.17+)
* Fixed launching Fabric with new Java versions
Expand Down
66 changes: 33 additions & 33 deletions vlauncher_linux.pb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Define.i useCustomJavaDefault = 0
Define.i useCustomParamsDefault = 0
Define.i keepLauncherOpenDefault = 0

Define.s launcherVersion = "1.1.13"
Define.s launcherVersion = "1.1.14"
Define.s launcherDeveloper = "Kron4ek"

Declare assetsToResources(assetsIndex.s)
Expand Down Expand Up @@ -149,28 +149,28 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
If jsonFile
clientJarFile = "versions/" + clientVersion + "/" + clientVersion + ".jar"
nativesPath = "versions/" + clientVersion + "/natives"

jsonObject = JSONValue(jsonFile)

jsonJarMember = GetJSONMember(jsonObject, "jar")
jsonInheritsFromMember = GetJSONMember(jsonObject, "inheritsFrom")

If jsonInheritsFromMember Or jsonJarMember
If jsonInheritsFromMember
inheritsClientJar = GetJSONString(jsonInheritsFromMember)
Else
inheritsClientJar = GetJSONString(jsonJarMember)
EndIf

If FileSize(clientJarFile) < 1 And FileSize("versions/" + inheritsClientJar + "/" + inheritsClientJar + ".jar") > 0
CopyFile("versions/" + inheritsClientJar + "/" + inheritsClientJar + ".jar", clientJarFile)
EndIf

nativesPath = "versions/" + inheritsClientJar + "/natives"
EndIf

releaseTimeMember = GetJSONMember(jsonObject, "releaseTime")

If releaseTimeMember
releaseTime = Val(StringField(GetJSONString(releaseTimeMember), 1, "-")) * 365 + Val(StringField(GetJSONString(releaseTimeMember), 2, "-")) * 30
EndIf
Expand All @@ -191,7 +191,7 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
clientArguments + " " + GetJSONString(jsonArrayElement) + " "
EndIf
Next

If jsonJvmArray
For i = 0 To JSONArraySize(jsonJvmArray) - 1
jsonArrayElement = GetJSONElement(jsonJvmArray, i)
Expand Down Expand Up @@ -223,7 +223,7 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
clientArguments + " " + GetJSONString(jsonArrayElement) + " "
EndIf
Next

If jsonJvmArray
For i = 0 To JSONArraySize(jsonJvmArray) - 1
jsonArrayElement = GetJSONElement(jsonJvmArray, i)
Expand All @@ -239,7 +239,7 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
assetsIndex = GetJSONString(GetJSONMember(JSONValue(inheritsJson), "assets"))

releaseTimeMember = GetJSONMember(inheritsJsonObject, "releaseTime")

If releaseTimeMember
releaseTime = Val(StringField(GetJSONString(releaseTimeMember), 1, "-")) * 365 + Val(StringField(GetJSONString(releaseTimeMember), 2, "-")) * 30
EndIf
Expand Down Expand Up @@ -267,49 +267,49 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
uuid = StringFingerprint("OfflinePlayer:" + playerName, #PB_Cipher_MD5)
uuid = Left(uuid, 12) + LCase(Hex(Val("$" + Mid(uuid, 13, 2)) & $0f | $30)) + Mid(uuid, 15, 2) + LCase(Hex(Val("$" + Mid(uuid, 17, 2)) & $3f | $80)) + Right(uuid, 14)

clientArguments = ReplaceString(clientArguments, "${auth_player_name}", playerName)
clientArguments = ReplaceString(clientArguments, "${version_name}", clientVersion)
clientArguments = ReplaceString(clientArguments, "${game_directory}", workingDirectory)
clientArguments = ReplaceString(clientArguments, "${assets_root}", "assets")
clientArguments = ReplaceString(clientArguments, "${auth_uuid}", uuid)
clientArguments = ReplaceString(clientArguments, "${auth_access_token}", "00000000000000000000000000000000")
clientArguments = ReplaceString(clientArguments, "${user_properties}", "{}")
clientArguments = ReplaceString(clientArguments, "${user_type}", "mojang")
clientArguments = ReplaceString(clientArguments, "${version_type}", "release")
clientArguments = ReplaceString(clientArguments, "${assets_index_name}", assetsIndex)
clientArguments = ReplaceString(clientArguments, "${auth_session}", "00000000000000000000000000000000")
clientArguments = ReplaceString(clientArguments, "${game_assets}", "resources")

jvmArguments = ReplaceString(jvmArguments, "${classpath}", librariesString + clientJarFile)
jvmArguments = ReplaceString(jvmArguments, "${library_directory}", "libraries")
jvmArguments = ReplaceString(jvmArguments, "${classpath_separator}", ":")
jvmArguments = ReplaceString(jvmArguments, "${natives_directory}", nativesPath)
jvmArguments = ReplaceString(jvmArguments, "-Dminecraft.launcher.brand=${launcher_name}", "")
jvmArguments = ReplaceString(jvmArguments, "-Dminecraft.launcher.version=${launcher_version}", "")

If assetsIndex = "pre-1.6" Or assetsIndex = "legacy"
assetsToResources(assetsIndex)
EndIf

If downloadMissingLibraries
downloadFiles(0)
EndIf

If jvmArguments = ""
jvmArguments = Chr(34) + "-Djava.library.path=" + nativesPath + Chr(34) + " -cp " + Chr(34) + librariesString + clientJarFile + Chr(34)
EndIf

If releaseTime > 0 And releaseTime < 736780
customLaunchArguments = customOldLaunchArgumentsDefault
Else
customLaunchArguments = customLaunchArgumentsDefault
EndIf

If ReadPreferenceInteger("UseCustomParameters", useCustomParamsDefault)
customLaunchArguments = ReadPreferenceString("LaunchArguments", customLaunchArgumentsDefault)
EndIf

fullLaunchString = "-Xmx" + ramAmount + "M " + customLaunchArguments + " " + jvmArguments + " " + clientMainClass + " " + clientArguments

fullLaunchString = ReplaceString(fullLaunchString, "${auth_player_name}", playerName)
fullLaunchString = ReplaceString(fullLaunchString, "${version_name}", clientVersion)
fullLaunchString = ReplaceString(fullLaunchString, "${game_directory}", workingDirectory)
fullLaunchString = ReplaceString(fullLaunchString, "${assets_root}", "assets")
fullLaunchString = ReplaceString(fullLaunchString, "${auth_uuid}", uuid)
fullLaunchString = ReplaceString(fullLaunchString, "${auth_access_token}", "00000000000000000000000000000000")
fullLaunchString = ReplaceString(fullLaunchString, "${user_properties}", "{}")
fullLaunchString = ReplaceString(fullLaunchString, "${user_type}", "mojang")
fullLaunchString = ReplaceString(fullLaunchString, "${version_type}", "release")
fullLaunchString = ReplaceString(fullLaunchString, "${assets_index_name}", assetsIndex)
fullLaunchString = ReplaceString(fullLaunchString, "${auth_session}", "00000000000000000000000000000000")
fullLaunchString = ReplaceString(fullLaunchString, "${game_assets}", "resources")
fullLaunchString = ReplaceString(fullLaunchString, "${classpath}", librariesString + clientJarFile)

This comment has been minimized.

Copy link
@Tratnic

Tratnic Aug 12, 2021

This replacement is no longer needed for both Windows and Unix-like systems since Forge version 37.0.13. The string that required it (i.e. -DlegacyClassPath=${classpath}) has been removed from the JSON manifest file that comes with Forge.

This comment has been minimized.

Copy link
@Kron4ek

Kron4ek Aug 12, 2021

Author Owner

Still needed for vanilla versions (1.13+) though, since they have ${classpath} in their json manifests.

This comment has been minimized.

Copy link
@Tratnic

Tratnic Aug 12, 2021

Ah, you are right. I have totally forgotten that it is still used by vanilla. Sorry for wasting your time.

fullLaunchString = ReplaceString(fullLaunchString, "${library_directory}", "libraries")
fullLaunchString = ReplaceString(fullLaunchString, "${classpath_separator}", ":")
fullLaunchString = ReplaceString(fullLaunchString, "${natives_directory}", nativesPath)
fullLaunchString = ReplaceString(fullLaunchString, "-Dminecraft.launcher.brand=${launcher_name}", "")
fullLaunchString = ReplaceString(fullLaunchString, "-Dminecraft.launcher.version=${launcher_version}", "")

RunProgram(javaBinaryPath, fullLaunchString, workingDirectory)

saveLaunchString = ReadPreferenceInteger("SaveLaunchString", saveLaunchStringDefault)
Expand Down
62 changes: 31 additions & 31 deletions vlauncher_windows.pb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Define.i keepLauncherOpenDefault = 0
Global.i useCustomJavaDefault = 0
Global.s javaBinaryPathDefault = "C:\jre8\bin\javaw.exe"

Define.s launcherVersion = "1.1.13"
Define.s launcherVersion = "1.1.14"
Define.s launcherDeveloper = "Kron4ek"

Declare assetsToResources(assetsIndex.s)
Expand Down Expand Up @@ -174,16 +174,16 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
Else
inheritsClientJar = GetJSONString(jsonJarMember)
EndIf

If FileSize(clientJarFile) < 1 And FileSize("versions\" + inheritsClientJar + "\" + inheritsClientJar + ".jar") > 0
CopyFile("versions\" + inheritsClientJar + "\" + inheritsClientJar + ".jar", clientJarFile)
EndIf

nativesPath = "versions\" + inheritsClientJar + "\natives"
EndIf

releaseTimeMember = GetJSONMember(jsonObject, "releaseTime")

If releaseTimeMember
releaseTime = Val(StringField(GetJSONString(releaseTimeMember), 1, "-")) * 365 + Val(StringField(GetJSONString(releaseTimeMember), 2, "-")) * 30
EndIf
Expand All @@ -204,7 +204,7 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
clientArguments + " " + GetJSONString(jsonArrayElement) + " "
EndIf
Next

If jsonJvmArray
For i = 0 To JSONArraySize(jsonJvmArray) - 1
jsonArrayElement = GetJSONElement(jsonJvmArray, i)
Expand Down Expand Up @@ -236,7 +236,7 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
clientArguments + " " + GetJSONString(jsonArrayElement) + " "
EndIf
Next

If jsonJvmArray
For i = 0 To JSONArraySize(jsonJvmArray) - 1
jsonArrayElement = GetJSONElement(jsonJvmArray, i)
Expand All @@ -250,9 +250,9 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine

librariesString + parseLibraries(inheritsClientJar, downloadMissingLibraries)
assetsIndex = GetJSONString(GetJSONMember(JSONValue(inheritsJson), "assets"))

releaseTimeMember = GetJSONMember(inheritsJsonObject, "releaseTime")

If releaseTimeMember
releaseTime = Val(StringField(GetJSONString(releaseTimeMember), 1, "-")) * 365 + Val(StringField(GetJSONString(releaseTimeMember), 2, "-")) * 30
EndIf
Expand Down Expand Up @@ -280,26 +280,6 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
uuid = StringFingerprint("OfflinePlayer:" + playerName, #PB_Cipher_MD5)
uuid = Left(uuid, 12) + LCase(Hex(Val("$" + Mid(uuid, 13, 2)) & $0f | $30)) + Mid(uuid, 15, 2) + LCase(Hex(Val("$" + Mid(uuid, 17, 2)) & $3f | $80)) + Right(uuid, 14)

clientArguments = ReplaceString(clientArguments, "${auth_player_name}", playerName)
clientArguments = ReplaceString(clientArguments, "${version_name}", clientVersion)
clientArguments = ReplaceString(clientArguments, "${game_directory}", workingDirectory)
clientArguments = ReplaceString(clientArguments, "${assets_root}", "assets")
clientArguments = ReplaceString(clientArguments, "${auth_uuid}", uuid)
clientArguments = ReplaceString(clientArguments, "${auth_access_token}", "00000000000000000000000000000000")
clientArguments = ReplaceString(clientArguments, "${user_properties}", "{}")
clientArguments = ReplaceString(clientArguments, "${user_type}", "mojang")
clientArguments = ReplaceString(clientArguments, "${version_type}", "release")
clientArguments = ReplaceString(clientArguments, "${assets_index_name}", assetsIndex)
clientArguments = ReplaceString(clientArguments, "${auth_session}", "00000000000000000000000000000000")
clientArguments = ReplaceString(clientArguments, "${game_assets}", "resources")

jvmArguments = ReplaceString(jvmArguments, "${classpath}", librariesString + clientJarFile)
jvmArguments = ReplaceString(jvmArguments, "${library_directory}", "libraries")
jvmArguments = ReplaceString(jvmArguments, "${classpath_separator}", ";")
jvmArguments = ReplaceString(jvmArguments, "${natives_directory}", nativesPath)
jvmArguments = ReplaceString(jvmArguments, "-Dminecraft.launcher.brand=${launcher_name}", "")
jvmArguments = ReplaceString(jvmArguments, "-Dminecraft.launcher.version=${launcher_version}", "")

If assetsIndex = "pre-1.6" Or assetsIndex = "legacy"
assetsToResources(assetsIndex)
EndIf
Expand All @@ -311,18 +291,38 @@ If OpenWindow(0, #PB_Ignore, #PB_Ignore, windowWidth, windowHeight, "Vortex Mine
If jvmArguments = ""
jvmArguments = Chr(34) + "-Djava.library.path=" + nativesPath + Chr(34) + " -cp " + Chr(34) + librariesString + clientJarFile + Chr(34)
EndIf

If releaseTime > 0 And releaseTime < 736780
customLaunchArguments = customOldLaunchArgumentsDefault
Else
customLaunchArguments = customLaunchArgumentsDefault
EndIf

If ReadPreferenceInteger("UseCustomParameters", useCustomParamsDefault)
customLaunchArguments = ReadPreferenceString("LaunchArguments", customLaunchArgumentsDefault)
EndIf

fullLaunchString = "-Xmx" + ramAmount + "M " + customLaunchArguments + " " + jvmArguments + " " + clientMainClass + " " + clientArguments

fullLaunchString = ReplaceString(fullLaunchString, "${auth_player_name}", playerName)
fullLaunchString = ReplaceString(fullLaunchString, "${version_name}", clientVersion)
fullLaunchString = ReplaceString(fullLaunchString, "${game_directory}", workingDirectory)
fullLaunchString = ReplaceString(fullLaunchString, "${assets_root}", "assets")
fullLaunchString = ReplaceString(fullLaunchString, "${auth_uuid}", uuid)
fullLaunchString = ReplaceString(fullLaunchString, "${auth_access_token}", "00000000000000000000000000000000")
fullLaunchString = ReplaceString(fullLaunchString, "${user_properties}", "{}")
fullLaunchString = ReplaceString(fullLaunchString, "${user_type}", "mojang")
fullLaunchString = ReplaceString(fullLaunchString, "${version_type}", "release")
fullLaunchString = ReplaceString(fullLaunchString, "${assets_index_name}", assetsIndex)
fullLaunchString = ReplaceString(fullLaunchString, "${auth_session}", "00000000000000000000000000000000")
fullLaunchString = ReplaceString(fullLaunchString, "${game_assets}", "resources")
fullLaunchString = ReplaceString(fullLaunchString, "${classpath}", librariesString + clientJarFile)
fullLaunchString = ReplaceString(fullLaunchString, "${library_directory}", "libraries")
fullLaunchString = ReplaceString(fullLaunchString, "${classpath_separator}", ";")
fullLaunchString = ReplaceString(fullLaunchString, "${natives_directory}", nativesPath)
fullLaunchString = ReplaceString(fullLaunchString, "-Dminecraft.launcher.brand=${launcher_name}", "")
fullLaunchString = ReplaceString(fullLaunchString, "-Dminecraft.launcher.version=${launcher_version}", "")

RunProgram(javaBinaryPath, fullLaunchString, workingDirectory)

saveLaunchString = ReadPreferenceInteger("SaveLaunchString", saveLaunchStringDefault)
Expand Down

0 comments on commit 7bd1610

Please sign in to comment.