-#!/usr/bin/perl\r
-\r
-$p = `pwd`;\r
-\r
-if($p =~ /.*(\/win32)/)\r
-{\r
- @dirents = split('/', $p);\r
- if(@dirents > 2)\r
- {\r
- # check dependencies\r
- print "Checking dependencies\n";\r
- @statLibSilcDllDebug = stat("libsilc/Debug/libsilc.dll");\r
- @statLibSilcExpDebug = stat("libsilc/Debug/libsilc.exp");\r
- @statLibSilcLibDebug = stat("libsilc/Debug/libsilc.lib");\r
- if(! @statLibSilcDllDebug || ! @statLibSilcExpDebug || ! @statLibSilcLibDebug)\r
- {\r
- die "Please rebuild libsilc Debug before creating the distribution\n";\r
- }\r
- \r
- @statLibSilcDllRelease = stat("libsilc/Release/libsilc.dll");\r
- @statLibSilcExpRelease = stat("libsilc/Release/libsilc.exp");\r
- @statLibSilcLibRelease = stat("libsilc/Release/libsilc.lib");\r
- if(! @statLibSilcDllRelease || ! @statLibSilcExpRelease || ! @statLibSilcLibRelease)\r
- {\r
- die "Please rebuild libsilc Release before creating the distribution\n";\r
- }\r
- \r
- @statLibSilcClientDllDebug = stat("libsilcclient/Debug/libsilcclient.dll");\r
- @statLibSilcClientExpDebug = stat("libsilcclient/Debug/libsilcclient.exp");\r
- @statLibSilcClientLibDebug = stat("libsilcclient/Debug/libsilcclient.lib");\r
- if(! @statLibSilcClientDllDebug || \r
- ! @statLibSilcClientExpDebug || \r
- ! @statLibSilcClientLibDebug || \r
- (@statLibSilcClientDllDebug[9] < @statLibSilcDllDebug[9]) ||\r
- (@statLibSilcClientExpDebug[9] < @statLibSilcExpDebug[9]) ||\r
- (@statLibSilcClientLibDebug[9] < @statLibSilcLibDebug[9])\r
- )\r
- { \r
- die "Please rebuild libsilcclient Debug before creating the distribution\n";\r
- }\r
-\r
- @statLibSilcClientDllRelease = stat("libsilcclient/Release/libsilcclient.dll");\r
- @statLibSilcClientExpRelease = stat("libsilcclient/Release/libsilcclient.exp");\r
- @statLibSilcClientLibRelease = stat("libsilcclient/Release/libsilcclient.lib");\r
- if(! @statLibSilcClientDllRelease || \r
- ! @statLibSilcClientExpRelease || \r
- ! @statLibSilcClientLibRelease ||\r
- (@statLibSilcClientDllRelease[9] < @statLibSilcDllRelease[9]) ||\r
- (@statLibSilcClientExpRelease[9] < @statLibSilcExpRelease[9]) ||\r
- (@statLibSilcClientLibRelease[9] < @statLibSilcLibRelease[9])\r
- )\r
- {\r
- die "Please rebuild libsilcclient Release before creating the distribution\n";\r
- }\r
-\r
- @statLibSilcStaticLibDebug = stat("libsilc_static/Debug/libsilc_static.lib");\r
- if(! @statLibSilcStaticLibDebug)\r
- {\r
- die "Please rebuild libsilc_static Debug before creating the distribution\n";\r
- }\r
- \r
- @statLibSilcStaticLibRelease = stat("libsilc_static/Release/libsilc_static.lib");\r
- if(! @statLibSilcStaticLibRelease)\r
- {\r
- die "Please rebuild libsilc_static Release before creating the distribution\n";\r
- }\r
- \r
- @statLibSilcClientStaticLibDebug = stat("libsilcclient_static/Debug/libsilcclient_static.lib");\r
- if(! @statLibSilcClientStaticLibDebug || (@statLibSilcClientStaticLibDebug[9] < @statLibSilcStaticLibDebug[9]))\r
- { \r
- die "Please rebuild libsilcclient_static Debug before creating the distribution\n";\r
- }\r
-\r
- @statLibSilcClientStaticLibRelease = stat("libsilcclient_static/Release/libsilcclient_static.lib");\r
- if(! @statLibSilcClientStaticLibRelease || (@statLibSilcClientStaticLibRelease[9] < @statLibSilcStaticLibRelease[9]))\r
- { \r
- die "Please rebuild libsilcclient_static Release before creating the distribution\n";\r
- }\r
-\r
- $index = @dirents - 2;\r
- $top = @dirents[$index];\r
- `find . -name \"*.obj\" -exec rm -f \\{} \\;`;\r
- `find . -name \"*.idb\" -exec rm -f \\{} \\;`;\r
- `find . -name \"*.pdb\" -exec rm -f \\{} \\;`;\r
- `find . -name \"*.pch\" -exec rm -f \\{} \\;`;\r
- `find ../ -name \"*.o\" -exec rm -f \\{} \\;`;\r
- `find ../ -name \"*.lo\" -exec rm -f \\{} \\;`;\r
- `find ../ -name \"*.a\" -exec rm -f \\{} \\;`;\r
- `find ../ -name \"*.la\" -exec rm -f \\{} \\;`;\r
- `find ../ -name \"*.lai\" -exec rm -f \\{} \\;`;\r
-\r
- push(@excludeList, "--exclude $top/win32/Debug");\r
- push(@excludeList, "--exclude $top/win32/libsilc/CVS");\r
- push(@excludeList, "--exclude $top/win32/libsilc/libsilc.plg");\r
- push(@excludeList, "--exclude $top/win32/libsilcclient/CVS");\r
- push(@excludeList, "--exclude $top/win32/libsilcclient/libsilcclient.plg");\r
- push(@excludeList, "--exclude $top/win32/libsilc_static/CVS");\r
- push(@excludeList, "--exclude $top/win32/libsilc_static/libsilc_static.plg");\r
- push(@excludeList, "--exclude $top/win32/libsilcclient_static/CVS");\r
- push(@excludeList, "--exclude $top/win32/libsilcclient_static/libsilcclient_static.plg");\r
- push(@excludeList, "--exclude $top/win32/silc.ncb");\r
- push(@excludeList, "--exclude $top/includes/CVS");\r
- push(@excludeList, "--exclude $top/lib/silcutil/win32/.cvsignore");\r
- push(@excludeList, "--exclude $top/lib/silcutil/win32/CVS");\r
- push(@excludeList, "--exclude $top/win32/all.plg");\r
- push(@excludeList, "--exclude $top/win32/buildDistAfterAllReleaseAndDebug.plg");\r
- push(@excludeList, "--exclude $top/win32/CVS");\r
- push(@excludeList, "--exclude $top/win32/tests/CVS");\r
- push(@excludeList, "--exclude $top/win32/libsilc/Debug/libsilc.ilk");\r
- push(@excludeList, "--exclude $top/win32/libsilc/Debug/libsilc.pdb");\r
- push(@excludeList, "--exclude $top/win32/libsilcclient/Debug/libsilcclient.ilk");\r
- push(@excludeList, "--exclude $top/win32/libsilcclient/Debug/libsilcclient.pdb");\r
- push(@excludeList, "--exclude $top/win32/libsilc/Release/libsilc.ilk");\r
- push(@excludeList, "--exclude $top/win32/libsilc/Release/libsilc.pdb");\r
- push(@excludeList, "--exclude $top/win32/libsilcclient/Release/libsilcclient.ilk");\r
- push(@excludeList, "--exclude $top/win32/silc.opt");\r
- push(@excludeList, "--exclude $top/irssi");\r
- push(@excludeList, "--exclude $top/doc/CVS");\r
- push(@excludeList, "--exclude $top/doc/examples/CVS");\r
- push(@excludeList, "--exclude $top/lib/doc/CVS");\r
- push(@excludeList, "--exclude $top/lib/silcclient/.libs");\r
- push(@excludeList, "--exclude $top/lib/silccore/.libs");\r
- push(@excludeList, "--exclude $top/lib/silccore/tests/CVS");\r
- push(@excludeList, "--exclude $top/lib/silccrypt/.libs");\r
- push(@excludeList, "--exclude $top/lib/silccrypt/tests/CVS");\r
- push(@excludeList, "--exclude $top/lib/silcmath/.libs");\r
- push(@excludeList, "--exclude $top/lib/silcmath/mpi/.libs");\r
- push(@excludeList, "--exclude $top/lib/silcsftp/.libs");\r
- push(@excludeList, "--exclude $top/lib/silcsftp/tests/CVS");\r
- push(@excludeList, "--exclude $top/lib/silcsim/.libs");\r
- push(@excludeList, "--exclude $top/lib/silcske/.libs");\r
- push(@excludeList, "--exclude $top/lib/silcutil/.libs");\r
- push(@excludeList, "--exclude $top/lib/silcutil/win32/.libs");\r
- push(@excludeList, "--exclude $top/silcer/CVS");\r
- push(@excludeList, "--exclude $top/silcer/intl/CVS");\r
- push(@excludeList, "--exclude $top/silcer/macros/CVS");\r
- push(@excludeList, "--exclude $top/silcer/pixmaps/CVS");\r
- push(@excludeList, "--exclude $top/silcer/po/CVS");\r
- push(@excludeList, "--exclude $top/silcer/src/CVS");\r
- push(@excludeList, "--exclude $top/silcer/ui/CVS");\r
- push(@excludeList, "--exclude $top/tutorial/CVS");\r
- push(@excludeList, "--exclude $top/tutorial/mybot/CVS");\r
-\r
-\r
-\r
- $excludes = "";\r
- foreach $entry(@excludeList)\r
- {\r
- $excludes = sprintf("%s%s ", $excludes, $entry);\r
- }\r
- \r
- print "Copying headers\n";\r
- `rm -rf include`;\r
- `mkdir -p include`;\r
- `find ../includes -name \"*.h\" -exec cp \\{} include \\;`;\r
- `find ../lib -name \"*.h\" -exec cp \\{} include \\;`;\r
- print "Creating distribution archive.\n";\r
- `cd ../.. ; tar $excludes -zcvf $top-win32.tgz $top/*` || die "Failed to create distribution\n"; \r
- }\r
-}\r
-else\r
-{\r
- die "Please run $0 from the win32 directory of the silc distribution\n";\r
-}\r
-\r
+#!/usr/bin/perl
+
+$p = `pwd`;
+
+if($p =~ /.*(\/win32)/)
+{
+ @dirents = split('/', $p);
+ if(@dirents > 2)
+ {
+ # check dependencies
+ print "Checking dependencies\n";
+ @statLibSilcDllDebug = stat("libsilc/Debug/libsilc.dll");
+ @statLibSilcExpDebug = stat("libsilc/Debug/libsilc.exp");
+ @statLibSilcLibDebug = stat("libsilc/Debug/libsilc.lib");
+ if(! @statLibSilcDllDebug || ! @statLibSilcExpDebug || ! @statLibSilcLibDebug)
+ {
+ die "Please rebuild libsilc Debug before creating the distribution\n";
+ }
+
+ @statLibSilcDllRelease = stat("libsilc/Release/libsilc.dll");
+ @statLibSilcExpRelease = stat("libsilc/Release/libsilc.exp");
+ @statLibSilcLibRelease = stat("libsilc/Release/libsilc.lib");
+ if(! @statLibSilcDllRelease || ! @statLibSilcExpRelease || ! @statLibSilcLibRelease)
+ {
+ die "Please rebuild libsilc Release before creating the distribution\n";
+ }
+
+ @statLibSilcClientDllDebug = stat("libsilcclient/Debug/libsilcclient.dll");
+ @statLibSilcClientExpDebug = stat("libsilcclient/Debug/libsilcclient.exp");
+ @statLibSilcClientLibDebug = stat("libsilcclient/Debug/libsilcclient.lib");
+ if(! @statLibSilcClientDllDebug ||
+ ! @statLibSilcClientExpDebug ||
+ ! @statLibSilcClientLibDebug ||
+ (@statLibSilcClientDllDebug[9] < @statLibSilcDllDebug[9]) ||
+ (@statLibSilcClientExpDebug[9] < @statLibSilcExpDebug[9]) ||
+ (@statLibSilcClientLibDebug[9] < @statLibSilcLibDebug[9])
+ )
+ {
+ die "Please rebuild libsilcclient Debug before creating the distribution\n";
+ }
+
+ @statLibSilcClientDllRelease = stat("libsilcclient/Release/libsilcclient.dll");
+ @statLibSilcClientExpRelease = stat("libsilcclient/Release/libsilcclient.exp");
+ @statLibSilcClientLibRelease = stat("libsilcclient/Release/libsilcclient.lib");
+ if(! @statLibSilcClientDllRelease ||
+ ! @statLibSilcClientExpRelease ||
+ ! @statLibSilcClientLibRelease ||
+ (@statLibSilcClientDllRelease[9] < @statLibSilcDllRelease[9]) ||
+ (@statLibSilcClientExpRelease[9] < @statLibSilcExpRelease[9]) ||
+ (@statLibSilcClientLibRelease[9] < @statLibSilcLibRelease[9])
+ )
+ {
+ die "Please rebuild libsilcclient Release before creating the distribution\n";
+ }
+
+ @statLibSilcStaticLibDebug = stat("libsilc_static/Debug/libsilc_static.lib");
+ if(! @statLibSilcStaticLibDebug)
+ {
+ die "Please rebuild libsilc_static Debug before creating the distribution\n";
+ }
+
+ @statLibSilcStaticLibRelease = stat("libsilc_static/Release/libsilc_static.lib");
+ if(! @statLibSilcStaticLibRelease)
+ {
+ die "Please rebuild libsilc_static Release before creating the distribution\n";
+ }
+
+ @statLibSilcClientStaticLibDebug = stat("libsilcclient_static/Debug/libsilcclient_static.lib");
+ if(! @statLibSilcClientStaticLibDebug || (@statLibSilcClientStaticLibDebug[9] < @statLibSilcStaticLibDebug[9]))
+ {
+ die "Please rebuild libsilcclient_static Debug before creating the distribution\n";
+ }
+
+ @statLibSilcClientStaticLibRelease = stat("libsilcclient_static/Release/libsilcclient_static.lib");
+ if(! @statLibSilcClientStaticLibRelease || (@statLibSilcClientStaticLibRelease[9] < @statLibSilcStaticLibRelease[9]))
+ {
+ die "Please rebuild libsilcclient_static Release before creating the distribution\n";
+ }
+
+ $index = @dirents - 2;
+ $top = @dirents[$index];
+ `find . -name \"*.obj\" -exec rm -f \\{} \\;`;
+ `find . -name \"*.idb\" -exec rm -f \\{} \\;`;
+ `find . -name \"*.pdb\" -exec rm -f \\{} \\;`;
+ `find . -name \"*.pch\" -exec rm -f \\{} \\;`;
+ `find ../ -name \"*.o\" -exec rm -f \\{} \\;`;
+ `find ../ -name \"*.lo\" -exec rm -f \\{} \\;`;
+ `find ../ -name \"*.a\" -exec rm -f \\{} \\;`;
+ `find ../ -name \"*.la\" -exec rm -f \\{} \\;`;
+ `find ../ -name \"*.lai\" -exec rm -f \\{} \\;`;
+
+ push(@excludeList, "--exclude $top/win32/Debug");
+ push(@excludeList, "--exclude $top/win32/libsilc/CVS");
+ push(@excludeList, "--exclude $top/win32/libsilc/libsilc.plg");
+ push(@excludeList, "--exclude $top/win32/libsilcclient/CVS");
+ push(@excludeList, "--exclude $top/win32/libsilcclient/libsilcclient.plg");
+ push(@excludeList, "--exclude $top/win32/libsilc_static/CVS");
+ push(@excludeList, "--exclude $top/win32/libsilc_static/libsilc_static.plg");
+ push(@excludeList, "--exclude $top/win32/libsilcclient_static/CVS");
+ push(@excludeList, "--exclude $top/win32/libsilcclient_static/libsilcclient_static.plg");
+ push(@excludeList, "--exclude $top/win32/silc.ncb");
+ push(@excludeList, "--exclude $top/win32/all.plg");
+ push(@excludeList, "--exclude $top/win32/buildDistAfterAllReleaseAndDebug.plg");
+ push(@excludeList, "--exclude $top/win32/CVS");
+ push(@excludeList, "--exclude $top/win32/tests/CVS");
+ push(@excludeList, "--exclude $top/win32/libsilc/Debug/libsilc.ilk");
+ push(@excludeList, "--exclude $top/win32/libsilc/Debug/libsilc.pdb");
+ push(@excludeList, "--exclude $top/win32/libsilcclient/Debug/libsilcclient.ilk");
+ push(@excludeList, "--exclude $top/win32/libsilcclient/Debug/libsilcclient.pdb");
+ push(@excludeList, "--exclude $top/win32/libsilc/Release/libsilc.ilk");
+ push(@excludeList, "--exclude $top/win32/libsilc/Release/libsilc.pdb");
+ push(@excludeList, "--exclude $top/win32/libsilcclient/Release/libsilcclient.ilk");
+ push(@excludeList, "--exclude $top/win32/silc.opt");
+ push(@excludeList, "--exclude $top/win32/tests");
+ push(@excludeList, "--exclude $top/apps");
+ push(@excludeList, "--exclude $top/doc/CVS");
+ push(@excludeList, "--exclude $top/doc/examples/CVS");
+ push(@excludeList, "--exclude $top/includes/CVS");
+ push(@excludeList, "--exclude $top/lib");
+ push(@excludeList, "--exclude $top/tutorial/CVS");
+ push(@excludeList, "--exclude $top/tutorial/mybot/CVS");
+
+ $excludes = "";
+ foreach $entry(@excludeList)
+ {
+ $excludes = sprintf("%s%s ", $excludes, $entry);
+ }
+
+ print "Copying headers\n";
+ `rm -rf include`;
+ `mkdir -p include`;
+ `find ../includes -name \"*.h\" -exec cp \\{} include \\;`;
+ `find ../lib -name \"*.h\" -exec cp \\{} include \\;`;
+ print "Creating distribution archive.\n";
+ `cd ../.. ; tar $excludes -zcvf $top-win32.tgz $top/*` || die "Failed to create distribution\n";
+ }
+}
+else
+{
+ die "Please run $0 from the win32 directory of the silc distribution\n";
+}
+