buildbot/symstore.pl
author Ruben Gonzalez <drifter01620@gmail.com>
Wed Nov 12 08:29:24 2014 -0500 (2014-11-12)
changeset 197 fd967f09ab68
parent 60 3494bfad2033
permissions -rwxr-xr-x
Update CSGO Gamedata
     1 #!/usr/bin/perl
     2 
     3 use File::Basename;
     4 
     5 my ($myself, $path) = fileparse($0);
     6 chdir($path);
     7 
     8 require 'helpers.pm';
     9 
    10 chdir('..');
    11 
    12 open(PDBLOG, '../OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n";
    13 
    14 #Get version info
    15 my ($version);
    16 $version = Build::ProductVersion(Build::PathFormat('product.version'));
    17 $version =~ s/-dev//g;
    18 $version .= '-hg' . Build::HgRevNum('.');
    19 
    20 my ($build_type);
    21 $build_type = Build::GetBuildType(Build::PathFormat('buildbot/build_type'));
    22 
    23 if ($build_type eq "dev")
    24 {
    25 	$build_type = "buildbot";
    26 }
    27 elsif ($build_type eq "rel")
    28 {
    29 	$build_type = "release";
    30 }
    31 
    32 my ($line);
    33 while (<PDBLOG>)
    34 {
    35 	$line = $_;
    36 	$line =~ s/\.pdb/\*/;
    37 	chomp $line;
    38 	Build::Command("symstore add /r /f \"..\\OUTPUT\\$line\" /s \"S:\\cssdm\" /t \"Stripper\" /v \"$version\" /c \"$build_type\"");
    39 }
    40 
    41 close(PDBLOG);
    42 
    43 #Lowercase DLLs.  Sigh.
    44 my (@files);
    45 opendir(DIR, "S:\\cssdm");
    46 @files = readdir(DIR);
    47 closedir(DIR);
    48 
    49 my ($i, $j, $file, @subdirs);
    50 for ($i = 0; $i <= $#files; $i++)
    51 {
    52 	$file = $files[$i];
    53 	next unless ($file =~ /\.dll$/);
    54 	next unless (-d "S:\\cssdm\\$file");
    55 	opendir(DIR, "S:\\cssdm\\$file");
    56 	@subdirs = readdir(DIR);
    57 	closedir(DIR);
    58 	for ($j = 0; $j <= $#subdirs; $j++)
    59 	{
    60 		next unless ($subdirs[$j] =~ /[A-Z]/);
    61 		Build::Command("rename S:\\cssdm\\$file\\" . $subdirs[$j] . " " . lc($subdirs[$j]));
    62 	}	
    63 }
    64