HomeWildfire Games

mod.io support.

"Yellow Medal" token, awarded by elexis."Like" token, awarded by Polakrity.


mod.io support.
mod.io is a new platform for sharing mods, that 0 A.D. can make use of in order to download mods and install them.

Based on patch by leper, numerous changes from s0600204, vladislavbelov, Imarok, elexis, temple and myself.
Differential Revision: https://code.wildfiregames.com/D1029


Event Timeline

elexis added a subscriber: elexis.Apr 22 2018, 8:42 PM

Getting compiler warnings with gcc 7.2.0.

../../../source/ps/ModIo.cpp: In member function ‘void ModIo::StartDownloadMod(size_t)’:
../../../source/ps/ModIo.cpp:320:82: warning: ‘new’ of type ‘DownloadCallbackData’ with extended alignment 64 [-Waligned-new=]
  m_CallbackData = new DownloadCallbackData(sys_OpenFile(m_DownloadFilePath, "wb"));
../../../source/ps/ModIo.cpp:320:82: note: uses ‘void* operator new(std::size_t)’, which does not have an alignment parameter
../../../source/ps/ModIo.cpp:320:82: note: use ‘-faligned-new’ to enable C++17 over-aligned new support

As mentioned the idea behind this very common include pattern is that the GUI pages using it have one directory with files that only this page uses.

But since the help page is introduced as a subdirectory to this one, the include should be updated as well to reflect that if it is kept (i.e. include gui/modmod/modselection/).
An alternative would be the currently common pattern to use only root level directories for pages (i.e. gui/modselection/ and gui/modselection_help/.

I can provide a patch for both.


Is the question answered in the revision proposal how this allocation can fail? (I'm asking for a friend)


nice data structure


Would it be benefitial to move this to a separate JSInterface_ file that could be excluded with a compiler directive thing?

This comment was removed by ffffffff.
Itms added a comment.Apr 24 2018, 10:52 AM

getting compiler error

You probably didn't install a libsodium version that is recent enough (see https://trac.wildfiregames.com/wiki/BuildInstructions#Dependencies, >= 1.0.14 is needed). Follow https://download.libsodium.org/doc/installation/ if my guess is correct.

elexis raised a concern with this commit.Jul 5 2018, 5:56 PM

This enables use of a third party online service, the mod.io API under https://mod.io/terms and https://mod.io/privacy without informing the user.

This commit now has outstanding concerns.Jul 5 2018, 5:56 PM
Stan added a subscriber: Stan.Jul 5 2018, 6:37 PM

Even the annoying confirmation popup ?

smiley added a subscriber: smiley.Jul 30 2018, 3:50 PM

This enables use of a third party online service, the mod.io API under https://mod.io/terms and https://mod.io/privacy without informing the user.

Would a link (as in a button) to both documents suffice?

Since the legal aspect was never reviewed as far as I recall:
I suppose this diff is GPL compliant because the API to the proprietary code is not running in the same binary, that those are two separate programs thus the backend doesn't have to be licensed under GPL (for the same reason the Steam WebAPI would also be compliant with our GPL licensed code afaics) (https://www.gnu.org/licenses/gpl-faq.en.html#MereAggregation)

A compiler option to build --without-modio equivalent to --disable-atlas and --without-lobby would be suited to maximize developer and user freedom.


The text is misplaced, beause the mod selector should remain distinct from the mod downloader, including explanations of the service.

The informative parts of the strings could have been added in the messagebox before connecting (along with the terms and conditions and privacy policy, possibly DMCA links to mod.io).

a link (as in a button) to both documents

refs D1601

elexis removed an auditor: elexis.Sep 23 2018, 3:12 AM
This commit no longer requires audit.Sep 23 2018, 3:12 AM