using System; namespace builder { public class PkgCore : Package { public PkgCore() { } public override string GetBaseFolder() { return "base"; } public override void GetCompressBases(ref string path, ref string folder) { path = "base"; folder = "addons"; } public override string GetPackageName() { return "sourcemod-core"; } /** * Must return the list of folders to create. */ public override string [] GetFolders() { string [] folders = new string[13]; folders[0] = "addons/sourcemod/bin"; folders[1] = "addons/sourcemod/plugins/disabled"; folders[2] = "addons/sourcemod/gamedata"; folders[3] = "addons/sourcemod/configs/geoip"; folders[4] = "addons/sourcemod/translations"; folders[5] = "addons/sourcemod/logs"; folders[6] = "addons/sourcemod/extensions"; folders[7] = "addons/sourcemod/data"; folders[8] = "addons/sourcemod/scripting/include"; folders[9] = "addons/sourcemod/scripting/admin-flatfile"; folders[10] = "addons/sourcemod/scripting/testsuite"; folders[11] = "cfg/sourcemod"; folders[12] = "addons/sourcemod/configs/sql-init-scripts"; return folders; } /** * Called when file to file copies must be performed */ public override void OnCopyFiles(ABuilder builder) { builder.CopyFile(this, "sourcepawn/batchtool/compile.exe", "addons/sourcemod/scripting/compile.exe"); } /** * Called when dir to dir copies must be performed */ public override void OnCopyFolders(ABuilder builder) { builder.CopyFolder(this, "configs", "addons/sourcemod/configs", null); builder.CopyFolder(this, "configs/geoip", "addons/sourcemod/configs/geoip", null); builder.CopyFolder(this, "configs/cfg", "cfg/sourcemod", null); builder.CopyFolder(this, "configs/sql-init-scripts", "addons/sourcemod/configs/sql-init-scripts", null); string [] plugin_omits = new string[1]; plugin_omits[0] = "spcomp.exe"; string [] include_omits = new string[1]; include_omits[0] = "version.tpl"; builder.CopyFolder(this, "gamedata", "addons/sourcemod/gamedata", null); builder.CopyFolder(this, "plugins", "addons/sourcemod/scripting", plugin_omits); builder.CopyFolder(this, "plugins/include", "addons/sourcemod/scripting/include", include_omits); builder.CopyFolder(this, "translations", "addons/sourcemod/translations", null); builder.CopyFolder(this, "public/licenses", "addons/sourcemod", null); builder.CopyFolder(this, "plugins/admin-flatfile", "addons/sourcemod/scripting/admin-flatfile", null); builder.CopyFolder(this, "plugins/testsuite", "addons/sourcemod/scripting/testsuite", null); } /** * Called to build libraries */ public override Library [] GetLibraries() { Library [] libs = new Library[8]; for (int i=0; i