Skip to content

Commit

Permalink
Miscellaneous fixes as release preparation
Browse files Browse the repository at this point in the history
Notably, this disables IPv6 support in Aria2, which was triggering an issue for at least one tester with an unusual network configuration and some public players causing the connection to fail.
  • Loading branch information
ChloeC committed Apr 26, 2023
1 parent 140aa48 commit c54fe61
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
Empty file modified CompileLinux.sh
100644 → 100755
Empty file.
18 changes: 5 additions & 13 deletions downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,10 @@
import gui
import versions










def download(url, size):
free_space_check(size, 'temporary')

run([vars.ARIA2C_BINARY, '--max-connection-per-server=16', '-UTF2CDownloader2022-12-05', '--max-concurrent-downloads=16', '--optimize-concurrent-downloads=true', '--check-certificate=false', '--check-integrity=true', '--auto-file-renaming=false', '--continue=true', '--console-log-level=error', '--summary-interval=0', '--bt-hash-check-seed=false', '--seed-time=0',
run([vars.ARIA2C_BINARY, '--max-connection-per-server=16', '-UTF2CDownloader2023-04-26', '--disable-ipv6=true', '--max-concurrent-downloads=16', '--optimize-concurrent-downloads=true', '--check-certificate=false', '--check-integrity=true', '--auto-file-renaming=false', '--continue=true', '--allow-overwrite=true', '--console-log-level=error', '--summary-interval=0', '--bt-hash-check-seed=false', '--seed-time=0',
'-d' + vars.TEMP_PATH, url], check=True)


Expand Down Expand Up @@ -60,7 +51,7 @@ def butler_verify(signature, gamedir, remote):
run([vars.BUTLER_BINARY, 'verify', signature, gamedir, '--heal=archive,' + remote], check=True)

def butler_patch(url, staging_dir, patchfilename, gamedir):
run([vars.ARIA2C_BINARY, '--max-connection-per-server=16', '-UTF2CDownloader2022-12-05', '--max-concurrent-downloads=16', '--optimize-concurrent-downloads=true', '--check-certificate=false', '--check-integrity=true', '--auto-file-renaming=false', '--continue=true', '--console-log-level=error', '--summary-interval=0', '--bt-hash-check-seed=false', '--seed-time=0',
run([vars.ARIA2C_BINARY, '--max-connection-per-server=16', '-UTF2CDownloader2023-04-26', '--disable-ipv6=true', '--max-concurrent-downloads=16', '--optimize-concurrent-downloads=true', '--check-certificate=false', '--check-integrity=true', '--auto-file-renaming=false', '--continue=true', '--allow-overwrite=true', '--console-log-level=error', '--summary-interval=0', '--bt-hash-check-seed=false', '--seed-time=0',
'-d' + vars.TEMP_PATH, url], check=True)
gui.message(_("Patching your game with the new update, please wait patiently."), 1)
run([vars.BUTLER_BINARY, 'apply', '--staging-dir=' + staging_dir, path.join(vars.TEMP_PATH, patchfilename), gamedir], check=True)
Expand Down Expand Up @@ -151,14 +142,15 @@ def update():

# Filesize check for butler-staging...
# patch_tempreq is NOT the size of the patch, this is the size of the staging folder when commiting
free_space_check(patch_tempreq, 'temporary')
# Even though this is literally temporary, we say this is "permanent" since we want to check and use the same drive as the game
free_space_check(patch_tempreq, 'permanent')

version_json = versions.get_version_list()["versions"]
signature_url = version_json[versions.get_installed_version()]["signature"]
heal_url = version_json[versions.get_installed_version()]["heal"]

# Finally, verify and heal with the information we've gathered.
butler_verify(vars.SOURCE_URL + signature_url, vars.INSTALL_PATH + '/tf2classic', vars.SOURCE_URL + heal_url)
butler_patch(vars.SOURCE_URL + patch_url, vars.TEMP_PATH + 'butler-staging', patch_file, vars.INSTALL_PATH + '/tf2classic')
butler_patch(vars.SOURCE_URL + patch_url, vars.INSTALL_PATH + '/butler-staging', patch_file, vars.INSTALL_PATH + '/tf2classic')

do_symlink()
1 change: 1 addition & 0 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def main_menu():
elif user_choice == 3:
version_json = versions.get_version_list()["versions"]
downloads.butler_verify(vars.SOURCE_URL + version_json[versions.get_installed_version()]["signature"], vars.INSTALL_PATH + '/tf2classic', vars.SOURCE_URL + version_json[versions.get_installed_version()]["heal"])
message_end(_("The verification process has completed, and any corruption has been repaired."), 0)

else:
message(_("Invalid choice. Please retry."))
Expand Down
4 changes: 2 additions & 2 deletions selfupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def hash_script():
def check_downloader_update():
try:
if system() == 'Windows':
remote_hash = httpx.get("https://wiki.tf2classic.com/downloader/tf2cd_sha512sum_windows")
remote_hash = httpx.get("https://wiki.tf2classic.com/kachemak/tf2cd_sha512sum_windows")
else:
remote_hash = httpx.get("https://wiki.tf2classic.com/downloader/tf2cd_sha512sum_linux")
remote_hash = httpx.get("https://wiki.tf2classic.com/kachemak/tf2cd_sha512sum_linux")
except httpx.RequestError:
gui.message(_("WARNING: downloader failed to check itself for updates, potentially out-of-date."))
return
Expand Down
2 changes: 1 addition & 1 deletion vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

SCRIPT_MODE = len(sys.argv) > 1

SOURCE_URL = 'https://wiki.tf2classic.com/downloader/butler/'
SOURCE_URL = 'https://wiki.tf2classic.com/kachemak/'

# Only on Linux
TO_SYMLINK = [
Expand Down

0 comments on commit c54fe61

Please sign in to comment.