Prelim: Text mode copy complist to /var/tmp

This commit is contained in:
Rory Fewell
2025-07-07 22:28:14 +01:00
parent c5d7089632
commit 708c93a5d8
4 changed files with 234 additions and 3 deletions

View File

@@ -1,5 +1,160 @@
[BaseSystem]
Libs=@WSETUP_LIBLIST@
OurPackages=wintc-setup-gui,wintc-theme-native,wintc-cursor-theme-standard-with-shadow,wintc-bootvid
DistPackagesDeb=lightdm,xfwm4,xfconf,plymouth
# FIXME: Other distro packags here
DistPackagesDeb=xfwm4,xfconf,plymouth
# FIXME: Other distro packages here
[ComponentRoot]
TopLevelGroups=Accessories,DevOnly,Shell,VisualStyles
AlwaysInstall=wintc-build-tag,wintc-regsvc,wintc-winver
#
# Group metadata
#
[Group.Accessories]
Name=Accessories
Components=Notepad,Taskmgr
SubGroups=
[Group.DevOnly]
Name=Developer
Components=Smss
SubGroups=
[Group.Shell]
Name=System Shell
Components=Desktop,ExitWin,Explorer,ShellRun,Taskband
SubGroups=ShellCpl,ShellExt
[Group.ShellCpl]
Name=Control Panel Applets
Components=CplDesk,CplPrinters,CplSysdm
SubGroups=
[Group.ShellExt]
Name=Shell Extensions
Components=ExtZip
SubGroups=
[Group.Personalisation]
Name=Personalisation
Components=FontsXP,IconsLuna,SoundsXP
SubGroups=VisualStyles
[Group.VisualStyles]
Name=Visual Styles
Components=ThemeNative,ThemePro,ThemeLunaBlue,ThemeLunaMetallic,ThemeLunaHomstead,ThemeZune
SubGroups=
#
# Component metdata
#
[Component.Notepad]
Name=Notepad
Packages=wintc-notepad
Description=The Notepad text editor.
[Component.Taskmgr]
Name=Task Manager
Packages=wintc-taskmgr
Description=Monitor and manage system processes and resources.
[Component.Smss]
Name=WinTC Session Manager
Packages=wintc-smss
Description=Provides a custom WinTC session that can be used instead of xfce4-session.
[Component.Desktop]
Name=Desktop
Packages=wintc-desktop
Description=The Windows desktop, replaces xfdesktop.
[Component.ExitWin]
Name=Exit Windows Stub
Packages=wintc-exitwin
Description=Launches the end session dialog, replaces xfce4-session-logout.
[Component.Explorer]
Name=Explorer
Packages=wintc-explorer
Description=The Windows Explorer file manager.
[Component.ShellRun]
Name=Run Dialog Stub
Packages=wintc-shell-run
Description=Launches the Run dialog, replaces xfce4-appfinder.
[Component.Taskband]
Name=Taskbar
Packages=wintc-taskband
Description=The Windows taskbar, replaces xfce4-panel.
[Component.CplDesk]
Name=Desktop Properties
Packages=wintc-cpl-desk
Description=The Desktop Properties applet.
[Component.CplPrinters]
Name=Printers and Faxes
Packages=libwintc-cpl-printers
Description=The Printers & Faxes shell extension.
[Component.CplSysdm]
Name=System Properties
Packages=wintc-cpl-sysdm
Description=The System Properties applet.
[Component.ExtZip]
Name=ZIP Files Extension
Packages=libwintc-shext-zip
Description=Support for ZIP files within the Windows shell.
[Component.FontsXP]
Name=Fonts (Windows XP)
Packages=wintc-fonts-xp
Description=The Windows XP font bundle.
[Component.IconsLuna]
Name=Icons (Windows XP)
Packages=wintc-icon-theme-luna
Description=The Windows XP icon set.
[Component.SoundsXP]
Name=Sounds (Windows XP)
Packages=wintc-sound-theme-xp
Description=The default Windows XP sound scheme.
[Component.Wallpapers]
Name=Desktop Wallpapers
Packages=wintc-wallpapers
Description=The collection of included desktop wallpapers.
[Component.ThemeNative]
Name=Windows Classic
Packages=wintc-theme-native
Description=The Windows Classic visual style.
[Component.ThemePro]
Name=Watercolor
Packages=wintc-theme-professional
Description=The Watercolor visual style.
[Component.ThemeLunaBlue]
Name=Windows XP style (Blue)
Packages=wintc-theme-luna-blue
Description=The Windows XP style (Blue) visual style.
[Component.ThemeLunaMetallic]
Name=Windows XP style (Silver)
Packages=wintc-theme-luna-metallic
Description=The Windows XP style (Silver) visual style.
[Component.ThemeLunaHomestead]
Name=Windows XP style (Olive Green)
Packages=wintc-theme-luna-homestead
Description=The Windows XP style (Olive Green) visual style.
[Component.ThemeZune]
Name=Zune style
Packages=wintc-theme-zune
Description=The Zune visual style.

