[vlc-commits] [Git][videolan/vlc][master] 2 commits: update: don't pretend all debug builds are Win32

Thomas Guillem (@tguillem) gitlab at videolan.org
Fri Mar 15 13:36:26 UTC 2024



Thomas Guillem pushed to branch master at VideoLAN / VLC


Commits:
c79116dc by Rémi Denis-Courmont at 2024-03-15T13:20:49+00:00
update: don't pretend all debug builds are Win32

If you want to test this on something else, then update the corresponding
status file, seriously.

- - - - -
dc82c0b9 by Rémi Denis-Courmont at 2024-03-15T13:20:49+00:00
update: update to 64-bit VLC on 64-bit Windows

This is justified just by the sheer amount of 64-bit arithmetic we do.

The only point in sticking to a 32-bit VLC is binary compatibility,
either for external VLC plugins, or for LibVLC applications. But VLC 4.0
will break binary compatibility on both counts, so that is moot.
This constitutes a once in a decade opportunity to smoothly switch over,
considering how rarely LibVLC compatibility is broken.

- - - - -


1 changed file:

- src/misc/update.c


Changes:

=====================================
src/misc/update.c
=====================================
@@ -73,18 +73,10 @@
  * Remaining text is a required description of the update
  */
 
-#if defined( _WIN64 )
-# define UPDATE_OS_SUFFIX "-win-x64"
-#elif defined( _WIN32 )
-# define UPDATE_OS_SUFFIX "-win-x86"
-#else
-# define UPDATE_OS_SUFFIX ""
-#endif
-
 #ifndef NDEBUG
-# define UPDATE_VLC_STATUS_URL "http://update-test.videolan.org/vlc/status-win-x86"
+# define UPDATE_VLC_STATUS_URL "http://update-test.videolan.org/vlc/status"
 #else
-# define UPDATE_VLC_STATUS_URL "http://update.videolan.org/vlc/status" UPDATE_OS_SUFFIX
+# define UPDATE_VLC_STATUS_URL "http://update.videolan.org/vlc/status"
 #endif
 
 #define dialog_FatalWait( p_obj, psz_title, psz_fmt, ... ) \
@@ -179,11 +171,26 @@ static void EmptyRelease( update_t *p_update )
  */
 static bool GetUpdateFile( update_t *p_update )
 {
+#if defined(_WIN64)
+    static const char url[] = UPDATE_VLC_STATUS_URL "-win-x64";
+#elif defined(_WIN32)
+    static const char *urls[] = {
+        UPDATE_VLC_STATUS_URL "-win-x86", UPDATE_VLC_STATUS_URL "-win-x64"
+    };
+    BOOL sixtyfour;
+
+    if (!IsWow64Process(GetCurrentProcess(), &sixtyfour))
+        sixtyfour = FALSE; // not clear how this can fail but MSDN says so
+
+    const char *url = urls[sixtyfour != FALSE];
+#else
+    static const char url[] = UPDATE_VLC_STATUS_URL;
+#endif
     stream_t *p_stream = NULL;
     char *psz_version_line = NULL;
     char *psz_update_data = NULL;
 
-    p_stream = vlc_stream_NewURL( p_update->p_libvlc, UPDATE_VLC_STATUS_URL );
+    p_stream = vlc_stream_NewURL( p_update->p_libvlc, url );
     if( !p_stream )
     {
         msg_Err( p_update->p_libvlc, "Failed to open %s for reading",



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0051b5f46e14b1719a620040262bef7d442d61a6...dc82c0b98d2f9a6a36d39fdabb5d06409f3e990e

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0051b5f46e14b1719a620040262bef7d442d61a6...dc82c0b98d2f9a6a36d39fdabb5d06409f3e990e
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list