It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
What exactly is --download-file? Is there a way to download only a specific file from inside the Linux installer?

I basically want to extract information on what the current build id / version the Linux installer has, to detect if there are updates pending vs my current installation.
Post edited November 15, 2024 by shmerl
97bb4d8 Galaxy: Select build by build id
Make it possible to select by build id
Tries to find build with build id first
If no build is found with specified build id then try to use it as build index
If build id or index is not valid then default to build index 0

d83ba7f Add option to select network interface for operations
Adds option --interface

8dce7a3 Change --wishlist into --list option
Remove --wishlist
Add --list wishlist

avatar
shmerl: What exactly is --download-file? Is there a way to download only a specific file from inside the Linux installer?

I basically want to extract information on what the current build id / version the Linux installer has, to detect if there are updates pending vs my current installation.
--download-file was made to download files using their id
It was made so lgogdownloader could be used with the old gogdownloader:// links or as a download agent for other tools that want to download specific installers/extras
for example using as download agent for makepkg on Arch Linux

Example: downloading soundtrack for Tyrian 2000
Get the file id you want from --list details output

$ lgogdownloader --list details --game tyrian_2000
gamename: tyrian_2000
product id: 1207658901
title: Tyrian 2000
icon: https://images-4.gog-statics.com/203248e9b6f1d89007fde05ad6e30ce4ba10be7a58579df54662c61e3d92f36c.png
installers:
id: en1installer0
name: Tyrian 2000
path: /tyrian_2000/setup_tyrian_2000_3.01_(76355).exe
size: 17825792
updated: False
language: English
version: 3.01

extras:
id: 9543
name: soundtrack
path: /tyrian_2000/extras/tyrian2000_ost.zip
size: 132120576
$ lgogdownloader --download-file tyrian_2000/9543
or
$ lgogdownloader --download-file 1207658901/9543


There isn't an option to do version comparison when using Mojosetup files as Galaxy depot for Linux installers at the moment.
The mojosetup hack is kinda dumb currently and doesn't try to check version numbers in any way and instead just always updates the installed files if there are differences found in the installer.
Not really sure how much work it is going to be to add all the logic needed for that since I haven't looked at that code in a while.
I'll have to look into it some more.
avatar
Sude: There isn't an option to do version comparison when using Mojosetup files as Galaxy depot for Linux installers at the moment.
The mojosetup hack is kinda dumb currently and doesn't try to check version numbers in any way and instead just always updates the installed files if there are differences found in the installer.
Not really sure how much work it is going to be to add all the logic needed for that since I haven't looked at that code in a while.
I'll have to look into it some more.
I see. The way to hack around that is to use gameinfo or game/goggame-<id>.info files that exists in Linux installers and extract versions / build information from there. That's what I wanted to do in my script at least, but to do that it needs an ability to download only one specific file from inside the installer.

UPDATE:

Actually using --list details shows the version! Thanks for the tip:

lgogdownloader --list details --platform l --game drova
...
gamename: drova_forsaken_kin
product id: 1254250206
title: Drova - Forsaken Kin
icon: https://images-1.gog-statics.com/5c7c8507bde7278261729ccb1d187a75c330eeebf34f0514e26266541522f11a.png
installers:
id: en3installer0
name: Drova - Forsaken Kin
path: /drova_forsaken_kin/drova_forsaken_kin_1_0_6_77800.sh
size: 1306525696
updated: False
language: English
version: 1.0.6

So I can detect that version has changed using my own script since I can extract the version from those files in the alredy installed game. That would make triggering the update more sensible.

UDPATE 2:

Hm, is there some way to get game name using game id? Because --list details works with names, but my script works with game ids.

For now I can hardcode it.

UDPDATE 3:

Actually, linux updating with "pseudo-Galaxy" using the installers isn't so dumb - if files are up to date, it's not downloading them.
Post edited November 17, 2024 by shmerl