View File

@@ -29,6 +29,18 @@ then
fi
fi
# Spawn the working dir for setup
#
WSETUP_STATE_ROOT="/var/tmp/.wintc-setup"
if [ -d "$WSETUP_STATE_ROOT" ]
then
rm -rf $WSETUP_STATE_ROOT
fi
mkdir -p $WSETUP_STATE_ROOT
export WSETUP_STATE_ROOT
# Inspect the distro
#
. "$SETUPROOT/setup/dal/detect.sh"

View File

@@ -11,6 +11,7 @@ def main(stdscr):
wsetup_step_welcome,
wsetup_step_eula,
wsetup_step_confirm_system,
wsetup_step_prep_install,
wsetup_step_install_base,
wsetup_step_prepare_chain_to_gui
]

View File

@@ -1,6 +1,7 @@
import curses
import math
import os
import shutil
import subprocess
from wsetup_brand import *
@@ -216,6 +217,59 @@ def wsetup_step_confirm_system(stdscr):
user_option == ord("\r"):
return 6
def wsetup_step_prep_install(stdscr):
wsetup_screen_clear(stdscr)
# Check package manager works
#
pkgcmd = ""
pkgfmt = os.environ.get("WSETUP_DIST_PKGFMT")
wsetup_screen_write_instructions(
stdscr,
[
"Updating package manager..."
]
)
stdscr.refresh()
if pkgfmt == "deb":
pkgcmd = "apt update"
else:
raise Exception(f"No install command for format {pkgfmt}")
try:
subprocess.run(
pkgcmd.split(),
check=True
)
except:
# FIXME: Should display error screen when one exists
raise Exception(f"Package manager is unhappy, '{pkgcmd}' failed")
# Copy complist to tmpdir
#
setup_root = os.environ.get("SETUPROOT")
wsetup_screen_write_instructions(
stdscr,
[
"Creating list of files to be copied..."
]
)
try:
shutil.copy(
f"{setup_root}/setup/complist.ini",
os.environ.get("WSETUP_STATE_ROOT")
)
except:
# FIXME: Ditto
raise Exception(f"Failed to copy complist.ini to setup state dir")
return 7
def wsetup_step_install_base(stdscr):
wsetup_screen_clear(stdscr)
@@ -251,6 +305,13 @@ def wsetup_step_install_base(stdscr):
"Setup is copying files...",
curses.color_pair(COLOR_PAIR_NORMAL_TEXT)
)
wsetup_screen_write_direct(
stdscr,
box_y + 2,
wsetup_screen_get_scaled_x(stdscr, 40) - 3,
"0%",
curses.color_pair(COLOR_PAIR_NORMAL_TEXT)
)
# Progress box
#
@@ -267,6 +328,8 @@ def wsetup_step_install_base(stdscr):
progbox_w
)
stdscr.refresh()
# Install the base packages to get to phase 2
#
pkgcmd = ""
@@ -339,7 +402,7 @@ def wsetup_step_install_base(stdscr):
stdscr.refresh()
return 7
return 8
def wsetup_step_prepare_chain_to_gui(stdscr):
wsetup_screen_clear(stdscr)