line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Filesys::MakeISO::Driver::MagicISO; |
2
|
1
|
|
|
1
|
|
24165
|
use version; $VERSION = qv('0.0.1'); |
|
1
|
|
|
|
|
2388
|
|
|
1
|
|
|
|
|
8
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Filesys::MakeISO::Driver::MagicISO - make iso images with MagicISO (Win32) |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
This document describes Filesys::MakeISO::Driver::MagicISO version 0.0.1 |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use Filesys::MakeISO; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $iso = Filesys::MakeISO->new( |
17
|
|
|
|
|
|
|
class => 'Filesys::MakeISO::Driver::MagicISO', |
18
|
|
|
|
|
|
|
magiciso_bin => '/path/to/miso.exe', |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
$iso->image('image.iso'); |
21
|
|
|
|
|
|
|
$iso->dir('/path/to/burn'); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
$iso->make_iso; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
|
95
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
27
|
|
28
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
33
|
|
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
1
|
|
844
|
use File::Which (); |
|
1
|
|
|
|
|
1174
|
|
|
1
|
|
|
|
|
25
|
|
31
|
1
|
|
|
1
|
|
1048
|
use IPC::Run3 (); |
|
1
|
|
|
|
|
53926
|
|
|
1
|
|
|
|
|
33
|
|
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
16
|
use base 'Filesys::MakeISO'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1098
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 DESCRIPTION |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
See http://www.magiciso.com/ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 INTERFACE |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 new [PARAMS] |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Constructor. Returns C if no C executable is found. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Valid PARAMS are: |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=over 4 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item magiciso_bin |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Location (path and filename) of the C binary. The command line |
52
|
|
|
|
|
|
|
version is called C. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=back |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub new { |
59
|
0
|
|
|
0
|
1
|
|
my ($class, %arg) = @_; |
60
|
0
|
|
0
|
|
|
|
my $self = bless({}, ref($class) || $class); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# find MagicISO binary |
63
|
0
|
|
0
|
|
|
|
my $bin = delete $arg{magiciso_bin} || File::Which::which('miso.exe'); |
64
|
0
|
0
|
|
|
|
|
return undef unless $bin; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
# executable? |
67
|
0
|
0
|
|
|
|
|
return undef unless -x $bin; |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
$self->{magiciso_bin} = $bin; |
70
|
|
|
|
|
|
|
|
71
|
0
|
|
|
|
|
|
return $self; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 make_iso |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Create image, specific for MagicISO. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub make_iso { |
81
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
# check params |
84
|
0
|
|
|
|
|
|
$self->_check_params; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
# delete old image |
87
|
0
|
|
|
|
|
|
unlink($self->image); |
88
|
|
|
|
|
|
|
|
89
|
0
|
0
|
|
|
|
|
my @cmd = ($self->{magiciso_bin}, |
|
|
0
|
|
|
|
|
|
90
|
|
|
|
|
|
|
$self->image, |
91
|
|
|
|
|
|
|
$self->rock_ridge ? ('-ar') : ('-rr'), |
92
|
|
|
|
|
|
|
$self->joliet ? ('-aj') : ('-rj'), |
93
|
|
|
|
|
|
|
'-a', $self->dir, |
94
|
|
|
|
|
|
|
'-py', |
95
|
|
|
|
|
|
|
); |
96
|
|
|
|
|
|
|
|
97
|
0
|
|
|
|
|
|
return IPC::Run3::run3(\@cmd, \undef, \undef, \undef); |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
1; |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
L, L |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
None reported. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
No bugs have been reported. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
116
|
|
|
|
|
|
|
C, or through the |
117
|
|
|
|
|
|
|
web interface at L. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 AUTHOR |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Uwe Voelker C<< uwe.voelker@gmx.de >> |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Copyright (c) 2006, Uwe Voelker C<< uwe.voelker@gmx.de >>. |
126
|
|
|
|
|
|
|
All rights reserved. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or |
129
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. See C. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTY |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
134
|
|
|
|
|
|
|
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
135
|
|
|
|
|
|
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
136
|
|
|
|
|
|
|
PROVIDE THE SOFTWARE ''AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER |
137
|
|
|
|
|
|
|
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
138
|
|
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE |
139
|
|
|
|
|
|
|
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH |
140
|
|
|
|
|
|
|
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL |
141
|
|
|
|
|
|
|
NECESSARY SERVICING, REPAIR, OR CORRECTION. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
144
|
|
|
|
|
|
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
145
|
|
|
|
|
|
|
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE |
146
|
|
|
|
|
|
|
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, |
147
|
|
|
|
|
|
|
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE |
148
|
|
|
|
|
|
|
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING |
149
|
|
|
|
|
|
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A |
150
|
|
|
|
|
|
|
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF |
151
|
|
|
|
|
|
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
152
|
|
|
|
|
|
|
SUCH DAMAGES. |