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\platforms host
19 $INSTDIR\plugins\${VERSION} device
20 $INSTDIR\profiles\Bluetooth device
21 $INSTDIR\profiles\Classic device
22 $INSTDIR\radius device
23 $INSTDIR\snmp\mibs device
26 $INSTDIR\wimaxasncp device
29 my @dirs; # the directories in the manifest
30 my @defines; # stack of defines
33 $line =~ s/\r//g; # remove CR on Windows
34 if($line =~ /^SetOutPath (.+)$/) {
36 $outpath =~ s/^'(.*)'$/$1/;
37 if($outpath ne '$PROFILE') { # ignore the PROFILE
38 push(@dirs, $outpath);
40 } elsif ($line =~ /!ifdef (.*)$/) {
42 } elsif ($line =~ /!endif/) {
44 if(scalar(@defines) == 0) {
47 } elsif ($line =~/^File.*uninstall/i) {
49 } elsif ($line =~ /^File[^\"]+\"([^\"]+)\"/) {
51 # make things relative to the root rather than the NSIS directory
52 if($file =~ /^[^\.\$]/) { $file = "packaging\\nsis\\" . $file; }
53 $file =~ s/\.\.\\\.\.\\//; # remove ../../
54 push(@$outpath, $file);
56 if(defined @defines) {
57 push(@$file, "ifdef=" . $defines[-1]);
60 # there may be a parameter - copy it across
61 if($line =~ /\/(\S+)/) {
67 print "#\n# DO NOT EDIT - autogenerated from wireshark.nsi\n#\n";
69 foreach $dir(sort @dirs) {
72 print STDERR "looking for $dir\n";
77 print "[". $dir . " u3loc=" . $loc . "]\n";
79 foreach $file(sort @$dir) {
82 foreach $param (sort(@$file)) {
86 if($dir eq '$INSTDIR') { # try and find a better location
87 if($file =~ /\.dll$|\.exe$|EXE}$|DLL}$/ && !($file =~ /WinPcap/) && !($file =~ /VCREDIST_EXE/)) {
103 if(defined @ignored) {
105 print STDERR "ERROR\nThe following directories have no known location on a U3 device:\n";
107 foreach $dir(sort @ignored) {
108 print STDERR "\t" . $dir . " ";