Commit Graph

72 Commits

Author SHA1 Message Date
tretrauit 0140969e4b
game: more refactoring
Signed-off-by: tretrauit <tretrauit@gmail.com>
2022-12-07 12:52:09 +07:00
tretrauit 680cf60720
fix: ImportError fix 2022-09-28 12:24:24 +07:00
tretrauit 6a76c49323
perf: rework parse_pkg_version & verify_game_files
parse_pkg_version will now return a dict which we can use key to access the value (md5 sum in this case) and therefore will provide faster speed than using previous method
2022-09-20 22:47:25 +07:00
tretrauit 66163f8f45
docs: fix docs for verify_game_file 2022-09-20 17:45:09 +07:00
tretrauit 208b34c9df
feat: verify_game_file, rename verify_game to verify_game_files
You can now use verify_game_file to verify a game file from a pkg_version (either parsed pkg_version or a path to pkg_version is fine), and verify_game_files to verify all game files from a pkg_version
2022-09-20 17:43:11 +07:00
tretrauit f61e4a39cf
fix: change PathLike to Union[str, bytes, PathLike]
This allows user to use str & bytes as path too.
2022-09-20 17:23:20 +07:00
tretrauit e133508d39
poetry: add cli script 2022-09-20 17:16:16 +07:00
tretrauit 96d1c7e8d3
refactor: move gamemanager.py to game & rename to Game
Also add back some staticmethods, because it'll be useful if you only import the Game class
2022-09-20 16:35:56 +07:00
tretrauit 811403bdfa
docs: write docs for most functions
The documentation follows Google python codestyle
2022-09-20 00:37:25 +07:00
tretrauit 44f0d10cb8
refactor: move static methods to module-level function 2022-09-18 21:38:44 +07:00
tretrauit 2abbdf066b
refactor: more cleanup
feat: initial support for callbacks
2022-09-18 18:41:58 +07:00
tretrauit f909297ae0
refactor: many refactoring changes
helper: create helper.py with download_file
refactor: move hdiffpatch to its own hdiffpatch.py
fmt: use black for formatting
2022-09-18 11:09:44 +07:00
tretrauit 42d7179ea5
poetry: add lock file 2022-09-18 11:00:10 +07:00
tretrauit c8823ea3b1
refactor: remove AsyncPath
feat: experimental threaded downloading
Also add very little support to Bilibili version.
Currently this isn't usable, so it'll need some time to be refactored
2022-09-18 01:58:51 +07:00
tretrauit 7d4f4e7931
refactor: migrate to pyproject.toml 2022-09-18 00:24:00 +07:00
tretrauit 184e96fa2d
patcher: add option to specify predefined patch url
This option adds patch_provider to Patcher class, currently you can choose either y0soro or Krock (by default it uses y0soro for latest 3.0.0 patch)
2022-08-24 20:14:38 +07:00
tretrauit 8449c104d9
patch: switch to y0soro repository for testing patch 2022-08-24 20:06:02 +07:00
tretrauit 9e00e58938
fix: catch TypeError 2022-08-24 09:51:31 +07:00
tretrauit 04dc922230
feat: support pre-downloading game & voicepacks 2022-08-23 17:02:20 +07:00
tretrauit 34a8ab6d99
fix: remove printing debug raw message 2022-08-17 02:12:39 +07:00
tretrauit 2b9951dcaa
fix: self._installer.get_game_version() in update_voiceover 2022-08-17 02:08:28 +07:00
tretrauit 5066a4e2b3
fix: update game & voiceover now works properly. 2022-07-13 13:52:57 +07:00
tretrauit efc2abf858
feat: add -Swp option
perf: tar.extractall wrapped in asyncio.to_thread
2022-06-27 04:09:47 +07:00
tretrauit aa147792e6
fix: calculate_md5 will return "" for nonexistent files 2022-06-26 01:56:14 +07:00
tretrauit 23980276ee
fix: patcher.py properly disable crash reporters.
fix: revert_patch now works correctly.
It was because of me forgetting to merge the game data name with the game directory
I hope my crash log wasn't uploaded to mHY since I blocked their hosts...
2022-06-26 01:53:37 +07:00
tretrauit d4773bc38d
fix: _ask won't automatically think the answer is yes.
I am dumb
2022-06-25 02:09:26 +07:00
tretrauit a5659f7ff3
refactor: convert all task-intensive functions to async.
chore: rename gui.py to cli.py
fix: internal downloader can resume download now.
feat: add verify_game, verify_from_pkg_version, clear_cache to installer.py.
feat: add clear_cache to patcher.py.
fix: linux now check for pkexec before executing it.
fix: add get_name to voicepack.py, latest.py, diff.py to get name from path (since the developer didn't set a name to these files in the sdk url)
chore: remove deprecation message in read_version_from_config in installer.py
misc: use chunk from self._download_chunk instead of being hardcoded to 8192.
fix: is_telemetry_blocked will only wait 15s for a connection.
chore: move appdirs to constants.py

This commit refactor almost all functions to be compatible with asyncio, also restructured CLI to use asyncio.run on main function instead of executing it randomly.
Also prioritize the use of asyncio.gather, sometimes making tasks faster
2022-06-25 01:13:47 +07:00
tretrauit 8b2d0cad8f
Remove game version check in download_full_game()
Fix remote archive name detection (because archive.game.latest.name doesn't contain it anymore)

Signed-off-by: tretrauit <tretrauit@gmail.com>
2022-04-01 09:43:33 +07:00
tretrauit b18da4e495
Remove game version check in download_full_game()
Fix remote archive name detection (because archive.game.latest.name doesn't contain it anymore)

Signed-off-by: tretrauit <tretrauit@gmail.com>
2022-04-01 09:27:03 +07:00
tretrauit 4b99162bce
Fix hdiffpatch executables not being detected on Windows
Signed-off-by: tretrauit <tretrauit@gmail.com>
2022-03-31 20:38:59 +07:00
tretrauit fd00e8b51d
Add support for hdiffpatch files
Game now apply update properly (hopefully)

Signed-off-by: tretrauit <tretrauit@gmail.com>
2022-03-31 02:09:33 +07:00
tretrauit c7918f8a20
Fix improper game version check 2022-03-30 16:54:47 +07:00
tretrauit 7c45133508
Add support for downloading HDiffPatch 2022-02-27 18:22:21 +07:00
tretrauit 992048ede3
Use create_subprocess_shell and fix hosts file appending on Linux 2022-02-27 13:50:59 +07:00
tretrauit 44cdf424dc
Use create_subprocess_shell 2022-02-27 13:44:51 +07:00
tretrauit 8f541ff0c4
Wait for patch process to exit
Bump to 1.2.9-2
2022-02-27 13:37:08 +07:00
tretrauit f7e5362e86
Fix blocking telemetry fail.
Bump to 1.2.9-1
2022-02-27 13:32:18 +07:00
tretrauit aaf728445d
Various changes, block telemetry feature.
-Sp/--patch is now required to do block telemetry before patching.
Still preparing for hdiffpatch (will be coming at 1.10)
Ay yo hosty support coming soon xD
2022-02-27 01:54:20 +07:00
tretrauit dbf6cf6d21
Merge remote-tracking branch 'origin/master' 2022-02-19 19:06:04 +07:00
tretrauit fbe4692f84
Await AsyncPath.exists()
Bump to 1.2.8-1
2022-02-19 19:05:52 +07:00
tretrauit 521c0808e9
Await AsyncPath.exists()
Bump to 1.2.8-1
2022-02-19 19:05:19 +07:00
tretrauit 92ae7b71cf
Bump to 1.2.8 2022-02-19 18:59:21 +07:00
tretrauit e4cc701166
Don't rely on xdelta3 python module
Don't crash if xdelta3 module is not present, and add the ability to download game & voicepack in CLI
Bump to 1.2.8
2022-02-19 18:57:45 +07:00
tretrauit 2d6cff77c6
Disable crash reporters on patch
Bump to 1.2.7
2022-02-18 23:34:10 +07:00
tretrauit ccb2d876fc
Fix syntax error on xlua patching function 2022-02-18 21:41:50 +07:00
tretrauit f4e668d8b0
Extend file duration from 3600 to 86400
I've never wanted to say fuck Linux like this before
2022-02-18 21:34:41 +07:00
tretrauit 9a7c696a6d
Bump to 1.2.4 2022-02-18 21:30:53 +07:00
tretrauit 659befc8f8
Change timestamp check (prevent false positive) 2022-02-18 21:30:24 +07:00
tretrauit d5e292eb2d
Bump to 1.2.3 2022-02-18 21:05:37 +07:00
tretrauit bd515c73cd
Xdelta3 workaround (because xdelta3-python doesn't work) 2022-02-18 21:04:44 +07:00