Oddsodz
4th October 2010 14:51 UTC
GitHub Downloading
Hello there.
This maybe the wrong place for this. I am not sure
I Am looking into making a project that makes use of GIT. What my plan is to fill the repository with all files needed for a game MOd to work. Then build a installer software using the "Nullsoft Scriptable Install System" and when the end user run the "install.exe" it will download all files from within the github repository and place them in the right folders for the game MOD to work. Now what I wish to know is, Can this be done? Has it been do before?
Hope somebody can help.
Oddsodz
QOAL
4th October 2010 15:09 UTC
I think the best way to do this would be to make use of githubs download source feature.
http://github.com/$USER/$REPO/zipball/master (Or you can use tarball instead of zipball)
So... use a plugin to download the archive (NSISdl, Inetc or whatever people recommend nowadays) and then another suitable one to decompress it. (http://nsis.sourceforge.net/Category:Compression)
Obviously this is lame compared being able to do git pull. (I guess you could package all the necessary cygwin git client stuff and do stuff via the command line, maybe if you really must?)
Or something like that?
Oddsodz
5th October 2010 03:31 UTC
I Was thinking that myself. And for a small project. I think that would be great. But as this project will be well over 3.5 Gb of data. A zip file of that size is not going to go down to well on older "Windows XP 32bit" systems. This is why I was hoping to find a away that did not have to be zipped up.
QOAL
5th October 2010 14:08 UTC
3.5GB! You'll never make it in the demo scene!!!!!111
Okay, but in all seriousness I have a solution.
So, of course, the proper solution is to have a git client in the installer that clones the repository, and I've been able to do that.
You could probably extend it so it's able to be ran as an updater too, that does git pull. (You'll need to pick out the files from cygwin (git is optional in it's installer) that it needs)
It uses ExecDos too because I thought it might output stuff nicely but from my quick set up and test it doesn't (maybe there is a flag so it will).
Basically, have a look and play with it.
Remember that Git and Cygwin fall under the GPL, so there might be stuff to take into account there.
And yes, that "usr\share\git-core\templates" folder is needed, even though it can be blank.
Bonus points if you spend the time amending the install dir string that's passed to cygwin so it doesn't generate the warning.
The compiled simple example installer I've made is just 2.11MB, which is nice.
http://stashbox.org/1010946/nsisgit.zip
I hope that helps in some way and isn't too vague.
Oddsodz
5th October 2010 20:28 UTC
Oh my. That is great stuff. Lots for me to play with. Thank you very much. I shall have great fun building this. I Will report back when I am done.