pr-downloader and or rapid

pr-downloader and or rapid

For the discussion of infrastructure improvements and changes.

Moderator: Moderators

Post Reply
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

pr-downloader and or rapid

Post by knorke »

I wanted to comment on http://springrts.com/mantis/view.php?id=3472 but when clicking "submit" it was suddendly read-only.

Imo Spring needs some downloader tool with which player can easily download any game they want even if it is currently not being hosted. Lobbys can only download what currently is being hosted, so for "obscure mods" that is important.

rapid-GUI was already hard on players, a commandline-only tool like pr-downloader will probally be unusuable or considered broken.
Players will click the pr-downloader.exe and *nothing* happens.
gui support should be added into lobby not into pr-downloader directly
In the year 2525....

Maybe in meantime textbased menu is possible? Anything else than a program that shows window for 1 seconde and then closes?
Image
example .bat file for windows: http://pastebin.com/Pv6esWYT
make it like Dwarf Fortress, spring players love that. :shock:

Image


If pr-downloader is not to be used by players, but only indirectly from lobbies, then it should not be in the same root folder as spring.exe and the lobbies, but instead be stored away in some subfolder.

pr-downloader output is too cryptic, no matter if download failed or was sucessfull:
http://pastebin.com/fRUw0JDw
The last line should be understandable summary of what happend:
"Sucessfully downloaded XY to ABC"
or
"Download failed: Did not find XY"


Portable mode:
springsettings.cfg says SpringData = C:\Spiele\springcontent
But pr-downloader downloaded to:
C:\Users\dell\Documents\My Games\Spring
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: pr-downloader and or rapid

Post by AF »

1: yay pastebin, y u no use gist?
2: yet another proprietary format, we already have npm/brew/macports/deb/rpm/pear/etc etc I'm surprised nobody has opted to reuse one of those or base things off of standardised setups. For example we have rsync and svn which are being tied in, why faff with all of this middleman PR-Downloader rapid stuff?
3: I have yet to see a web based interface, what's wrong with writing a program that responds to some protocol URI in the browser and grabs the necessary stuff, so users can browse in Chrome/FF/safari then click a link and some hocus pocus installs it in the background and tells them when everything's done? It'd even allow lobbies to outsource the download process itself by just implementing browsing and update checking but not installation itself. I know people are like "oh noes webkit heavy weight" but webkit is probably loaded in the background in a browser when you launch already anyway. Any GUI doesn't need a flash applet and a java applet, some html5 1080p video and a canvas webgl element does it?
4: This wiki page is utterly inadequate: http://springrts.com/wiki/Dev:LobbyDownloadSystems If you're not sure, how do you know which download system to implement?

5: The documentation is full of errors and hasn't been checked by the author.

e.g.: http://springrts.com/wiki/Rapid

Some can be fixed by editing, but when entire sentences are truncated because of wiki styling issues, it's obvious whoever wrote it never bothered to check what they'd put was actually readable.

There's no source for Plasma pointed out, UPQ is just for listing, no diagrams etc

6: Hypercomplexity:

E.g. most of this could have been implemented as primitive PHP + JSON:
https://github.com/det/BuildRapid

Yet OCaml made it in there?

This could have been done using purely POST/GET, yet it used XML-RPC? http://springrts.com/wiki/Upq

And plasma decided to go for SOAP, a protocol notoriously awkward to use, that has been through so many definitions, redefinitions, and complex layers of abstraction, that expert SOAP developers struggle to understand exactly what is and isn't SOAP and what it is currently.


My only compliments are that UPQ was built in a language that a lot of us likely understand, and Rapid made a claim to some semblance of rsync


My Proposed Solution

We use git and the git libraries ( end users installing git? not a chance, so needs to be baked in ). We then build a C based library and a wrapper executable as a demonstration of how to use it.

We then refer to packages via IDs, use a json based data format to specify an ID, a filename, dependencies (IDs), a list of source in order of priority, and any associated meta in a sub object like author minimap etc. All done via the web. The source might be a WordPress install, a json text file, some python magic, how it works is irrelevant.

Actual transfer of the files would be done via HTTP or git. I suppose with a little work plasma and rapid sources could be defined too

