1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tools/builder/Package.cs Sun Mar 30 07:00:22 2008 +0000
1.3 @@ -0,0 +1,103 @@
1.4 +using System;
1.5 +
1.6 +namespace builder
1.7 +{
1.8 + public enum ReleaseMode : int
1.9 + {
1.10 + ReleaseMode_Release,
1.11 + ReleaseMode_Debug,
1.12 + };
1.13 +
1.14 + public enum BuildMode : int
1.15 + {
1.16 + BuildMode_Simple,
1.17 + BuildMode_OldMetamod,
1.18 + BuildMode_Episode1,
1.19 + BuildMode_Episode2
1.20 + };
1.21 +
1.22 + public class Library
1.23 + {
1.24 + public Library()
1.25 + {
1.26 + has_platform_ext = false;
1.27 + is_executable = false;
1.28 + release_mode = ReleaseMode.ReleaseMode_Release;
1.29 + build_mode = BuildMode.BuildMode_Simple;
1.30 + }
1.31 + public string binary_name; /* Name of binary */
1.32 + public string source_path; /* Local path to library build scripts */
1.33 + public ReleaseMode release_mode; /* Release mode */
1.34 + public BuildMode build_mode; /* Build mode */
1.35 + public string package_path; /* Final relative path */
1.36 + public bool has_platform_ext; /* Add extra platform extension? */
1.37 + public string vcproj_name; /* Project file, NULL for standard */
1.38 + public bool is_executable; /* If this is an EXE instead of a DLL */
1.39 + };
1.40 +
1.41 + public class Plugin
1.42 + {
1.43 + public Plugin(string file)
1.44 + {
1.45 + Source = file;
1.46 + disabled = false;
1.47 + }
1.48 + public Plugin (string file, string folder)
1.49 + {
1.50 + Source = file;
1.51 + Folder = folder;
1.52 + disabled = false;
1.53 + }
1.54 + public Plugin (string file, bool is_disabled)
1.55 + {
1.56 + Source = file;
1.57 + disabled = is_disabled;
1.58 + }
1.59 + public string Folder; /* Source folder relative to scripting (null for default) */
1.60 + public string Source; /* Source file name */
1.61 + public bool disabled; /* Is the plugin disabled? */
1.62 + };
1.63 +
1.64 + public abstract class Package
1.65 + {
1.66 + /**
1.67 + * Must return the root compression point.
1.68 + */
1.69 + public abstract void GetCompressBases(ref string path, ref string folder);
1.70 +
1.71 + /**
1.72 + * Must return the base package output folder.
1.73 + */
1.74 + public abstract string GetBaseFolder();
1.75 +
1.76 + /**
1.77 + * Must return the list of folders to create.
1.78 + */
1.79 + public abstract string [] GetFolders();
1.80 +
1.81 + /**
1.82 + * Called when file to file copies must be performed
1.83 + */
1.84 + public abstract void OnCopyFiles(ABuilder builder);
1.85 +
1.86 + /**
1.87 + * Called when dir to dir copies must be performed
1.88 + */
1.89 + public abstract void OnCopyFolders(ABuilder builder);
1.90 +
1.91 + /**
1.92 + * Called to build libraries
1.93 + */
1.94 + public abstract Library [] GetLibraries();
1.95 +
1.96 + /**
1.97 + * Called to get package name
1.98 + */
1.99 + public abstract string GetPackageName();
1.100 +
1.101 + /**
1.102 + * Called to get a plugin list
1.103 + */
1.104 + public abstract Plugin [] GetPlugins();
1.105 + }
1.106 +}