tools/builder/PkgCore.cs
changeset 388 4c346c316a49
child 392 12aa3258d020
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/builder/PkgCore.cs	Sat Jan 27 03:10:31 2007 +0000
     1.3 @@ -0,0 +1,96 @@
     1.4 +using System;
     1.5 +
     1.6 +namespace builder
     1.7 +{
     1.8 +	public class PkgCore : Package
     1.9 +	{
    1.10 +		public PkgCore()
    1.11 +		{
    1.12 +		}
    1.13 +
    1.14 +		public override string GetBaseFolder()
    1.15 +		{
    1.16 +			return "base/addons/sourcemod";
    1.17 +		}
    1.18 +
    1.19 +		/** 
    1.20 +		 * Must return the list of folders to create.
    1.21 +		 */
    1.22 +		public override string [] GetFolders()
    1.23 +		{
    1.24 +			string [] folders = new string[7];
    1.25 +
    1.26 +			folders[0] = "bin";
    1.27 +			folders[1] = "plugins/disabled";
    1.28 +			folders[2] = "configs";
    1.29 +			folders[3] = "translations";
    1.30 +			folders[4] = "logs";
    1.31 +			folders[5] = "extensions";
    1.32 +			folders[6] = "scripting/include";
    1.33 +
    1.34 +			return folders;
    1.35 +		}
    1.36 +
    1.37 +		/**
    1.38 +		 * Called when file to file copies must be performed
    1.39 +		 */
    1.40 +		public override void OnCopyFiles()
    1.41 +		{
    1.42 +		}
    1.43 +
    1.44 +		/**
    1.45 +		 * Called when dir to dir copies must be performed
    1.46 +		 */
    1.47 +		public override void OnCopyFolders(ABuilder builder)
    1.48 +		{
    1.49 +			builder.CopyFolder(this, "configs", "configs", null);
    1.50 +			
    1.51 +			string [] plugin_omits = new string[1];
    1.52 +			plugin_omits[0] = "spcomp.exe";
    1.53 +
    1.54 +			builder.CopyFolder(this, "plugins", "scripting", plugin_omits);
    1.55 +			builder.CopyFolder(this, "plugins/include", "scripting/include", null);
    1.56 +			builder.CopyFolder(this, "translations", "translations", null);
    1.57 +		}
    1.58 +
    1.59 +		/**
    1.60 +		 * Called to build libraries
    1.61 +		 */
    1.62 +		public override Library [] GetLibraries()
    1.63 +		{
    1.64 +			Library [] libs = new Library[5];
    1.65 +
    1.66 +			for (int i=0; i<libs.Length; i++)
    1.67 +			{
    1.68 +				libs[i] = new Library();
    1.69 +			}
    1.70 +
    1.71 +			libs[0].Destination = "bin";
    1.72 +			libs[0].LocalPath = "core";
    1.73 +			libs[0].Name = "sourcemod_mm";
    1.74 +			libs[0].PlatformExt = true;
    1.75 +
    1.76 +			libs[1].Destination = "bin";
    1.77 +			libs[1].LocalPath = "sourcepawn/jit/x86";
    1.78 +			libs[1].Name = "sourcepawn.jit.x86";
    1.79 +			libs[1].ProjectFile = "jit-x86";
    1.80 +
    1.81 +			libs[2].Destination = "scripting";
    1.82 +			libs[2].LocalPath = "sourcepawn/compiler";
    1.83 +			libs[2].Name = "spcomp";
    1.84 +			libs[2].IsExecutable = true;
    1.85 +
    1.86 +			libs[3].Destination = "extensions";
    1.87 +			libs[3].LocalPath = "extensions/geoip";
    1.88 +			libs[3].Name = "geoip.ext";
    1.89 +			libs[3].ProjectFile = "geoip";
    1.90 +
    1.91 +			libs[4].Destination = "extensions";
    1.92 +			libs[4].LocalPath = "extensions/threader";
    1.93 +			libs[4].Name = "threader.ext";
    1.94 +			libs[4].ProjectFile = "threader";
    1.95 +
    1.96 +			return libs;
    1.97 +		}
    1.98 +	}
    1.99 +}