This should take care of prepackaged zips, lua widgets ( every gist is also a git repo ), people who like svn ( github works fine with svn client ), people clueless about vcs ( zip up and upload somewhere with Apache running ), and people who like independence ( Ima put my XYZ Annihilation stuff at xyz.tomjn.com and let people add that as a source )

It simplifies UI because ti can all be done via Javascript in a browser or html view.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: pr-downloader and or rapid

Post by abma »

@knorke:
Imo Spring needs some downloader tool with which player can easily download any game they want even if it is currently not being hosted. Lobbys can only download what currently is being hosted, so for "obscure mods" that is important.
+1 for that. when i started with coding upq/pr-downloader there were many files that couldn't be downloaded by some download systems. also there were tons of duplicates / broken files / ...

@AF:
biggest problem is that there are to few people are willing to code.

to use git i would suggest to use libgit2. i had that idea, too but that would require a lot of coding, too. it would still require some metadata for searching / downloading / etc.
as i started coding with upq & pr-downloader there were no docs about the existing download systems, also they were implemented in .net / python / c++&wxWidgets.... so no way to make it a lib.

xml-rpc was choosen because post / get would require some data encapsilation for the metadata. difference between json / xml-rpc is pretty low. i used xml-rpc because there existed a working libs. json has problems with binary data, xml-rpc does support it out of the box (still base64 encoded).

your suggestion sounds like many work with pretty low benefits. still something git based could be easily added to upq / pr-downloader. so feel free to code it. but: keep it simple and integrate it nicely in existing systems, don't create a completely new eco system.



i currently don't feel like to discuss, my todo list is way to long :-/

i know, spring needs some easy to use downloader in lobby integrated or maybe inside spring, thats nothing new.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: pr-downloader and or rapid

Post by knorke »

abma, what do you think about adding (simple) menu?
Even if pr-downloader is maybe not meant for endusers some players might be forced to use it. (for example if lobbies do not work for them, like happend to me before)
Menu either in the program or as .bat file (see example), which is a bit ugly from many points but better than players being confused by a programm that instantly closes after start?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: pr-downloader and or rapid

Post by hoijui »

make a GUI, consisting of a single error message saying: "Error, this application has no GUI!"
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: pr-downloader and or rapid

Post by Licho »

Knorke, systems can download mods/maps which are upload to springfiles!

Just upload it there and within few minutes its downloadable everywhere.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: pr-downloader and or rapid

Post by Forboding Angel »

Please don't put it in a subfolder.

It's rather irritating to tell a player:

"Open up a command window in the folder where spring is (Probably program files (x86)/spring) and type:
pr-downloader\prdownloader.exe --download-game zk:stable"

Knorke's batch menu makes a lot more sense. I suppose I could whip one up if you guys want, or one of you can, whatever works.

Imo though, menu would be better off being baked directly into pr-downloader.exe, but that's just my 2 cents.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: pr-downloader and or rapid

Post by Forboding Angel »

The year 2525 is upon us...
Drop files in spring folder

I didn't have a master list of spring game tags, sadly :-( If someone can get me such a list I will add them all.

That said, you can put in tags manually.

Have fun ;p

Edit: Updated with a list of rapid tags and a little logic change.

Uses this wiki page to display rapid tags: http://springrts.com/wiki/Rapid_Tags

Edit2: Updated with smarter logic and better menu

Edit3: Removed file. See last post.
Last edited by Forboding Angel on 22 Mar 2013, 00:29, edited 1 time in total.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: pr-downloader and or rapid

Post by gajop »

note that menu is for windows only
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: pr-downloader and or rapid

Post by Forboding Angel »

Well yeah... But it's a basis for something Abma could bake into the binary (Not as it is of course... I highly doubt you would want to bake in win32 batch hehe).

That and it's an idea of how a menu could function, and if you really wanted, you could stick it in win32 spring and it would work fine. *shrug*
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: pr-downloader and or rapid

Post by Forboding Angel »

Made the manual tag entry screen better-er.
PR-Downloader-Menu-v4.7z
(1.56 KiB) Downloaded 36 times
Post Reply

Return to “Infrastructure Development”