diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-01-06 16:20:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-01-06 16:20:52 +0000 |
commit | 2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1 (patch) | |
tree | 1a4b617866229fab81835f368ad6e9863461b3fc /perl-install/install_any.pm | |
parent | 36772d0e48af0e3fd74f3255f842a5b98f90f55b (diff) | |
download | drakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.tar drakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.tar.gz drakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.tar.bz2 drakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.tar.xz drakx-backup-do-not-use-2e45ccff1d73c392c7c6480b3c5d6ffdd9f0a5c1.zip |
- move some install specific code out of ugtk2.pm into install_gtk.pm
- move some install specific code out of common.pm into install_any.pm
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index c995836e0..3042f34f8 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -1500,6 +1500,34 @@ sub X_options_from_o { }; } +sub screenshot_dir__and_move() { + my ($dir1, $dir2) = ("$::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('', N("Can not 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('', N("Screenshots will be available after install in %s", "/root/DrakX-screenshots")) if $warn; +} + sub copy_advertising { my ($o) = @_; |