Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved updater for Windows #571

Merged
merged 4 commits into from
Apr 2, 2022
Merged

Conversation

123jimin
Copy link

@123jimin 123jimin commented Apr 1, 2022

For me and some other people, some network problem interrupted the update process, and the updater not checking the error code of cpr::Response resulted in corrupted game directory.
While this can be resolved by running the updater until it succeedes, it's very annoying.

Using the HTTP range header, the updater now tries to download from where it was after the download is interrupted. Also few other improvents are made.

Important fixes:

  • The updater now seamlessly continue downloading on encountering NETWORK_RECEIVE_ERROR
    • It tries to download partial content not yet downloaded yet, unless previous attempt could not download anything.
    • I think that sleeping before retrying in this case is unnecessary.
  • Added a progress bar for visualizing download progression.

Additional changes:

  • Changed the default path from http://drewol.me/Downloads/Game.zip to https://www.drewol.me/Downloads/Game.zip
  • Separated logics for downloading and extracting archives.
    • The intention is to reuse the code for Nautica downloads (in future).
  • Changed the flags for libarchive
    • Removed ARCHIVE_EXTRACT_PERM
    • Added ARCHIVE_EXTRACT_SECURE_NODOTDOT and ARCHIVE_EXTRACT_SECURE_SYMLINKS
bandicam.2022-04-02.17-15-01-668.mp4

@123jimin 123jimin marked this pull request as ready for review April 2, 2022 08:11
@Drewol Drewol merged commit 81ef517 into Drewol:develop Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants