summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-07-18 17:18:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-07-18 17:18:31 +0000
commit60642ca2e3ec60c9bc39ed820bd759e9a58d4d85 (patch)
treea262d4afaf8210dd3d1cf6fb4b8d187b253e4658
parent74e57fc68e455eb20d26ba781dc67588ea39d35c (diff)
downloaddrakx-backup-do-not-use-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.tar
drakx-backup-do-not-use-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.tar.gz
drakx-backup-do-not-use-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.tar.bz2
drakx-backup-do-not-use-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.tar.xz
drakx-backup-do-not-use-60642ca2e3ec60c9bc39ed820bd759e9a58d4d85.zip
no_comment
-rw-r--r--Makefile5
-rwxr-xr-xmake_boot_img2
-rw-r--r--perl-install/c/stuff.xs.pm25
-rw-r--r--perl-install/install2.pm12
-rw-r--r--perl-install/install_steps_gtk.pm16
-rw-r--r--perl-install/install_steps_interactive.pm3
-rw-r--r--perl-install/mouse.pm29
7 files changed, 68 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index 8f1eb4063..73d88b96a 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,6 @@ ARCH := $(patsubst sparc%,sparc,$(ARCH))
RELEASE_BOOT_IMG = hd.img cdrom.img network.img
ifeq (i386,$(ARCH))
-BOOT_IMG = pcmcia_ks.img network_ks.img
RELEASE_BOOT_IMG += pcmcia.img
endif
ifeq (sparc,$(ARCH))
@@ -22,7 +21,7 @@ UPLOAD_DEST = $(UPLOAD_DEST_)/cooker
UPLOAD_DEST_CONTRIB = $(UPLOAD_DEST_)/contrib
UPLOAD_SPARC_DEST = /mnt/BIG/distrib/sparc
-.PHONY: dirs $(FLOPPY_IMG) install network_ks.rdz pcmcia_ks.rdz
+.PHONY: dirs $(FLOPPY_IMG) install
install: build autoboot rescue
for i in images misc Mandrake Mandrake/base; do install -d $(ROOTDEST)/$$i ; done
@@ -57,7 +56,7 @@ rescue: modules
network_ks.rdz pcmcia_ks.rdz: %_ks.rdz: %.rdz
-network.rdz pcmcia.rdz hd.rdz cdrom.rdz live.rdz tftp.rdz tftprd.rdz network64.rdz hd64.rdz cdrom64.rdz live64.rdz tftp64.rdz tftprd64.rdz blank.rdz: dirs modules
+$(BOOT_RDZ): dirs modules
./make_boot_img $@ $(@:%.rdz=%)
$(BOOT_IMG): %.img: %.rdz
diff --git a/make_boot_img b/make_boot_img
index 1b0ed51b3..61013cc2b 100755
--- a/make_boot_img
+++ b/make_boot_img
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-@ARGV >= 2 or die "usage: $0 <image> cdrom|hd|network|blank|network_ks|pcmcia|live|tftp|tftprd\n";
+@ARGV >= 2 or die "usage: $0 <image> cdrom|hd|network|blank|pcmcia|live|tftp|tftprd\n";
use Config;
Config->import;
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index 3967392fb..87ee1c98e 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -27,6 +27,7 @@ print '
#include <gdk/gdkx.h>
#include <X11/Xlib.h>
#include <X11/extensions/xf86misc.h>
+#include <term.h>
#define SECTORSIZE 512
';
@@ -55,6 +56,22 @@ FD_t fd2FD_t(int fd) {
return f;
}
+void initIMPS2() {
+ unsigned char imps2_s1[] = { 243, 200, 243, 100, 243, 80, };
+ unsigned char imps2_s2[] = { 246, 230, 244, 243, 100, 232, 3, };
+
+ int fd = open("/dev/cdrom", O_WRONLY);
+ if (fd < 0) return;
+
+ write (fd, imps2_s1, sizeof (imps2_s1));
+ usleep (30000);
+ write (fd, imps2_s2, sizeof (imps2_s2));
+ usleep (30000);
+ tcflush (fd, TCIFLUSH);
+ tcdrain(fd);
+}
+
+
';
print '
@@ -81,18 +98,20 @@ Xtest(display)
RETVAL
void
-setMouseMicrosoft(display)
+setMouseLive(display, type)
char *display
+ int type
CODE:
{
XF86MiscMouseSettings mseinfo;
Display *d = XOpenDisplay(display);
if (d) {
if (XF86MiscGetMouseSettings(d, &mseinfo) == True) {
- mseinfo.type = MTYPE_MICROSOFT;
- mseinfo.flags = 128;
+ mseinfo.type = type;
+ mseinfo.flags |= 128;
XF86MiscSetMouseSettings(d, &mseinfo);
XFlush(d);
+ if (type == MTYPE_IMPS2) initIMPS2();
}
}
}
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 5fbeace0f..9bbad4da8 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -304,7 +304,7 @@ sub partitionDisks {
if (cat_("/proc/mounts") =~ m|/\w+/(\S+)\s+/tmp/hdimage\s+(\S+)|) {
$stage1_hd = { dev => $1, fs => $2 };
install_any::getFile("XXX"); #- close still opened filehandle
- fs::umount("/tmp/hdimage");
+ eval { fs::umount("/tmp/hdimage") };
}
$::o->{steps}{formatPartitions}{done} = 0;
eval { fs::umount_all($o->{fstab}, $o->{prefix}) } if $o->{fstab} && !$::testing;
@@ -326,7 +326,7 @@ sub partitionDisks {
unless ($::testing) {
$o->rebootNeeded foreach grep { $_->{rebootNeeded} } @{$o->{hds}};
}
- fs::mount($stage1_hd->{dev}, "/tmp/hdimage", $stage1_hd->{fs}) if $stage1_hd;
+ eval { fs::mount($stage1_hd->{dev}, "/tmp/hdimage", $stage1_hd->{fs}) } if $stage1_hd;
$o->{fstab} = [ fsedit::get_fstab(@{$o->{hds}}, $o->{raid}) ];
fsedit::get_root($o->{fstab}) or die
@@ -459,7 +459,7 @@ sub configureTimezone {
add2hash($o->{timezone}, { timezone::read($f) });
}
$o->{timezone}{timezone} ||= timezone::bestTimezone(lang::lang2text($o->{lang}));
- $o->{timezone}{UTC} = !$::beginner && !grep { isFat($_) } @{$o->{fstab}} unless exists $o->{timezone}{UTC};
+ $o->{timezone}{UTC} = !$::beginner && !grep { isFat($_) || isNT($_) } @{$o->{fstab}} unless exists $o->{timezone}{UTC};
$o->timeConfig($f, $clicked);
}
#------------------------------------------------------------------------------
@@ -632,11 +632,7 @@ sub main {
if ($::auto_install) {
require install_steps_auto_install;
- if ($::auto_install eq 'floppy') {
- eval { $o = $::o = install_any::loadO($o, "floppy") } if $@;
- } else {
- eval { $o = $::o = install_any::loadO($o, $::auto_install) };
- }
+ eval { $o = $::o = install_any::loadO($o, $::auto_install) };
if ($@) {
log::l("error using auto_install, continuing");
undef $::auto_install;
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 7595fd5e9..74cae0157 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -25,6 +25,7 @@ use interactive_gtk;
use install_any;
use diskdrake;
use log;
+use mouse;
use help;
use lang;
@@ -177,15 +178,15 @@ sub selectInstallClass1 {
#------------------------------------------------------------------------------
sub selectMouse {
my ($o, $force) = @_;
- my $old_dev = $o->{mouse}{device};
$o->SUPER::selectMouse($force);
- my $dev = $o->{mouse}{device};
- if ($old_dev ne $dev && $dev =~ /ttyS/ && !$::testing) {
+ if (!$::testing) {
log::l("telling X server to use another mouse");
- eval { commands::modprobe("serial") };
- symlinkf($dev, "/dev/mouse");
- c::setMouseMicrosoft($ENV{DISPLAY});
+ eval { commands::modprobe("serial") } if $o->{mouse}{device} =~ /ttyS/;
+ symlinkf($o->{mouse}{device}, "/dev/mouse");
+ my $id = mouse::xmouse2xId($o->{mouse}{XMOUSETYPE});
+ log::l("XMOUSETYPE: $o->{mouse}{XMOUSETYPE} = $id");
+ c::setMouseLive($ENV{DISPLAY}, $id);
}
}
@@ -895,8 +896,7 @@ EndSection
Section "Pointer"
Protocol "$mouse_type"
Device "/dev/mouse"
- Emulate3Buttons
- Emulate3Timeout 50
+ ZAxisMapping 4 5
EndSection
$wacom
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 1307ae8b6..91abcdc20 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -982,7 +982,8 @@ _("Do you want to generate an auto install floppy for linux replication?"), $flo
output "$workdir/ks.cfg", install_any::generate_ks_cfg($o);
output "$workdir/boot.msg", "\n7m",
"!! If you press enter, an auto-install is going to start.
- All data on this computer is going to be lost !!
+ ALL data on this computer is going to be lost,
+ including any Windows partitions !!
", "7m\n";
local $o->{partitioning}{clearall} = 1;
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 5acd6dcd3..239a3de17 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -66,6 +66,35 @@ map_index {
$mouses[$::i] = \%l;
} @mouses;
+#- xmousetypes must be sorted as found in /usr/include/X11/extensions/xf86misc.h
+#- so that first mean "0", etc
+my @xmousetypes = (
+ "Microsoft",
+ "MouseSystems",
+ "MMSeries",
+ "Logitech",
+ "BusMouse",
+ "Logitech",
+ "PS/2",
+ "MMHittab",
+ "GlidePoint",
+ "IntelliMouse",
+ "ThinkingMouse",
+ "IMPS/2",
+ "ThinkingMousePS/2",
+ "MouseManPlusPS/2",
+ "GlidePointPS/2",
+ "NetMousePS/2",
+ "NetScrollPS/2",
+ "SysMouse",
+ "Auto",
+ "AceCad",
+ "WSMouse",
+ "USB",
+#MouseMan,
+);
+sub xmouse2xId { my ($id) = @_; my $i; map_index { $_ eq $id and $i = $::i } @xmousetypes; $i }
+
sub names { map { $_->{FULLNAME} } @mouses }
sub name2mouse {