6 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
11 @EXPORT_OK = qw($current_dir $wine_dir $winapi_dir $winapi_check_dir);
13 use vars qw($current_dir $wine_dir $winapi_dir $winapi_check_dir);
18 if($0 =~ m%^((.*?)/?tools/([^/]+))/([^/]+)$%)
21 $winapi_check_dir = $1;
25 if(defined($2) && $2 ne "")
33 if($wine_dir =~ /^\./) {
35 my $pwd; chomp($pwd = `pwd`);
36 foreach my $n (1..((length($wine_dir) + 1) / 3)) {
37 $pwd =~ s/\/([^\/]*)$//;
38 $current_dir = "$1/$current_dir";
40 $current_dir =~ s%/\.$%%;
43 $winapi_dir =~ s%^\./%%;
44 $winapi_dir =~ s/$dir/winapi/g;
46 $winapi_check_dir =~ s%^\./%%;
47 $winapi_check_dir =~ s/$dir/winapi_check/g;
49 print STDERR "$tool: You must run this tool in the main Wine directory or a sub directory\n";
53 push @INC, ($winapi_check_dir, $winapi_dir) if $tool eq "winapi_check";
54 push @INC, ($winapi_dir, $winapi_check_dir) if $tool eq "winapi_extract";
55 push @INC, ($winapi_dir, $winapi_check_dir) if $tool eq "winapi_fixup";