[www-doc] [Git][VideoLAN.org/websites][win-detection] VLC/Windows: detect architecture on the download page

Thomas Guillem (@tguillem) gitlab at videolan.org
Tue Sep 22 12:23:13 UTC 2026



Thomas Guillem pushed to branch win-detection at VideoLAN organization / websites


Commits:
3a61b83c by Thomas Guillem at 2026-09-22T14:22:28+02:00
VLC/Windows: detect architecture on the download page

Enable the shared detector instead of always offering win32.

- - - - -


2 changed files:

- www.videolan.org/include/os-specific.php
- www.videolan.org/vlc/download-windows.php


Changes:

=====================================
www.videolan.org/include/os-specific.php
=====================================
@@ -17,7 +17,7 @@ $osxLocation = "$dlBase/$macosxversion/macosx/vlc-$macosxversion-universal.dmg";
 $osxIntel64Location = "$dlBase/$macosxversion/macosx/vlc-$macosxversion-intel64.dmg";
 $osxArm64Location = "$dlBase/$macosArm64version/macosx/vlc-$macosArm64version-arm64.dmg";
 
-function replaceDLinfos( $downloadButton = "#downloadButton" )
+function replaceDLinfos( $downloadButton = "#downloadButton", $targetOS = null )
 {
     global $version;
     global $win32version;
@@ -119,6 +119,8 @@ function replaceDLinfos( $downloadButton = "#downloadButton" )
 
     $(document).ready(function () {
         var OS = getOS() || {};
+        if (<?php echo json_encode($targetOS); ?> === "windows" && OS.indexOf("windows") !== 0)
+            return;
         var details = '';
         var separator = "  •  ";
         details += PLATFORMS[OS].latestVersion ? "Version " + PLATFORMS[OS].latestVersion : '';
@@ -367,7 +369,7 @@ function downloadButton2($dropdownItems = null, $targetOS = null, $displayMainOS
         </div>
         <?php } ?>
     </div>
-    <?php if (is_null($targetOS)) replaceDLinfos( "#downloadButton2" );
+    <?php if (is_null($targetOS) || $targetOS == "windows") replaceDLinfos( "#downloadButton2", $targetOS );
 }
 
 function Screenshot( $os )


=====================================
www.videolan.org/vlc/download-windows.php
=====================================
@@ -9,6 +9,10 @@
    include($_SERVER["DOCUMENT_ROOT"]."/include/os-specific.php");
    include($_SERVER["DOCUMENT_ROOT"]."/include/package.php");
    $dropdownItems = array(
+       array(
+           "name"       => "Installer for 32bit version",
+           "location"   => "$dlBase/$win32version/win32/vlc-$win32version-win32.exe",
+       ),
        array(
            "name"       => "7zip package",
            "location"   => "$dlBase/$win32version/win32/vlc-$win32version-win32.7z",



View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/-/commit/3a61b83cde1d03ca0191eee486756ca8af357fc1

-- 
View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/-/commit/3a61b83cde1d03ca0191eee486756ca8af357fc1
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the www-doc mailing list