1
0
mirror of https://gitlab.com/JKANetwork/JKArch.git synced 2026-02-14 17:21:32 +01:00
This commit is contained in:
2017-01-21 16:42:32 +01:00
parent 383dd54bdf
commit 14902804de

View File

@@ -400,6 +400,7 @@ function programasguiuser {
opt3="1"
opt5="1 2"
opt6="1 2 3 4 5 6"
opt7="1 2 5"
mostrardialog "Leer" "Ahora se le presenta la opcion de elegir que programas quieres que sean instalados, cosa que recomendamos, aunque, dejamos tambien una opcion rapida, que instalara lo basico y recomendado desde nuestro punto de vista."
tipoinstall=`dialog --stdout --nocancel --menu "¿Elegir los programas que quiere?" 0 0 5 1 "Si, elegir (Muy recomendado)" 2 "No, instalar preseleccion de programas (Opcion rapida)" 3 "No, no instalar ninguno (Solo tendras el entorno y poco más)"`
case $tipoinstall in
@@ -416,7 +417,7 @@ function programasguiuser {
4) opt4=`dialog --stdout --checklist "Imagen" 0 0 6 1 "GIMP" $(optstate "$opt4" 1) 2 "Inkscape" $(optstate "$opt4" 2) 3 "Pinta" $(optstate "$opt4" 3) 4 "Krita (Dibujo)" $(optstate "$opt4" 4)`;;
5) opt5=`dialog --stdout --checklist "Fuentes/Tipos de letra" 0 0 6 1 "Fuentes basicas (Noto,devaju,liberation..)" $(optstate "$opt5" 1) 2 "Microsoft Fonts" $(optstate "$opt5" 2) 3 "Recopilatorio de fuentes de Google (mas de 300)" $(optstate "$opt5" 3)`;;
6) opt6=`dialog --stdout --checklist "Recomendado pulsar todos \nUtilidades basicas" 0 0 6 1 "Evince (Lector PDF)" $(optstate "$opt6" 1) 2 "Ristretto (imagenes jpg,png...)" $(optstate "$opt6" 2) 3 "Cacluladora" $(optstate "$opt6" 3) 4 "Montar ISO/IMG" $(optstate "$opt6" 4) 5 "(Des)compresor de archivos (ZIP,RAR...)" $(optstate "$opt6" 5) 6 "Miniaturas mejoradas de ficheros" $(optstate "$opt6" 6)`;;
7) opt7=`dialog --stdout --checklist "Soportes (Impresoras,Bluetooth...)" 0 0 6 1 "CUPS (Soporte impresoras)" $(optstate "$opt7" 1) 2 "HPLIP (Soporte impresoras HP)" $(optstate "$opt7" 2) 3 "Bluetooth" $(optstate "$opt7" 3)`;;
7) opt7=`dialog --stdout --checklist "Soportes (Impresoras,Bluetooth...)" 0 0 6 1 "CUPS (Soporte impresoras)" $(optstate "$opt7" 1) 2 "Drivers comunes impresoras" $(optstate "$opt7" 2) 3 "HPLIP (Soporte impresoras HP)" $(optstate "$opt7" 3) 4 "Bluetooth" $(optstate "$opt7" 4) 5 "Escaner (Programa)" $(optstate "$opt7" 5)`;;
8) opt8=`dialog --stdout --scrollbar --checklist "Utilidades varias" 0 0 8 1 "Dropbox" $(optstate "$opt8" 1) 2 "MEGA" $(optstate "$opt8" 2) 3 "Visor de correo Evolution" $(optstate "$opt8" 3) 4 "Grabador de discos (k3b)" $(optstate "$opt8" 4) 5 "Java (jre8)" $(optstate "$opt8" 5) 6 "Wine ('Emulador' de programas de Windows)" $(optstate "$opt8" 6) 7 "BleachBit (Limpiador de disco duro)" $(optstate "$opt8" 7)`;;
9) opt9=`dialog --stdout --scrollbar --checklist "Programacion (IDEs)" 0 0 8 1 "Sublime Text 3" $(optstate "$opt9" 1) 2 "Sublime Text 2" $(optstate "$opt9" 2) 3 "Visual Studio Code" $(optstate "$opt9" 3) 4 "Eclipse" $(optstate "$opt9" 4) 5 "Monodevelop" $(optstate "$opt9" 5) 6 "Brackets" $(optstate "$opt9" 6) 7 "Atom" $(optstate "$opt9" 7) 8 "Gamedevelop" $(optstate "$opt9" 8) 9 "Poedit (gettext)" $(optstate "$opt9" 9) A "Arduino IDE" $(optstate "$opt9" A)`;;
"A") optA=`dialog --stdout --checklist "Programacion (Programas)" 0 0 6 1 "base-devel (standard utils like GCC)" $(optstate "$optA" 1) 2 "Java (OpenJDK 8)" $(optstate "$optA" 2)`;;
@@ -479,9 +480,17 @@ function programasguiuser {
*6*) packages="$packages tumbler poppler-glib ffmpegthumbnailer libgsf";;&
esac
case $opt7 in
*1*) packages="$packages cups cups-filters";;&
*2*) packages="$packages hplip";;&
*3*) packages="$packages bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry";;&
*1*) cups=1;;&
*2*) packages="$packages foomatic-db-engine foomatic-db foomatic-db-ppds"
cups=1
;;&
*3*) packages="$packages hplip"
cups=1
;;&
*4*) packages="$packages bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry";;&
*5*) packages="$packages xsane"
cups=1
;;&
esac
case $opt8 in
*1*) packages="$packages dropbox";;&
@@ -512,6 +521,10 @@ function programasguiuser {
esac
allpackages=$allpackages" "$packages
packages=""
#Añadir soporte cups basico si se selecciona cualquier opcion de impresoras
if [[ $cups = "1" ]];then
allpackages=$allpackages" cups cups-filters cups-pk-helper system-config-printer gtk3-print-backends"
fi
fi
}
@@ -552,7 +565,7 @@ function entorno {
# Basic programs (Xorg) and audio support if there is selected any
if [[ $optentorno != 7 ]];then
#Gestor de energia xfce4-power-manager
allpackages=$allpackages" xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks networkmanager network-manager-applet gnome-keyring xdialog lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs jkarch-appearance xfce4-power-manager"
allpackages=$allpackages" xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks networkmanager network-manager-applet gnome-keyring xdialog lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs jkarch-appearance xfce4-power-manager lxtask"
fi
}
# End of functions that are user interactive for configuring system
@@ -657,9 +670,8 @@ function installconf {
execl chroot hwclock --systohc --utc
execl chroot systemctl enable ntpd
if [[ $isoffline = 0 ]];then #Only sync if its online
echo "$(T "Syncing hour to internet")";
execl chroot ntpd -qg
execl chroot hwclock -w
echo "$(T "Syncing hour to internet in background")";
execl chroot (ntpd -qg && && hwclock -w) &> /dev/null
else
echo "Clock will not be okay until restart and configure manually because you dont have net"
fi
@@ -692,6 +704,14 @@ function installconf {
if [[ $optentorno = 4 ]];then #GDM remove in gnome
execl chroot pacman -R gdm --noconfirm
fi
if [[ $optentorno = 5 ]];then #MATE
if [[ $isoffline = "1" ]];then # Is an offline installation?
tar xJf mods/MATE.tar.xz -C /mnt/
else #online
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/MATE.tar.xz -O- | tar xJf - -C /mnt/
fi
fi
if [[ $optentorno = 6 ]];then #Plasma, remove 2 apps
execl chroot pacman -R plasma-mediacenter ksshaskpass --noconfirm
@@ -717,6 +737,11 @@ function installconf {
execl chroot systemctl enable lightdm
execl chroot systemctl enable NetworkManager
execl chroot systemctl enable dhcpcd
# Enable cupsd service for printing
if [[ $cups = "1" ]];then
execl chroot systemctl enable org.cups.cupsd
fi
# Configure wine if neccesary
@@ -777,6 +802,7 @@ function installconf {
# Clean pacman
echo "$(T "Cleaning")"
execl chroot rm -rf $sfslocate/var/cache/pacman/pkg/*
execl chroot pacman -Sc --noconfirm
} # Fin installconf