Adapt game udapter for other projects

Release and discuss things you've made, including mods.
Post Reply
glitchapp
Posts: 5
Joined: Thu Sep 22, 2022 7:15 am UTC

Adapt game udapter for other projects

Post 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!

User avatar
Ishq
Project Head
Posts: 1148
Joined: Tue Mar 06, 2012 8:32 pm UTC

Re: Adapt game udapter for other projects

Post 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.

glitchapp
Posts: 5
Joined: Thu Sep 22, 2022 7:15 am UTC

Re: Adapt game udapter for other projects

Post 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...

User avatar
illwieckz
Project Head
Posts: 727
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: Adapt game udapter for other projects

Post 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).

This comment is licensed under cc ​​by 4 and antecedent. The Crunch tool is awesome!

glitchapp
Posts: 5
Joined: Thu Sep 22, 2022 7:15 am UTC

Re: Adapt game udapter for other projects

Post 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.

User avatar
killing time
Programmer
Posts: 164
Joined: Wed Jul 04, 2012 7:55 am UTC

Re: Adapt game udapter for other projects

Post 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

glitchapp
Posts: 5
Joined: Thu Sep 22, 2022 7:15 am UTC

Re: Adapt game udapter for other projects

Post 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.

User avatar
illwieckz
Project Head
Posts: 727
Joined: Sat Aug 11, 2012 7:22 pm UTC
Location: France
Contact:

Re: Adapt game udapter for other projects

Post 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

This comment is licensed under cc ​​by 4 and antecedent. The Crunch tool is awesome!

User avatar
killing time
Programmer
Posts: 164
Joined: Wed Jul 04, 2012 7:55 am UTC

Re: Adapt game udapter for other projects

Post 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.

glitchapp
Posts: 5
Joined: Thu Sep 22, 2022 7:15 am UTC

Re: Adapt game udapter for other projects

Post 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!

Post Reply