1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-12-02 14:24:16 +01:00
HLMetaModOfficial/support/buildbot/symstore.pl

66 lines
1.3 KiB
Perl
Raw Normal View History

2008-11-18 12:23:58 +01:00
#!/usr/bin/perl
use File::Basename;
my ($myself, $path) = fileparse($0);
chdir($path);
require 'helpers.pm';
chdir('..');
chdir('..');
open(PDBLOG, '../OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n";
2008-11-18 12:23:58 +01:00
#Get version info
my ($version);
$version = Build::ProductVersion(Build::PathFormat('product.version'));
$version =~ s/-dev//g;
2008-11-18 12:23:58 +01:00
$version .= '-hg' . Build::HgRevNum('.');
my ($build_type);
$build_type = Build::GetBuildType(Build::PathFormat('support/buildbot/build_type'));
if ($build_type eq "dev")
{
$build_type = "buildbot";
}
elsif ($build_type eq "rel")
{
$build_type = "release";
}
my ($line);
while (<PDBLOG>)
{
$line = $_;
$line =~ s/\.pdb/\*/;
chomp $line;
2011-03-13 05:18:10 +01:00
Build::Command("symstore add /r /f \"..\\OUTPUT\\$line\" /s \"S:\\mmsource\" /t \"Metamod:Source\" /v \"$version\" /c \"$build_type\"");
}
close(PDBLOG);
2008-11-18 12:23:58 +01:00
#Lowercase DLLs. Sigh.
my (@files);
2011-03-13 05:18:10 +01:00
opendir(DIR, "S:\\mmsource");
2008-11-18 12:23:58 +01:00
@files = readdir(DIR);
closedir(DIR);
my ($i, $j, $file, @subdirs);
for ($i = 0; $i <= $#files; $i++)
{
$file = $files[$i];
next unless ($file =~ /\.dll$/);
2011-03-13 05:18:10 +01:00
next unless (-d "S:\\mmsource\\$file");
opendir(DIR, "S:\\mmsource\\$file");
2008-11-18 12:23:58 +01:00
@subdirs = readdir(DIR);
closedir(DIR);
for ($j = 0; $j <= $#subdirs; $j++)
{
next unless ($subdirs[$j] =~ /[A-Z]/);
2011-03-13 05:18:10 +01:00
Build::Command("rename S:\\mmsource\\$file\\" . $subdirs[$j] . " " . lc($subdirs[$j]));
2008-11-18 12:23:58 +01:00
}
}