[Feedback needed] AND2 Checker: Easy installation and update v0.3

@Afforess: I thought about the logic behind the new update system:

## Standard update process
- Check local md5sum of each file
- Save a config file (json) with: "filepath" : "md5sum"
- Download a json server file
- For each filepath in json server file, compare md5sum with local file
3 cases:
-> File is identical -> Nothing to do
-> File is found server-side but not client-side -> Download server version
-> File is found client-side but not server-side OR md5sum are different:
--> Standard config files are blacklisted, so they won't be removed or overwrited [Autolog, Uninstall.exe, Checker/checker_config.ini, Checker/updater.log]
--> PROBLEM: If an addon is installed or a file manually modified.

How do you think it has to work for a modified file ?
 
After you fetch the server file list, but before you download the new files from the server, you could show a popup that shows the user which files are about to be changed and let them exclude files.
 
Hmm i think it would be easier for you and for me to use this:
Server-side, launch "svn log -qv -r HEAD --xml > (revnumber).xml and export this one into a subfolder. It already contains which files are modified, removed or added.

So:
- For a first time install, just grab all the files on the server
- For an update, check the current revision (in the python file) and grab all the delta xml files, then check what has changed. Basically, it is how svn might be working.

EDIT: Your idea seems better.

After seeing your message: It could be a way. For an user like oldnoob, which like to edit the files, it could mean that he has to backup his files before to do the update but at least, it would reduce inconsistencies and ensure the user has the very same setup that we provide.

EDIT2: It also mean that the launcher will be totally independant from the version control we use !
 
After seeing your message: It could be a way. For an user like oldnoob, which like to edit the files, it could mean that he has to backup his files before to do the update but at least, it would reduce inconsistencies and ensure the user has the very same setup that we provide.

EDIT2: It also mean that the launcher will be totally independant from the version control we use !
If you wanted to be really helpful, you could code a way to "export" the changes into a new module, so it doesn't override the files.

But that's not important at all. Just a random idea.
 
I think the standard update should be without any user intervention: Click "update", wait and it's over.
If there is a way to check "legit" files, then it would be easy to spot on user-modified files and then show a popup. Maybe i do not need to go to too much trouble...
 
I think the standard update should be without any user intervention: Click "update", wait and it's over.
If there is a way to check "legit" files, then it would be easy to spot on user-modified files and then show a popup. Maybe i do not need to go to too much trouble...

Possibly store previous md5sums from the server? If the file is the same as any of the previous md5sums, it was not modified by a user, it's just out of date.
 
That seems easier. We should go with that !
 
dbkblk, I've set up the server as I said I would. Let me know what you think of the format.

http://civ.afforess.com/

repo.json is automatically updated every 5 minutes with the latest information from the repository.

http://civ.afforess.com/repo/ is the path to the latest svn repository, but accessable over http. You can use it to download the entire repo. It's a very fast connection, unlimited bandwidth.

Edit: @dbkblk if there is anything about the format or setup you would like to improve, let me know. I just whipped this up in 3 hours of free time, it's certainly not perfect.
 
Thank you ! Json seems ok for Qt, so it should be good to go !

I'll try to find some time to code. I don't have enough time these days, so don't expect a working update before a month :)
 
Thank you ! Json seems ok for Qt, so it should be good to go !

I'll try to find some time to code. I don't have enough time these days, so don't expect a working update before a month :)

Ok, no particular rush. :)
 
@Afforess: Do you think it is possible to install rsync on your server ?
I thought about that. It would be really easy to use rsync to grab the latest and restore the folder to the very standard state. It might introduce difficulties to keep some modified files however.

Rsync can also download only delta modified files (really useful for fpk files).
 
@Afforess: Do you think it is possible to install rsync on your server ?
I thought about that. It would be really easy to use rsync to grab the latest and restore the folder to the very standard state. It might introduce difficulties to keep some modified files however.

Rsync can also download only delta modified files (really useful for fpk files).

Yep, I could do that. I am the root administrator, it's an ubuntu 14.04 LTS server. I can install whatever I like.
 
I have rsync set up and read-only. It should be public. I can see it remotely with: rsync -r afforess.com::ftp/

It should be very fast. The server uses SSDs.
 
Ok, nice ! I like the linux way of thinking. Linux was my main system for 6 years (ubuntu, debian, arch). I've made a break for 2 years on Windows 8.1 because i thought they've enhanced the OS. Now that i realised this is the same broken system as before, i'm back to Arch :)

Fortunately, most of the useful tools can be distribued as standalone on windows (rsync is less than 1mb with two dll).

EDIT: Perfect !
 
Ok, nice ! I like the linux way of thinking. Linux was my main system for 6 years (ubuntu, debian, arch). I've made a break for 2 years on Windows 8.1 because i thought they've enhanced the OS. Now that i realised this is the same broken system as before, i'm back to Arch :)

Agreed. I thoroughly enjoy my work on ubuntu servers. If you are curious, I use DigitalOcean as my host. They have very affordable prices on VPS's.

Fortunately, most of the useful tools can be distribued as standalone on windows (rsync is less than 1mb with two dll).
Yep! Rsync is part of cygwin, that's how I tested it.
 
@Affo: You might not need to copy the .svn folder in the repository, as it will increase the storage size !
http://civ.afforess.com/repo/.svn/

I am not sure - I believe the .svn is nessecary to keep checkouts to only delta changes, and not the full checkout.

At any rate, it is possible to tell rsync to exclude certain files. You should be able to ignore .svn folders.
 
I am not sure - I believe the .svn is nessecary to keep checkouts to only delta changes, and not the full checkout.

I didn't think you've updated the server that way. So this is not a problem.

At any rate, it is possible to tell rsync to exclude certain files. You should be able to ignore .svn folders.[/QUOTE]

I used this workaround and it works fine.
Going further, i will use that to keep modified files into the directory:
- Users like oldnoob will be able to specify which files to exclude with a GUI and these files won't be updated by rsync. It might need to add a warning when excluded files are updated, but that won't be on first release.
- Config dirs will be excluded from the rsync.
- The option --delete-after will be used, so only the files in the repo AND excluded folders should stay on the user dir.
 
Sounds excellent. Let me know if you have any other suggestions or ideas.
 
Top Bottom