2 # ws-manifest.pl - create a generic manifest file (including u3 information) from the wireshark.nsi
6 # These are the known directories in the distribution and where they should live on a U3 device
10 $INSTDIR\diameter device
12 $INSTDIR\${GTK_ETC_DIR} host
13 $INSTDIR\${GTK_SCHEMAS_DIR} host
14 $INSTDIR\${GTK_ENGINES_DIR} host
15 $INSTDIR\${GTK_MODULES_DIR} host
16 $INSTDIR\etc\pango host
18 $INSTDIR\plugins\${VERSION} device
19 $INSTDIR\radius device
20 $INSTDIR\snmp\mibs device
23 $INSTDIR\wimaxasncp device
26 my @dirs; # the directories in the manifest
27 my @defines; # stack of defines
30 if($line =~ /^SetOutPath (.+)$/) {
32 $outpath =~ s/^'(.*)'$/$1/;
33 if($outpath ne '$PROFILE') { # ignore the PROFILE
34 push(@dirs, $outpath);
36 } elsif ($line =~ /!ifdef (.*)$/) {
38 } elsif ($line =~ /!endif/) {
40 if(scalar(@defines) == 0) {
43 } elsif ($line =~/^File.*uninstall/i) {
45 } elsif ($line =~ /^File[^\"]+\"([^\"]+)\"/) {
47 # make things relative to the root rather than the NSIS directory
48 if($file =~ /^[^\.\$]/) { $file = "packaging\\nsis\\" . $file; }
49 $file =~ s/\.\.\\\.\.\\//; # remove ../../
50 push(@$outpath, $file);
52 if(defined @defines) {
53 push(@$file, "ifdef=" . $defines[-1]);
56 # there may be a parameter - copy it across
57 if($line =~ /\/(\S+)/) {
63 print "#\n# DO NOT EDIT - autogenerated from wireshark.nsi\n#\n";
65 foreach $dir(sort @dirs) {
68 print STDERR "looking for $dir\n";
73 print "[". $dir . " u3loc=" . $loc . "]\n";
75 foreach $file(sort @$dir) {
78 foreach $param (sort(@$file)) {
82 if($dir eq '$INSTDIR') { # try and find a better location
83 if($file =~ /\.dll$|\.exe$|EXE}$|DLL}$/ && !($file =~ /WinPcap/) && !($file =~ /VCREDIST_EXE/)) {
99 if(defined @ignored) {
101 print STDERR "ERROR\nThe following directories have no known location on a U3 device:\n";
103 foreach $dir(sort @ignored) {
104 print STDERR "\t" . $dir . " ";