HomeWildfire Games

mod.io support.
Concern RaisedrP21759

Tags
None
Subscribers
Tokens
"Yellow Medal" token, awarded by elexis."Like" token, awarded by Polakrity.

Description

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

Details

Auditors
Angen
Committed
ItmsApr 22 2018, 8:14 PM
Differential Revision
D1029: mod.io support
Parents
rP21758: petra: make some use of mobile dropsites
Branches
Unknown
Tags
Unknown
Build Status
Buildable 5942
Build 9922: Trigger Windows Autobuild
Build 9921: Post-Commit BuildJenkins

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
/ps/trunk/binaries/data/mods/mod/gui/modmod/modmod.xml
6

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.

/ps/trunk/source/ps/scripting/JSInterface_Mod.cpp
129

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

158

nice data structure

195

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.

/ps/trunk/binaries/data/mods/mod/gui/modmod/help/help.txt
7

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
Angen raised a concern with this commit.Tue, Jun 23, 9:01 PM
Angen added a subscriber: Angen.
Angen added inline comments.
/ps/trunk/binaries/data/mods/mod/gui/modio/modio.js
154

since state in case of error never changes, this is spamming showErrorMessageBox and it looks like it is impossible to click Abort but in real there is too much message boxes.

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: hide <- clicking Abort

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: hide <- clicking Abort

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck

WARNING: failed_filecheck
This commit now has outstanding concerns.Tue, Jun 23, 9:01 PM
Angen added inline comments.Tue, Jun 23, 10:23 PM
/ps/trunk/source/ps/ModIo.cpp
683

This will not work if version is not set on mod io, it will return true and log warning about failed to verify v.isObject v.isString (get type of null)