Commit 8e9cdc15 authored by Geoffroy Couprie's avatar Geoffroy Couprie

Launch the installer after download

parent fffce3a3
...@@ -48,10 +48,13 @@ ...@@ -48,10 +48,13 @@
#include <vlc_strings.h> #include <vlc_strings.h>
#include <vlc_fs.h> #include <vlc_fs.h>
#include <vlc_dialog.h> #include <vlc_dialog.h>
#include <vlc_interface.h>
#include <gcrypt.h> #include <gcrypt.h>
#include <vlc_gcrypt.h> #include <vlc_gcrypt.h>
#include <shellapi.h>
#include "update.h" #include "update.h"
#include "../libvlc.h" #include "../libvlc.h"
...@@ -729,6 +732,16 @@ static void* update_DownloadReal( vlc_object_t *p_this ) ...@@ -729,6 +732,16 @@ static void* update_DownloadReal( vlc_object_t *p_this )
msg_Info( p_udt, "%s authenticated", psz_destfile ); msg_Info( p_udt, "%s authenticated", psz_destfile );
free( p_hash ); free( p_hash );
int answer = dialog_Question( p_udt, _("Update VLC media player"),
_("The new version was successfully downloaded. Do you want to close VLC and install it now?"),
_("Install"), _("Cancel"), NULL);
if(answer == 1)
{
answer = ShellExecuteA( NULL, "open", psz_destfile, NULL, NULL, SW_SHOW);
if(answer > 32)
libvlc_Quit(p_this->p_libvlc);
}
end: end:
if( p_progress ) if( p_progress )
dialog_ProgressDestroy( p_progress ); dialog_ProgressDestroy( p_progress );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment