Add direct download button on the homepage #21

Open
opened 2025-09-10 22:49:55 -05:00 by giteasync · 4 comments
Owner

Originally created by @maddhruv on GitHub.

Just like how https://code.visualstudio.com/ has the download button right away on the homepage, based on the OS/Arch, VSCodium can add a similar button, rather than redirecting to the github releases page

Originally created by @maddhruv on GitHub. Just like how https://code.visualstudio.com/ has the download button right away on the homepage, based on the OS/Arch, VSCodium can add a similar button, rather than redirecting to the github releases page
giteasync added the
enhancement
help wanted
labels 2025-09-10 22:49:55 -05:00
Author
Owner

@ghost commented on GitHub:

I found this script, this could help... (from https://stackoverflow.com/a/11219680/19866794)

// This script sets OSName variable as follows:
// "Windows"    for all versions of Windows
// "MacOS"      for all versions of Macintosh OS
// "Linux"      for all versions of Linux
// "UNIX"       for all other UNIX flavors 
// "Unknown OS" indicates failure to detect the OS

var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

document.write('Your OS: '+OSName);

This should help.

License: Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

@ghost commented on GitHub: I found this script, this could help... (from https://stackoverflow.com/a/11219680/19866794) ``` // This script sets OSName variable as follows: // "Windows" for all versions of Windows // "MacOS" for all versions of Macintosh OS // "Linux" for all versions of Linux // "UNIX" for all other UNIX flavors // "Unknown OS" indicates failure to detect the OS var OSName="Unknown OS"; if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows"; if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS"; if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX"; if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux"; document.write('Your OS: '+OSName); ``` This should help. <small>License: <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</small>
Author
Owner

@GitMensch commented on GitHub:

Sadly this doesn't provide a solution as it cannot know what version is wanted: stable/insiders user/system and hat version is actually the one "up to date". If these are all known then it may be possible to pre-select "something reasonable".

@GitMensch commented on GitHub: Sadly this doesn't provide a solution as it cannot know what version is wanted: stable/insiders user/system and hat version is actually the one "up to date". If these are all known then it _may_ be possible to pre-select "something reasonable".
Author
Owner

@GitMensch commented on GitHub:

I general it seems more important to provide something like https://code.visualstudio.com/#alt-downloads, it seems this let the user do the actual choosing of the items above (of course VSCodium provides much more than MS, but the amount could be added using a similar UI) then a JavaScript (in the case of MS a non-free one, but we could do better) uses this information to look up the URL (we have the versions repo) and trigger the download.
With the user-provided information this would for example query https://github.com/VSCodium/versions/blob/master/stable/win32/arm64/archive/latest.json .
Sounds doable. Any volunteer to write the necessary java script and HTML elements?

The "download button" referenced in the issue is then only a pre-selection for the user, something that could actually be done ith the same javascript (not acting on a click but on page load).

@GitMensch commented on GitHub: I general it seems more important to provide something like https://code.visualstudio.com/#alt-downloads, it seems this let the user do the actual choosing of the items above (of course VSCodium provides much more than MS, but the amount could be added using a _similar_ UI) then a JavaScript (in the case of MS a non-free one, but we could do better) uses this information to look up the URL (we have the versions repo) and trigger the download. With the user-provided information this would for example query https://github.com/VSCodium/versions/blob/master/stable/win32/arm64/archive/latest.json . Sounds doable. Any volunteer to write the necessary java script and HTML elements? The "download button" referenced in the issue is then only a pre-selection for the user, something that could actually be done ith the same javascript (not acting on a click but on page load).
Author
Owner

@Crystal-RainSlide commented on GitHub:

I fixed and wrote some regular expressions for the filenames of VSCodium releases, when I was contributing for an open source software mirror backend. Can be helpful. Note that VSCodium-{version}-src.(tar.gz|zip) is not included.

345d47184c/geninfo/genisolist.ini (L746)

Output of all those regexs:
  • darwin:

    • type: dmg zip
    • arch: arm64 x64
  • linux:

    type arch
    AppImage
    AppImage.zsync
    x86_64
    deb amd64 arm64 armhf
    rpm aarch64 armv7hl x86_64
    tar.gz arm64 armhf x64
  • win32:

    • type: exe-Setup exe-UserSetup msi msi-updates-disabled zip
    • arch: arm64 ia32 x64
  • Remote Extension Host:

    type arch
    darwin arm64 x64
    linux arm64 armhf x64
    win32 ia32 x64
  • After all:

    • x86: ia32
    • x64: amd64 x64 x86_64
    • armhf: armhf armv7hl
    • arm64: aarch64 arm64
@Crystal-RainSlide commented on GitHub: I fixed and wrote some regular expressions for the filenames of VSCodium releases, when I was contributing for an open source software mirror backend. Can be helpful. Note that `VSCodium-{version}-src.(tar.gz|zip)` is not included. https://github.com/tuna/mirror-web/blob/345d47184c9d9064ce8a08b554305b72ad9821e5/geninfo/genisolist.ini#L746 <details> <summary>Output of all those regexs:</summary> - `darwin`: - type: `dmg zip` - arch: `arm64 x64` - `linux`: type | arch -----|----- `AppImage`<br>`AppImage.zsync` | `x86_64` `deb` | `amd64 arm64 armhf` `rpm` | `aarch64 armv7hl x86_64` `tar.gz` | `arm64 armhf x64` - `win32`: - type: `exe-Setup exe-UserSetup msi msi-updates-disabled zip` - arch: `arm64 ia32 x64` - Remote Extension Host: type | arch -----|----- `darwin` | `arm64 x64` `linux` | `arm64 armhf x64` `win32` | `ia32 x64` - After all: - `x86`: `ia32` - `x64`: `amd64 x64 x86_64` - `armhf`: `armhf armv7hl` - `arm64`: `aarch64 arm64` </details>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: VSCodium/vscodium.github.io#21
No description provided.