tools/builder/Package.cs
author Scott Ehlert <ds@alliedmods.net>
Sun Jul 15 08:00:26 2007 +0000 (2007-07-15)
changeset 1116 40cc5e9f0f1b
parent 852 9a7a93363979
child 1329 8a8789881ec3
permissions -rw-r--r--
Removed strange debugging code
     1 using System;
     2 
     3 namespace builder
     4 {
     5 	public class Library
     6 	{
     7 		public Library()
     8 		{
     9 			PlatformExt = false;
    10 			IsExecutable = false;
    11 			ReleaseBuild = "Release";
    12 		}
    13 		public string Name;			/* Name of binary */
    14 		public string LocalPath;	/* Local path to library build scripts */
    15 		public string ReleaseBuild;	/* Release build name */
    16 		public string Destination;	/* Final relative path */
    17 		public bool PlatformExt;	/* Extra platform extension */
    18 		public string ProjectFile;	/* Project file, NULL for standard */
    19 		public bool IsExecutable;	/* If this is an EXE instead of a DLL */
    20 		//string DebugBuild;		/* Debug build name */
    21 	};
    22 
    23 	public class Plugin
    24 	{
    25 		public Plugin(string file)
    26 		{
    27 			Source = file;
    28 		}
    29 		public Plugin (string file, string folder)
    30 		{
    31 			Source = file;
    32 			Folder = folder;
    33 		}
    34 		public string Folder;		/* Source folder relative to scripting (null for default) */
    35 		public string Source;		/* Source file name */
    36 	};
    37 
    38 	public abstract class Package
    39 	{
    40 		/**
    41 		 * Must return the root compression point.
    42 		 */
    43 		public abstract void GetCompressBases(ref string path, ref string folder);
    44 
    45 		/**
    46 		 * Must return the base package output folder.
    47 		 */
    48 		public abstract string GetBaseFolder();
    49 
    50 		/** 
    51 		 * Must return the list of folders to create.
    52 		 */
    53 		public abstract string [] GetFolders();
    54 
    55 		/**
    56 		 * Called when file to file copies must be performed
    57 		 */
    58 		public abstract void OnCopyFiles(ABuilder builder);
    59 
    60 		/**
    61 		 * Called when dir to dir copies must be performed
    62 		 */
    63 		public abstract void OnCopyFolders(ABuilder builder);
    64 
    65 		/**
    66 		 * Called to build libraries
    67 		 */
    68 		public abstract Library [] GetLibraries();
    69 
    70 		/**
    71 		 * Called to get package name
    72 		 */
    73 		public abstract string GetPackageName();
    74 
    75 		/**
    76 		 * Called to get a plugin list
    77 		 */
    78 		public abstract Plugin [] GetPlugins();
    79 	}
    80 }