Skip to content

Commit 3bfd9a1

Browse files
committed
Fix helpers module path lookup on newer Perl versions.
(cherry picked from commit 5104549)
1 parent b7fcd66 commit 3bfd9a1

File tree

4 files changed

+73
-65
lines changed

4 files changed

+73
-65
lines changed

support/buildbot/bootstrap.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
my ($myself, $path) = fileparse($0);
1010
chdir($path);
1111

12+
use FindBin;
13+
use lib $FindBin::Bin;
1214
require 'helpers.pm';
1315

1416
#Go back above build dir

support/buildbot/package.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
my ($myself, $path) = fileparse($0);
2727
chdir($path);
2828

29+
use FindBin;
30+
use lib $FindBin::Bin;
2931
require 'helpers.pm';
3032

3133
#Switch to the output folder.

support/buildbot/startbuild.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
my ($myself, $path) = fileparse($0);
77
chdir($path);
88

9+
use FindBin;
10+
use lib $FindBin::Bin;
911
require 'helpers.pm';
1012

1113
chdir('../../../OUTPUT');

support/buildbot/symstore.pl

Lines changed: 67 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,67 @@
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-
chdir('..');
12-
13-
open(PDBLOG, '../OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n";
14-
15-
#Get version info
16-
my ($version);
17-
$version = Build::ProductVersion(Build::PathFormat('product.version'));
18-
$version =~ s/-dev//g;
19-
$version .= '-git' . Build::GitRevNum('.');
20-
21-
my ($build_type);
22-
$build_type = Build::GetBuildType(Build::PathFormat('support/buildbot/build_type'));
23-
24-
if ($build_type eq "dev")
25-
{
26-
$build_type = "buildbot";
27-
}
28-
elsif ($build_type eq "rel")
29-
{
30-
$build_type = "release";
31-
}
32-
33-
my ($line);
34-
while (<PDBLOG>)
35-
{
36-
$line = $_;
37-
$line =~ s/\.pdb/\*/;
38-
chomp $line;
39-
Build::Command("symstore add /r /f \"..\\OUTPUT\\$line\" /s \"S:\\mmsource\" /t \"Metamod:Source\" /v \"$version\" /c \"$build_type\"");
40-
}
41-
42-
close(PDBLOG);
43-
44-
#Lowercase DLLs. Sigh.
45-
my (@files);
46-
opendir(DIR, "S:\\mmsource") or die "Could not open mmsource symbol folder: $!\n";
47-
@files = readdir(DIR);
48-
closedir(DIR);
49-
50-
my ($i, $j, $file, @subdirs);
51-
for ($i = 0; $i <= $#files; $i++)
52-
{
53-
$file = $files[$i];
54-
next unless ($file =~ /\.dll$/);
55-
next unless (-d "S:\\mmsource\\$file");
56-
opendir(DIR, "S:\\mmsource\\$file") or die "Could not open S:\\mmsource\\$file: $!\n";
57-
@subdirs = readdir(DIR);
58-
closedir(DIR);
59-
for ($j = 0; $j <= $#subdirs; $j++)
60-
{
61-
next unless ($subdirs[$j] =~ /[A-Z]/);
62-
Build::Command("rename S:\\mmsource\\$file\\" . $subdirs[$j] . " " . lc($subdirs[$j]));
63-
}
64-
}
65-
1+
#!/usr/bin/perl
2+
3+
use File::Basename;
4+
5+
my ($myself, $path) = fileparse($0);
6+
chdir($path);
7+
8+
use FindBin;
9+
use lib $FindBin::Bin;
10+
require 'helpers.pm';
11+
12+
chdir('..');
13+
chdir('..');
14+
15+
open(PDBLOG, '../OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n";
16+
17+
#Get version info
18+
my ($version);
19+
$version = Build::ProductVersion(Build::PathFormat('product.version'));
20+
$version =~ s/-dev//g;
21+
$version .= '-git' . Build::GitRevNum('.');
22+
23+
my ($build_type);
24+
$build_type = Build::GetBuildType(Build::PathFormat('support/buildbot/build_type'));
25+
26+
if ($build_type eq "dev")
27+
{
28+
$build_type = "buildbot";
29+
}
30+
elsif ($build_type eq "rel")
31+
{
32+
$build_type = "release";
33+
}
34+
35+
my ($line);
36+
while (<PDBLOG>)
37+
{
38+
$line = $_;
39+
$line =~ s/\.pdb/\*/;
40+
chomp $line;
41+
Build::Command("symstore add /r /f \"..\\OUTPUT\\$line\" /s \"S:\\mmsource\" /t \"Metamod:Source\" /v \"$version\" /c \"$build_type\"");
42+
}
43+
44+
close(PDBLOG);
45+
46+
#Lowercase DLLs. Sigh.
47+
my (@files);
48+
opendir(DIR, "S:\\mmsource") or die "Could not open mmsource symbol folder: $!\n";
49+
@files = readdir(DIR);
50+
closedir(DIR);
51+
52+
my ($i, $j, $file, @subdirs);
53+
for ($i = 0; $i <= $#files; $i++)
54+
{
55+
$file = $files[$i];
56+
next unless ($file =~ /\.dll$/);
57+
next unless (-d "S:\\mmsource\\$file");
58+
opendir(DIR, "S:\\mmsource\\$file") or die "Could not open S:\\mmsource\\$file: $!\n";
59+
@subdirs = readdir(DIR);
60+
closedir(DIR);
61+
for ($j = 0; $j <= $#subdirs; $j++)
62+
{
63+
next unless ($subdirs[$j] =~ /[A-Z]/);
64+
Build::Command("rename S:\\mmsource\\$file\\" . $subdirs[$j] . " " . lc($subdirs[$j]));
65+
}
66+
}
67+

0 commit comments

Comments
 (0)