Files
euri-packages/packages/calamares-branding-antergos-next-minimal/calamares-next.sh
T
c-ludenberg a43ebd898e feat: new Antergos NeXT Minimal (Xfce) edition — branding, theme, and packaging
Introduces a lightweight Xfce-based variant of Antergos NeXT to work
around the 2 GB GitHub Releases limit for the full Plasma ISO.

New packages in antergos-packages:
- calamares-branding-antergos-next-minimal: Calamares branding variant
  that says "Minimal (Xfce)" with a notesqml page explaining why this
  edition exists (Plasma ISO exceeded GitHub's 2 GB limit).
- antergos-xfce-theme: GTK 2.0/3.0/3.20 + xfwm4 theme based on Numix,
  recolored to Antergos brand accent (#4A9EFF). Includes xfce-notify-4.0,
  metacity-1, openbox-3, and unity support directories.

packages.yaml updated with both new packages in the build list.
2026-07-08 18:51:27 +02:00

213 lines
5.5 KiB
Bash

#!/bin/bash
# Antergos NeXT Calamares Installer Launcher
GUIDIE() {
echo "calamares-next: $1" | sed -e 's|<tt>||g' -e 's|</tt>||g'
local prog=yad
command -v yad &>/dev/null || prog=zenity
local cmd=(
"$prog" --form --title="Error detected"
--text="<b>calamares-next:</b>\n$1\n"
--image=dialog-error
--button=yad-quit:1
)
"${cmd[@]}"
exit 1
}
FollowFile() {
local tailfile="$1"
local term_title="$2"
local xpos="$3"
local ypos="$4"
case "$CurrentDesktop" in
xfce) xfce4-terminal -T "$term_title" --geometry="120x20+$xpos+$ypos" -x tail -f "$tailfile" & ;;
kde) setsid konsole -e tail -f "$tailfile" &> /dev/null ;;
esac
}
CatchChrootedPacmanLog() {
local pacmanlog=""
local lockfile="$HOME/.$progname.lck"
while true ; do
sleep 2
pacmanlog="$(/usr/bin/ls -1 /tmp/calamares-root-*/var/log/pacman.log 2>/dev/null | /usr/bin/tail -n 1)"
if [ -n "$pacmanlog" ] ; then
[ -r "$lockfile" ] && return
/usr/bin/touch "$lockfile"
FollowFile "$pacmanlog" "Pacman log" 400 50
break
fi
done
}
LogHeader() {
local calamares_version date
calamares_version="$(pacman -Q calamares 2>/dev/null | awk '{print $NF}')"
date=$(date -u "+%x %X")
cat <<EOF > $log
########## $log by calamares-next
########## Started (UTC): $date
########## Install mode: $mode
########## Calamares version: $calamares_version
EOF
}
InstallLog_Start() {
LogHeader
if [ "$ShowInstallLog" = "TRUE" ] ; then
FollowFile "$log" "Install log" 20 20
fi
}
Calamares_Start() {
if [ "$EUID" = 0 ]; then
calamares -D8 >> $log &
return
fi
local kdesu=/usr/lib/kf6/kdesu
[ -x $kdesu ] || kdesu=kdesu
case "$CurrentDesktop" in
kde) $kdesu -t -c "calamares -D8" >> $log & ;;
*) pkexec calamares -D8 >> $log & ;;
esac
}
AskMode() {
local ICO="/usr/share/calamares/branding/antergos-next/antergos-icon.png"
[ -f "$ICO" ] || ICO="system-software-install"
if [ "$has_connection" = yes ] ; then
yad --form \
--title="Antergos NeXT Installer" \
--image="$ICO" \
--borders=20 \
--height=250 --width=520 \
--buttons-layout=spread \
--field=" ":LBL "" \
--field="<b>Online Install</b>":LBL "" \
--field="Full desktop selection from the internet.":LBL "" \
--field="Choose your desktop environment, customize packages,":LBL "" \
--field="get the latest updates.":LBL "" \
--field=" ":LBL "" \
--field="<b>Offline Install</b>":LBL "" \
--field="Quick install from the live ISO.":LBL "" \
--field="Install KDE Plasma desktop directly from the ISO.":LBL "" \
--field="No internet required.":LBL "" \
--field=" ":LBL "" \
--button="Offline":13 \
--button="Online":11
else
yad --form \
--title="Antergos NeXT Installer" \
--image="$ICO" \
--borders=20 \
--height=200 --width=520 \
--buttons-layout=spread \
--field=" ":LBL "" \
--field="<b>Offline Install</b>":LBL "" \
--field="Quick install from the live ISO.":LBL "" \
--field="Install KDE Plasma desktop directly from the ISO.":LBL "" \
--field=" ":LBL "" \
--button="Offline":13
fi
}
InstallWithLogs() {
InstallLog_Start
Calamares_Start
if [ "$ShowPacmanLog" = "FALSE" ] ; then
sleep 5
return
fi
case "$mode" in
online) CatchChrootedPacmanLog ;;
offline) CatchChrootedPacmanLog ;;
esac
}
SetConfig() {
case "$mode" in
online)
sudo rm -f "/etc/calamares/settings.conf"
sudo cp "/etc/calamares-online/settings.conf" "/etc/calamares/settings.conf"
PreLog "Using online settings"
;;
offline)
sudo rm -f "/etc/calamares/settings.conf"
sudo cp "/etc/calamares-offline/settings.conf" "/etc/calamares/settings.conf"
PreLog "Using offline settings"
;;
esac
}
PreLog() {
echo "==> $1" >> "$prelogfile"
}
Main() {
progname="${0##*/}"
has_connection=no
show_mode=yes
[ -x /usr/bin/calamares ] || GUIDIE "<tt>/usr/bin/calamares</tt> is needed for installing Antergos NeXT"
ping -c 1 -W 2 archlinux.org &>/dev/null && has_connection=yes
local CurrentDesktop=""
if [ "$XDG_CURRENT_DESKTOP" ]; then
CurrentDesktop=$(echo "$XDG_CURRENT_DESKTOP" | tr '[:upper:]' '[:lower:]')
elif [ "$DESKTOP_SESSION" ]; then
CurrentDesktop=$(echo "$DESKTOP_SESSION" | tr '[:upper:]' '[:lower:]')
fi
local ShowInstallLog="FALSE"
local ShowPacmanLog="FALSE"
local Home=/home/antergos
local log=$Home/antergos-install.log
local cfolder=/etc/calamares
local workdir=""
local prelogfile=""
workdir="$Home/work.$progname.xyz"
mkdir -p "$workdir"
prelogfile="$workdir/preliminary.log"
rm -f "$prelogfile"
if [ "$show_mode" = yes ] ; then
AskMode
ret=$?
case $ret in
11) mode=online ;;
13) mode=offline ;;
*) exit $ret ;;
esac
else
mode=offline
fi
case "$mode" in
online|offline)
SetConfig
InstallWithLogs
;;
*)
GUIDIE "unsupported mode '$mode'"
;;
esac
}
Main "$@"