diff options
author | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2008-01-04 14:07:47 +0000 |
---|---|---|
committer | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2008-01-04 14:07:47 +0000 |
commit | 906d66181e688f7c4ee08a77d667221bda1e1c1a (patch) | |
tree | d2d06d74a993cfaa86c6fc68f2381ada2a7e728a /packaging | |
parent | 73fee653de767e0f8ae9637b54ac8d56c7fbb720 (diff) | |
download | wireshark-906d66181e688f7c4ee08a77d667221bda1e1c1a.tar.gz wireshark-906d66181e688f7c4ee08a77d667221bda1e1c1a.tar.bz2 wireshark-906d66181e688f7c4ee08a77d667221bda1e1c1a.zip |
A script to generate a generic manifest file from the nsis/wireshark.nsi.
The U3 and portableapps packaging will use this generic manifest to package the
correct set of components. Thus all three packages will be kept in sync.
svn path=/trunk/; revision=24011
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/makefile.nmake | 17 | ||||
-rw-r--r-- | packaging/ws-manifest.pl | 102 |
2 files changed, 119 insertions, 0 deletions
diff --git a/packaging/makefile.nmake b/packaging/makefile.nmake new file mode 100644 index 0000000000..a988f3c183 --- /dev/null +++ b/packaging/makefile.nmake @@ -0,0 +1,17 @@ +# +# $Id$ +# + +include ../config.nmake +include <win32.mak> + +wireshark.manifest: nsis/wireshark.nsi ws-manifest.pl + $(PERL) ws-manifest.pl nsis/wireshark.nsi > $@ + +clean: + rm -rf wireshark.manifest + +distclean: clean + +maintainer-clean: distclean + diff --git a/packaging/ws-manifest.pl b/packaging/ws-manifest.pl new file mode 100644 index 0000000000..984feb994f --- /dev/null +++ b/packaging/ws-manifest.pl @@ -0,0 +1,102 @@ +# +# ws-manifest.pl - create a generic manifest file (including u3 information) from the wireshark.nsi +# $Id$ +# + +# These are the known directories in the distribution and where they should live on a U3 device +my %u3locs = qw($INSTDIR device + $INSTDIR\plugins\${VERSION} device + $INSTDIR\help device + $INSTDIR\snmp\mibs device + $INSTDIR\diameter device + $INSTDIR\dtds device + $INSTDIR\radius device + $INSTDIR\wimaxasncp device + $INSTDIR\tpncp device + $INSTDIR\${GTK_WIMP_RCDST_DIR} host + $INSTDIR\etc\gtk-2.0 host + $INSTDIR\etc\pango host + $INSTDIR\lib\gtk-2.0\${GTK2_LIB_DIR}\immodules host + $INSTDIR\${GTK_WIMP_DLLDST_DIR} host); + +my @dirs; # the directories in the manifest +my @defines; # stack of defines + +while ($line = <>) { + if($line =~ /^SetOutPath (.+)$/) { + $outpath = $1; + if($outpath ne '$PROFILE') { # ignore the PROFILE + push(@dirs, $outpath); + } + } elsif ($line =~ /!ifdef (.*)$/) { + push(@defines, $1); + } elsif ($line =~ /!endif/) { + pop(@defines); + if(scalar(@defines) == 0) { + undef @defines; + } + } elsif ($line =~ /^File[^\"]+\"([^\"]+)\"/) { + $file = $1; + # make things relative to the root rather than the NSIS directory + if($file =~ /^[^\.\$]/) { $file = "packaging\\nsis\\" . $file; } + $file =~ s/\.\.\\\.\.\\//; # remove ../../ + push(@$outpath, $file); + + if(defined @defines) { + push(@$file, "ifdef=" . $defines[-1]); + } + + # there may be a parameter - copy it across + if($line =~ /\/(\S+)/) { + push(@$file, $1); + } + } +} + +print "#\n# DO NOT EDIT - autogenerated from wireshark.nsi\n#\n"; + +foreach $dir(sort @dirs) { + + if($prev ne $dir) { + $loc = $u3locs{$dir}; + + if(defined $loc) { + + print "[". $dir . " u3loc=" . $loc . "]\n"; + + foreach $file(sort @$dir) { + print "\t" . $file; + + foreach $param (sort(@$file)) { + print " " . $param; + } + + if($dir eq '$INSTDIR') { # try and find a better location + if($file =~ /\.dll$|\.exe$|EXE}$|DLL}$/) { + print " u3loc=host"; + } + } + + print "\n"; + } + } else { + + push(@ignored, $dir); + + } + } + $prev = $dir; +} + +if(defined @ignored) { + + print STDERR "ERROR\nThe following directories have no known location on a U3 device:\n"; + + foreach $dir(sort @ignored) { + print STDERR "\t" . $dir . " "; + } + + print STDERR "\n"; + + exit -1; +} |