]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/toolchain/Preferences.java
Updated ArchCheckBox.java and Preferences.java to support enable, disable of individu...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / toolchain / Preferences.java
index ded198d16694029dd076e58d40e0518648643f5f..1082cc3d7da3c61002c9da5d381b6981923d19a9 100644 (file)
@@ -198,6 +198,8 @@ public class Preferences extends IFrame {
 \r
     private Vector<String> vArchList = null;\r
 \r
+    private Vector<String> vDisableArchList = null;\r
+\r
     //\r
     // Not used by UI\r
     //\r
@@ -246,7 +248,8 @@ public class Preferences extends IFrame {
             jComboBoxActivePlatform.setBounds(new java.awt.Rectangle(valueColumn, activePlatformRow, valueWidth,\r
                                                                      oneRowHeight));\r
             jComboBoxActivePlatform.setPreferredSize(new java.awt.Dimension(valueWidth, oneRowHeight));\r
-            jComboBoxActivePlatform.setToolTipText("<html>Select &quot;Do Not Set&quot; if you want to build a platform"\r
+            jComboBoxActivePlatform\r
+                                   .setToolTipText("<html>Select &quot;Do Not Set&quot; if you want to build a platform"\r
                                                    + "<br>from the directory where the FPD file exists,"\r
                                                    + "<br>otherwise scroll down to select the platform.</html>");\r
 \r
@@ -299,7 +302,7 @@ public class Preferences extends IFrame {
     private ICheckBoxList getICheckBoxListTagName() {\r
         if (iCheckBoxListTagName == null) {\r
             iCheckBoxListTagName = new ICheckBoxList();\r
-            \r
+\r
             if (toolsDefTagNames != null) {\r
                 toolsDefTagNames.trim();\r
                 String aTagNames[] = toolsDefTagNames.trim().split(" ");\r
@@ -312,7 +315,7 @@ public class Preferences extends IFrame {
                 Vector<String> defaultTags = stringToVector("MYTOOLS");\r
                 iCheckBoxListTagName.setAllItems(defaultTags);\r
             }\r
-            \r
+\r
             iCheckBoxListTagName.setAllItemsUnchecked();\r
             iCheckBoxListTagName.setToolTipText("<html>"\r
                                                 + "Specify the TagName(s) from the tool configuration file to use"\r
@@ -358,7 +361,7 @@ public class Preferences extends IFrame {
 \r
     private ICheckBoxList getICheckBoxListBuildTarget() {\r
         if (iCheckBoxListBuildTarget == null) {\r
-            \r
+\r
             String aBuildTargets[] = toolsDefTargetNames.trim().split(" ");\r
             Vector<String> vBuildTargets = new Vector<String>();\r
             for (int i = 0; i < aBuildTargets.length; i++) {\r
@@ -613,6 +616,23 @@ public class Preferences extends IFrame {
                     lineCounter++;\r
                 }\r
                 reader.close();\r
+                // Only enable Architecture selection based on tool chain installations\r
+                String turnOff = "";\r
+                if (!toolsDefArchNames.contains("EBC"))\r
+                    turnOff = "EBC ";\r
+                if (!toolsDefArchNames.contains("PPC"))\r
+                    turnOff += "PPC ";\r
+                if (!toolsDefArchNames.contains("IPF"))\r
+                    turnOff += "IPF ";\r
+                if (!toolsDefArchNames.contains("X64"))\r
+                    turnOff += "X64 ";\r
+                if (!toolsDefArchNames.contains("IA32"))\r
+                    turnOff += "X64 ";\r
+                if (!toolsDefArchNames.contains("ARM"))\r
+                    turnOff += "ARM ";\r
+                turnOff = turnOff.trim();\r
+                vDisableArchList = stringToVector(turnOff);\r
+\r
                 if (!toolsDefTargetNames.matches("[A-Z]+")) {\r
                     toolsDefTargetNames = toolsDefTargetNames.replace("* ", "").trim();\r
                     if (Debug)\r
@@ -751,6 +771,7 @@ public class Preferences extends IFrame {
 \r
             jContentPane.add(jLabelTargetArch, null);\r
 \r
+            jArchCheckBox.setDisabledItems(vDisableArchList);\r
             jArchCheckBox.setSelectedItems(vArchList);\r
             jContentPane.add(jArchCheckBox, null);\r
 \r