2007-01-27 04:10:31 +01:00
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace builder
|
|
|
|
{
|
|
|
|
public class PkgCore : Package
|
|
|
|
{
|
|
|
|
public PkgCore()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public override string GetBaseFolder()
|
|
|
|
{
|
|
|
|
return "base/addons/sourcemod";
|
|
|
|
}
|
|
|
|
|
2007-01-28 05:19:46 +01:00
|
|
|
public override void GetCompressBases(ref string path, ref string folder)
|
|
|
|
{
|
|
|
|
path = "base";
|
|
|
|
folder = "addons";
|
|
|
|
}
|
|
|
|
|
|
|
|
public override string GetPackageName()
|
|
|
|
{
|
|
|
|
return "sourcemod-core";
|
|
|
|
}
|
|
|
|
|
2007-01-27 04:10:31 +01:00
|
|
|
/**
|
|
|
|
* Must return the list of folders to create.
|
|
|
|
*/
|
|
|
|
public override string [] GetFolders()
|
|
|
|
{
|
2007-05-06 21:45:46 +02:00
|
|
|
string [] folders = new string[8];
|
2007-01-27 04:10:31 +01:00
|
|
|
|
|
|
|
folders[0] = "bin";
|
|
|
|
folders[1] = "plugins/disabled";
|
2007-04-03 09:02:27 +02:00
|
|
|
folders[2] = "configs/gamedata";
|
2007-01-27 04:10:31 +01:00
|
|
|
folders[3] = "translations";
|
|
|
|
folders[4] = "logs";
|
|
|
|
folders[5] = "extensions";
|
|
|
|
folders[6] = "scripting/include";
|
2007-05-06 21:45:46 +02:00
|
|
|
folders[7] = "data";
|
2007-01-27 04:10:31 +01:00
|
|
|
|
|
|
|
return folders;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when file to file copies must be performed
|
|
|
|
*/
|
2007-01-28 05:19:46 +01:00
|
|
|
public override void OnCopyFiles(ABuilder builder)
|
2007-01-27 04:10:31 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when dir to dir copies must be performed
|
|
|
|
*/
|
|
|
|
public override void OnCopyFolders(ABuilder builder)
|
|
|
|
{
|
|
|
|
builder.CopyFolder(this, "configs", "configs", null);
|
2007-04-03 09:02:27 +02:00
|
|
|
builder.CopyFolder(this, "configs/gamedata", "configs/gamedata", null);
|
2007-01-27 04:10:31 +01:00
|
|
|
|
|
|
|
string [] plugin_omits = new string[1];
|
|
|
|
plugin_omits[0] = "spcomp.exe";
|
|
|
|
|
2007-03-03 09:56:45 +01:00
|
|
|
string [] include_omits = new string[1];
|
2007-03-03 10:46:36 +01:00
|
|
|
include_omits[0] = "version.tpl";
|
2007-03-03 09:56:45 +01:00
|
|
|
|
2007-01-27 04:10:31 +01:00
|
|
|
builder.CopyFolder(this, "plugins", "scripting", plugin_omits);
|
2007-03-03 10:46:36 +01:00
|
|
|
builder.CopyFolder(this, "plugins/include", "scripting/include", include_omits);
|
2007-01-27 04:10:31 +01:00
|
|
|
builder.CopyFolder(this, "translations", "translations", null);
|
2007-01-28 05:19:46 +01:00
|
|
|
builder.CopyFolder(this, "public/licenses", null, null);
|
2007-01-27 04:10:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called to build libraries
|
|
|
|
*/
|
|
|
|
public override Library [] GetLibraries()
|
|
|
|
{
|
|
|
|
Library [] libs = new Library[5];
|
|
|
|
|
|
|
|
for (int i=0; i<libs.Length; i++)
|
|
|
|
{
|
|
|
|
libs[i] = new Library();
|
|
|
|
}
|
|
|
|
|
|
|
|
libs[0].Destination = "bin";
|
|
|
|
libs[0].LocalPath = "core";
|
|
|
|
libs[0].Name = "sourcemod_mm";
|
|
|
|
libs[0].PlatformExt = true;
|
|
|
|
|
|
|
|
libs[1].Destination = "bin";
|
|
|
|
libs[1].LocalPath = "sourcepawn/jit/x86";
|
|
|
|
libs[1].Name = "sourcepawn.jit.x86";
|
|
|
|
libs[1].ProjectFile = "jit-x86";
|
|
|
|
|
|
|
|
libs[2].Destination = "scripting";
|
|
|
|
libs[2].LocalPath = "sourcepawn/compiler";
|
|
|
|
libs[2].Name = "spcomp";
|
|
|
|
libs[2].IsExecutable = true;
|
|
|
|
|
|
|
|
libs[3].Destination = "extensions";
|
|
|
|
libs[3].LocalPath = "extensions/geoip";
|
|
|
|
libs[3].Name = "geoip.ext";
|
|
|
|
libs[3].ProjectFile = "geoip";
|
|
|
|
|
|
|
|
libs[4].Destination = "extensions";
|
|
|
|
libs[4].LocalPath = "extensions/threader";
|
|
|
|
libs[4].Name = "threader.ext";
|
|
|
|
libs[4].ProjectFile = "threader";
|
|
|
|
|
|
|
|
return libs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-01-27 04:40:05 +01:00
|
|
|
|