Revert "refactor: Improved platform detection, UI enhancements, and overall code quality"

This commit is contained in:
mauro 🤙
2024-08-25 00:51:46 +02:00
committed by GitHub
parent 4838f336c5
commit 2a7dc0cae3
3 changed files with 312 additions and 291 deletions

View File

@@ -1,54 +1,46 @@
export const releases = {
WindowsInstaller: "zen.installer.exe",
WindowsInstallerGeneric: "zen.installer-generic.exe",
export const releases: any = {
WindowsInstaller: "zen.installer.exe",
WindowsInstallerGeneric: "zen.installer-generic.exe",
WindowsZip: "zen.win-specific.zip",
WindowsZipGeneric: "zen.win-generic.zip",
WindowsZip: "zen.win-specific.zip",
WindowsZipGeneric: "zen.win-generic.zip",
MacOS: "zen.macos-aarch64.dmg",
MacOSIntel: "zen.macos-x64.dmg",
MacOS: "zen.macos-aarch64.dmg",
MacOSIntel: "zen.macos-x64.dmg",
Linux: "zen.linux-specific.tar.bz2",
LinuxGeneric: "zen.linux-generic.tar.bz2",
Linux: "zen.linux-specific.tar.bz2",
LinuxGeneric: "zen.linux-generic.tar.bz2",
LinuxAppImage: "zen-specific.AppImage",
LinuxAppImageGeneric: "zen-generic.AppImage",
} as const;
LinuxAppImage: "zen-specific.AppImage",
LinuxAppImageGeneric: "zen-generic.AppImage",
};
// platform
// -> arch
// -> file
export const releaseTree: any = {
windows: {
specific: {
installer: "WindowsInstaller",
portable: "WindowsZip",
windows: {
specific: {
installer: "WindowsInstaller",
portable: "WindowsZip",
},
generic: {
installer: "WindowsInstallerGeneric",
portable: "WindowsZipGeneric",
},
},
generic: {
installer: "WindowsInstallerGeneric",
portable: "WindowsZipGeneric",
macos: {
generic: "MacOSIntel",
specific: "MacOS",
},
},
macos: {
generic: "MacOSIntel",
specific: "MacOS",
},
linux: {
specific: {
portable: "Linux",
appimage: "LinuxAppImage",
linux: {
specific: {
portable: "Linux",
appimage: "LinuxAppImage",
},
generic: {
portable: "LinuxGeneric",
appimage: "LinuxAppImageGeneric",
},
},
generic: {
portable: "LinuxGeneric",
appimage: "LinuxAppImageGeneric",
},
},
};
type Platform = "Windows" | "MacOS" | "Linux";
type Architecture = "specific" | "generic";
type WindowsDownloadType = "installer" | "portable";
type LinuxDownloadType = "portable" | "appimage" | "flatpak";
export type { Platform, Architecture, WindowsDownloadType, LinuxDownloadType };