Пример #1
0
        private static LanguagePlatform ParsePlatform(XmlNode node)
        {
            // parse platform file, ie. flashplayer.xml
            List <PlatformVersion> versions = null;
            Dictionary <string, PlatformCommand> defaultCommands = null;

            foreach (XmlNode sub in node.ChildNodes)
            {
                switch (sub.Name)
                {
                case "defaults": defaultCommands = ParseCommands(sub, null); break;

                case "versions": versions = ParseVersions(sub, defaultCommands); break;
                }
            }

            var platform = new LanguagePlatform
            {
                Name                     = node.Attributes["name"].Value,
                Targets                  = GetList(node, "targets"),
                Versions                 = versions,
                LastVersion              = versions[versions.Count - 1],
                IsFlashPlatform          = GetBool(node, "flash"),
                IsGraphical              = GetBool(node, "graphical"),
                ExternalToolchain        = GetAttribute(node, "external"),
                ExternalToolchainCapture = GetList(node, "external-capture"),
                DefaultProjectFile       = GetList(node, "default-project"),
                HaxeTarget               = GetAttribute(node, "haxe-target"),
                DebuggerSupported        = GetList(node, "debugger"),
                RawData                  = node
            };

            platform.VersionNames = new string[platform.Versions.Count];
            for (int i = 0; i < platform.Versions.Count; i++)
            {
                platform.VersionNames[i] = platform.Versions[i].Value;
            }
            return(platform);
        }
        private static LanguagePlatform ParsePlatform(XmlNode node)
        {
            // parse platform file, ie. flashplayer.xml
            List<PlatformVersion> versions = null;
            Dictionary<string, PlatformCommand> defaultCommands = null;
            foreach (XmlNode sub in node.ChildNodes)
            {
                switch (sub.Name)
                {
                    case "defaults": defaultCommands = ParseCommands(sub, null); break;
                    case "versions": versions = ParseVersions(sub, defaultCommands); break;
                }
            }

            var platform = new LanguagePlatform
            {
                Name = node.Attributes["name"].Value,
                Targets = GetList(node, "targets"),
                Versions = versions,
                LastVersion = versions[versions.Count - 1],
                IsFlashPlatform = GetBool(node, "flash"),
                IsGraphical = GetBool(node, "graphical"),
                ExternalToolchain = GetAttribute(node, "external"),
                ExternalToolchainCapture = GetList(node, "external-capture"),
                DefaultProjectFile = GetList(node, "default-project"),
                HaxeTarget = GetAttribute(node, "haxe-target"),
                DebuggerSupported = GetList(node, "debugger"),
                RawData = node
            };
            platform.VersionNames = new string[platform.Versions.Count];
            for (int i = 0; i < platform.Versions.Count; i++)
                platform.VersionNames[i] = platform.Versions[i].Value;
            return platform;
        }
Пример #3
0
        protected virtual void BuildDisplay()
        {
            this.Text = " " + project.Name + " (" + project.LanguageDisplayName + ") " + TextHelper.GetString("Info.Properties");

            langPlatform = GetLanguagePlatform(project.MovieOptions.Platform);

            InitOutputTab();
            InitBuildTab();
            InitOptionsTab();
            if (project.IsCompilable)
            {
                InitSDKTab();
                InitClasspathTab();
            }
            else
            {
                tabControl.TabPages.Remove(sdkTabPage);
                tabControl.TabPages.Remove(classpathsTab);
            }

            btnApply.Enabled = false;
        }
Пример #4
0
        void platformCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            langPlatform = GetLanguagePlatform(platformCombo.Text);

            this.versionCombo.Items.Clear();
            this.versionCombo.Items.AddRange(project.MovieOptions.TargetVersions(this.platformCombo.Text));
            this.versionCombo.SelectedIndex = Math.Max(0, this.versionCombo.Items.IndexOf(
                        project.MovieOptions.DefaultVersion(this.platformCombo.Text)));

            UpdateVersionCombo();
            InitTestMovieOptions();
            UpdateGeneralPanel();
            UpdateEditCommandButton();
            DetectExternalToolchain();
            UpdateClasspaths();
            UpdateCompilerOptions();

            platformChanged = true;
            Modified();
        }