Closed Fragjacker closed 4 years ago
@IgorTheLight Maybe have a look at this bad boi here? 😀
I will look at it tomorrow! Sounds interesting! I (on the other hand) implemented a few interesting things myself: My 2.0.2 version:
So I will check your 2.0.2 and merge them :-)
On Tue, Jul 14, 2020 at 5:34 PM Dennis S. notifications@github.com wrote:
@IgorTheLight https://github.com/IgorTheLight Maybe have a look at this bad boi here? 😀
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/14#issuecomment-658216622, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F35NRZOR2H3IUCO32PDR3RUIRANCNFSM4OZSPONQ .
It's working quite good. Just delete the duplication of starting a new program twice and trying to terminate old one twice:
Strange. Maybe you got bamboozled by the web UI? My actual code only has one call to CleanupAndStartApp()
:
private void Completed(object sender, AsyncCompletedEventArgs e)
{
ThemedMessageBox.Show("Download completed!\nApplication will restart to take effect", "Good news!");
CleanupAndStartApp();
}
Also in that function there's only one call to close the old app and one call to open the new app 🤔 .
private void CleanupAndStartApp()
{
// Start new downloaded exectuable
Process.Start(executablePath);
// Delete the old executable after 3 seconds have passed using cmd!
Process.Start("cmd.exe", "/C choice /C Y /N /D Y /T 3 & Del \"" + oldexecutablePath + "\"");
CreateShortcut($"DoW Mod Manager v{latestStringVersion}");
ModManagerForm.TerminateApp();
}
Other then that I am thinking about implementing and automatic check for an update when starting the app. If there's a new update available the user gets a prompt asking him if he wants to update now or not.
Closing this pull request to merge the latest of @IgorTheLight changes into my own ones. There will be a new request.
Hm, ok! My 2.0.2 + your 2.0.2 looked fine to me :-) My current 2.0.2 release is just that: my 2.0.2 (optimizations) + your 2.0.2 (delete old file + create new *.lnk) I will write my 2.0.3 which will be more optimizations. Then I will merge it with your 2.0.3 I think it's not a bad idea - we are making two parts of one update! :-) About autoupdater - yes, that's a good idea!
On Wed, Jul 15, 2020 at 3:46 PM Dennis S. notifications@github.com wrote:
Closing this pull request to merge the latest of @IgorTheLight https://github.com/IgorTheLight changes into my own ones. There will be a new request.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Fragjacker/DoW-Mod-Manager/pull/14#issuecomment-658745793, or unsubscribe https://github.com/notifications/unsubscribe-auth/APM5F376CG4FFURDYSNJA2DR3WQIVANCNFSM4OZSPONQ .
Features
How to Test:
Type the following commands into the command line tool of choice:
After one is done delete the branch again
git branch -D BRANCH_NAME