[vlc-devel] [PATCH] update: do not launch the downloaded exe in Winstore builds

Steve Lhomme robux4 at ycbcr.xyz
Thu Apr 9 11:56:24 CEST 2020


The API is forbidden.

It could be done with this winrt API:
https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-the-default-app-for-a-file
---
 src/misc/update.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/misc/update.c b/src/misc/update.c
index ac1a565bb01..a4c9349153a 100644
--- a/src/misc/update.c
+++ b/src/misc/update.c
@@ -725,9 +725,11 @@ static void* update_DownloadReal( void *obj )
                                            psz_msg );
     if(answer == 1)
     {
+#ifndef VLC_WINSTORE_APP
         wchar_t psz_wdestfile[MAX_PATH];
         MultiByteToWideChar( CP_UTF8, 0, psz_destfile, -1, psz_wdestfile, MAX_PATH );
         answer = (int)ShellExecuteW( NULL, L"open", psz_wdestfile, NULL, NULL, SW_SHOW);
+#endif
         if(answer > 32)
             libvlc_Quit(vlc_object_instance(p_udt));
     }
-- 
2.17.1



More information about the vlc-devel mailing list