2005-08-02 06:28:41 +00:00
|
|
|
using System;
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
namespace AMXXRelease
|
|
|
|
{
|
2005-08-24 02:53:38 +00:00
|
|
|
//AMX Mod X core distribution
|
2005-08-02 06:28:41 +00:00
|
|
|
public class CoreMod : AMod
|
|
|
|
{
|
|
|
|
public CoreMod()
|
|
|
|
{
|
|
|
|
AddModules();
|
|
|
|
AddPlugins();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override sealed string GetName()
|
|
|
|
{
|
|
|
|
return "base";
|
|
|
|
}
|
|
|
|
|
|
|
|
public override sealed string GetPluginDir()
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public override sealed string GetBaseName()
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2005-08-24 05:19:23 +00:00
|
|
|
//annoyingly complicated file exclusion filter
|
|
|
|
public override sealed bool ExcludeCopy(string file)
|
|
|
|
{
|
|
|
|
if ( ((file.IndexOf(".so")!=-1) || (ABuilder.GetFileName(file).CompareTo("amxxpc")==0))
|
|
|
|
&& (Releaser.IsWindows) )
|
|
|
|
return true;
|
|
|
|
if ( (file.IndexOf(".sh")!=-1) && Releaser.IsWindows )
|
|
|
|
return true;
|
|
|
|
if ( ((file.IndexOf(".exe")!=-1) || (file.IndexOf(".dll")!=-1))
|
|
|
|
&& (!Releaser.IsWindows) )
|
|
|
|
return true;
|
|
|
|
if ( (file.IndexOf("dlsym")!=-1) && Releaser.IsWindows )
|
|
|
|
return true;
|
|
|
|
if ( ((ABuilder.GetFileName(file).CompareTo("sasm")) == 0)
|
|
|
|
&& Releaser.IsWindows )
|
|
|
|
return true;
|
2007-03-13 00:21:35 +00:00
|
|
|
if (ABuilder.GetFileName(file).CompareTo("svn_version.tpl") == 0)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2005-08-24 05:19:23 +00:00
|
|
|
|
|
|
|
return base.ExcludeCopy(file);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-09-18 03:26:26 +00:00
|
|
|
public override sealed bool CopyExtraFiles(ABuilder ab, string basedir, string source)
|
2005-08-02 06:28:41 +00:00
|
|
|
{
|
|
|
|
//Create directory structures
|
|
|
|
string datadir = basedir + "\\data";
|
|
|
|
|
2005-08-24 02:53:38 +00:00
|
|
|
if (!Directory.Exists(ABuilder.PropSlashes(datadir)))
|
2005-09-18 03:26:26 +00:00
|
|
|
ab.CreateDir(ABuilder.PropSlashes(datadir));
|
2005-08-02 06:28:41 +00:00
|
|
|
|
2005-08-24 02:53:38 +00:00
|
|
|
File.Copy(ABuilder.PropSlashes(source + "\\dlls\\geoip\\GeoIP.dat"),
|
|
|
|
ABuilder.PropSlashes(datadir + "\\GeoIP.dat"),
|
2005-08-02 06:28:41 +00:00
|
|
|
true);
|
|
|
|
|
2005-09-18 03:26:26 +00:00
|
|
|
ABuilder.CopyNormal(ab,
|
2005-08-24 02:53:38 +00:00
|
|
|
ABuilder.PropSlashes(source + "\\plugins\\lang"),
|
|
|
|
ABuilder.PropSlashes(datadir + "\\lang")
|
|
|
|
);
|
2005-08-02 06:28:41 +00:00
|
|
|
|
2005-08-24 02:53:38 +00:00
|
|
|
if (!Directory.Exists(ABuilder.PropSlashes(basedir + "\\logs")))
|
2005-09-18 03:26:26 +00:00
|
|
|
ab.CreateDir(ABuilder.PropSlashes(basedir + "\\logs"));
|
2005-08-02 06:28:41 +00:00
|
|
|
|
2005-09-18 03:26:26 +00:00
|
|
|
ABuilder.CopyNormal(ab,
|
2005-08-24 02:53:38 +00:00
|
|
|
ABuilder.PropSlashes(source + "\\plugins\\include"),
|
|
|
|
ABuilder.PropSlashes(basedir + "\\scripting\\include"));
|
2005-08-02 06:28:41 +00:00
|
|
|
|
2006-09-10 06:29:22 +00:00
|
|
|
ABuilder.CopyNormal(ab,
|
|
|
|
ABuilder.PropSlashes(source + "\\plugins\\include\\amxmod_compat"),
|
|
|
|
ABuilder.PropSlashes(basedir + "\\scripting\\include\\amxmod_compat"));
|
|
|
|
|
|
|
|
ABuilder.CopyNormal(ab,
|
|
|
|
ABuilder.PropSlashes(source + "\\plugins\\amxmod_compat"),
|
|
|
|
ABuilder.PropSlashes(basedir + "\\scripting\\amxmod_compat"));
|
|
|
|
|
2006-09-10 06:46:06 +00:00
|
|
|
ABuilder.CopyNormal(ab,
|
|
|
|
ABuilder.PropSlashes(source + "\\plugins\\testsuite"),
|
|
|
|
ABuilder.PropSlashes(basedir + "\\scripting\\testsuite"));
|
|
|
|
|
2005-08-02 06:28:41 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
private void AddPlugins()
|
|
|
|
{
|
|
|
|
AddPlugin("admin");
|
|
|
|
|
|
|
|
Plugin admin_sql = new Plugin("admin_sql");
|
|
|
|
admin_sql.source = "admin";
|
|
|
|
admin_sql.options = "USING_SQL=1 -oadmin_sql.amx";
|
|
|
|
m_Plugins.Add(admin_sql);
|
|
|
|
|
2006-09-09 03:29:13 +00:00
|
|
|
Plugin bcompat = new Plugin("amxmod_compat");
|
2006-09-10 06:29:22 +00:00
|
|
|
bcompat.source = "amxmod_compat/amxmod_compat";
|
2006-09-09 03:29:13 +00:00
|
|
|
m_Plugins.Add(bcompat);
|
|
|
|
|
2005-08-02 06:28:41 +00:00
|
|
|
AddPlugin("adminchat");
|
|
|
|
AddPlugin("admincmd");
|
|
|
|
AddPlugin("adminhelp");
|
2005-08-02 07:53:59 +00:00
|
|
|
AddPlugin("adminslots");
|
2005-08-02 06:28:41 +00:00
|
|
|
AddPlugin("adminvote");
|
|
|
|
AddPlugin("antiflood");
|
|
|
|
AddPlugin("imessage");
|
|
|
|
AddPlugin("mapchooser");
|
|
|
|
AddPlugin("mapsmenu");
|
|
|
|
AddPlugin("menufront");
|
|
|
|
AddPlugin("multilingual");
|
|
|
|
AddPlugin("nextmap");
|
|
|
|
AddPlugin("pausecfg");
|
|
|
|
AddPlugin("plmenu");
|
|
|
|
AddPlugin("scrollmsg");
|
|
|
|
AddPlugin("statscfg");
|
|
|
|
AddPlugin("telemenu");
|
|
|
|
AddPlugin("timeleft");
|
|
|
|
AddPlugin("cmdmenu");
|
2007-10-26 01:47:40 +00:00
|
|
|
AddPlugin("pluginmenu");
|
2005-08-02 06:28:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private void AddModules()
|
|
|
|
{
|
|
|
|
Module core = new Module();
|
|
|
|
|
|
|
|
core.sourcedir = "amxmodx";
|
|
|
|
core.vcproj = "amxmodx_mm";
|
|
|
|
core.build = "JITRelease";
|
|
|
|
core.projname = "amxmodx_mm";
|
|
|
|
core.outdir = "dlls";
|
|
|
|
|
2007-03-13 11:46:03 +00:00
|
|
|
Module mysqlx = new Module("mysqlx");
|
2007-04-25 16:37:13 +00:00
|
|
|
mysqlx.projname = "mysql_amxx";
|
|
|
|
|
2007-03-13 11:46:03 +00:00
|
|
|
Module sqlitex = new Module("sqlite");
|
|
|
|
Module engine = new Module("engine");
|
|
|
|
Module fun = new Module("fun");
|
2005-08-02 06:28:41 +00:00
|
|
|
Module geoip = new Module("geoip");
|
|
|
|
Module fakemeta = new Module("fakemeta");
|
|
|
|
Module sockets = new Module("sockets");
|
|
|
|
Module regex = new Module("regex");
|
|
|
|
Module nvault = new Module("nvault");
|
2007-08-03 16:48:04 +00:00
|
|
|
Module sammich = new Module("hamsandwich");
|
2005-08-02 06:28:41 +00:00
|
|
|
|
|
|
|
m_Modules.Add(core);
|
2006-06-04 01:46:24 +00:00
|
|
|
m_Modules.Add(mysqlx);
|
2005-08-02 06:28:41 +00:00
|
|
|
m_Modules.Add(engine);
|
|
|
|
m_Modules.Add(fun);
|
|
|
|
m_Modules.Add(geoip);
|
|
|
|
m_Modules.Add(fakemeta);
|
|
|
|
m_Modules.Add(sockets);
|
|
|
|
m_Modules.Add(regex);
|
|
|
|
m_Modules.Add(nvault);
|
2006-06-04 01:46:24 +00:00
|
|
|
m_Modules.Add(sqlitex);
|
2007-08-03 16:48:04 +00:00
|
|
|
m_Modules.Add(sammich);
|
2005-08-02 06:28:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|