git.annexia.org
/
fedora-mingw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8e960d7
)
Added --run option.
author
Richard W.M. Jones
<rjones@redhat.com>
Wed, 8 Oct 2008 14:12:45 +0000
(15:12 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Wed, 8 Oct 2008 14:12:45 +0000
(15:12 +0100)
nsiswrapper/nsiswrapper.pl
patch
|
blob
|
history
diff --git
a/nsiswrapper/nsiswrapper.pl
b/nsiswrapper/nsiswrapper.pl
index
344e5c0
..
f0eafb8
100755
(executable)
--- a/
nsiswrapper/nsiswrapper.pl
+++ b/
nsiswrapper/nsiswrapper.pl
@@
-22,6
+22,7
@@
use strict;
use Getopt::Long;
use Pod::Usage;
use strict;
use Getopt::Long;
use Pod::Usage;
+use File::Temp qw/tempfile/;
=pod
=pod
@@
-162,10
+163,12
@@
This is the same as the C<InstallDirRegKey> option to NSIS.
=cut
my $objdump;
=cut
my $objdump;
+my %files;
+
my $help = '';
my $man = '';
my $verbose = '';
my $help = '';
my $man = '';
my $verbose = '';
-my
%files
;
+my
$run = ''
;
my $name = '';
my $outfile = 'installer.exe';
my $installdir = '';
my $name = '';
my $outfile = 'installer.exe';
my $installdir = '';
@@
-177,6
+180,7
@@
sub get_options
"help|?" => \$help,
"man" => \$man,
"verbose" => \$verbose,
"help|?" => \$help,
"man" => \$man,
"verbose" => \$verbose,
+ "run" => \$run,
"name=s" => \$name,
"outfile=s" => \$outfile,
"installdir=s" => \$installdir,
"name=s" => \$name,
"outfile=s" => \$outfile,
"installdir=s" => \$installdir,
@@
-612,7
+616,15
@@
Section -post
WriteUninstaller "\$INSTDIR\\Uninstall $name.exe"
SectionEnd
EOT
WriteUninstaller "\$INSTDIR\\Uninstall $name.exe"
SectionEnd
EOT
+}
+# Run makensis on the named file.
+
+sub run_makensis
+{
+ my $filename = shift;
+
+ system ("makensis", $filename) == 0 or die "makensis: $?"
}
# Main program.
}
# Main program.
@@
-625,7
+637,14
@@
sub main
do_dependencies ();
install_names ();
print_files () if $verbose;
do_dependencies ();
install_names ();
print_files () if $verbose;
- write_script (\*STDOUT);
+ if ($run) {
+ my ($io, $filename) = tempfile ("nswXXXXXX", UNLINK => 1);
+ write_script ($io);
+ close $io;
+ run_makensis ($filename);
+ } else {
+ write_script (\*STDOUT);
+ }
}
main ()
}
main ()