From ae34a1a6c02a1ef3684c7b171e4ecf52abec0f0a Mon Sep 17 00:00:00 2001
From: "mr. m" <91018726+mr-cheff@users.noreply.github.com>
Date: Tue, 24 Dec 2024 00:36:24 +0000
Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Update=20AppImage=20and=20instal?=
=?UTF-8?q?lation=20scripts=20to=20use=20x86=5F64=20binaries=20and=20remov?=
=?UTF-8?q?e=20AVX2=20checks?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
appimage.sh | 53 +++++--------------
install.sh | 17 +-----
scripts/write_redirects.py | 4 +-
.../Linux_x86_64-gcc3/beta-generic/update.xml | 6 ---
.../twilight-generic/update.xml | 6 ---
.../WINNT_x86_64-msvc/beta-generic/update.xml | 6 ---
.../twilight-generic/update.xml | 6 ---
7 files changed, 16 insertions(+), 82 deletions(-)
delete mode 100644 updates/browser/Linux_x86_64-gcc3/beta-generic/update.xml
delete mode 100644 updates/browser/Linux_x86_64-gcc3/twilight-generic/update.xml
delete mode 100644 updates/browser/WINNT_x86_64-msvc/beta-generic/update.xml
delete mode 100644 updates/browser/WINNT_x86_64-msvc/twilight-generic/update.xml
diff --git a/appimage.sh b/appimage.sh
index 0e6c39e..38f52cb 100755
--- a/appimage.sh
+++ b/appimage.sh
@@ -34,11 +34,9 @@ function log_highlight() { log "highlight" "$1"; }
# Download URL globals
# Zen Stable
-ZEN_STABLE_GENERIC="https://github.com/zen-browser/desktop/releases/latest/download/zen-generic.AppImage"
-ZEN_STABLE_SPECIFIC="https://github.com/zen-browser/desktop/releases/latest/download/zen-specific.AppImage"
+ZEN_STABLE="https://github.com/zen-browser/desktop/releases/latest/download/zen-x86_64.AppImage"
# Zen Twilight
-ZEN_TWILIGHT_GENERIC="https://github.com/zen-browser/desktop/releases/download/twilight/zen-generic.AppImage"
-ZEN_TWILIGHT_SPECIFIC="https://github.com/zen-browser/desktop/releases/download/twilight/zen-specific.AppImage"
+ZEN_TWILIGHT="https://github.com/zen-browser/desktop/releases/download/twilight/zen-x86_64.AppImage"
# Filename base globals
ZEN_STABLE_NAME_BASE="ZenBrowser"
@@ -87,13 +85,7 @@ kawaii_art() {
log_info "║ ║"
log_info "║ (ノ◕ヮ◕)ノ*:・゚✧ Zen Browser Installer ║"
log_info "║ ║"
-
- if check_avx2_support; then
- log_info "║ CPU: AVX2 Supported (Optimized Version) ║"
- else
- log_info "║ CPU: AVX2 Not Supported (Generic Version) ║"
- fi
-
+
if check_installation_status "$file_base"; then
log_info "║ Status: Zen Browser Installed ║"
else
@@ -246,24 +238,13 @@ check_for_updates() {
log_info ""
- if check_avx2_support; then
- if [[ "$is_twilight" == 1 ]]; then
- zsync_url="$ZEN_TWILIGHT_SPECIFIC.zsync"
- appimage_url="$ZEN_TWILIGHT_SPECIFIC"
- else
- zsync_url="$ZEN_STABLE_SPECIFIC.zsync"
- appimage_url="$ZEN_STABLE_SPECIFIC"
- fi
- log_warn "Auto detecting AVX2 support..."
+
+ if [[ "$is_twilight" == 1 ]]; then
+ zsync_url="$ZEN_TWILIGHT.zsync"
+ appimage_url="$ZEN_TWILIGHT"
else
- if [[ "$is_twilight" == 1 ]]; then
- zsync_url="$ZEN_TWILIGHT_GENERIC.zsync"
- appimage_url="$ZEN_TWILIGHT_GENERIC"
- else
- zsync_url="$ZEN_STABLE_GENERIC.zsync"
- appimage_url="$ZEN_STABLE_GENERIC"
- fi
- log_warn "AVX2 not supported. Using generic version..."
+ zsync_url="$ZEN_STABLE.zsync"
+ appimage_url="$ZEN_STABLE"
fi
zsync_file="${HOME}/Downloads/$file_base.AppImage.zsync"
@@ -304,20 +285,10 @@ install_zen_browser() {
log_info ""
- if check_avx2_support; then
- if [[ "$is_twilight" == 1 ]]; then
- appimage_url="$ZEN_TWILIGHT_SPECIFIC"
- else
- appimage_url="$ZEN_STABLE_SPECIFIC"
- fi
- log_warn "Auto detecting AVX2 support..."
+ if [[ "$is_twilight" == 1 ]]; then
+ appimage_url="$ZEN_TWILIGHT"
else
- if [[ "$is_twilight" == 1 ]]; then
- appimage_url="$ZEN_TWILIGHT_GENERIC"
- else
- appimage_url="$ZEN_STABLE_GENERIC"
- fi
- log_warn "AVX2 not supported. Using generic version..."
+ appimage_url="$ZEN_STABLE"
fi
log_warn "Downloading Zen from $appimage_url"
diff --git a/install.sh b/install.sh
index f2e2806..d229430 100644
--- a/install.sh
+++ b/install.sh
@@ -4,9 +4,7 @@ app_name=zen
literal_name_of_installation_directory=".tarball-installations"
universal_path_for_installation_directory="$HOME/$literal_name_of_installation_directory"
app_installation_directory="$universal_path_for_installation_directory/zen"
-official_package_location_generic="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-generic.tar.bz2"
-official_package_location_specific="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-specific.tar.bz2"
-official_package_location="$official_package_location_generic"
+official_package_location="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-x86_64.tar.bz2"
tar_location=$(mktemp /tmp/zen.XXXXXX.tar.bz2)
open_tar_application_data_location="zen"
local_bin_path="$HOME/.local/bin"
@@ -16,19 +14,6 @@ desktop_in_local_applications="$local_application_path/$app_name.desktop"
icon_path="$app_installation_directory/browser/chrome/icons/default/default128.png"
executable_path=$app_installation_directory/zen
-# Function to check if AVX2 is supported
-check_avx2_support() {
- if grep -q avx2 /proc/cpuinfo; then
- return 0 # AVX2 supported
- else
- return 1 # AVX2 not supported
- fi
-}
-
-if check_avx2_support; then
- official_package_location="$official_package_location_specific"
-fi
-
echo "Welcome to Zen tarball installer, just chill and wait for the installation to complete!"
sleep 1
diff --git a/scripts/write_redirects.py b/scripts/write_redirects.py
index 600c200..a59ec04 100644
--- a/scripts/write_redirects.py
+++ b/scripts/write_redirects.py
@@ -6,7 +6,9 @@ import os
REDIRECTS = {
"twilightundefined": "twilight", # A bug there was with previous twilight updates
"alpha": "beta", # Alpha -> Beta
- "alpha-generic": "beta-generic", # Alpha -> Beta
+ "alpha-generic": "beta", # Alpha -> Beta
+ "beta-generic": "beta", # Beta (Generic) -> Beta
+ "twilight-generic": "twilight", # Twilight (Generic) -> Twilight
}
UPDATES_ROOT = "updates/browser"
diff --git a/updates/browser/Linux_x86_64-gcc3/beta-generic/update.xml b/updates/browser/Linux_x86_64-gcc3/beta-generic/update.xml
deleted file mode 100644
index 93d3c9d..0000000
--- a/updates/browser/Linux_x86_64-gcc3/beta-generic/update.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/updates/browser/Linux_x86_64-gcc3/twilight-generic/update.xml b/updates/browser/Linux_x86_64-gcc3/twilight-generic/update.xml
deleted file mode 100644
index 3d7863a..0000000
--- a/updates/browser/Linux_x86_64-gcc3/twilight-generic/update.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/updates/browser/WINNT_x86_64-msvc/beta-generic/update.xml b/updates/browser/WINNT_x86_64-msvc/beta-generic/update.xml
deleted file mode 100644
index ade659d..0000000
--- a/updates/browser/WINNT_x86_64-msvc/beta-generic/update.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/updates/browser/WINNT_x86_64-msvc/twilight-generic/update.xml b/updates/browser/WINNT_x86_64-msvc/twilight-generic/update.xml
deleted file mode 100644
index 7f5384f..0000000
--- a/updates/browser/WINNT_x86_64-msvc/twilight-generic/update.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file