| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Perl::Dist::Padre; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
#<<< |
|
4
|
1
|
|
|
1
|
|
35442
|
use 5.008001; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
40
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
39
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
7
|
|
|
|
1
|
|
|
|
|
36
|
|
|
7
|
1
|
|
|
1
|
|
490
|
use Perl::Dist::WiX 1.200002; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use Perl::Dist::Strawberry 2.10 qw(); |
|
9
|
|
|
|
|
|
|
use URI::file qw(); |
|
10
|
|
|
|
|
|
|
use English qw( -no_match_vars ); |
|
11
|
|
|
|
|
|
|
use File::Spec::Functions qw( catfile catdir ); |
|
12
|
|
|
|
|
|
|
use parent qw( Perl::Dist::Strawberry ); |
|
13
|
|
|
|
|
|
|
#>>> |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/ |
|
16
|
|
|
|
|
|
|
our $VERSION = '0.630'; |
|
17
|
|
|
|
|
|
|
$VERSION =~ s/_//ms; |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
###################################################################### |
|
22
|
|
|
|
|
|
|
# Configuration |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new { |
|
25
|
|
|
|
|
|
|
my $dist_dir = File::ShareDir::dist_dir('Perl-Dist-Padre'); |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
return shift->SUPER::new( |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# Define the distribution information and where it goes. |
|
30
|
|
|
|
|
|
|
app_id => 'padre', |
|
31
|
|
|
|
|
|
|
app_name => 'Strawberry Perl plus Padre', |
|
32
|
|
|
|
|
|
|
app_ver_name => 'Strawberry Perl 5.10.1.2 plus Padre 0.62', |
|
33
|
|
|
|
|
|
|
app_publisher => 'Padre', |
|
34
|
|
|
|
|
|
|
app_publisher_url => 'http://padre.perlide.org/', |
|
35
|
|
|
|
|
|
|
image_dir => 'C:\strawberry', |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Set e-mail to something Padre-specific. |
|
38
|
|
|
|
|
|
|
perl_config_cf_email => 'padre-dev@perlide.org', |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# The MSI stuff. |
|
41
|
|
|
|
|
|
|
msi_product_icon => catfile( $dist_dir, 'padre.ico' ), |
|
42
|
|
|
|
|
|
|
msi_help_url => undef, |
|
43
|
|
|
|
|
|
|
msi_banner_top => catfile( $dist_dir, 'PadreBanner.bmp' ), |
|
44
|
|
|
|
|
|
|
msi_banner_side => catfile( $dist_dir, 'PadreDialog.bmp' ), |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Perl version |
|
47
|
|
|
|
|
|
|
perl_version => '5101', |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# Program version. |
|
50
|
|
|
|
|
|
|
build_number => 1, |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
# Trace level. |
|
53
|
|
|
|
|
|
|
trace => 1, |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# Build both exe and zip versions. |
|
56
|
|
|
|
|
|
|
msi => 1, |
|
57
|
|
|
|
|
|
|
zip => 1, |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# These are the locations to pull down the msm. |
|
60
|
|
|
|
|
|
|
msm_to_use => |
|
61
|
|
|
|
|
|
|
'http://strawberryperl.com/download/strawberry-msm/strawberry-perl-5.10.1.2.msm', |
|
62
|
|
|
|
|
|
|
msm_zip => |
|
63
|
|
|
|
|
|
|
'http://strawberryperl.com/download/strawberry-perl-5.10.1.2.zip', |
|
64
|
|
|
|
|
|
|
msm_code => 'BC4B680E-4871-31E7-9883-3E2C74EA4F3C', |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
# Tasks to complete to create Strawberry + Padre. |
|
67
|
|
|
|
|
|
|
tasklist => [ |
|
68
|
|
|
|
|
|
|
'final_initialization', |
|
69
|
|
|
|
|
|
|
'initialize_using_msm', |
|
70
|
|
|
|
|
|
|
'install_padre_prereq_modules_1', |
|
71
|
|
|
|
|
|
|
'install_padre_prereq_modules_2', |
|
72
|
|
|
|
|
|
|
'install_padre_modules', |
|
73
|
|
|
|
|
|
|
'install_win32_extras', |
|
74
|
|
|
|
|
|
|
'install_strawberry_extras', |
|
75
|
|
|
|
|
|
|
'install_padre_extras', |
|
76
|
|
|
|
|
|
|
'remove_waste', |
|
77
|
|
|
|
|
|
|
'regenerate_fragments', |
|
78
|
|
|
|
|
|
|
'write', |
|
79
|
|
|
|
|
|
|
], |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
# Other parameters passed in override the ones |
|
82
|
|
|
|
|
|
|
# here and in Strawberrry. |
|
83
|
|
|
|
|
|
|
@_, |
|
84
|
|
|
|
|
|
|
); |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
} ## end sub new |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub output_base_filename { |
|
91
|
|
|
|
|
|
|
return 'strawberry-plus-padre-0.63'; |
|
92
|
|
|
|
|
|
|
} |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
##################################################################### |
|
97
|
|
|
|
|
|
|
# Customisations for Perl assets |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub install_perl_589 { |
|
100
|
|
|
|
|
|
|
my $self = shift; |
|
101
|
|
|
|
|
|
|
PDWiX->throw('Perl 5.8.9 is not available in Padre Standalone'); |
|
102
|
|
|
|
|
|
|
return; |
|
103
|
|
|
|
|
|
|
} |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub install_perl_5100 { |
|
108
|
|
|
|
|
|
|
my $self = shift; |
|
109
|
|
|
|
|
|
|
PDWiX->throw('Perl 5.10.0 is not available in Padre Standalone'); |
|
110
|
|
|
|
|
|
|
return; |
|
111
|
|
|
|
|
|
|
} |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
sub install_perl_5120 { |
|
116
|
|
|
|
|
|
|
my $self = shift; |
|
117
|
|
|
|
|
|
|
PDWiX->throw('Perl 5.12.0 is not available in Padre Standalone'); |
|
118
|
|
|
|
|
|
|
return; |
|
119
|
|
|
|
|
|
|
} |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub install_perl_5121 { |
|
124
|
|
|
|
|
|
|
my $self = shift; |
|
125
|
|
|
|
|
|
|
PDWiX->throw('Perl 5.12.1 is not available in Padre Standalone'); |
|
126
|
|
|
|
|
|
|
return; |
|
127
|
|
|
|
|
|
|
} |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub install_padre_prereq_modules_1 { |
|
132
|
|
|
|
|
|
|
my $self = shift; |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
# Manually install our non-Wx dependencies first to isolate |
|
135
|
|
|
|
|
|
|
# them from the Wx problems |
|
136
|
|
|
|
|
|
|
$self->install_modules( qw{ |
|
137
|
|
|
|
|
|
|
File::Glob::Windows |
|
138
|
|
|
|
|
|
|
File::Next |
|
139
|
|
|
|
|
|
|
App::Ack |
|
140
|
|
|
|
|
|
|
Class::Adapter |
|
141
|
|
|
|
|
|
|
Class::Inspector |
|
142
|
|
|
|
|
|
|
Class::Unload |
|
143
|
|
|
|
|
|
|
AutoXS::Header |
|
144
|
|
|
|
|
|
|
Class::XSAccessor |
|
145
|
|
|
|
|
|
|
Devel::Dumpvar |
|
146
|
|
|
|
|
|
|
File::Copy::Recursive |
|
147
|
|
|
|
|
|
|
File::ShareDir |
|
148
|
|
|
|
|
|
|
File::ShareDir::PAR |
|
149
|
|
|
|
|
|
|
Test::Object |
|
150
|
|
|
|
|
|
|
Config::Tiny |
|
151
|
|
|
|
|
|
|
Test::ClassAPI |
|
152
|
|
|
|
|
|
|
Clone |
|
153
|
|
|
|
|
|
|
Hook::LexWrap |
|
154
|
|
|
|
|
|
|
} ); |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
return 1; |
|
157
|
|
|
|
|
|
|
} ## end sub install_padre_prereq_modules_1 |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
sub install_padre_prereq_modules_2 { |
|
162
|
|
|
|
|
|
|
my $self = shift; |
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
# Manually install our non-Wx dependencies first to isolate |
|
165
|
|
|
|
|
|
|
# them from the Wx problems |
|
166
|
|
|
|
|
|
|
# NOTE: ORLite::Migrate goes after ORLite once they don't clone it privately. |
|
167
|
|
|
|
|
|
|
# NOTE: Test::Exception goes before Test::Most when it's not in Strawberry. |
|
168
|
|
|
|
|
|
|
$self->install_modules( qw{ |
|
169
|
|
|
|
|
|
|
Test::SubCalls |
|
170
|
|
|
|
|
|
|
List::MoreUtils |
|
171
|
|
|
|
|
|
|
PPI |
|
172
|
|
|
|
|
|
|
Module::Locate |
|
173
|
|
|
|
|
|
|
Perl::Tags |
|
174
|
|
|
|
|
|
|
Module::Refresh |
|
175
|
|
|
|
|
|
|
Devel::Symdump |
|
176
|
|
|
|
|
|
|
Pod::Coverage |
|
177
|
|
|
|
|
|
|
Test::Pod::Coverage |
|
178
|
|
|
|
|
|
|
Test::Pod |
|
179
|
|
|
|
|
|
|
Module::Starter |
|
180
|
|
|
|
|
|
|
ORLite |
|
181
|
|
|
|
|
|
|
Test::Differences |
|
182
|
|
|
|
|
|
|
Pod::POM |
|
183
|
|
|
|
|
|
|
Parse::ErrorString::Perl |
|
184
|
|
|
|
|
|
|
Text::FindIndent |
|
185
|
|
|
|
|
|
|
Pod::Abstract |
|
186
|
|
|
|
|
|
|
Devel::StackTrace |
|
187
|
|
|
|
|
|
|
Class::Data::Inheritable |
|
188
|
|
|
|
|
|
|
Exception::Class |
|
189
|
|
|
|
|
|
|
Test::Most |
|
190
|
|
|
|
|
|
|
Parse::ExuberantCTags |
|
191
|
|
|
|
|
|
|
CPAN::Mini |
|
192
|
|
|
|
|
|
|
Portable |
|
193
|
|
|
|
|
|
|
Capture::Tiny |
|
194
|
|
|
|
|
|
|
prefork |
|
195
|
|
|
|
|
|
|
PPIx::EditorTools |
|
196
|
|
|
|
|
|
|
Spiffy |
|
197
|
|
|
|
|
|
|
Test::Base |
|
198
|
|
|
|
|
|
|
ExtUtils::XSpp |
|
199
|
|
|
|
|
|
|
Locale::Msgfmt |
|
200
|
|
|
|
|
|
|
Module::ScanDeps |
|
201
|
|
|
|
|
|
|
Module::Install |
|
202
|
|
|
|
|
|
|
Format::Human::Bytes |
|
203
|
|
|
|
|
|
|
Template::Tiny |
|
204
|
|
|
|
|
|
|
Win32::Shortcut |
|
205
|
|
|
|
|
|
|
Debug::Client |
|
206
|
|
|
|
|
|
|
Devel::Refactor |
|
207
|
|
|
|
|
|
|
App::cpanminus |
|
208
|
|
|
|
|
|
|
POD2::Base |
|
209
|
|
|
|
|
|
|
Readonly |
|
210
|
|
|
|
|
|
|
Readonly::XS |
|
211
|
|
|
|
|
|
|
PPIx::Regexp |
|
212
|
|
|
|
|
|
|
UNIVERSAL::isa |
|
213
|
|
|
|
|
|
|
UNIVERSAL::can |
|
214
|
|
|
|
|
|
|
Test::MockObject |
|
215
|
|
|
|
|
|
|
} ); |
|
216
|
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
return 1; |
|
218
|
|
|
|
|
|
|
} ## end sub install_padre_prereq_modules_2 |
|
219
|
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
sub install_padre_modules { |
|
223
|
|
|
|
|
|
|
my $self = shift; |
|
224
|
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
## no critic(RestrictLongStrings) |
|
226
|
|
|
|
|
|
|
# Install the Alien::wxWidgets module from a precompiled .par |
|
227
|
|
|
|
|
|
|
my $par_url = |
|
228
|
|
|
|
|
|
|
'http://strawberryperl.com/download/padre/Alien-wxWidgets-0.50-MSWin32-x86-multi-thread-5.10.1.par'; |
|
229
|
|
|
|
|
|
|
my $filelist = $self->install_par( |
|
230
|
|
|
|
|
|
|
name => 'Alien_wxWidgets', |
|
231
|
|
|
|
|
|
|
url => $par_url, |
|
232
|
|
|
|
|
|
|
); |
|
233
|
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
# Install the Wx module over the top of alien module |
|
235
|
|
|
|
|
|
|
$self->install_module( name => 'Wx' ); |
|
236
|
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
# Install modules that add more Wx functionality |
|
238
|
|
|
|
|
|
|
$self->install_module( |
|
239
|
|
|
|
|
|
|
name => 'Wx::Perl::ProcessStream', |
|
240
|
|
|
|
|
|
|
force => 1 # since it fails on vista |
|
241
|
|
|
|
|
|
|
); |
|
242
|
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
# And finally, install Padre itself |
|
244
|
|
|
|
|
|
|
$self->install_module( name => 'Padre', ); |
|
245
|
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
return 1; |
|
247
|
|
|
|
|
|
|
} ## end sub install_padre_modules |
|
248
|
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
sub install_padre_extras { |
|
250
|
|
|
|
|
|
|
my $self = shift; |
|
251
|
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
# Check that the padre.exe exists |
|
253
|
|
|
|
|
|
|
my $to = catfile( $self->image_dir(), 'perl', 'bin', 'padre.exe' ); |
|
254
|
|
|
|
|
|
|
if ( not -f $to ) { |
|
255
|
|
|
|
|
|
|
PDWiX->throw(q{The "padre.exe" file does not exist}); |
|
256
|
|
|
|
|
|
|
} |
|
257
|
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
# Get the Id for directory object that stores the filename passed in. |
|
259
|
|
|
|
|
|
|
my $dir_id = $self->get_directory_tree()->search_dir( |
|
260
|
|
|
|
|
|
|
path_to_find => catdir( $self->image_dir(), 'perl', 'bin' ), |
|
261
|
|
|
|
|
|
|
exact => 1, |
|
262
|
|
|
|
|
|
|
descend => 1, |
|
263
|
|
|
|
|
|
|
)->get_id(); |
|
264
|
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
my $icon_id = |
|
266
|
|
|
|
|
|
|
$self->_icons() |
|
267
|
|
|
|
|
|
|
->add_icon( catfile( $self->dist_dir(), 'padre.ico' ), 'padre.exe' ); |
|
268
|
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
# Add the start menu icon. |
|
270
|
|
|
|
|
|
|
$self->get_fragment_object('StartMenuIcons')->add_shortcut( |
|
271
|
|
|
|
|
|
|
name => 'Padre', |
|
272
|
|
|
|
|
|
|
description => |
|
273
|
|
|
|
|
|
|
'Perl Application Development and Refactoring Environment - a Perl IDE', |
|
274
|
|
|
|
|
|
|
target => "[D_$dir_id]padre.exe", |
|
275
|
|
|
|
|
|
|
id => 'Padre', |
|
276
|
|
|
|
|
|
|
working_dir => $dir_id, |
|
277
|
|
|
|
|
|
|
icon_id => $icon_id, |
|
278
|
|
|
|
|
|
|
); |
|
279
|
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
return 1; |
|
281
|
|
|
|
|
|
|
} ## end sub install_padre_extras |
|
282
|
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
sub dist_dir { |
|
286
|
|
|
|
|
|
|
my $self = shift; |
|
287
|
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
my $dir; |
|
289
|
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
if ( not eval { $dir = File::ShareDir::dist_dir('Perl-Dist-Padre'); 1; } |
|
291
|
|
|
|
|
|
|
) |
|
292
|
|
|
|
|
|
|
{ |
|
293
|
|
|
|
|
|
|
PDWiX::Caught->throw( |
|
294
|
|
|
|
|
|
|
message => |
|
295
|
|
|
|
|
|
|
'Could not find distribution directory for Perl::Dist::Padre', |
|
296
|
|
|
|
|
|
|
info => ( defined $EVAL_ERROR ) ? $EVAL_ERROR : 'Unknown error', |
|
297
|
|
|
|
|
|
|
); |
|
298
|
|
|
|
|
|
|
} |
|
299
|
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
return $dir; |
|
301
|
|
|
|
|
|
|
} ## end sub dist_dir |
|
302
|
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
|
304
|
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
__END__ |