diff --git a/tools/buildbot/bootstrap.pl b/tools/buildbot/bootstrap.pl index fc15c906..81997fb5 100755 --- a/tools/buildbot/bootstrap.pl +++ b/tools/buildbot/bootstrap.pl @@ -27,7 +27,7 @@ die "Unable to build builder tool!\n" unless -e 'builder.exe'; chdir(Build::PathFormat('../..')); #Get the source path. -my ($root) = getcwd(); +our ($root) = getcwd(); #Create output folder if it doesn't exist. if (!(-d 'OUTPUT')) { @@ -58,3 +58,34 @@ if ($^O eq "linux") Build::Command("chmod +x tools/versionchanger.pl"); } Build::Command(Build::PathFormat('tools/versionchanger.pl') . ' --buildstring="-dev"'); + +#Bootstrap extensions that have complex dependencies + +if ($^O eq "linux") +{ + BuildLibCurl_Linux(); +} +else +{ + BuildLibCurl_Win32(); +} + +sub BuildLibCurl_Win32 +{ + chdir("extensions\\curl\\curl-src\\lib"); + Build::Command('"' . $ENV{'VC9BUILDER'} . '" /rebuild build_libcurl.vcproj LIB-Release'); + die "Unable to find libcurl.lib!\n" unless (-f "LIB-Release\\libcurl.lib"); + chdir("..\\..\\..\\.."); +} + +sub BuildLibCurl_Linux +{ + chdir("extensions/curl/curl-src"); + Build::Command("mkdir -p Release"); + Build::Command("chmod +x configure"); + chdir("Release"); + Build::Command("../configure --enable-static --disable-shared --disable-ldap --without-ssl --without-zlib"); + Build::Command("make"); + die "Unable to find libcurl.a!\n" unless (-f "lib/.libs/libcurl.a"); + chdir("../../../.."); +} diff --git a/tools/builder/Main.cs b/tools/builder/Main.cs index ce22634a..425930e7 100644 --- a/tools/builder/Main.cs +++ b/tools/builder/Main.cs @@ -31,10 +31,13 @@ namespace builder else if (cfg.Platform == BasePlatform.Platform_Windows) { bld = new Win32Builder(cfg); - if (cfg.pdb_log_file != null && File.Exists(cfg.pdb_log_file)) + /* Do not delete this file anymore. We don't support rebuilds, and thus the file + * is guaranteed to be wiped by buildbot. + */ + /*if (cfg.pdb_log_file != null && File.Exists(cfg.pdb_log_file)) { File.Delete(cfg.pdb_log_file); - } + }*/ } try diff --git a/tools/builder/PkgCore.cs b/tools/builder/PkgCore.cs index 41b399a1..42d2185a 100644 --- a/tools/builder/PkgCore.cs +++ b/tools/builder/PkgCore.cs @@ -292,6 +292,13 @@ namespace builder lib.vcproj_name = "clientprefs"; libraries.Add(lib); + lib = new Library(); + lib.package_path = "addons/sourcemod/extensions"; + lib.source_path = "extensions/curl"; + lib.binary_name = "webternet.ext"; + lib.vcproj_name = "curl"; + libraries.Add(lib); + return (Library [])libraries.ToArray(typeof(Library)); } diff --git a/tools/builder/Win32Builder.cs b/tools/builder/Win32Builder.cs index 04792798..762bb8ba 100644 --- a/tools/builder/Win32Builder.cs +++ b/tools/builder/Win32Builder.cs @@ -52,7 +52,7 @@ namespace builder } else if (lib.build_mode == BuildMode.BuildMode_Left4Dead) { - config_name = config_name + " - Left 4 Dead"; + config_name = config_name + " - Left 4 Dead"; } string binpath = Config.PathFormat("{0}/{1}/{2}",