mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2024-11-29 11:24:19 +01:00
Added windows support to builder.
This commit is contained in:
parent
276d0e6f4a
commit
55b54ac77f
@ -12,10 +12,11 @@ require 'helpers.pm';
|
||||
chdir('..');
|
||||
chdir('..');
|
||||
|
||||
Build('loader', '', 'server', 'full');
|
||||
Build('core-legacy', '', 'metamod.1.ep1', '');
|
||||
Build('core', 'OrangeBox', 'metamod.2.ep2', '');
|
||||
Build('core', 'Left4Dead', 'metamod.2.l4d', '');
|
||||
# Folder .vcproj Engine Binary Suffix type
|
||||
Build('loader', 'mm_loader', '', 'server', 'full');
|
||||
Build('core-legacy', 'mm_core-legacy', '', 'metamod.1.ep1', '');
|
||||
Build('core', 'mm_core', 'OrangeBox', 'metamod.2.ep2', '');
|
||||
Build('core', 'mm_core', 'Left4Dead', 'metamod.2.l4d', '');
|
||||
|
||||
#Structure our output folder
|
||||
mkdir('OUTPUT');
|
||||
@ -43,7 +44,7 @@ sub Copy
|
||||
|
||||
sub Build
|
||||
{
|
||||
my ($srcdir, $objdir, $binary, $suffix) = (@_);
|
||||
my ($srcdir, $vcproj, $objdir, $binary, $suffix) = (@_);
|
||||
|
||||
if ($^O eq "linux")
|
||||
{
|
||||
@ -57,6 +58,45 @@ sub Build
|
||||
}
|
||||
BuildLinux($srcdir, $objdir, $binary);
|
||||
}
|
||||
else
|
||||
{
|
||||
$binary .= '.dll';
|
||||
BuildWindows($srcdir, $vcproj, $objdir, $binary);
|
||||
}
|
||||
}
|
||||
|
||||
sub BuildWindows
|
||||
{
|
||||
my ($srcdir, $vcproj, $build, $binary) = (@));
|
||||
my ($dir, $file, $param, $vcbuilder, $cmd);
|
||||
|
||||
$dir = getcwd();
|
||||
chdir($srcdir);
|
||||
|
||||
$param = "Release";
|
||||
if ($build eq "Orange Box")
|
||||
{
|
||||
$param = "Release - Orange Box";
|
||||
}
|
||||
elsif ($build eq "Left4Dead")
|
||||
{
|
||||
$param = "Release - Left 4 Dead";
|
||||
}
|
||||
|
||||
print "Clean building $srcdir...\n";
|
||||
$vcbuilder = $ENV{'VC9BUILDER'};
|
||||
$cmd = "\"$vcbuilder\" /rebuild \"$vcproj.vcproj\" \"$param\"";
|
||||
print "$cmd\n";
|
||||
system($cmd);
|
||||
CheckFailure();
|
||||
|
||||
$file = "$param\\$binary";
|
||||
|
||||
die "Output library not found: $file\n" if (!-f $file);
|
||||
|
||||
chdir($dir);
|
||||
|
||||
push(@LIBRARIES, "$srcdir\\$file");
|
||||
}
|
||||
|
||||
sub BuildLinux
|
||||
|
Loading…
Reference in New Issue
Block a user