Esempio n. 1
0
        public void OnGUI()
        {
            // build xCode
//			build_xCode_project = EditorGUILayout.Toggle("Build xCode Project", build_xCode_project);

            // option
//			if(build_xCode_project)
            {
                //build_option = (IOSBuildOption)EditorGUILayout.EnumPopup("Option", build_option);
                int selected = Array.IndexOf(option_list, selected_option);
                selected        = EditorGUILayout.Popup("Use Backuped ?", selected, option_list);
                selected_option = option_list[selected];
            }

            // player name
            {
                var productName = PlayerSettings.productName;
                productName = EditorGUILayout.TextField("Product Name", productName);
                PlayerSettings.productName = productName;
            }

            // package name
            {
                var a = PlayerSettings.applicationIdentifier;
                var b = EditorGUILayout.TextField("Identifier", a);
                //PlayerSettings.applicationIdentifier = b;
                PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, b);
            }

            {
                var list = EditorBuildSettings.scenes;
                foreach (var s in list)
                {
                    var enable = GUILayout.Toggle(s.enabled, s.path);
                    s.enabled = enable;
                }
                EditorBuildSettings.scenes = list;
            }



            // backup info
            //if(this.Backup != null)
            //{
            //	// if backup_project is not current selected project, reload it.
            //	if(backup_project == null || backup_project.path != Configuration.Gloable.XCode_Project_Backup_Home + "/" + this.Backup)
            //	{
            //		backup_project = new XCProject(Configuration.Gloable.XCode_Project_Backup_Home + "/" + this.Backup);
            //	}
            //	EditorGUILayout.LabelField("Backup Built At: " + this.backup_project.BuildTime);
            //}


            //if(!build_xCode_project)
            //{
            //	apply_native_builder = false;
            //}


            //apply_native_builder = EditorGUILayout.Toggle("Apply NativeBuilder", apply_native_builder);
            //{
            //	if(apply_native_builder)
            //	{
            //		if(mod_list.Length > 0)
            //		{
            //			int selectedIndex = Array.IndexOf(mod_list, selected_mod);
            //			selectedIndex = EditorGUILayout.Popup("Xupe package", selectedIndex, mod_list);
            //			this.selected_mod = mod_list[selectedIndex];
            //		}
            //		else
            //		{
            //			EditorGUILayout.LabelField("None of .xupe package found, Can't Build.");
            //		}
            //	}
            //}

            //build_ipa = EditorGUILayout.Toggle("Build Ipa", build_ipa);
            //if(build_ipa)
            //{
            //	build_xCode_project = true;
            //	apply_native_builder = true;
            //}


            if (!string.IsNullOrEmpty(this.selected_option))
            {
                if (GUILayout.Button("Build"))
                {
                    var task = new BuildTask_iOS(this.Backup);
                    task.Build();
                }
            }

            if (GUILayout.Button("Open ProductDirectory"))
            {
                OpenProductDir();
            }
        }
Esempio n. 2
0
        public void OnGUI()
        {
            // build xCode
//			build_xCode_project = EditorGUILayout.Toggle("Build xCode Project", build_xCode_project);

            // option
//			if(build_xCode_project)
            {
                //build_option = (IOSBuildOption)EditorGUILayout.EnumPopup("Option", build_option);
                int selected = Array.IndexOf(option_list, selected_option);
                selected        = EditorGUILayout.Popup("Use Backuped ?", selected, option_list);
                selected_option = option_list[selected];
            }

            // backup info
            //if(this.Backup != null)
            //{
            //	// if backup_project is not current selected project, reload it.
            //	if(backup_project == null || backup_project.path != Configuration.Gloable.XCode_Project_Backup_Home + "/" + this.Backup)
            //	{
            //		backup_project = new XCProject(Configuration.Gloable.XCode_Project_Backup_Home + "/" + this.Backup);
            //	}
            //	EditorGUILayout.LabelField("Backup Built At: " + this.backup_project.BuildTime);
            //}


            //if(!build_xCode_project)
            //{
            //	apply_native_builder = false;
            //}


            //apply_native_builder = EditorGUILayout.Toggle("Apply NativeBuilder", apply_native_builder);
            //{
            //	if(apply_native_builder)
            //	{
            //		if(mod_list.Length > 0)
            //		{
            //			int selectedIndex = Array.IndexOf(mod_list, selected_mod);
            //			selectedIndex = EditorGUILayout.Popup("Xupe package", selectedIndex, mod_list);
            //			this.selected_mod = mod_list[selectedIndex];
            //		}
            //		else
            //		{
            //			EditorGUILayout.LabelField("None of .xupe package found, Can't Build.");
            //		}
            //	}
            //}

            //build_ipa = EditorGUILayout.Toggle("Build Ipa", build_ipa);
            //if(build_ipa)
            //{
            //	build_xCode_project = true;
            //	apply_native_builder = true;
            //}


            if (!string.IsNullOrEmpty(this.selected_option))
            {
                if (GUILayout.Button("Build"))
                {
                    var task = new BuildTask_iOS(IOSBuildLevel.JustXCodeProject, this.Backup);
                    task.Build();
                }
            }
        }