summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/README5
-rw-r--r--perl-install/common.pm28
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/my_gtk.pm9
-rw-r--r--perl-install/share/list1
5 files changed, 40 insertions, 5 deletions
diff --git a/docs/README b/docs/README
index 93f62004d..a6b691be6 100644
--- a/docs/README
+++ b/docs/README
@@ -259,9 +259,10 @@ to give it the complete path.
********************************************************************************
* Making screenshots ***********************************************************
********************************************************************************
-On a test machine, make a network install, switch to console (ctrl-alt-F2), enter:
-% xhost+
+1. easy solution: press "F2"!
+2. On a test machine, make a network install, switch to console (ctrl-alt-F2), enter:
+% xhost+
then, on another computer:
% DISPLAY=test_machine:0 xwd -root | convert - screenshot.png
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 282112275..f39cda588 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -138,6 +138,34 @@ sub group_n_lm {
@l
}
+sub screenshot_dir__and_move {
+ my ($dir1, $dir2) = ("$::o->{prefix}/root", '/tmp/stage2');
+ if (-e $dir1) {
+ if (-e "$dir2/DrakX-screenshots") {
+ cp_af("$dir2/DrakX-screenshots", $dir1);
+ rm_rf("$dir2/DrakX-screenshots");
+ }
+ $dir1;
+ } else {
+ $dir2;
+ }
+}
+
+sub take_screenshot {
+ my ($in) = @_;
+ my $dir = screenshot_dir__and_move() . '/DrakX-screenshots';
+ my $warn;
+ if (!-e $dir) {
+ mkdir $dir or $in->ask_warn('', _("Can't make screenshots before partitioning")), return;
+ $warn = 1;
+ }
+ my $nb = 1;
+ $nb++ while -e "$dir/$nb.png";
+ system("fb2png /dev/fb0 $dir/$nb.png 0");
+
+ $in->ask_warn('', _("Screenshots will be available after install in %s", "/root/DrakX-screenshots")) if $warn;
+}
+
#-######################################################################################
#- Wonderful perl :(
#-######################################################################################
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 2ad1297b9..be04f5b4f 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -184,6 +184,8 @@ sub formatPartitions {
home mnt tmp var var/tmp var/lib var/lib/rpm var/lib/urpmi);
mkdir "$o->{prefix}/$_", 0700 foreach qw(root root/tmp);
+ common::screenshot_dir__and_move();
+
substInFile { s/%_excludedocs.*//; $_ .= "%_excludedocs yes\n" if eof && $o->{excludedocs} } "$o->{prefix}/etc/rpm/macros";
any::rotate_logs($o->{prefix});
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index b13d88a24..6679a1ba0 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -680,13 +680,16 @@ sub _create_window($$) {
});
}
$w->signal_connect(key_press_event => sub {
- my $d = ${{ 65470 => 'help',
- 65481 => 'next',
- 65480 => 'previous' }}{$_[1]{keyval}};
+ my $d = ${{ 0xffbe => 'help',
+ 0xffbf => 'screenshot',
+ 0xffc9 => 'next',
+ 0xffc8 => 'previous' }}{$_[1]{keyval}};
if ($d eq "help") {
require install_gtk;
install_gtk::create_big_help($::o);
+ } elsif ($::isInstall && $d eq 'screenshot') {
+ common::take_screenshot($o);
} elsif (chr($_[1]{keyval}) eq 'e' && $_[1]{state} & 8) {
log::l("Switching to " . ($::expert ? "beginner" : "expert"));
$::expert = !$::expert;
diff --git a/perl-install/share/list b/perl-install/share/list
index 5088abc34..96cf569e9 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -20,6 +20,7 @@
/sbin/modinfo
/usr/X11R6/lib/modules/xf86Wacom.so
/usr/bin/bzip2
+/usr/bin/fb2png
/usr/bin/packdrake
/usr/bin/parsehdlist
/usr/bin/perl