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

Adding in Check for Updates/New Update Notification/Automatic Updates #199

Closed
ricksee opened this issue Aug 25, 2016 · 8 comments
Closed

Comments

@ricksee
Copy link

ricksee commented Aug 25, 2016

Is it possible in the future to allow an option to check for updates of this program to see if they are available and then allow the program to download the update or enter the link to download it?

@evandixon
Copy link
Collaborator

evandixon commented Aug 25, 2016

I've been toying with the idea of deploying PKHeX via ClickOnce to allow prompts for notifications and possibly even file associations with pkm files. There was actually some code that would be useful if/when this happens in the future, but I removed it because it broke compatibility with Mono.

I might be able to get around this by creating another project that wraps PKHeX, and deploying that one via ClickOnce. However, last time I tried having a ClickOnce deployment with multiple executables, there were some manifest errors. Since that was years ago, I'll continue to play around with things to see how this would work. Or perhaps we could introduce some compiler directives to enable/disable using System.Deployment?

@kwsch
I fixed some of the back-end hosting stuff, so this is the last non-code stuff that needs to be done for future releases if you want to pursue this:

  • Instead of, or in addition to dates, assign a real version number to each future release, preferably with 3 parts (like 1.0.0). (My "super-secret" dev ClickOnce deployment currently uses 1.0.0.X, where X is the auto-generated number. IMO the 4th part should stay automatically generated.) Since we're already on 1.0.0, I'll need you to pick an arbitrary version to start with. After that, I recommend using the standard Major.Minor.Patch for future releases (Major and Minor for new features, Patch for bug fixes).
  • Tag releases using the version number. This would also show source code (plus any binaries we upload) on Github Releases.

@kwsch
Copy link
Owner

kwsch commented Aug 30, 2016

Simplest way to not break Mono support is to query a webpage to retrieve the latest version info, then popping open a webpage to download the latest version.

Investigating how PokeGen did it, the program queried a url on projectpokemon, if it differed it grabbed /PokeGen.zip, with other detections for lang_%s.txt. Pretty sure that's what the extra version info at the end is for (auto update language translations).

It's something I'd want to get done before S&M, as that's prime to catch the users that are updating for that support. Probably best to just do a simple version# check from a URL, then pop open a webpage after prompting the user.

@SciresM
Copy link
Collaborator

SciresM commented Aug 30, 2016

Any reason not to use the github repo (version.txt resource?) (wiki page) as a URL to query?

@evandixon
Copy link
Collaborator

I think that managing updates ourselves would require too much re-inventing of the wheel. PKHeX would need its own update checks, its own form, its own code for replacing the executable... ClickOnce does all this for us.

My latest PR should™ fix my only remaining concern about the code. If/when it's completed, I'll have my build system use it when deploying via ClickOnce so it can detect if it's deployed (and if it is, use Documents instead of the current directory for storing the database). Since tags are easier to automate than a version in a file, all that remains to use ClickOnce is to tag releases with a version number (make sure it's in the format "X.Y.Z", where X, Y, and Z are integers), and make sure that everything works as expected.

@evandixon
Copy link
Collaborator

I don't mean an entire box, like selecting certain Pokemon from the box.
Did you mean to post that in another issue?

@ricksee
Copy link
Author

ricksee commented Aug 30, 2016

Yea sorry about that.

@droped
Copy link

droped commented Sep 18, 2016

Hasn't this been added in the new update?

It says in the changelog:
"+ Added: Program will now check for updates when the program starts. If an update is available, a URL label will appear."

@kwsch
Copy link
Owner

kwsch commented Sep 18, 2016

It has.

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

5 participants