From 3237592af5967731e85294ff611ad2c62d58a222 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 3 Sep 2004 06:26:47 +0000 Subject: - we need unicode_start, which need kbd_mode and a real "echo" command - initialize newt (and so slang) with a fake en_US.UTF-8 locale during install (and it works better when slang does its setlocale, i don't know why) --- perl-install/Makefile | 3 +++ perl-install/Newt/Newt.xs | 5 +++-- perl-install/interactive/newt.pm | 11 ++++++++++- perl-install/share/list | 2 ++ 4 files changed, 18 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/Makefile b/perl-install/Makefile index 122fabfe1..e6cb9e2b6 100644 --- a/perl-install/Makefile +++ b/perl-install/Makefile @@ -149,6 +149,9 @@ endif cd $(DEST)/usr/bin ; mv insmod insmod_ rmdir $(DEST)/bin $(DEST)/sbin + perl -pe 's!^echo!/usr/bin/echo!' /bin/unicode_start > $(DEST)/usr/bin/unicode_start + chmod a+x $(DEST)/usr/bin/unicode_start + perl -ane 'symlink "$$F[1]", "$(DEST)/usr/bin/$$F[0]"' share/aliases ifeq (i386,$(ARCH)) diff --git a/perl-install/Newt/Newt.xs b/perl-install/Newt/Newt.xs index fee23d388..caf961692 100644 --- a/perl-install/Newt/Newt.xs +++ b/perl-install/Newt/Newt.xs @@ -31,9 +31,10 @@ DESTROY() } int -newtInit() +newtInit(setlocale) + int setlocale CODE: - SLsmg_Setlocale = 0; + SLsmg_Setlocale = setlocale; newtInit(); int diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm index 5a1f22e5d..c9da9c92a 100644 --- a/perl-install/interactive/newt.pm +++ b/perl-install/interactive/newt.pm @@ -15,7 +15,16 @@ my ($width, $height) = (80, 25); my @wait_messages; sub new { - Newt::Init(); + if ($::isInstall) { + system('unicode_start'); #- don't use run_program, we must do it on current console + { + local $ENV{LC_CTYPE} = "en_US.UTF-8"; + Newt::Init(1); + } + c::setlocale(); + } else { + Newt::Init(0); + } Newt::Cls(); Newt::SetSuspendCallback(); ($width, $height) = Newt::GetScreenSize(); diff --git a/perl-install/share/list b/perl-install/share/list index 73e593dce..9d90eae80 100644 --- a/perl-install/share/list +++ b/perl-install/share/list @@ -1,6 +1,7 @@ /bin/ash /bin/consolechars /bin/cpio +/bin/echo /bin/gzip /LIB/libnss_nis.so.2 /LIB/libnss_files.so.2 @@ -26,6 +27,7 @@ /sbin/modinfo /usr/bin/bzip2 /usr/bin/fb2png +/usr/bin/kbd_mode /usr/bin/packdrake /usr/bin/parsehdlist /usr/bin/perl -- cgit v1.2.1