#!/usr/bin/perl -w no warnings 'portable'; use strict; use Getopt::Long; use File::Spec::Functions qw(:ALL); my $command = "build"; my $debug = 0; my $wmsdkpath; if (!GetOptions( 'wmsdkpath=s' => \$wmsdkpath, 'command=s' => \$command, 'debug' => \$debug, )) { showUsage(); exit(1); }; my $incdir; my $libdir; if (defined($wmsdkpath)) { $incdir = catdir($wmsdkpath, "include"); $libdir = catdir($wmsdkpath, "lib"); if (!-d $wmsdkpath || !-d $incdir || !-d $libdir) { print "Can't find WMSDK9 directory\n"; exit(1); } } my $objdir; if ($debug) { $objdir = "Debug"; } else { $objdir = "Release"; } if (defined($incdir)) { print "Creating wmadec VC Project...\n"; open TEMPLATE, "wmadec.vctmpl" or die "Couldn't open project template ($!)\n"; open PROJ, ">wmadec.vcproj" or die "Couldn't open VC project for writing ($!)\n"; while (