heroic-games-launcher / heroic-gogdl Goto Github PK
View Code? Open in Web Editor NEWGOG Downloading module for Heroic Games Launcher
License: GNU General Public License v3.0
GOG Downloading module for Heroic Games Launcher
License: GNU General Public License v3.0
It would be nice to have a command to get information about a potential download of a game in a specific installation directory, without actually installing the game in the process.
I imagine something like gogdl install-info game --install_dir="some path"
(not sure if this follows the project's conventions, just an example)
The command would output at least this information:
(*) to add some clarification here, it's not the size of the uncompressed files in the disk, it's the size of the compressed files that would be downloaded, if the files on disk are uncompressed and the downloaded files are compressed we want the value of the compressed files which is the actual amount we are not re-downloading
We could include, as extra, some calculations with those numbers:
total - reusable
to know how much is left in absolute units(total - reusable) / total
to know how much is left in %These last extra numbers are not critical for this feature, we can calculate that with the other 2 values anyway
[📦 com.heroicgameslauncher.hgl ~]$ /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/gogdl info 1207659093 --token="redacted" --lang=en-US --os windows
[API] INFO: Getting info from products endpoint for id: 1207659093
[DOWNLOAD_MANAGER] INFO: Checking compatibility of Ultima™ 9: Ascension with windows
[DOWNLOAD_MANAGER] INFO: Game is compatible
[DOWNLOAD_MANAGER] INFO: Depot version: 1
[API] INFO: Getting Dependencies repository
[API] INFO: Getting repository manifest
Traceback (most recent call last):
File "gogdl/cli.py", line 44, in <module>
File "gogdl/cli.py", line 41, in main
File "gogdl/dl/manager.py", line 43, in calculate_download_size
File "gogdl/dl/manager.py", line 206, in collect_depots
IndexError: string index out of range
[5] Failed to execute script 'cli' due to unhandled exception!
Currently, the import command is hard-coded to use the Windows platform, that doesn't allow importing of Linux/MacOS native versions.
Line 96 in 893a2e6
Currently it is necessary to go to the Store tab, scroll to the free games, and buy them manually. It is also necessary to check periodically whether or not new games are present.
It would be easier if this process was automated.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/heroic-gogdl/gogdl/cli.py", line 67, in <module>
main()
File "/heroic-gogdl/gogdl/cli.py", line 62, in main
function(arguments, unknown_args)
File "/heroic-gogdl/gogdl/dl/managers/manager.py", line 67, in download
self.download_manager.download()
File "/heroic-gogdl/gogdl/dl/managers/linux.py", line 173, in download
self.setup()
File "/heroic-gogdl/gogdl/dl/managers/linux.py", line 113, in setup
installer_data = dl_utils.get_json(self.api_handler, installer["files"][0]["downlink"])
~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
Download and install works when using version 7.2 from the AUR, but not with 1.0.1 shipped with Heroic or 1.1.0 from this repo.
When in upload on windows then download on Linux, dir/file is transformed to a file named dir\file (the directory is in the file name, it's linked to the fact that Windows use \ for paths and Linux use /)
Fix: upload always using / as said by @imLinguin here
https://github.com/Heroic-Games-Launcher/heroic-gogdl/blob/main/.github/workflows/build.yaml
do you have some documentation how i can build this?
this is all im getting so far
pyinstaller --onefile --name gogdl ?? gogdl/cli.py
it builds but unsuccessfully calls errors when run
heroic-gogdl/dist $ ./gogdl
Traceback (most recent call last):
File "gogdl/cli.py", line 35, in <module>
File "gogdl/cli.py", line 16, in main
File "gogdl/args.py", line 7, in init_parser
File "argparse.py", line 1716, in add_subparsers
TypeError: __init__() got an unexpected keyword argument 'required'
[2028] Failed to execute script 'cli' due to unhandled exception!
issue im having is glibc 2.29 requirements in your CI build environment
Heroic-Games-Launcher/HeroicGamesLauncher#1015
Hello,
I have noticed that when running the install command on Windows I get this:
[DOWNLOAD_MANAGER] INFO: Checking free disk space,Exception in thread Thread-1:,Traceback (most recent call last):
File "threading.py", line 980, in _bootstrap_inner,File "threading.py", line 917, in run,File "gogdl\dl\progressbar.py", line 42, in print_progressbar,ZeroDivisionError: float division by zero,[DOWNLOAD_MANAGER] INFO: Done
Such behavior doesn't seem to happen on Linux however. Do you happen to know what might be causing this? (using gogdl 0.7 on both)
C:\Users\user>gogdl.exe info 1434370838 --token="redacted" --lang=en-US --os windows
[API] INFO: Getting info from products endpoint for id: 1434370838
[DOWNLOAD_MANAGER] INFO: Checking compatibility of Windward with windows
[DOWNLOAD_MANAGER] INFO: Game is compatible
[DOWNLOAD_MANAGER] INFO: Depot version: 2
[API] INFO: Getting Dependencies repository
[API] INFO: Getting repository manifest
Traceback (most recent call last):
File "gogdl\cli.py", line 44, in <module>
File "gogdl\cli.py", line 41, in main
File "gogdl\dl\manager.py", line 43, in calculate_download_size
File "gogdl\dl\manager.py", line 169, in collect_depots
File "gogdl\dl\objects.py", line 24, in __init__
KeyError: 'compressedSize'
[5756] Failed to execute script 'cli' due to unhandled exception!
Exception in thread Thread-4 (loop):
Traceback (most recent call last):
File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
self.run()
File "/usr/lib/python3.12/threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "/heroic-gogdl/gogdl/dl/progressbar.py", line 44, in loop
wr, r = self.write_queue.get(timeout=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/multiprocessing/queues.py", line 100, in get
raise ValueError(f"Queue {self!r} is closed")
ValueError: Queue <multiprocessing.queues.Queue object at 0x70e13b87e810> is closed
During installation two directories are created, PillarsOfEternity_Data
and PillarsOfEternity_data
, which differ only in case. One file is contained in the former, and the rest of the files in the latter. Because Windows programs can only access one of the two directories and the former sorts first in binary order, the game can't find its files.
Gogdl may need to do some case folding to avoid this situation.
Hello,
I have a pending update for The Witcher 3 on GOG.
The updates starts and 3 processes of gogdl are spun up.
They are slowly taking all my ram and the progress is not moving forward. Very low network activity like 5kbps max
CPU usage and RAM usage increasing without stopping.
Had to kill the processes because my ram was full and it was going to use all my SWAP.
Here are the logs of GOG :
gog.log
fixes Heroic-Games-Launcher/HeroicGamesLauncher#1298
gogdl/dl/linux_native.py", line 120
subprocess.run(command, shell=True)
maybe subprocess.run(command, shell=True, encoding="utf-8")
will workt, but probably more than just this location
As mentioned at Heroic project, I have a noisy game which fails when you use the gamesdb.gog.com internal API, and today doesn't allow me to download the game as intended.
https://gamesdb.gog.com/platforms/gog/external_releases/1198397489?sso_success=1
{"error":"not_found","error_description":"Release with per platform id: gog_1198397489 not found"}
But if I use their gog.com/account/gameDetails API, it works fine, on this case
//Large JSON with images, game, DLC, addons, cdkeys, etc.
As mentioned also at Heroic-Games-Launcher/HeroicGamesLauncher#2237, seems like Lgogdownloader already uses this API if you check their code: Heroic-Games-Launcher/HeroicGamesLauncher#2237 .
I use Lgogdownloader for my personal backups, and downloads the game as intended for my both Windows and Linux backups.
While this use case is quite specific for this game, may cause issues in future since that API is not intended for public use and may change or dropped anytime.
You can find more information about this API here: https://gogapidocs.readthedocs.io/en/latest/account.html#get--account-gameDetails-(int-game_id).json
I'm getting the following error when attempting to download a game:
Exception in thread Thread-1 (print_progressbar):
Traceback (most recent call last):
File "threading.py", line 1038, in _bootstrap_inner
File "threading.py", line 975, in run
File "gogdl\dl\progressbar.py", line 54, in print_progressbar
ZeroDivisionError: float division by zero
Note that although this issue looks similar to #27, it is not the same issue. I'm running the latest commit on master (e3b4dae) and the issue is still present.
Adding the following code fixes the error:
if time_since_last_update == 0:
time_since_last_update = 1
When updating very large games like Baldur's Gate 3, I'm seeing update install times over an hour for what amounts to only a couple of files being changed. If you cache the checksums of the files after updating them (or simply cache the current version and filter the file list down to the files whose checksums changed between the current version and the newest version), wouldn't that make checking existing files that are unchanged during an update much faster? You'd need to ignore the cached checksums for the 'repair' function, but for everyday updates it would run much faster for large games.
I'm afraid I can't figure out a minimal reproduction for this issue, but I can at least get it to happen consistently.
The launch command for running Deus Ex with the GMDX mod hangs indefinitely.
$ LD_LIBRARY_PATH=/home/aidan/.config/heroic/tools/wine/Wine-GE-Proton8-13/lib64:/home/aidan/.config/heroic/tools/wine/Wine-GE-Proton8-13/lib:/run/opengl-driver/lib:/run/opengl-driver-32/lib:/usr/lib:/usr/lib32 INI="Z:\extrapool\aidan\heroic\Deus Ex GOTY\GMDXv9\System\gmdx.ini" USERINI="Z:\extrapool\aidan\heroic\Deus Ex GOTY\GMDXv9\System\GMDXUser.ini" LD_PRELOAD= WINEPREFIX="/extrapool/aidan/heroic/prefixes/Deus Ex GOTY Edition" WINEDLLOVERRIDES=winemenubuilder.exe=d DXVK_HUD=fps WINE_FULLSCREEN_FSR=0 WINEESYNC=1 ORIG_LD_LIBRARY_PATH=/run/opengl-driver/lib:/run/opengl-driver-32/lib:/usr/lib:/usr/lib32 GST_PLUGIN_SYSTEM_PATH_1_0=/home/aidan/.config/heroic/tools/wine/Wine-GE-Proton8-13/lib64/gstreamer-1.0:/home/aidan/.config/heroic/tools/wine/Wine-GE-Proton8-13/lib/gstreamer-1.0 WINEDLLPATH=/home/aidan/.config/heroic/tools/wine/Wine-GE-Proton8-13/lib64/wine:/home/aidan/.config/heroic/tools/wine/Wine-GE-Proton8-13/lib/wine /nix/store/1l717xlqryalk6ij7qpzjdkzad3smac4-heroic-unwrapped-2.9.1/share/heroic/build/bin/linux/gogdl launch "/extrapool/aidan/heroic/Deus Ex GOTY" --override-exe "/extrapool/aidan/heroic/Deus Ex GOTY/System/GMDX.exe" 1207658995 --wine /home/aidan/.config/heroic/tools/wine/Wine-GE-Proton8-13/bin/wine --platform windows
^CTraceback (most recent call last):
File "/nix/store/phhb11c2vg03vzrbi91zwvxi2ca03xig-gogdl-0.7.3/bin/.gogdl-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/phhb11c2vg03vzrbi91zwvxi2ca03xig-gogdl-0.7.3/lib/python3.10/site-packages/gogdl/cli.py", line 47, in main
function(arguments, unknown_args)
File "/nix/store/phhb11c2vg03vzrbi91zwvxi2ca03xig-gogdl-0.7.3/lib/python3.10/site-packages/gogdl/launch.py", line 27, in launch
wrapper = shlex.split(wrapper_arg)
File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/shlex.py", line 315, in split
return list(lex)
File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/shlex.py", line 300, in __next__
token = self.get_token()
File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/shlex.py", line 109, in get_token
raw = self.read_token()
File "/nix/store/jhflvwr40xbb0xr6jx4311icp9cym1fp-python3-3.10.12/lib/python3.10/shlex.py", line 140, in read_token
nextchar = self.instream.read(1)
KeyboardInterrupt
At @imLinguin's suggestion on the Heroic Discord server, I tried adding --wrapper gamemoderun
, and then it would launch the game. Adding gamemoderun
as a wrapper in the game settings in Heroic also worked around the hanging.
Using command $ /app/bin/heroic/resources/app.asar.unpacked/build/bin/linux/gogdl --auth-config-path /home/user/.var/app/com.heroicgameslauncher.hgl/config/heroic/gog_store/auth.json info 1097426220 --lang=en-US --os windows
returns this data:
[API] INFO: Getting info from products endpoint for id: 1097426220
[DOWNLOAD_MANAGER] INFO: Checking compatibility of Songs of Conquest with windows
[DOWNLOAD_MANAGER] INFO: Game is compatible
[DOWNLOAD_MANAGER] INFO: Depot version: 2
[DOWNLOAD_MANAGER] INFO: Getting Meta data
[API] INFO: Getting Dependencies repository
[API] INFO: Getting repository manifest
[DOWNLOAD_MANAGER] INFO: Calculating download size
{"download_size": 2451209532, "disk_size": 3103338688, "dlcs": [], "buildId": "56504850103710017", "languages": ["en-US"], "folder_name": "Songs of Conquest", "versionEtag": "\"1074652667\"", "versionName": "945b30055c990c8797c045bbcfadb2aa37866bb2"}
But looking at the GOG.com website shows the latest version as 44486ac170bb71c9198c23e6f7da4c9b8ecedada
. GOG Galaxy also downloads this version. This inconsistency is causing version mismatch error during multiplayer play through Heroic.
Important note: The version shown on the GOG website 44486ac170bb71c9198c23e6f7da4c9b8ecedada
(v0.83.6 - 24 Mar 2023) is older than version 945b30055c990c8797c045bbcfadb2aa37866bb2
(v0.84.8 - 24 Apr 2023). I don't know how gogdl is finding a newer version than what GOG is making available.
(Please let me know if you require any screenshots, data, or logs.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.