View topic - UnitSync :: Game Dependencies



All times are UTC + 1 hour


Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 01 Mar 2012, 19:01 
Lobby Developer
User avatar

Joined: 08 Feb 2010, 22:21
Location: Saint-Petersburg, Russia
GetPrimaryModCount();
GetPrimaryModName();

UnitSync is not checking game's dependencies, isn't it ?

For example: if we have downloaded BA Chicken Defense but haven't downloaded Balanced Annihilation.


Top
 Offline Profile  
 
PostPosted: 01 Mar 2012, 20:36 
Lobby Developer
User avatar

Joined: 14 Aug 2007, 15:15
I suggest you read the doxygen comments again and explain in detail what you didn't understand or what your actual problem is.
https://raw.github.com/spring/spring/de ... sync_api.h


Top
 Offline Profile  
 
PostPosted: 04 Mar 2012, 09:06 
Lobby Developer

Joined: 02 Dec 2009, 12:01
Location: Russia, Krasnodar
When we build avialable game list, we using GetPrimaryModCount / GetPrimaryModName. And that function return that we have BA chicken defense, for example. But for runing that game we need BA itself. What is the best way to get game dependencies in that case?


Top
 Offline Profile  
 
PostPosted: 06 Mar 2012, 00:41 
Spring Developer

Joined: 31 May 2009, 23:08
unitsync currently offers no function to detect dependencies, when the file isn't available.

on http://api.springfiles.com, i solved that by parsing modinfo.lua / mapinfo.lua. not a clean solution, but works fine for the moment.

https://github.com/springfiles/upq/blob ... ta.py#L390

i don't know, if it worked with an old version of unitsync to get the depends or if it broke at some version. :-/

the problem was, spring could be run without all depends, now it enforces it, and maybe that is the cause, why it gets not listed with GetPrimaryModCount / GetPrimaryModName. see https://github.com/spring/spring/commit ... 9216f22245


afaik, GetNextError() should be non-empty after calling AddAllArchives() when a depends is missing.


so: currently the cleanest way is to check depends is before / while downloading. (plasma/springfiles api/rapid have depends)


i made a bug-report: http://springrts.com/mantis/view.php?id=3000


and yes, this code/api really needs a cleanup! :-(

Note: GetPrimaryModName is deprecated...


Top
 Offline Profile  
 
PostPosted: 06 Mar 2012, 18:32 
Lobby Developer

Joined: 02 Dec 2009, 12:01
Location: Russia, Krasnodar
Thanks, Abma.
May be add to UnitSync GetModDependeciesCount/GetModDependecie?

P.S. I replace GetPrimaryModName with GetPrimaryModInfoCount/GetInfo...


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.