-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Move AutoUpdate.CanUpdate check to resolve VisualStudio Designer Error #2407
Conversation
Show full `AutoUpdateCheckbox`, even if AutoUpdate isn't avaiable to solve VisualStudio Designer Error. Instead, check for `AutoUpdate.CanUpdate` on `InstallUpdateButton_Click` and raise error, if false.
|
Wil test tonight after work but looks good at first glance. |
Oooh, I just made my executable read-only and yes, that is rather ugly. Thanks for this PR, DasSkelett! |
} | ||
else | ||
{ | ||
GUI.user.RaiseError("Can't autoupdate. Please check https://github.com/KSP-CKAN/CKAN/ for help!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would someone opening this URL be able to figure out what was going on and/or what to do about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, that's a good point. Just merged this, unfortunately. Pointing to the latest release would probably be better, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups, you were a bit faster than me.
Actually, I wanted to ask if this would work first, before detailing the error message...
Well, should I open a new PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it point to https://github.com/KSP-CKAN/CKAN/releases/latest I think. @HebaruSan , does that seem like a useful link to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, maybe something like:
"Error during update.
Can't update automatically, because ckan.exe is read-only or we are not allowed to overwrite it. Please update manually via https://github.com/KSP-CKAN/CKAN/releases/latest ." ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That message sounds good to me!
Problem:
VisualStudio is very touchy to manual changes in the Designer, especially in
InitializeComponent()
.At the moment, it throws an error every time you want to open the Design View of the Settings Form, because the
AutoUpdateGroupBox
and its members depend onAutoUpdate.CanUpdate
via an if-statement, which checks if the exe is rewriteable.My Proposal:
Move the
AutoUpdate.CanUpdate
-check toInstallUpdateButton_Click
instead of blocking some GUI labels and buttons. Throw an error (should it throw a kraken?), if it's false.This would also make the SettingsWindow don't look as holey in this case.