summaryrefslogtreecommitdiffstats
path: root/perl-install/install2.pm
Commit message (Expand)AuthorAgeFilesLines
* (main): in oem, configureX automaticPascal Rigaux2000-11-071-1/+1
* (main): $::oem is now global :-( (needed in install_steps.pm)Pascal Rigaux2000-11-071-3/+3
* (formatPartitions): formatMountPartitions done even in upgradePascal Rigaux2000-11-061-5/+3
* (main): set $o->{partitioning}{use_existing_root} in oemPascal Rigaux2000-11-061-0/+1
* add a flag to allow by default formating /Francois Pons2000-11-061-0/+1
* *** empty log message ***Francois Pons2000-10-061-3/+3
* no_commentPascal Rigaux2000-10-051-3/+3
* *** empty log message ***Francois Pons2000-10-031-1/+1
* no_commentPascal Rigaux2000-10-021-4/+4
* no_commentPascal Rigaux2000-10-021-1/+1
* no_commentPascal Rigaux2000-09-281-2/+0
* no_commentPascal Rigaux2000-09-271-1/+0
* no_commentPascal Rigaux2000-09-271-4/+4
* *** empty log message ***Pascal Rigaux2000-09-261-18/+17
* no_commentPascal Rigaux2000-09-251-3/+5
* *** empty log message ***Francois Pons2000-09-251-6/+1
* no_commentPascal Rigaux2000-09-231-0/+1
* no_commentPascal Rigaux2000-09-221-1/+4
* *** empty log message ***Francois Pons2000-09-221-20/+6
* no_commentPascal Rigaux2000-09-221-0/+1
* no_commentPascal Rigaux2000-09-211-1/+3
* no_commentPascal Rigaux2000-09-191-0/+1
* no_commentPascal Rigaux2000-09-191-4/+4
* no_commentPascal Rigaux2000-09-151-1/+1
* no_commentPascal Rigaux2000-09-151-1/+7
* no_commentPascal Rigaux2000-09-141-1/+1
* no_commentPascal Rigaux2000-09-141-1/+1
* no_commentPascal Rigaux2000-09-141-0/+1
* Add VISOR=no by default to /etc/sysconfig/usb.Chmouel Boudjnah2000-09-131-0/+1
* no_commentPascal Rigaux2000-09-131-12/+14
* no_commentPascal Rigaux2000-09-121-3/+7
* *** empty log message ***Francois Pons2000-09-121-1/+2
* *** empty log message ***Francois Pons2000-09-121-14/+3
* no_commentPascal Rigaux2000-09-111-1/+0
* add USB=yes because if no then no load USB, move ZIP to STORAGE.Chmouel Boudjnah2000-09-081-2/+3
* no_commentPascal Rigaux2000-09-071-0/+1
* no_commentPascal Rigaux2000-09-071-1/+1
* no_commentPascal Rigaux2000-09-061-8/+9
* *** empty log message ***Francois Pons2000-09-061-2/+2
* no_commentPascal Rigaux2000-09-061-2/+2
* no_commentPascal Rigaux2000-09-041-1/+2
* no_commentPascal Rigaux2000-09-011-1/+1
* no_commentPascal Rigaux2000-08-311-2/+2
* *** empty log message ***Francois Pons2000-08-311-28/+0
* no_commentPascal Rigaux2000-08-301-1/+0
* no_commentPascal Rigaux2000-08-281-0/+2
* *** empty log message ***Francois Pons2000-08-241-13/+34
* no_commentPascal Rigaux2000-08-211-15/+16
* no_commentPascal Rigaux2000-08-181-0/+1
* no_commentPascal Rigaux2000-08-181-4/+4
class="hl str">',', $1 if /NORMAL.*\{(.*)\}/; } } } } #------------------------------------------------------------------------------ sub load_font { my ($o) = @_; if (lang::text_direction_rtl()) { Gtk2::Widget->set_default_direction('rtl'); my ($x, $y) = $::WizardWindow->get_position; my ($width) = $::WizardWindow->get_size; $::WizardWindow->move($::rootwidth - $width - $x, $y); } Gtk2::Rc->parse_string(q( style "default-font" { font_name = ") . lang::l2pango_font($o->{locale}{lang}) . q(" } widget "*" style "default-font" )); } #------------------------------------------------------------------------------ sub default_theme { my ($o) = @_; $o->{meta_class} eq 'desktop' ? 'blue' : $o->{meta_class} eq 'firewall' ? 'mdk-Firewall' : $o->{simple_themes} || $o->{vga16} ? 'blue' : 'galaxy'; } sub install_theme { my ($o) = @_; $o->{theme} ||= default_theme($o); load_rc($o, "themes-$o->{theme}"); load_font($o); gtkset_background(@background) unless $::live; #- || testing; } #------------------------------------------------------------------------------ sub create_help_window { my ($o) = @_; my $w; if ($w = $o->{help_window}) { $w->{window}->foreach(sub { $_[0]->destroy }, undef); } else { $w = $o->{help_window} = bless {}, 'ugtk2'; $w->{rwindow} = $w->{window} = Gtk2::Window->new('toplevel'); $w->{rwindow}->set_uposition($::rootwidth - $::helpwidth, $::rootheight - $::helpheight); $w->{rwindow}->set_size_request($::helpwidth, $::helpheight); $w->{rwindow}->set_title('skip'); }; gtkadd($w->{window}, create_scrolled_window($o->{help_window_text} = Gtk2::TextView->new)); $w->show; } #------------------------------------------------------------------------------ my %steps; sub create_steps_window { my ($o) = @_; return if $::stepswidth == 0; $o->{steps_window} and $o->{steps_window}->destroy; my $w = bless {}, 'ugtk2'; $w->{rwindow} = $w->{window} = Gtk2::Window->new('toplevel'); $w->{rwindow}->set_uposition(lang::text_direction_rtl() ? ($::rootwidth - $::stepswidth - 8) : 8, 160); $w->{rwindow}->set_size_request($::stepswidth, -1); $w->{rwindow}->set_name('Steps'); $w->{rwindow}->set_title('skip'); $steps{$_} ||= gtkcreate_pixbuf("steps_$_") foreach qw(on off); gtkpack__(my $vb = Gtk2::VBox->new(0, 3), $steps{inst} = Gtk2::Label->new(N("System installation")), ''); foreach (grep { !eval $o->{steps}{$_}{hidden} } @{$o->{orderedSteps}}) { $_ eq 'setRootPassword' and gtkpack__($vb, '', '', $steps{conf} = Gtk2::Label->new(N("System configuration")), ''); $steps{steps}{$_} = { img => gtkcreate_img('steps_off.png'), txt => Gtk2::Label->new(translate($o->{steps}{$_}{text})) }; gtkpack__($vb, gtkpack__(Gtk2::HBox->new(0, 7), $steps{steps}{$_}{img}, $steps{steps}{$_}{txt})); } gtkadd($w->{window}, $vb); $w->show; $o->{steps_window} = $w; } sub update_steps_position { my ($o) = @_; return if !$steps{steps}; my $last_step; foreach (@{$o->{orderedSteps}}) { exists $steps{steps}{$_} or next; if ($o->{steps}{$_}{entered} && !$o->{steps}{$_}{done}) { $steps{steps}{$_}{img}->set_from_pixbuf($steps{on}); $last_step and $steps{steps}{$last_step}{img}->set_from_pixbuf($steps{off}); return; } $last_step = $_; } } #------------------------------------------------------------------------------ sub create_logo_window { my ($o) = @_; return if $::logowidth == 0; gtkdestroy($o->{logo_window}); my $w = bless {}, 'ugtk2'; $w->{rwindow} = $w->{window} = Gtk2::Window->new('toplevel'); $w->{rwindow}->set_uposition(0, 0); $w->{rwindow}->set_size_request($::logowidth, $::logoheight); $w->{rwindow}->set_name("logo"); $w->{rwindow}->set_title('skip'); $w->show; my $file = $o->{meta_class} eq 'desktop' ? "logo-mandrake-Desktop.png" : "logo-mandrake.png"; $o->{meta_class} eq 'firewall' and $file = "logo-mandrake-Firewall.png"; -r $file or $file = "$ENV{SHARE_PATH}/$file"; -r $file and gtkadd($w->{window}, gtkcreate_img($file)); $o->{logo_window} = $w; } #------------------------------------------------------------------------------ sub init_gtk() { symlink("/tmp/stage2/etc/$_", "/etc/$_") foreach qw(gtk-2.0 pango fonts); Gtk2->init(\@ARGV); Gtk2->set_locale; } #------------------------------------------------------------------------------ sub init_sizes() { ($::rootwidth, $::rootheight) = (Gtk2::Gdk->screen_width, Gtk2::Gdk->screen_height); $::live and $::rootheight -= 80; #- ($::rootheight, $::rootwidth) = (min(768, $::rootheight), min(1024, $::rootwidth)); $::stepswidth = $::rootwidth <= 640 ? 0 : 160; ($::logowidth, $::logoheight) = $::rootwidth <= 640 ? (0, 0) : (500, 40); ($::helpwidth, $::helpheight) = ($::rootwidth - $::stepswidth, 0); ($::windowwidth, $::windowheight) = ($::rootwidth - $::stepswidth, $::rootheight - $::helpheight - $::logoheight); } #------------------------------------------------------------------------------ sub createXconf { my ($file, $mouse_type, $mouse_dev, $wacom_dev) = @_; $mouse_type = 'IMPS/2' if $mouse_type eq 'ExplorerPS/2'; devices::make("/dev/kbd") if arch() =~ /^sparc/; #- used by Xsun style server. symlinkf(devices::make($mouse_dev), "/dev/mouse") if $mouse_dev ne 'none'; #- needed for imlib to start on 8-bit depth visual. symlink("/tmp/stage2/etc/imrc", "/etc/imrc"); symlink("/tmp/stage2/etc/im_palette.pal", "etc/im_palette.pal"); if (arch() =~ /^ia64/) { require Xconfig::card; my ($card) = Xconfig::card::probe(); Xconfig::card::add_to_card__using_Cards($card, $card->{type}) if $card && $card->{type}; output($file, sprintf(<<'END', $mouse_type, $card->{driver})); Section "Files" FontPath "/usr/X11R6/lib/X11/fonts:unscaled" EndSection Section "InputDevice" Identifier "Keyboard" Driver "Keyboard" Option "XkbDisable" Option "XkbModel" "pc105" Option "XkbLayout" "" EndSection Section "InputDevice" Identifier "Mouse" Driver "mouse" Option "Protocol" "%s" Option "Device" "/dev/mouse" EndSection Section "Monitor" Identifier "monitor" HorizSync 31.5-35.5 VertRefresh 50-70 EndSection Section "Device" Identifier "device" Driver "%s" EndSection Section "Screen" Identifier "screen" Device "device" Monitor "monitor" DefaultColorDepth 16 Subsection "Display" Depth 16 Modes "800x600" "640x480" EndSubsection EndSection Section "ServerLayout" Identifier "layout" Screen "screen" InputDevice "Mouse" "CorePointer" InputDevice "Keyboard" "CoreKeyboard" EndSection END } else { my $wacom; if ($wacom_dev) { my $dev = devices::make($wacom_dev); $wacom = <<END; Section "Module" Load "xf86Wacom.so" EndSection Section "XInput" SubSection "WacomStylus" Port "$dev" AlwaysCore EndSubSection SubSection "WacomCursor" Port "$dev" AlwaysCore EndSubSection SubSection "WacomEraser" Port "$dev" AlwaysCore EndSubSection EndSection END } output($file, <<END); Section "Files" FontPath "/usr/X11R6/lib/X11/fonts:unscaled" EndSection Section "Keyboard" Protocol "Standard" AutoRepeat 0 0 LeftAlt Meta RightAlt Meta ScrollLock Compose RightCtl Control XkbDisable EndSection Section "Pointer" Protocol "$mouse_type" Device "/dev/mouse" ZAxisMapping 4 5 EndSection $wacom Section "Monitor" Identifier "monitor" HorizSync 31.5-35.5 VertRefresh 50-70 ModeLine "640x480" 25.175 640 664 760 800 480 491 493 525 ModeLine "640x480" 28.3 640 664 760 800 480 491 493 525 ModeLine "800x600" 36 800 824 896 1024 600 601 603 625 EndSection Section "Device" Identifier "Generic VGA" Chipset "generic" EndSection Section "Device" Identifier "svga" EndSection Section "Screen" Driver "vga16" Device "Generic VGA" Monitor "monitor" Subsection "Display" Modes "640x480" ViewPort 0 0 EndSubsection EndSection Section "Screen" Driver "fbdev" Device "Generic VGA" Monitor "monitor" Subsection "Display" Depth 16 Modes "default" ViewPort 0 0 EndSubsection EndSection Section "Screen" Driver "svga" Device "svga" Monitor "monitor" Subsection "Display" Depth 16 Modes "800x600" "640x480" ViewPort 0 0 EndSubsection EndSection Section "Screen" Driver "accel" Device "svga" Monitor "monitor" Subsection "Display" Depth 16 Modes "800x600" "640x480" ViewPort 0 0 EndSubsection EndSection END } } 1;