Exemple #1
0
 static PackUtility()
 {
     vconf = new R.Version.Config()
     {
         name   = "0.1",
         cdn    = "http://localhost:8080/Product",
         branch = "unknown",
         rev    = "deadbeef"
     };
 }
Exemple #2
0
    static Args ParseArgs(string argStart)
    {
        string[] args = Environment.GetCommandLineArgs();
        int      i    = Array.IndexOf(args, argStart);

        if (i < 0)
        {
            throw new Exception("Parse args failed, unable to find " + argStart);
        }

        ++i;
        if (args.Length - i < 7)
        {
            throw new Exception("Invalid args format, correct args format is: appIdentifier version(major.minor) cdnUrl buildFlags isDebug branch rev");
        }

        var log = new StringBuilder("Commandline Args:\n");

        for (int j = i; j < args.Length; ++j)
        {
            log.Append(args[j]).Append('\n');
        }
        Debug.Log(log);

        Args ret = new Args();

        ret.identifier = args[i++];

        var vconf = new R.Version.Config();

        vconf.name = args[i++];
        vconf.cdn  = args[i++];

        ret.buildFlags = BuildFlags.None;
        foreach (string f in args[i++].Split('|'))
        {
            ret.buildFlags |= (BuildFlags)Enum.Parse(typeof(BuildFlags), f);
        }

        ret.debug    = bool.Parse(args[i++]);
        vconf.branch = args[i++];
        vconf.rev    = args[i++];

        ret.version = R.Version.Create(vconf);

        return(ret);
    }
Exemple #3
0
 public static void Setup(R.Version.Config vconf)
 {
     PackUtility.vconf = vconf;
 }