sourcemod/tools/buildbot/symstore.pl

66 lines
1.4 KiB
Perl
Raw Normal View History

#!/usr/bin/perl
use File::Basename;
my ($myself, $path) = fileparse($0);
chdir($path);
require 'helpers.pm';
chdir('..');
chdir('..');
2009-08-30 09:21:42 +02:00
open(PDBLOG, '../OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n";
#Get version info
my ($version);
$version = Build::ProductVersion(Build::PathFormat('product.version'));
2009-08-30 09:21:42 +02:00
$version =~ s/-dev//g;
$version .= '-hg' . Build::HgRevNum('.');
my ($build_type);
$build_type = Build::GetBuildType(Build::PathFormat('tools/buildbot/build_type'));
2009-08-30 09:21:42 +02:00
if ($build_type eq "dev")
{
$build_type = "buildbot";
}
2009-08-30 09:21:42 +02:00
elsif ($build_type eq "rel")
{
$build_type = "release";
}
my ($line);
while (<PDBLOG>)
{
$line = $_;
$line =~ s/\.pdb/\*/;
chomp $line;
2011-03-13 08:01:29 +01:00
Build::Command("symstore add /r /f \"..\\OUTPUT\\$line\" /s \"S:\\sourcemod\" /t \"SourceMod\" /v \"$version\" /c \"$build_type\"");
}
close(PDBLOG);
#Lowercase DLLs. Sigh.
my (@files);
opendir(DIR, "S:\\sourcemod") or die "Could not open sourcemod symbol folder: $!\n";
@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 08:01:29 +01:00
next unless (-d "S:\\sourcemod\\$file");
opendir(DIR, "S:\\sourcemod\\$file") or die "Could not open S:\\sourcemod\\$file: $!\n";
@subdirs = readdir(DIR);
closedir(DIR);
2008-11-11 11:21:25 +01:00
for ($j = 0; $j <= $#subdirs; $j++)
{
next unless ($subdirs[$j] =~ /[A-Z]/);
2011-03-13 08:01:29 +01:00
Build::Command("rename S:\\sourcemod\\$file\\" . $subdirs[$j] . " " . lc($subdirs[$j]));
}
}