예제 #1
0
        static void Main(string[] args)
        {
            if (args.GetLength(0) < 1)
            {
                System.Console.WriteLine("Usage: <config file>");
                return;
            }

            Config cfg = new Config();

            if (!cfg.ReadFromFile(args[0]))
            {
                return;
            }

            /* :TODO: Add path validation */

            ABuilder bld = null;

            if (cfg.Platform == BasePlatform.Platform_Linux)
            {
                bld = new LinuxBuilder(cfg);
            }
            else if (cfg.Platform == BasePlatform.Platform_Windows)
            {
                bld = new Win32Builder(cfg);

                /* Do not delete this file anymore.  We don't support rebuilds, and thus the file
                 * is guaranteed to be wiped by buildbot.
                 */
                /*if (cfg.pdb_log_file != null && File.Exists(cfg.pdb_log_file))
                 * {
                 *      File.Delete(cfg.pdb_log_file);
                 * }*/
            }

            try
            {
                bld.BuildPackage(new PkgCore());
            }
            catch (System.Exception e)
            {
                Console.WriteLine("Build failed, exception: " + e.Message);
                Environment.Exit(1);
            }

            Environment.Exit(0);
        }
예제 #2
0
        static void Main(string[] args)
        {
            if (args.GetLength(0) < 1)
            {
                System.Console.WriteLine("Usage: <config file>");
                return;
            }

            Config cfg = new Config();

            if (!cfg.ReadFromFile(args[0]))
            {
                return;
            }

            /* :TODO: Add path validation */

            ABuilder bld = null;

            if (cfg.Platform == BasePlatform.Platform_Linux)
            {
                bld = new LinuxBuilder(cfg);
            }
            else if (cfg.Platform == BasePlatform.Platform_Windows)
            {
                bld = new Win32Builder(cfg);
                if (cfg.pdb_log_file != null && File.Exists(cfg.pdb_log_file))
                {
                    File.Delete(cfg.pdb_log_file);
                }
            }

            try
            {
                bld.BuildPackage(new PkgCore());
            }
            catch (System.Exception e)
            {
                Console.WriteLine("Build failed, exception: " + e.Message);
                Environment.Exit(1);
            }

            Environment.Exit(0);
        }
예제 #3
0
파일: PkgCore.cs 프로젝트: asceth/synapi
        /**
         * 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/metamod", "addons/metamod", 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, "gamedata/sdktools.games", "addons/sourcemod/gamedata/sdktools.games", null);
            builder.CopyFolder(this, "gamedata/core.games", "addons/sourcemod/gamedata/core.games", 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/adminmenu", "addons/sourcemod/scripting/adminmenu", 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/funvotes", "addons/sourcemod/scripting/funvotes", 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/funcommands", "addons/sourcemod/scripting/funcommands", null);
            builder.CopyFolder(this, "plugins/playercommands", "addons/sourcemod/scripting/playercommands", null);
        }
예제 #4
0
 /**
  * Called when dir to dir copies must be performed
  */
 public abstract void OnCopyFolders(ABuilder builder);
예제 #5
0
 /**
  * Called when file to file copies must be performed
  */
 public abstract void OnCopyFiles(ABuilder builder);
예제 #6
0
파일: Package.cs 프로젝트: asceth/synapi
 /**
  * Called when dir to dir copies must be performed
  */
 public abstract void OnCopyFolders(ABuilder builder);
예제 #7
0
파일: Package.cs 프로젝트: asceth/synapi
 /**
  * Called when file to file copies must be performed
  */
 public abstract void OnCopyFiles(ABuilder builder);
예제 #8
0
        /**
         * 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/metamod", "addons/metamod", 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/adminmenu", "addons/sourcemod/scripting/adminmenu", 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/funvotes", "addons/sourcemod/scripting/funvotes", 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/funcommands", "addons/sourcemod/scripting/funcommands", null);
            builder.CopyFolder(this, "plugins/playercommands", "addons/sourcemod/scripting/playercommands", null);
        }
예제 #9
0
 /**
  * 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");
 }
예제 #10
0
 /**
  * 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");
 }