Beispiel #1
0
        static void Main(String[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FolderBrowserDialog dialog = new FolderBrowserDialog();

            dialog.Description = "Select the folder of the Cocos2D JavaScript project you want to run a development Web server for.";

            String filename;

            if (args.Length > 0)
            {
                filename = args[0];
            }
            else
            {
                filename = (dialog.ShowDialog() == DialogResult.OK) ? dialog.SelectedPath : null;
            }

            if (filename != null)
            {
                System.IO.Directory.SetCurrentDirectory(filename);
                Cocos.Command("server");
            }
        }
Beispiel #2
0
        static void Main(String[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FolderBrowserDialog dialog = new FolderBrowserDialog();

            dialog.Description = "Select the folder of the Cocos2D JavaScript project you want to compile.";

            String filename;

            if (args.Length > 0)
            {
                filename = args[0];
            }
            else
            {
                filename = (dialog.ShowDialog() == DialogResult.OK) ? dialog.SelectedPath : null;
            }

            if (filename != null)
            {
                System.IO.Directory.SetCurrentDirectory(filename);
                Cocos.Command("make", "", true);
                Process.Start(new ProcessStartInfo("explorer.exe ", filename + "\\build\\"));
            }
        }
Beispiel #3
0
        static void Main(String[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            FolderBrowserDialog dialog = new FolderBrowserDialog();

            dialog.Description = "Create and select the folder for the new Cocos2D JavaScript project you want to create.";
            String filename;

            if (args.Length > 0)
            {
                filename = args[0];
            }
            else
            {
                filename = (dialog.ShowDialog() == DialogResult.OK) ? dialog.SelectedPath : null;
            }

            if (filename != null)
            {
                String exeDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

                String oldDir = System.IO.Directory.GetCurrentDirectory();
                System.IO.Directory.SetCurrentDirectory(filename);
                Cocos.Command("new", ".", true);

                // Create shortcuts
                Create.Shortcut(exeDir + @"\Serve project.exe", filename + @"\Serve project.lnk");
                Create.Shortcut(exeDir + @"\Compile project.exe", filename + @"\Compile project.lnk");

                Process.Start(new ProcessStartInfo("explorer.exe", filename));
            }
        }