Example #1
0
        } // end function InitializeManifest

        static void Main(string[] args)
        {
            try
            {
                IntPtr hwnd;
                hwnd = GetConsoleWindow();
                //ShowWindow(hwnd, SW_HIDE);

                lib.ArgumentsParser parser = new lib.ArgumentsParser();

                if (args.Length >= 1)
                {
                    if (args[0] == "init")
                    {
                        InitializeManifest(ref parser);
                        return;
                    }

                    if (args[0] == "publish")
                    {
                        string version = null;
                        if (args.Length == 2)
                        {
                            version = args[1];
                        }

                        parser.PublishRelease(version);
                        return;
                    } // end if publish

                    if (args[0] == "checksum" && args.Length == 2)
                    {
                        string file = args[1];
                        Console.WriteLine(RealSimpleNet.Helpers.Crypt.Checksum(file));
                        return;
                    } // end if checksum
                }     // end if args.len = 1

                parser.Upgrade();
            } catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex.Message);

                if (ex.InnerException != null)
                {
                    Console.WriteLine("Error Inner: " + ex.InnerException.Message);
                }
            }
        } // end function main
Example #2
0
        static void InitializeManifest(ref lib.ArgumentsParser parser)
        {
            string appname, main, url, user, pwd;

            Console.WriteLine("Welcome to Real Simple Upgrades.");
            Console.WriteLine("Please type the following information:");
            Console.WriteLine("App name:");
            appname = Console.ReadLine();
            Console.WriteLine("Main executable file:");
            main = Console.ReadLine();
            Console.WriteLine("FTP Server:");
            url = Console.ReadLine();
            Console.WriteLine("FTP User name:");
            user = Console.ReadLine();
            Console.WriteLine("FTP Password:"******"Manifest created!");
            return;
        } // end function InitializeManifest