Skip to content

Commit 1d9f5d8

Browse files
committed
osgeo4w: fix creatensis.pl
1 parent 7ff9dc9 commit 1d9f5d8

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

ms-windows/osgeo4w/creatensis.pl

+18-4
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ sub getDeps {
122122
my @desc;
123123
foreach my $p ( keys %pkgs ) {
124124
my @f;
125+
unless( exists $file{$p} ) {
126+
print "No file for package $p found found.\n" if $verbose;
127+
next;
128+
}
125129
push @f, "$root/$file{$p}";
126130

127131
if( exists $lic{$p} ) {
@@ -174,9 +178,19 @@ sub getDeps {
174178
print O "INSTALLED.DB 2\n";
175179

176180
foreach my $pn ( keys %pkgs ) {
177-
$p = $file{$pn};
181+
my $p = $file{$pn};
182+
unless( defined $p ) {
183+
print "No package found for $pn\n" if $verbose;
184+
next;
185+
}
186+
178187
$p =~ s#^.*/#$packages/#;
179188

189+
unless( -r $p ) {
190+
print "Package $p not found.\n" if $verbose;
191+
next;
192+
}
193+
180194
print O "$pn $p 0\n";
181195

182196
print "Unpacking $p...\n" if $verbose;
@@ -288,8 +302,8 @@ sub getDeps {
288302
$version = "$major.$minor.$patch" unless defined $version;
289303

290304
unless( defined $binary ) {
291-
if( -f "binary-$archpostfix$version" ) {
292-
open P, "binary-$archpostfix$version";
305+
if( -f "binary$archpostfix-$version" ) {
306+
open P, "binary$archpostfix-$version";
293307
$binary = <P>;
294308
close P;
295309
$binary++;
@@ -386,7 +400,7 @@ sub getDeps {
386400
system $cmd;
387401
die "running nsis failed" if $?;
388402

389-
open P, ">osgeo4w/binary-$archpostfix$version";
403+
open P, ">osgeo4w/binary$archpostfix-$version";
390404
print P $binary;
391405
close P;
392406

0 commit comments

Comments
 (0)