Skip to content

Commit

Permalink
Fix helpers module path lookup on newer Perl versions.
Browse files Browse the repository at this point in the history
(cherry picked from commit 5104549)
(cherry picked from commit 3bfd9a1)
  • Loading branch information
psychonic committed Jun 24, 2022
1 parent d45dd28 commit 80e8ff0
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 65 deletions.
2 changes: 2 additions & 0 deletions support/buildbot/bootstrap.pl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
my ($myself, $path) = fileparse($0);
chdir($path);

use FindBin;
use lib $FindBin::Bin;
require 'helpers.pm';

#Go back above build dir
Expand Down
2 changes: 2 additions & 0 deletions support/buildbot/package.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
my ($myself, $path) = fileparse($0);
chdir($path);

use FindBin;
use lib $FindBin::Bin;
require 'helpers.pm';

#Switch to the output folder.
Expand Down
2 changes: 2 additions & 0 deletions support/buildbot/startbuild.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
my ($myself, $path) = fileparse($0);
chdir($path);

use FindBin;
use lib $FindBin::Bin;
require 'helpers.pm';

chdir('../../../OUTPUT');
Expand Down
132 changes: 67 additions & 65 deletions support/buildbot/symstore.pl
Original file line number Diff line number Diff line change
@@ -1,65 +1,67 @@
#!/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";

#Get version info
my ($version);
$version = Build::ProductVersion(Build::PathFormat('product.version'));
$version =~ s/-dev//g;
$version .= '-git' . Build::GitRevNum('.');

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;
Build::Command("symstore add /r /f \"..\\OUTPUT\\$line\" /s \"S:\\mmsource\" /t \"Metamod:Source\" /v \"$version\" /c \"$build_type\"");
}

close(PDBLOG);

#Lowercase DLLs. Sigh.
my (@files);
opendir(DIR, "S:\\mmsource") or die "Could not open mmsource 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$/);
next unless (-d "S:\\mmsource\\$file");
opendir(DIR, "S:\\mmsource\\$file") or die "Could not open S:\\mmsource\\$file: $!\n";
@subdirs = readdir(DIR);
closedir(DIR);
for ($j = 0; $j <= $#subdirs; $j++)
{
next unless ($subdirs[$j] =~ /[A-Z]/);
Build::Command("rename S:\\mmsource\\$file\\" . $subdirs[$j] . " " . lc($subdirs[$j]));
}
}

#!/usr/bin/perl

use File::Basename;

my ($myself, $path) = fileparse($0);
chdir($path);

use FindBin;
use lib $FindBin::Bin;
require 'helpers.pm';

chdir('..');
chdir('..');

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'));
$version =~ s/-dev//g;
$version .= '-git' . Build::GitRevNum('.');

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;
Build::Command("symstore add /r /f \"..\\OUTPUT\\$line\" /s \"S:\\mmsource\" /t \"Metamod:Source\" /v \"$version\" /c \"$build_type\"");
}

close(PDBLOG);

#Lowercase DLLs. Sigh.
my (@files);
opendir(DIR, "S:\\mmsource") or die "Could not open mmsource 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$/);
next unless (-d "S:\\mmsource\\$file");
opendir(DIR, "S:\\mmsource\\$file") or die "Could not open S:\\mmsource\\$file: $!\n";
@subdirs = readdir(DIR);
closedir(DIR);
for ($j = 0; $j <= $#subdirs; $j++)
{
next unless ($subdirs[$j] =~ /[A-Z]/);
Build::Command("rename S:\\mmsource\\$file\\" . $subdirs[$j] . " " . lc($subdirs[$j]));
}
}

0 comments on commit 80e8ff0

Please sign in to comment.