Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

versioncheck.conf to json #336

Closed
xpeh-owns opened this issue Jan 29, 2018 · 21 comments
Closed

versioncheck.conf to json #336

xpeh-owns opened this issue Jan 29, 2018 · 21 comments

Comments

@xpeh-owns
Copy link

First results: https://gist.github.com/xpeh-owns/881f040050dd4a4c89cbd34831eccd11

  • Order of appearence? Currently it's 'WAR3', 'W3XP', 'STAR', 'SEXP', 'W2BN', 'DRTL', 'D2XP', 'D2DV'. Newer versions are below, opposite to .conf
  • Key names/order?

You will add newer versions manually, right?

@RElesgoe
Copy link
Member

W2BN should be next to W3XP. Can you reverse the order so that the newest versions are at the top instead of oldest.

@xpeh-owns
Copy link
Author

xpeh-owns commented Jan 29, 2018

Can you reverse the order so that the newest versions are at the top instead of oldest.

But why?
Your proposition of tag order?

@RElesgoe
Copy link
Member

It's quicker to manually insert new entries at the top.

Since WarCraft 2 and WarCraft 3 are the same series, they should be next to each other.

@xpeh-owns
Copy link
Author

It's quicker to manually insert new entries at the top.

If you mean...
So please the whole clienttag order.

@RElesgoe
Copy link
Member

What I mean is that the objects in each array should be sorted so that the newest versions are at the top (e.g. 1.16.1 at the top for STAR and SEXP).
The order of clients should be WAR3, W3XP, W2BN, STAR, SEXP, DRTL, D2XP, D2DV.

@xpeh-owns
Copy link
Author

What I mean is that the objects in each array should be sorted so that the newest versions are at the top (e.g. 1.16.1 at the top for STAR and SEXP).

Yes, I've got it.

@xpeh-owns
Copy link
Author

https://gist.github.com/xpeh-owns/1d76c897891f9538a63814a55d2ddc12
Need converter from json to conf?

@xpeh-owns
Copy link
Author

War 2 and 3 are the same series but war2 is never updated, opposite to star/sexp

@xpeh-owns
Copy link
Author

@xpeh-owns
Copy link
Author

Why is there no Mac versions? I've got versioncheck from your rep.

@RElesgoe
Copy link
Member

People never submitted versioncheck entries for Mac clients.

@xpeh-owns
Copy link
Author

Surely they exist somewhere, probably even on harpywar forum.
So do you need json-conf converter? Even if you use json in your server original pvpgn still can't do it.

@RElesgoe
Copy link
Member

A converter script would be nice, it could be placed in the scripts directory in this repository. Just make a pull request for it.

@xpeh-owns
Copy link
Author

xpeh-owns commented Jan 29, 2018

I already made one :) This json is produced with a script with no edits after.

@xpeh-owns
Copy link
Author

So how to upload them? Never had worked with git and github :)

@RElesgoe
Copy link
Member

Just make another Gist and I'll upload it.

@xpeh-owns
Copy link
Author

xpeh-owns commented Jan 29, 2018

I'll probably have to commit something else in the future. Would be better if I commit.

@RElesgoe
Copy link
Member

RElesgoe commented Feb 5, 2018

Can you modify your script to output tabs instead of spaces.
Before "WAR3": [ should be a single tab. Before { should be 2 tabs. Before "title", "architecture", etc. should be 3 tabs.

@RElesgoe
Copy link
Member

@xpeh-owns I need the file to be modified like so:

{  
    "WAR3":{  
        "0x1c":{  
            "checkrevision_file":"ver-IX86-1.mpq",
            "equation":"A=1239576727 C=1604096186 B=4198521212 4 A=A+S B=B-C C=C^A A=A+B",
            "entries":[  
                {  
                    "title":"Warcraft III - ROC 1.28.2.",
                    "architecture":"IX86",
                    "version":"1.28.2.227",
                    "hash":"0x2dc96bf5",
                    "file_metadata":"War3.exe 05/20/17 13:25:29 558568",
                    "versiontag":"WAR3_1282"
                },
                {  
                    "title":"Warcraft III - ROC 1.28.1.",
                    "architecture":"IX86",
                    "version":"1.28.1.197",
                    "hash":"0x1fbde0fd",
                    "file_metadata":"War3.exe 04/17/17 12:06:57 536040",
                    "versiontag":"WAR3_1281"
                },
                {  
                    "title":"Warcraft III - ROC 1.28",
                    "architecture":"IX86",
                    "version":"1.28.0.37",
                    "hash":"0xe00c3096",
                    "file_metadata":"War3.exe 04/17/17 12:06:57 536040",
                    "versiontag":"WAR3_128"
                }
            ]
        },
        "0x1b":{  
            "checkrevision_file":"ver-IX86-1.mpq",
            "equation":"B=454282227 C=2370009462 A=2264812340 4 A=A^S B=B-C C=C-A A=A+B",
            "entries":[  
                {  
                    "title":"Warcraft III - ROC 1.27b",
                    "architecture":"IX86",
                    "version":"1.27.1.173",
                    "hash":"0x4026b5b0",
                    "file_metadata":"War3.exe 12/09/16 06:05:09 515048",
                    "versiontag":"WAR3_127B"
                }
            ]
        }
    }
}

@RElesgoe
Copy link
Member

New format:

{  
    "WAR3":{  
		"IX86":{  
			"0x1c":{  
				"checkrevision_file":"ver-IX86-1.mpq",
				"equation":"A=1239576727 C=1604096186 B=4198521212 4 A=A+S B=B-C C=C^A A=A+B",
				"entries":[  
					{  
						"title":"Warcraft III - ROC 1.28.2.",
						"version":"1.28.2.227",
						"hash":"0x2dc96bf5",
						"file_metadata":"War3.exe 05/20/17 13:25:29 558568",
						"versiontag":"WAR3_1282"
					},
					{
						"title":"Warcraft III - ROC 1.28.1.",
						"version":"1.28.1.197",
						"hash":"0x1fbde0fd",
						"file_metadata":"War3.exe 04/17/17 12:06:57 536040",
						"versiontag":"WAR3_1281"
					},
					{  
						"title":"Warcraft III - ROC 1.28",
						"version":"1.28.0.37",
						"hash":"0xe00c3096",
						"file_metadata":"War3.exe 04/17/17 12:06:57 536040",
						"versiontag":"WAR3_128"
					}
				]
			},
			"0x1b":{  
				"checkrevision_file":"ver-IX86-1.mpq",
				"equation":"B=454282227 C=2370009462 A=2264812340 4 A=A^S B=B-C C=C-A A=A+B",
				"entries":[  
					{  
						"title":"Warcraft III - ROC 1.27b",
						"version":"1.27.1.173",
						"hash":"0x4026b5b0",
						"file_metadata":"War3.exe 12/09/16 06:05:09 515048",
						"versiontag":"WAR3_127B"
					}
				]
			}
		},
		"XMAC":{
		}
    }
}

I considered moving checkrevision_file and equation under the architecture objects, but it would be too time consuming to go back and update every entry.

@RElesgoe
Copy link
Member

74b06d0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants