Page 1 of 1

Adapt game udapter for other projects

Posted: Thu Sep 22, 2022 7:24 am UTC
by glitchapp

I would like to use the game updater as a client / downloader / updater for my own projects. I see it's using aria2 to download via torrent. Is there any documentation to change parameters and fork it for another project?
Any hint is welcome.
Thank you!


Re: Adapt game udapter for other projects

Posted: Thu Sep 22, 2022 7:35 am UTC
by Ishq

It's largely hardcoded to Unvanquished's stuff but you can modify the code here:

https://github.com/Unvanquished/updater ... r.cpp#L161

to change the torrent location. There is no other relevant documentation unfortunately as it was never designed to be a general purpose updater.


Re: Adapt game udapter for other projects

Posted: Thu Sep 22, 2022 9:05 am UTC
by glitchapp

Thank you! that's the most important parameter.
I just need to change pictures and text to make a custom installer and updater.

I can't compile it, the following errors appears before completing the compilation:

Code: Select all

/aria2/src/LibsslARC4Encryptor.cc:51: undefined reference to `RC4'

I compiled aria2 with no issues...


Re: Adapt game udapter for other projects

Posted: Thu Sep 22, 2022 4:30 pm UTC
by illwieckz

Did you tried to build it with the docker file? I find it far easier on my end (though this is far slower).


Re: Adapt game udapter for other projects

Posted: Thu Sep 22, 2022 10:50 pm UTC
by glitchapp
illwieckz wrote: Thu Sep 22, 2022 4:30 pm UTC

Did you tried to build it with the docker file? I find it far easier on my end (though this is far slower).

No, I'm not sure how it could impact performance and I wanted to try to compile it without it, but if I don't find a solution I will try that, thanks for the advice.


Re: Adapt game udapter for other projects

Posted: Fri Sep 23, 2022 8:25 am UTC
by killing time

Well of course building in Docker might help. The point is to have a precise environment and build steps that are known to work


Re: Adapt game udapter for other projects

Posted: Fri Sep 23, 2022 9:16 am UTC
by glitchapp

hi, it compiled without problems with docker, I customized the banners and graphics and changed the torrent location, the only thing missing to customize the updater for my needs is to change the location of the rss feed that feed the text and pictures, any hint how to do that?

I found out this which seems to be the main source when offline: https://github.com/Unvanquished/updater ... posts.json

I would like to disable the online link if possible and provide all the feeds within the app.


Re: Adapt game udapter for other projects

Posted: Fri Sep 23, 2022 3:10 pm UTC
by illwieckz

To remove the behaviour of clicking the image opening an url, you may want to remove that:

https://github.com/Unvanquished/updater ... ml#L80-L88

The “Continue reading” link to remove is probably that:

https://github.com/Unvanquished/updater ... #L169-L196

This line may also be useless, I haven't tested right now:

https://github.com/Unvanquished/updater ... rd.qml#L14


Re: Adapt game udapter for other projects

Posted: Fri Sep 23, 2022 3:17 pm UTC
by killing time

There's a list of internet resources used by the updater here: https://github.com/Unvanquished/updater ... he-updater. So you'll need to find and replace each one of those.


Re: Adapt game udapter for other projects

Posted: Fri Sep 23, 2022 3:20 pm UTC
by glitchapp
killing time wrote: Fri Sep 23, 2022 3:17 pm UTC

There's a list of internet resources used by the updater here: https://github.com/Unvanquished/updater ... he-updater. So you'll need to find and replace each one of those.

Hi, I managed to change the feeds by disabling the online json file and modify the internal offline json. Now it shows what I want. I'm testing it to see if downloads the proper Torrent.

I changed the original torrent with this line:

Code: Select all

worker_->addTorrent("qrc:/resources/torrents/mytorrent.torrent");

To contain the torrent within the build, I'm not sure if the syntax is correct... I wait to see if others can download the torrent.

Thank you!