;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Mathieu Othacehe ;;; Copyright © 2020 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu installer newt welcome) #:use-module (gnu installer steps) #:use-module (gnu installer utils) #:use-module (gnu installer newt page) #:use-module (gnu installer newt utils) #:use-module (guix build syscalls) #:use-module (guix i18n) #:use-module (srfi srfi-1) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (ice-9 match) #:use-module (ice-9 receive) #:use-module (newt) #:export (run-welcome-page)) ;; Expected width and height for the logo. (define logo-width (make-parameter 43)) (define logo-height (make-parameter 19)) (define info-textbox-width (make-parameter 70)) (define options-listbox-height (make-parameter 5)) (define (display-logo?) (> (screen-rows) 35)) (define* (run-menu-page title info-text logo #:key listbox-items listbox-item->text) "Run a page with the given TITLE, to ask the user to choose between LISTBOX-ITEMS displayed in a listbox. The listbox items are converted to text using LISTBOX-ITEM->TEXT procedure. Display the textual LOGO in the center of the page. Contrary to other pages, we cannot resort to grid layouts, because we want this page to occupy all the screen space available." (define (fill-listbox listbox items) (map (lambda (item) (let* ((text (listbox-item->text item)) (key (append-entry-to-listbox listbox text))) (cons key item))) items)) (let* ((logo-textbox (make-textbox -1 -1 (if (display-logo?) (logo-width) 0) (if (display-logo?) (logo-height) 0) 0)) (info-textbox (make-reflowed-textbox -1 -1 info-text (info-textbox-width))) (options-listbox (make-listbox -1 -1 (options-listbox-height) (logior FLAG-BORDER FLAG-RETURNEXIT))) (keys (fill-listbox options-listbox listbox-items)) (grid (vertically-stacked-grid GRID-ELEMENT-COMPONENT logo-textbox GRID-ELEMENT-COMPONENT info-textbox GRID-ELEMENT-COMPONENT options-listbox)) (form (make-form))) (define (choice->item str) ;; Return the item that corresponds to STR. (match (find (match-lambda ((key . item) (string=? str (listbox-item->text item)))) keys) ((key . item) item) (#f (abort-to-prompt 'installer-step 'abort)))) (set-textbox-text logo-textbox (read-all logo)) (add-form-to-grid grid form #t) (make-wrapped-grid-window grid title) (receive (exit-reason argument) (run-form-with-clients form `(menu (title ,title) (text ,info-text) (items ,(map listbox-item->text listbox-items)))) (dynamic-wind (const #t) (lambda () (match exit-reason ('exit-component (let* ((entry (current-listbox-entry options-listbox)) (item (assoc-ref keys entry))) (match item ((text . proc) (proc))))) ('exit-fd-ready (let* ((choice argument) (item (choice->item choice))) (match item ((text . proc) (proc))))))) (lambda () (destroy-form-and-pop form)))))) (define (run-welcome-page logo) "Run a welcome page with the given textual LOGO displayed at the center of the page. Ask the user to choose between manual installation, graphical installation and reboot." (run-menu-page (G_ "GNU Guix install") (G_ "Welcome to GNU Guix system installer! You will be guided through a graphical installation program. If you are familiar with GNU/Linux and you want tight control over \ the installation process, you can instead choose manual installation. \ Documentation is accessible at any time by pressing Ctrl-Alt-F2.") logo #:listbox-items `((,(G_ "Graphical install using a terminal based interface") . ,(const #t)) (,(G_ "Install using the shell based process") . ,(lambda () ;; Switch to TTY3, where a root shell is available for shell based ;; install. The other root TTY's would have been ok too. (system* "chvt" "3") (run-welcome-page logo))) (,(G_ "Reboot") . ,(lambda () (newt-finish) (reboot)))) #:listbox-item->text car)) 2024-05-04gnu: aqbanking: Update to 6.5.4....* gnu/packages/gnucash (aqbanking): Update to 6.5.4. Change-Id: I8d10562e1fc8517bee946792ad1ac901a26137d5 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Steve George 2024-05-04gnu: gwenhywfar: Update to 5.10.2....* gnu/packages/gnucash.scm (gwenhywfar): Update to 5.10.2. [inputs]: add libxml2. [arguments]: <configure-flags>: Remove flag that's not recognised --with-openssl-includes; add --with-libxml2-code, --enable-system-certs and --disable-binreloc Change-Id: I4085779e3ed7ecb621dd3d0b5427e92962466033 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Steve George 2024-04-23gnu: gnucash: Update to 5.6....* gnu/packages/gnucash.scm (gnucash): Update to 5.6. Reviewed-by: Julian Flake <flake@uni-koblenz.de> Signed-off-by: Christopher Baines <mail@cbaines.net> Change-Id: I5fb5195f4f1a401dd66ebcdd7251cd14d83bb974 Andy Tai 2024-02-28gnu: gnucash: Update to 5.5....* gnu/packages/gnucash.scm (gnucash): Update to 5.5. (gnucash-docs): Update to 5.5. Change-Id: I3c188c952afde07fce80648a5f99c84648ec6a3a Efraim Flashner