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[22]; 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"; folders[13] = "addons/sourcemod/configs/sql-init-scripts/mysql"; folders[14] = "addons/sourcemod/configs/sql-init-scripts/sqlite"; folders[15] = "addons/sourcemod/extensions/games"; folders[16] = "addons/sourcemod/scripting/basecommands"; folders[17] = "addons/sourcemod/scripting/basecomm"; folders[18] = "addons/sourcemod/scripting/basefunvotes"; folders[19] = "addons/sourcemod/scripting/basevotes"; folders[20] = "addons/sourcemod/scripting/basebans"; folders[21] = "addons/sourcemod/scripting/basefuncommands"; 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); builder.CopyFolder(this, "configs/sql-init-scripts/mysql", "addons/sourcemod/configs/sql-init-scripts/mysql", null); builder.CopyFolder(this, "configs/sql-init-scripts/sqlite", "addons/sourcemod/configs/sql-init-scripts/sqlite", 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); builder.CopyFolder(this, "plugins/basecommands", "addons/sourcemod/scripting/basecommands", null); builder.CopyFolder(this, "plugins/basecomm", "addons/sourcemod/scripting/basecomm", null); builder.CopyFolder(this, "plugins/basefunvotes", "addons/sourcemod/scripting/basefunvotes", null); builder.CopyFolder(this, "plugins/basevotes", "addons/sourcemod/scripting/basevotes", null); builder.CopyFolder(this, "plugins/basebans", "addons/sourcemod/scripting/basebans", null); builder.CopyFolder(this, "plugins/basefuncommands", "addons/sourcemod/scripting/basefuncommands", null); } /** * Called to build libraries */ public override Library [] GetLibraries() { Library [] libs = new Library[10]; for (int i=0; i