diff --git a/INSTALLER/Dune_Rise.otf b/INSTALLER/Dune_Rise.otf deleted file mode 100644 index df025f4..0000000 Binary files a/INSTALLER/Dune_Rise.otf and /dev/null differ diff --git a/INSTALLER/Dune_Rise.ttf b/INSTALLER/Dune_Rise.ttf deleted file mode 100644 index 4da6799..0000000 Binary files a/INSTALLER/Dune_Rise.ttf and /dev/null differ diff --git a/INSTALLER/Screencast from 2025-09-25 22-14-05.webm b/INSTALLER/Screencast from 2025-09-25 22-14-05.webm deleted file mode 100644 index c2e0b9d..0000000 Binary files a/INSTALLER/Screencast from 2025-09-25 22-14-05.webm and /dev/null differ diff --git a/INSTALLER/Screencast from 2025-09-25 22-18-23.webm b/INSTALLER/Screencast from 2025-09-25 22-18-23.webm deleted file mode 100644 index 3b4fb5f..0000000 Binary files a/INSTALLER/Screencast from 2025-09-25 22-18-23.webm and /dev/null differ diff --git a/INSTALLER/Screencast from 2025-09-25 22-46-23.webm b/INSTALLER/Screencast from 2025-09-25 22-46-23.webm deleted file mode 100644 index dd274a1..0000000 Binary files a/INSTALLER/Screencast from 2025-09-25 22-46-23.webm and /dev/null differ diff --git a/INSTALLER/ecoin.png b/INSTALLER/ecoin.png deleted file mode 100644 index 4308a29..0000000 Binary files a/INSTALLER/ecoin.png and /dev/null differ diff --git a/INSTALLER/gtk.css b/INSTALLER/gtk.css deleted file mode 100644 index d5b065e..0000000 --- a/INSTALLER/gtk.css +++ /dev/null @@ -1,106 +0,0 @@ -/* ========================================================== - SOLAR NET HUB – GTK3 Theme (YAD) - ========================================================== */ - -@define-color bg #000000; -@define-color fg #E6E6E6; -@define-color muted #9AA0A6; -@define-color accent #FF4E00; /* Naranja corporativo */ -@define-color success #27D980; /* Verde OK */ -@define-color field_bg #0B0B0B; -@define-color stroke #202020; - -/* ---------- Tipografía / color global ---------- */ -* { - color: @fg; - font-family: "Dune Rise", "Cantarell", "Ubuntu", "DejaVu Sans", sans-serif; - font-size: 12.1pt; /* un pelín más pequeño */ -} - -/* ---------- Fondos de contenedores ---------- */ -window, dialog, grid, box, scrolledwindow, viewport { background-color: @bg; } -grid { padding: 11px 12px 14px 12px; } /* menos padding para que quepa más */ - -/* ---------- Evitar fondos dentro de textos/botones ---------- */ -label, accellabel, -button label, button accellabel, -button * { background: transparent; background-color: transparent; } - -/* ========================================================== - BOTONES: negro + borde/ texto naranja → hover VERDE + texto negro - ========================================================== */ -/* ========================================================== - CTAs (botones de acción) — versión compacta - ========================================================== */ -button { - background: @bg; /* fondo negro */ - color: @accent; /* texto naranja */ - border: 2px solid @accent; /* borde naranja */ - border-radius: 10px; - padding: 5px 5px; /* ↓ padding */ - font-weight: 200; - font-size: 5pt; /* ↓ tamaño de fuente */ - letter-spacing: .2px; - min-width: 100px; /* ↓ ancho mínimo */ - min-height: 20px; /* ↓ alto mínimo */ - margin: 3px 6px; /* ↓ separación vertical */ -} - -/* Hover: botón verde y texto negro (como pediste) */ -button:hover { - background-color: @success; /* verde */ - color: #000; /* texto negro */ - border-color: @success; -} - -button:active { - background-color: shade(@success, 0.85); - color: #000; - border-color: shade(@success, 0.85); -} - -button:disabled { - background-color: #101010; - color: #444; - border-color: #222; -} - -/* Icono dentro del botón (si lo hay), más contenido y pequeño */ -button image { - margin-right: 6px; - -gtk-icon-transform: scale(0.95); -} - -/* ========================================================== - Entradas / listas (por si las usas) - ========================================================== */ -entry, spinbutton, combobox, textview, treeview { - background-color: @field_bg; - color: @fg; - border: 1px solid @stroke; - border-radius: 10px; - padding: 8px 10px; -} -entry:focus, spinbutton:focus, combobox:focus, textview:focus, treeview:focus { - border-color: @accent; -} - -/* ========================================================== - Progreso YAD - ========================================================== */ -trough { background-color: #121212; border-radius: 6px; } -progressbar progress { background-color: @accent; border-radius: 6px; } - -/* ========================================================== - Tooltips - ========================================================== */ -tooltip, tooltip * { - background-color: #111111; - color: @fg; - border: 1px solid @stroke; - border-radius: 8px; - padding: 6px 8px; -} - -/* Labels sueltos dentro del grid con separación mínima */ -grid label { margin: 3px 0 5px; } diff --git a/INSTALLER/gtk_oasis.css b/INSTALLER/gtk_oasis.css deleted file mode 100644 index 1bf6e57..0000000 --- a/INSTALLER/gtk_oasis.css +++ /dev/null @@ -1,42 +0,0 @@ -/* ========================================================== - SOLAR NET HUB – GTK3 Theme (YAD) – OASIS simple (fluido) - ========================================================== */ - -@define-color bg #000000; -@define-color fg #E6E6E6; -@define-color accent #FF4E00; -@define-color accent_hover #27D980; - -/* Tipografía y color global: tamaño moderado (mejor en HiDPI) */ -* { - color: @fg; - font-family: "Dune Rise", "Cantarell", "Ubuntu", "DejaVu Sans", sans-serif; - font-size: 11pt; /* antes 13pt */ -} - -window, dialog, grid, box, scrolledwindow, viewport { - background-color: @bg; -} -grid { padding: 16px; } /* un poco menos de padding */ - -/* Botones sin tamaños rígidos: usa padding, no min-width/height */ -button { - background: #000000; - color: @accent; - border: 2px solid @accent; - border-radius: 14px; - padding: 10px 14px; /* sustituye min-width/height por padding */ - margin: 8px 0; - letter-spacing: 0.5px; -} -button:hover { background: @accent_hover; color: #000; } -button:active { background: @accent; color: #000; } - -/* Limpieza de fondos parásitos en textos dentro de botones */ -label, accellabel, -button label, button accellabel, -button * { - background: transparent; - background-color: transparent; -} - diff --git a/INSTALLER/icons/hicolor/256x256/apps/ecoin.png b/INSTALLER/icons/hicolor/256x256/apps/ecoin.png deleted file mode 100644 index 4308a29..0000000 Binary files a/INSTALLER/icons/hicolor/256x256/apps/ecoin.png and /dev/null differ diff --git a/INSTALLER/icons/hicolor/256x256/apps/oasis-hero.png b/INSTALLER/icons/hicolor/256x256/apps/oasis-hero.png deleted file mode 100644 index f28986c..0000000 Binary files a/INSTALLER/icons/hicolor/256x256/apps/oasis-hero.png and /dev/null differ diff --git a/INSTALLER/icons/hicolor/256x256/apps/oasis-logo.png b/INSTALLER/icons/hicolor/256x256/apps/oasis-logo.png deleted file mode 100644 index ccf33ce..0000000 Binary files a/INSTALLER/icons/hicolor/256x256/apps/oasis-logo.png and /dev/null differ diff --git a/INSTALLER/icons/hicolor/index.theme b/INSTALLER/icons/hicolor/index.theme deleted file mode 100644 index 29ece9b..0000000 --- a/INSTALLER/icons/hicolor/index.theme +++ /dev/null @@ -1,9 +0,0 @@ -[Icon Theme] -Name=Hicolor -Comment=Local fallback for Solar Net Hub -Directories=256x256/apps - -[256x256/apps] -Size=256 -Context=Applications -Type=Fixed diff --git a/INSTALLER/installer.sh b/INSTALLER/installer.sh deleted file mode 100755 index d9a46e6..0000000 --- a/INSTALLER/installer.sh +++ /dev/null @@ -1,400 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# ========================= -# SOLAR NET HUB - Installer -# ========================= - -# --- Rutas --- -SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" -: "${SELF:=$SCRIPT_DIR/installer.sh}" # ruta absoluta a este script -INSTALLER_DIR="$SCRIPT_DIR" -CSS_SOURCE="$INSTALLER_DIR/gtk.css" -HERO_IMAGE="$INSTALLER_DIR/oasis-ecoin.png" # imagen con los dos logos (head) - -# ICONOS INDIVIDUALES (se usan en ensure_local_icons y en el .desktop) -ICON_OASIS="$INSTALLER_DIR/oasis-logo.png" -ICON_ECOIN="$INSTALLER_DIR/ecoin.png" - -APPS_DIR="$HOME/.local/share/applications" -DESKTOP_DIR="$(xdg-user-dir DESKTOP 2>/dev/null || echo "$HOME/Desktop")" - -# --- Tema local (no toca sistema) --- -NAME="SolarHubInstaller" -THEME_NAME="SolarHub" -YAD_THEME="${THEME_NAME}:dark" -ORANGE="#FF4E00" -GREEN="#27D980" - -# ========== Helpers ========== -have(){ command -v "$1" >/dev/null 2>&1; } - -# Iconos locales (sin instalar nada en el sistema/usuario) -ensure_local_icons(){ - local base="$INSTALLER_DIR/icons/hicolor/256x256/apps" - local idx="$INSTALLER_DIR/icons/hicolor/index.theme" - mkdir -p "$base" - install -m 0644 "$ICON_OASIS" "$base/oasis-logo.png" - install -m 0644 "$ICON_ECOIN" "$base/ecoin.png" - cat > "$idx" <<'EOF' -[Icon Theme] -Name=Hicolor -Comment=Local fallback for Solar Net Hub -Directories=256x256/apps - -[256x256/apps] -Size=256 -Context=Applications -Type=Fixed -EOF - # Hacer visible este tema SOLO para este proceso y descendientes - export GTK_ICON_THEME_PATH="$INSTALLER_DIR/icons${GTK_ICON_THEME_PATH:+:$GTK_ICON_THEME_PATH}" -} - -pkg_install(){ - local pkgs=("$@") - if have apt-get; then - if have pkexec; then pkexec bash -lc "apt-get update && apt-get install -y ${pkgs[*]}" || sudo apt-get update && sudo apt-get install -y "${pkgs[@]}"; - else sudo apt-get update && sudo apt-get install -y "${pkgs[@]}"; fi - elif have pacman; then - if have pkexec; then pkexec bash -lc "pacman -Sy --noconfirm ${pkgs[*]}" || sudo pacman -Sy --noconfirm "${pkgs[@]}"; - else sudo pacman -Sy --noconfirm "${pkgs[@]}"; fi - elif have dnf; then - if have pkexec; then pkexec bash -lc "dnf install -y ${pkgs[*]}" || sudo dnf install -y "${pkgs[@]}"; - else sudo dnf install -y "${pkgs[@]}"; fi - elif have zypper; then - if have pkexec; then pkexec bash -lc "zypper --non-interactive install ${pkgs[*]}" || sudo zypper --non-interactive install "${pkgs[@]}"; - else sudo zypper --non-interactive install "${pkgs[@]}"; fi - else - echo "❌ Gestor de paquetes no soportado." >&2; exit 1 - fi -} - -ensure_basics(){ - local miss=() - have yad || miss+=("yad") - if ! command -v pkexec >/dev/null 2>&1; then - if have apt-get; then miss+=("policykit-1"); else miss+=("polkit"); fi - fi - have xdg-user-dirs-update || miss+=("xdg-user-dirs") - if command -v dpkg >/dev/null 2>&1; then - dpkg -s hicolor-icon-theme >/dev/null 2>&1 || miss+=("hicolor-icon-theme") - elif command -v rpm >/dev/null 2>&1; then - rpm -q hicolor-icon-theme >/dev/null 2>&1 || miss+=("hicolor-icon-theme") - fi - if ((${#miss[@]})); then - pkg_install "${miss[@]}" - fi -} - -ensure_theme(){ - local tdir="$HOME/.themes/${THEME_NAME}/gtk-3.0" - mkdir -p "$tdir" - if [ -f "$CSS_SOURCE" ]; then - sed 's/\r$//' "$CSS_SOURCE" > "$tdir/gtk.css" - else - cat > "$tdir/gtk.css" <<'CSS' -*{background:#000;color:#E6E6E6;font-family:"Cantarell","Ubuntu","DejaVu Sans",sans-serif;font-size:12pt} -button{background:#FF4E00;color:#000;border:none;border-radius:16px;padding:12px 18px;font-weight:800} -button:hover{background:#ff6a26} button:active{background:#e24a00} -CSS - fi -} - -yad_cmd(){ GTK_THEME="$YAD_THEME" NO_AT_BRIDGE=1 yad --name="$NAME" --class="$NAME" "$@"; } - -progress_user(){ # $1 título, $2 comando (string) - bash -lc "$2" 2>&1 | yad_cmd --progress --title="$1" --pulsate --auto-close --no-buttons \ - --width=800 --height=260 --center -} -progress_root(){ # $1 título, $2 comando (string, root) - pkexec bash -lc "$2" 2>&1 | yad_cmd --progress --title="$1" --pulsate --auto-close --no-buttons \ - --width=800 --height=260 --center -} - -ensure_launcher(){ - mkdir -p "$APPS_DIR" "$DESKTOP_DIR" - local ABS_INSTALLER="$SCRIPT_DIR/installer.sh" - local ABS_ICON="$ICON_OASIS"; [ -f "$ABS_ICON" ] || ABS_ICON="$HERO_IMAGE" - - cat > "$APPS_DIR/INSTALLER.desktop" </dev/null || true - chmod 644 "$APPS_DIR/INSTALLER.desktop" 2>/dev/null || true - chmod +x "$DESKTOP_DIR/INSTALLER.desktop" 2>/dev/null || true - command -v update-desktop-database >/dev/null 2>&1 && \ - update-desktop-database "$HOME/.local/share/applications" >/dev/null 2>&1 || true -} - -ensure_user_fonts(){ - local FONTS_SRC_DIR="$INSTALLER_DIR" - local FONTS_DST_DIR="$HOME/.local/share/fonts" - local copied=0 - - mkdir -p "$FONTS_DST_DIR" - - # Copia Dune Rise (OTF/TTF) si existe en INSTALLER - for f in "$FONTS_SRC_DIR"/Dune_Rise.otf "$FONTS_SRC_DIR"/Dune_Rise.ttf; do - if [ -f "$f" ]; then - cp -f "$f" "$FONTS_DST_DIR/" && copied=1 - fi - done - - # Refresca caché si hemos copiado algo - if [ "$copied" = 1 ]; then - fc-cache -f >/dev/null 2>&1 || true - fi -} - -# ========== Estado ========== -OASIS_DIR_DEFAULT="${HOME}/oasis" -OASIS_REPO_DEFAULT="https://code.03c8.net/KrakensLab/oasis.git" -OASIS_MODEL_FILE="oasis-42-1-chat.Q4_K_M.gguf" -OASIS_MODEL_TAR="${OASIS_MODEL_FILE}.tar.gz" -OASIS_MODEL_URL="https://solarnethub.com/code/models/${OASIS_MODEL_TAR}" -oasis_installed(){ local d="${1:-$OASIS_DIR_DEFAULT}"; [[ -d "$d/src/server/node_modules" && -f "$d/AI/$OASIS_MODEL_FILE" ]]; } - -ECOIN_DIR_DEFAULT="${HOME}/ecoin" -ECOIN_REPO_DEFAULT="https://github.com/epsylon/ecoin" -ecoin_installed(){ local d="${1:-$ECOIN_DIR_DEFAULT}"; [[ -x "$d/ecoin/ecoin-qt" || -x "$d/ecoin/src/ecoind" ]]; } -ecoin_wallet_exists(){ [ -f "$HOME/.ecoin/wallet.dat" ]; } - -# ========== OASIS ========== -node_setup_cmd(){ cat < "$CONF" </dev/null || true -ensure_local_icons -ensure_theme -ensure_launcher - -case "${1:-}" in - --oasis-install) oasis_quick_install 22 "$OASIS_REPO_DEFAULT" "$OASIS_DIR_DEFAULT" ;; - --oasis-start) oasis_quick_start "$OASIS_DIR_DEFAULT" ;; - --ecoin-install) ecoin_quick_install "$ECOIN_REPO_DEFAULT" "$ECOIN_DIR_DEFAULT" ;; - --wallet-create) progress_user "ECOIN: Crear cartera" "$(ecoin_create_wallet_cmd)" ;; - --wallet-connect)progress_user "ECOIN: Conectar cartera" "$(ecoin_connect_wallet_cmd)" ;; - --ecoin-gui) progress_user "ECOIN: Wallet (Qt)" "$(ecoin_qt_cmd "$ECOIN_DIR_DEFAULT")" ;; - *) home_single_dialog ;; -esac diff --git a/INSTALLER/installer.sh.bak.1757923726 b/INSTALLER/installer.sh.bak.1757923726 deleted file mode 100755 index a72bf07..0000000 --- a/INSTALLER/installer.sh.bak.1757923726 +++ /dev/null @@ -1,346 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# ========================= -# SOLAR NET HUB - Installer -# ========================= - -# --- Rutas --- -SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" -INSTALLER_DIR="$SCRIPT_DIR" -CSS_SOURCE="$INSTALLER_DIR/gtk.css" # (lo añadimos luego) -ICON_OASIS="$INSTALLER_DIR/oasis-logo.webp" -ICON_ECOIN="$INSTALLER_DIR/ecoin.png" - -APPS_DIR="$HOME/.local/share/applications" -DESKTOP_DIR="$(xdg-user-dir DESKTOP 2>/dev/null || echo "$HOME/Desktop")" - -# --- Theming local (no toca el sistema) --- -NAME="SolarHubInstaller" # --name/--class (CSS scope) -THEME_NAME="SolarHub" # ~/.themes/SolarHub/gtk-3.0/gtk.css -YAD_THEME="${THEME_NAME}:dark" -ORANGE="#FF4E00" -GREEN="#27D980" -GREY="#b9b9b9" - -# --- Helpers básicos --- -have(){ command -v "$1" >/dev/null 2>&1; } -pkg_install(){ - local pkgs=("$@") - if have apt-get; then - pkexec bash -lc "apt-get update && apt-get install -y ${pkgs[*]}" - elif have pacman; then - pkexec bash -lc "pacman -Sy --noconfirm ${pkgs[*]}" - elif have dnf; then - pkexec bash -lc "dnf install -y ${pkgs[*]}" - elif have zypper; then - pkexec bash -lc "zypper --non-interactive install ${pkgs[*]}" - else - echo "❌ Gestor de paquetes no soportado. Instala manualmente: yad, policykit-1, hicolor-icon-theme, xdg-user-dirs" >&2 - exit 1 - fi -} - - -ensure_theme(){ - local tdir="$HOME/.themes/${THEME_NAME}/gtk-3.0" - mkdir -p "$tdir" - if [ -f "$CSS_SOURCE" ]; then - sed 's/\r$//' "$CSS_SOURCE" > "$tdir/gtk.css" - else - # CSS mínimo por si aún no creaste gtk.css - cat > "$tdir/gtk.css" <<'CSS' -*{background:#000;color:#E6E6E6;font-family:"Cantarell","Ubuntu","DejaVu Sans",sans-serif;font-size:12pt} -button{background:#FF4E00;color:#000;border:none;border-radius:16px;padding:12px 18px;font-weight:800} -button:hover{background:#ff6a26} button:active{background:#e24a00} -CSS - fi -} - -yad_cmd(){ GTK_THEME="$YAD_THEME" yad --name="$NAME" --class="$NAME" "$@"; } - -progress_user(){ # $1=title $2=cmd (como string) - bash -lc "$2" 2>&1 | yad_cmd --progress --title="$1" --pulsate --auto-close --no-buttons \ - --width=940 --height=260 --center -} -progress_root(){ # $1=title $2=cmd (string) -> pkexec - pkexec bash -lc "$2" 2>&1 | yad_cmd --progress --title="$1" --pulsate --auto-close --no-buttons \ - --width=940 --height=260 --center -} - -ensure_launcher(){ - mkdir -p "$APPS_DIR" "$DESKTOP_DIR" - cat > "$APPS_DIR/INSTALLER.desktop" </dev/null || true - chmod +x "$DESKTOP_DIR/INSTALLER.desktop" 2>/dev/null || true -} - -# ========= Detección de estado ========= -OASIS_DIR_DEFAULT="${HOME}/oasis" -OASIS_REPO_DEFAULT="https://code.03c8.net/KrakensLab/oasis.git" -OASIS_MODEL_FILE="oasis-42-1-chat.Q4_K_M.gguf" -OASIS_MODEL_TAR="${OASIS_MODEL_FILE}.tar.gz" -OASIS_MODEL_URL="https://solarnethub.com/code/models/${OASIS_MODEL_TAR}" -oasis_installed(){ local d="${1:-$OASIS_DIR_DEFAULT}"; [[ -d "$d/src/server/node_modules" && -f "$d/AI/$OASIS_MODEL_FILE" ]]; } - -ECOIN_DIR_DEFAULT="${HOME}/ecoin" -ECOIN_REPO_DEFAULT="https://github.com/epsylon/ecoin" -ecoin_installed(){ local d="${1:-$ECOIN_DIR_DEFAULT}"; [[ -x "$d/ecoin/ecoin-qt" || -x "$d/ecoin/src/ecoind" ]]; } -ecoin_wallet_exists(){ [ -f "$HOME/.ecoin/wallet.dat" ]; } - -# ========= Comandos OASIS ========= -node_setup_cmd(){ # $1=major (22/18) -cat < "$CONF" </dev/null 2>&1; then - KEY="$(shuf -i 1-2000000000 -n 1)" - else - KEY=$(( (RANDOM<<15) | RANDOM )); KEY=$((KEY%2000000000+1)) - fi - - # --- MITAD IZQUIERDA: OASIS --- - local O_TEXT O_BTN - if oasis_installed; then - O_TEXT="OASIS\nInstalado" - O_BTN="bash -lc '$0 --oasis-start'!$ICON_OASIS!Abrir OASIS" - else - O_TEXT="OASIS\nNo instalado" - O_BTN="bash -lc '$0 --oasis-install'!$ICON_OASIS!Instalar OASIS" - fi - - yad_cmd --plug="$KEY" --form --borders=28 --columns=1 \ - ${ICON_OASIS:+--image="$ICON_OASIS"} --image-on-top \ - --text="$O_TEXT" \ - --field=":BTN" "$O_BTN" \ - --no-buttons --buttons-layout=center & - PID_L=$! - - # --- MITAD DERECHA: ECOIN --- - local E_TEXT E_BTN1 E_BTN2 - if ! ecoin_installed; then - E_TEXT="ECOIN\nNo instalado" - E_BTN1="bash -lc '$0 --ecoin-install'!$ICON_ECOIN!Instalar ECOIN" - E_BTN2="" - else - if ecoin_wallet_exists; then - E_TEXT="ECOIN\nCartera detectada" - E_BTN1="bash -lc '$0 --wallet-connect'!$ICON_ECOIN!Conectar cartera" - E_BTN2="bash -lc '$0 --ecoin-gui'!$ICON_ECOIN!Abrir ECOIN GUI" - else - E_TEXT="ECOIN\nSin cartera" - E_BTN1="bash -lc '$0 --wallet-create'!$ICON_ECOIN!Crear cartera" - E_BTN2="" - fi - fi - - if [ -n "$E_BTN2" ]; then - yad_cmd --plug="$KEY" --form --borders=28 --columns=1 \ - ${ICON_ECOIN:+--image="$ICON_ECOIN"} --image-on-top \ - --text="$E_TEXT" \ - --field=":BTN" "$E_BTN1" \ - --field=":BTN" "$E_BTN2" \ - --no-buttons --buttons-layout=center & - else - yad_cmd --plug="$KEY" --form --borders=28 --columns=1 \ - ${ICON_ECOIN:+--image="$ICON_ECOIN"} --image-on-top \ - --text="$E_TEXT" \ - --field=":BTN" "$E_BTN1" \ - --no-buttons --buttons-layout=center & - fi - PID_R=$! - - sleep 0.35 - yad_cmd --paned --key="$KEY" \ - --title="SOLAR NET HUB" --width=1180 --height=740 --center \ - --button="Cerrar:0" - - kill "$PID_L" "$PID_R" 2>/dev/null || true -} - -# ========= Entrypoint ========= -ensure_basics -ensure_theme -ensure_launcher - -case "${1:-}" in - --oasis-install) oasis_quick_install 22 "$OASIS_REPO_DEFAULT" "$OASIS_DIR_DEFAULT" ;; - --oasis-start) oasis_quick_start "$OASIS_DIR_DEFAULT" ;; - --ecoin-install) ecoin_quick_install "$ECOIN_REPO_DEFAULT" "$ECOIN_DIR_DEFAULT" ;; - --wallet-create) progress_user "ECOIN: Crear cartera" "$(ecoin_create_wallet_cmd)" ;; - --wallet-connect)progress_user "ECOIN: Conectar cartera" "$(ecoin_connect_wallet_cmd)" ;; - --ecoin-gui) progress_user "ECOIN: Wallet (Qt)" "$(ecoin_qt_cmd "$ECOIN_DIR_DEFAULT")" ;; - *) home ;; -esac -ensure_basics(){ - local miss=() - command -v yad >/dev/null 2>&1 || miss+=("yad") - command -v pkexec >/dev/null 2>&1 || miss+=("policykit-1") - command -v xdg-user-dirs-update >/dev/null 2>&1 || miss+=("xdg-user-dirs") - if command -v dpkg >/dev/null 2>&1; then - dpkg -s hicolor-icon-theme >/dev/null 2>&1 || miss+=("hicolor-icon-theme") - elif command -v rpm >/dev/null 2>&1; then - rpm -q hicolor-icon-theme >/dev/null 2>&1 || miss+=("hicolor-icon-theme") - fi - ((${#miss[@]})) && pkg_install "${miss[@]}" -} diff --git a/INSTALLER/installer_oasis.sh b/INSTALLER/installer_oasis.sh deleted file mode 100755 index 6dcd815..0000000 --- a/INSTALLER/installer_oasis.sh +++ /dev/null @@ -1,265 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# ========================= -# OASIS Installer (simple) -# ========================= - -SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" -: "${SELF:=$SCRIPT_DIR/installer_oasis.sh}" - -INSTALLER_DIR="$SCRIPT_DIR" -CSS_SOURCE="$INSTALLER_DIR/gtk_oasis.css" - -# Imagen/icono -HERO_FILE="$INSTALLER_DIR/oasis-logito.png"; [ -f "$HERO_FILE" ] || HERO_FILE="$INSTALLER_DIR/oasis-logo.png" -WINDOW_ICON="$INSTALLER_DIR/oasis-logo.png" - -# Tema / ventana -NAME="OasisInstaller" -THEME_NAME="SolarOasis" -YAD_THEME="${THEME_NAME}:dark" - -# Repo (se mantiene por compatibilidad con funciones existentes) -OASIS_REPO_DEFAULT="https://code.03c8.net/KrakensLab/oasis.git" - -# Estado persistente -STATE_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/oasis-installer" -STATE_FILE="$STATE_DIR/state" -mkdir -p "$STATE_DIR" - -have(){ command -v "$1" >/dev/null 2>&1; } - -# ===== NUEVO: chequeo de npm (único cambio funcional pedido) ===== -npm_ok(){ - # Permite forzar el estado "no instalado" para pruebas: - # OASIS_FORCE_INSTALL=1 ./INSTALLER/installer_oasis.sh - if [ "${OASIS_FORCE_INSTALL:-0}" = "1" ]; then - return 1 - fi - have npm && npm -v >/dev/null 2>&1 -} - -# ---------- Preflight ---------- -preflight(){ - # DISPLAY “de cortesía” - if [ -z "${DISPLAY:-}" ]; then export DISPLAY=":0"; fi - # YAD disponible? - if ! have yad; then - echo "✘ Falta 'yad'. Instálalo y vuelve a ejecutar." >&2 - exit 1 - fi -} - -ensure_basics(){ - local miss=() - have yad || miss+=("yad") - command -v pkexec >/dev/null 2>&1 || miss+=("policykit-1") - have xdg-user-dirs-update || miss+=("xdg-user-dirs") - if command -v dpkg >/dev/null 2>&1; then - dpkg -s hicolor-icon-theme >/dev/null 2>&1 || miss+=("hicolor-icon-theme") - fi - if ((${#miss[@]})); then - if have apt-get; then - if have pkexec; then pkexec bash -lc "apt-get update && apt-get install -y ${miss[*]}"; - else sudo apt-get update && sudo apt-get install -y "${miss[@]}"; fi - fi - fi -} - -ensure_theme(){ - local tdir="$HOME/.themes/${THEME_NAME}/gtk-3.0" - mkdir -p "$tdir" - if [ -f "$CSS_SOURCE" ]; then - sed 's/\r$//' "$CSS_SOURCE" > "$tdir/gtk.css" - else - cat > "$tdir/gtk.css" <<'CSS' -*{background:#000;color:#E6E6E6;font-family:"Dune Rise","Cantarell","Ubuntu","DejaVu Sans",sans-serif;font-size:13pt} -grid{padding:18px} -button{ - border:2px solid #FF4E00; border-radius:14px; background:#000; color:#FF4E00; - min-width:380px; min-height:46px; margin:10px 0; letter-spacing:.5px; -} -button:hover{ background:#27D980; color:#000; } -button:active{ background:#FF4E00; color:#000; } -image{ margin:8px auto 6px auto; } -CSS - fi -} - -# YAD wrapper -yad_cmd(){ GTK_THEME="$YAD_THEME" NO_AT_BRIDGE=1 yad --name="$NAME" --class="$NAME" "$@"; } - -# -------- Detección / estado de OASIS -------- -oasis_is_installed_dir(){ - local d="$1" - [[ -f "$d/oasis.sh" ]] || [[ -f "$d/src/server/server.js" ]] || [[ -d "$d/src/server/node_modules" ]] -} - -save_oasis_dir(){ - local d="$1" - mkdir -p "$STATE_DIR" - { - echo "OASIS_DIR=$d" - date +"SAVED=%Y-%m-%dT%H:%M:%S" - } > "$STATE_FILE" -} - -read_saved_dir(){ - [ -f "$STATE_FILE" ] && sed -n 's/^OASIS_DIR=//p' "$STATE_FILE" | head -n1 || true -} - -guess_oasis_dir(){ - local cands=() - - # 1) Padre del installer (estructura estándar) - cands+=("$SCRIPT_DIR/..") - - # 2) Guardado previo - local saved; saved="$(read_saved_dir || true)" - [ -n "${saved:-}" ] && cands+=("$saved") - - # 3) Candidatas típicas - cands+=("$HOME/COFRE/CODERS/oasis" "$HOME/oasis" "$HOME/Projects/oasis" "$HOME/Documentos/oasis") - - local d - for d in "${cands[@]}"; do - d="$(cd "$d" 2>/dev/null && pwd || true)" - [ -n "$d" ] || continue - if oasis_is_installed_dir "$d"; then - echo "$d"; return 0 - fi - done - echo "$HOME/oasis" -} - -# -------- Comandos auxiliares existentes (sin cambios) -------- -node_setup_cmd(){ cat <<'EOF' -set -e -apt-get update -apt-get install -y git curl ca-certificates tar gnupg -curl -fsSL https://deb.nodesource.com/setup_22.x | bash - -apt-get install -y nodejs -node -v && npm -v -EOF -} - -oasis_install_cmd(){ cat < /tmp/oasis_gui.log 2>&1 & - for i in $(seq 1 30); do - if ss -lnt sport = :$PORT | grep -q "$PORT"; then - echo "Oasis levantado en $PORT" - break - fi - sleep 1 - done -fi - -# Abrir navegador siempre -xdg-open "http://localhost:$PORT" >/dev/null 2>&1 || true -EOF -} - -progress_user(){ bash -lc "$2" 2>&1 | yad_cmd --progress --title="$1" --pulsate --auto-close --no-buttons --width=700 --height=180 --center; } -progress_root(){ pkexec bash -lc "$2" 2>&1 | yad_cmd --progress --title="$1" --pulsate --auto-close --no-buttons --width=700 --height=180 --center; } - -oasis_quick_install(){ - local dir="$1" - progress_root "OASIS: Node.js 22" "$(node_setup_cmd)" - progress_user "OASIS: Clonar + npm" "$(oasis_install_cmd "$OASIS_REPO_DEFAULT" "$dir")" - save_oasis_dir "$dir" -} - -oasis_quick_start(){ - local dir="$1" - progress_user "OASIS: Abrir" "$(oasis_start_cmd "$dir" 3000)" -} - -# -------- UI -------- -home_oasis_dialog(){ - local OASIS_DIR; OASIS_DIR="$(guess_oasis_dir)" - save_oasis_dir "$OASIS_DIR" - - local O_VER="—" - if [ -f "$OASIS_DIR/src/server/package.json" ]; then - O_VER="$(sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$OASIS_DIR/src/server/package.json" | head -n1)" - [ -z "$O_VER" ] && O_VER="—" - fi - - # Subcomandos (OPEN se mantiene EXACTO como antes) - local BTN_OPEN_SITE="/bin/bash -lc '$SELF --open-site'" - local BTN_INSTALL="/bin/bash -lc '$SELF --do-install'" - local BTN_OPEN="/bin/bash -lc '$SELF --open-now'" - - # ===== ÚNICO CAMBIO: decidir etiqueta/acción de INSTALL según npm ===== - local INSTALL_LABEL="INSTALL:BTN" - if npm_ok; then - INSTALL_LABEL="ALREADY INSTALLED:BTN" - BTN_INSTALL="/bin/true" - fi - # (No tocamos BTN_OPEN) - - yad_cmd \ - --title="SOLAR NET HUB" --window-icon="$WINDOW_ICON" \ - --center --width=720 --height=600 \ - --image="$HERO_FILE" --image-on-top \ - --form --borders=16 --columns=1 --align=center \ - \ - --field="OASIS PROJECT:BTN" "$BTN_OPEN_SITE" \ - --field="$INSTALL_LABEL" "$BTN_INSTALL" \ - --field="OPEN:BTN" "$BTN_OPEN" \ - --field="VERSION ( $O_VER ):BTN" "/bin/true" \ - \ - --buttons-layout=center \ - --button="CERRAR:0" -} - -# -------- Subcomandos -------- -case "${1:-}" in - --open-site) - xdg-open "https://oasis-project.pub" >/dev/null 2>&1 || true - exit 0 - ;; - --do-install) - preflight; ensure_basics; ensure_theme - # Ejecutar el install.sh del raíz del repo (padre de INSTALLER) - if [ -f "$SCRIPT_DIR/../install.sh" ]; then - /bin/bash -lc "cd \"$SCRIPT_DIR/..\" && bash install.sh" - else - yad_cmd --error --title="OASIS Installer" --text="No se encontró install.sh en $SCRIPT_DIR/.." - exit 1 - fi - # Guardar ruta para OPEN - dir="$(cd "$SCRIPT_DIR/.." && pwd)" - save_oasis_dir "$dir" - exit 0 - ;; - --open-now) - preflight; ensure_basics; ensure_theme - dir="$(read_saved_dir)"; [ -n "${dir:-}" ] || dir="$(guess_oasis_dir)" - save_oasis_dir "$dir" - oasis_quick_start "$dir" - exit 0 - ;; - *) - preflight; ensure_basics; ensure_theme - home_oasis_dialog - ;; -esac diff --git a/INSTALLER/oasis-ecoin.png b/INSTALLER/oasis-ecoin.png deleted file mode 100644 index 4d870e8..0000000 Binary files a/INSTALLER/oasis-ecoin.png and /dev/null differ diff --git a/INSTALLER/oasis-logito.png b/INSTALLER/oasis-logito.png deleted file mode 100644 index f28986c..0000000 Binary files a/INSTALLER/oasis-logito.png and /dev/null differ diff --git a/INSTALLER/oasis-logo.png b/INSTALLER/oasis-logo.png deleted file mode 100644 index ccf33ce..0000000 Binary files a/INSTALLER/oasis-logo.png and /dev/null differ