chore: Update release file names for different platforms
This commit is contained in:
@@ -92,7 +92,7 @@ export default function DownloadPage() {
|
||||
const [linuxDownloadType, setLinuxDownloadType] = useState<string | null>(null);
|
||||
|
||||
const [selectedPlatform, setSelectedPlatform] = useState(getDefaultPlatformBasedOnUserAgent());
|
||||
const [selectedArchitecture, setSelectedArchitecture] = useState("64-bit");
|
||||
const [selectedArchitecture, setSelectedArchitecture] = useState("specific");
|
||||
const [selectedWindowsDownloadType, setSelectedWindowsDownloadType] = useState("installer");
|
||||
const [selectedLinuxDownloadType, setSelectedLinuxDownloadType] = useState("portable");
|
||||
|
||||
@@ -130,14 +130,7 @@ export default function DownloadPage() {
|
||||
|
||||
const startDownload = () => {
|
||||
const platform = releaseTree[selectedPlatform.toLowerCase()];
|
||||
let arch: string;
|
||||
if (selectedArchitecture === "64-bit") {
|
||||
arch = "x64";
|
||||
} else if (selectedArchitecture === "aarch64") {
|
||||
arch = "arm";
|
||||
} else {
|
||||
arch = "x32";
|
||||
}
|
||||
let arch: string = selectedArchitecture;
|
||||
let releaseTarget: string;
|
||||
if (selectedPlatform === "MacOS") {
|
||||
releaseTarget = platform[arch];
|
||||
@@ -148,7 +141,7 @@ export default function DownloadPage() {
|
||||
}
|
||||
console.log("Downloading: ");
|
||||
console.log("platform: ", selectedPlatform);
|
||||
console.log("arch: ", arch);
|
||||
console.log("compat: ", arch);
|
||||
setHasDownloaded(true);
|
||||
addDownload(releaseTarget);
|
||||
window.location.replace(`${BASE_URL}/${releases[releaseTarget]}`);
|
||||
@@ -184,7 +177,7 @@ export default function DownloadPage() {
|
||||
}
|
||||
|
||||
const changeToFlatpak = () => {
|
||||
if (selectedArchitecture === "64-bit") {
|
||||
if (selectedArchitecture === "specific") {
|
||||
setSelectedLinuxDownloadType("flatpak");
|
||||
}
|
||||
}
|
||||
@@ -254,14 +247,14 @@ export default function DownloadPage() {
|
||||
<FieldTitle>Select Architecture</FieldTitle>
|
||||
<FieldDescription>Choose the architecture of your device, either 32-bit or 64-bit.</FieldDescription>
|
||||
<div className="flex items-center justify-center">
|
||||
<div onClick={() => setSelectedArchitecture("64-bit")} className={ny("select-none w-full h-full mb-2 p-5 flex flex-col items-center rounded-lg bg-background cursor-pointer border", selectedArchitecture === "64-bit" ? "border-blue-400" : "")}>
|
||||
<div onClick={() => setSelectedArchitecture("specific")} className={ny("select-none w-full h-full mb-2 p-5 flex flex-col items-center rounded-lg bg-background cursor-pointer border", selectedArchitecture === "64-bit" ? "border-blue-400" : "")}>
|
||||
<h1 className="text-5xl my-2 opacity-40 dark:opacity-20">🚀</h1>
|
||||
<h1 className="text-2xl font-semibold my-2">64 Bits</h1>
|
||||
<h1 className="text-2xl font-semibold my-2">Optimized</h1>
|
||||
<p className="text-muted-foreground mx-auto text-center">Blazing fast and compatible with modern devices</p>
|
||||
</div>
|
||||
<div onClick={() => setSelectedArchitecture("32-bit")} className={ny("select-none w-full h-full mb-2 ml-10 p-5 flex flex-col items-center rounded-lg bg-background cursor-pointer border", selectedArchitecture === "32-bit" ? "border-blue-400" : "")}>
|
||||
<div onClick={() => setSelectedArchitecture("generic")} className={ny("select-none w-full h-full mb-2 ml-10 p-5 flex flex-col items-center rounded-lg bg-background cursor-pointer border", selectedArchitecture === "32-bit" ? "border-blue-400" : "")}>
|
||||
<h1 className="text-5xl my-2 opacity-40 dark:opacity-20">👴</h1>
|
||||
<h1 className="text-2xl font-semibold my-2">32 Bits</h1>
|
||||
<h1 className="text-2xl font-semibold my-2">Generic</h1>
|
||||
<p className="text-muted-foreground mx-auto text-center">Slow but compatible with older devices.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -275,12 +268,12 @@ export default function DownloadPage() {
|
||||
<FieldTitle>Download Zen for MacOS</FieldTitle>
|
||||
<FieldDescription>Click the button below to download Zen for MacOS.</FieldDescription>
|
||||
<div className="flex items-center justify-center">
|
||||
<div onClick={() => setSelectedArchitecture("aarch64")} className={ny("select-none w-full h-full mb-2 p-5 flex flex-col items-center rounded-lg bg-background cursor-pointer border", selectedArchitecture === "aarch64" ? "border-blue-400" : "")}>
|
||||
<div onClick={() => setSelectedArchitecture("specific")} className={ny("select-none w-full h-full mb-2 p-5 flex flex-col items-center rounded-lg bg-background cursor-pointer border", selectedArchitecture === "aarch64" ? "border-blue-400" : "")}>
|
||||
<h1 className="text-5xl my-2 opacity-40 dark:opacity-20">🍏</h1>
|
||||
<h1 className="text-2xl font-semibold my-2">aarch64</h1>
|
||||
<p className="text-muted-foreground mx-auto text-center">64-bit ARM architecture, for Apple's M1 or M2 chips</p>
|
||||
</div>
|
||||
<div onClick={() => setSelectedArchitecture("64-bit")} className={ny("select-none w-full h-full mb-2 ml-10 p-5 flex flex-col items-center rounded-lg bg-background cursor-pointer border", selectedArchitecture === "64-bit" ? "border-blue-400" : "")}>
|
||||
<div onClick={() => setSelectedArchitecture("generic")} className={ny("select-none w-full h-full mb-2 ml-10 p-5 flex flex-col items-center rounded-lg bg-background cursor-pointer border", selectedArchitecture === "64-bit" ? "border-blue-400" : "")}>
|
||||
<h1 className="text-5xl font-bold my-2 opacity-40 dark:opacity-20">x64</h1>
|
||||
<h1 className="text-2xl font-semibold my-2">Intel</h1>
|
||||
<p className="text-muted-foreground mx-auto text-center">64-bit Intel architecture, for older Macs</p>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
export const releases: any = {
|
||||
WindowsInstaller: "zen.installer-x64.exe",
|
||||
WindowsInstaller32: "zen.installer-x32.exe",
|
||||
WindowsInstaller: "zen.installer.exe",
|
||||
WindowsInstallerGeneric: "zen.installer-generic.exe",
|
||||
|
||||
WindowsZip: "zen.win-x64.zip",
|
||||
WindowsZip32: "zen.win-x32.zip",
|
||||
WindowsZip: "zen.win-specific.zip",
|
||||
WindowsZipGeneric: "zen.win-generic.zip",
|
||||
|
||||
MacOS: "zen.macos-aarch64.dmg",
|
||||
MacOSIntel: "zen.macos-x64.dmg",
|
||||
|
||||
Linux: "zen.linux-x64.tar.bz2",
|
||||
Linux32: "zen.linux-x32.tar.bz2",
|
||||
Linux: "zen.linux-specific.tar.bz2",
|
||||
LinuxGeneric: "zen.linux-generic.tar.bz2",
|
||||
|
||||
LinuxAppImage: "zen-x64.AppImage",
|
||||
LinuxAppImage32: "zen-x32.AppImage",
|
||||
LinuxAppImage: "zen-specific.AppImage",
|
||||
LinuxAppImageGeneric: "zen-generic.AppImage",
|
||||
};
|
||||
|
||||
// platform
|
||||
@@ -20,27 +20,27 @@ export const releases: any = {
|
||||
// -> file
|
||||
export const releaseTree: any = {
|
||||
windows: {
|
||||
x64: {
|
||||
specific: {
|
||||
installer: "WindowsInstaller",
|
||||
portable: "WindowsZip",
|
||||
},
|
||||
x32: {
|
||||
installer: "WindowsInstaller32",
|
||||
portable: "WindowsZip32",
|
||||
generic: {
|
||||
installer: "WindowsInstallerGeneric",
|
||||
portable: "WindowsZipGeneric",
|
||||
},
|
||||
},
|
||||
macos: {
|
||||
x64: "MacOSIntel",
|
||||
arm: "MacOS",
|
||||
generic: "MacOSIntel",
|
||||
specific: "MacOS",
|
||||
},
|
||||
linux: {
|
||||
x64: {
|
||||
specific: {
|
||||
portable: "Linux",
|
||||
appimage: "LinuxAppImage",
|
||||
},
|
||||
x32: {
|
||||
portable: "Linux32",
|
||||
appimage: "LinuxAppImage32",
|
||||
generic: {
|
||||
portable: "LinuxGeneric",
|
||||
appimage: "LinuxAppImageGeneric",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user