aboutsummaryrefslogtreecommitdiffstats
path: root/transfugdrake
blob: d7dd9643ffaeb970eca9904825b95b0424bd0778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#! /usr/bin/perl
# $Id$

#
# Yves Duret (yduret at mandrakesoft.com)
#
# Copyright 2001 MandrakeSoft
#
# This software may be freely redistributed under the terms of the GNU
# public license.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

use lib q(/usr/lib/libDrakX);

use common qw(:common :file :functional :system);
use interactive;
use standalone;
#use log;
use my_gtk qw(:helpers :wrappers :ask);
use netconnect;
use detect_devices;

$::isInstall and die "Not supported during install.\n";


$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;

local $_ = join '', @ARGV;

/-h/ and die "usage: transfug [--version]\n";
/-version/ and die 'transfug '."\n";
$::isEmbedded or $::isWizard = 1;
$::Wizard_pix_up = "wiz_drakgw.png";
$::Wizard_title = _("Transfugdrake");
$::direct = /-direct/;

my $in = interactive::vnew('su');
if (-e "/mnt/windows") {$win="/mnt/windows";}
elsif (-e "/mnt/win_c") {$win="/mnt/win_c";}
else { 
    print "no windows partitions ?\n";
    $in->ask_warn(_("No windows(c)(r)(tm) on your system!"), 
		  _("No windows on your system. Please install windows first!"));
    quit_global($in);
}

begin:

#- **********************************
#- * 0th step: verify if we are already set up

    $::Wizard_no_previous = 1;

#- **********************************
#- * 1st step: detect/setup
step_1:

$::direct or $in->ask_okcancel(_("Transfug"),
_("Kick windows out of your life.

The next step will be bringing back windows(c)(r)(tm) files"), 1) or quit_global($in, 0);


#- **********************************
#- * 2nd step: win files
step_2:

$wait_configuring = $in->wait_message(_("Configuring..."), 
				      _("Configuring scripts, installing software, starting servers..."));
#sleep(2);
undef $wait_configuring;
 
$::direct or $in->ask_okcancel(_("Transfug"),
_("
Do you want to copy all the c:\\My Documents to one of your user home ?"), 1) or goto step_3;

# translators need to accord My Documents..
  link(_("$win/My Documents"), $ENV{HOME});


#- *******************************
#- * 3rd step: mail from win
step_3:

$::direct or $in->ask_okcancel(_("Transfug"),
_("Kick windows out of your life.

We will bring back your Outlook Mailboxes to a standart unix mbox"), 1) or quit_global($in, 0);

mkdir "$ENV{HOME}/Mail" unless (-e "$ENV{HOME}/Mail");
$oe5onwin98="$win/WINDOWS/Application Data/Identities/{424975E0-8577-11D4-A891-989048140B20}/Microsoft/Outlook Express";

if (-e $oe5onwin98) {
    print "OE5 on win98 detected\n";
    opendir YREP, $oe5onwin98 or die "unable to open dir: $!";
    @files = grep /.*dbx$/, readdir YREP;
    closedir YREP;
    foreach $i (@files) {
	`transfug_oe \"$oe5onwin98/$i\" \"$ENV{HOME}/Mail/$i\"`;
    }
} else {
    while (1) {
	$a=ask_file_path(_("Select file"),"$win/Application Data/Identities") or goto step_4;
	`transfug_oe \"$a\" \"$ENV{HOME}/Mail/$i\"`;
    }
    
}

#- *******************************
#- * 4th step: mail from win
step_4:
$::direct or $in->ask_okcancel(_("Transfug"),
_("You kicked windows out of your life.

You no more need to reboot your system.."), 1) or quit_global($in, 0);