AbstractSettingsApplication.st
changeset 12411 342b4192df01
parent 12409 fee90d607ee7
child 12413 7787a6343ae7
--- a/AbstractSettingsApplication.st	Wed Feb 20 11:50:30 2013 +0100
+++ b/AbstractSettingsApplication.st	Wed Feb 20 16:21:11 2013 +0100
@@ -255,7 +255,7 @@
 	instanceVariableNames:'cc ccOptions stcIncludes linkCommand stc linkArgs linkSharedArgs
 		canLoadBinaries stcDefines stcLibraries stcOptions stcLibraryPath
 		stcCompilationSelection stcCompilationList makeCommand
-		stcKeepCIntermediate'
+		stcKeepCIntermediate supportedCCompilerSelection'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:AbstractSettingsApplication
@@ -11805,11 +11805,11 @@
              (SpecCollection
                 collection: (
                  (ViewSpec
-                    name: 'SeparatingBox12'
+                    name: 'SeparatingBox1'
                     extent: (Point 600 4)
                   )
                  (ViewSpec
-                    name: 'Box1'
+                    name: 'InfoTextBox'
                     component: 
                    (SpecCollection
                       collection: (
@@ -11909,7 +11909,7 @@
                     extent: (Point 600 30)
                   )
                  (ViewSpec
-                    name: 'Box2'
+                    name: 'KeepCIntermediateBox'
                     component: 
                    (SpecCollection
                       collection: (
@@ -12212,6 +12212,36 @@
                     )
                     extent: (Point 600 30)
                   )
+                 (ViewSpec
+                    name: 'SeparatingBox2'
+                    extent: (Point 600 12)
+                  )
+                 (ViewSpec
+                    name: 'SetupForBox'
+                    component: 
+                   (SpecCollection
+                      collection: (
+                       (LabelSpec
+                          label: 'Set above Options for:'
+                          name: 'Label16'
+                          layout: (LayoutFrame 0 0 0 0 200 0 22 0)
+                          translateLabel: true
+                          adjust: right
+                        )
+                       (PopUpListSpec
+                          name: 'PopUpList1'
+                          layout: (LayoutFrame 201 0 0 0 -5 1 22 0)
+                          tabable: true
+                          model: supportedCCompilerSelection
+                          menu: supportedCCompilerList
+                          useIndex: true
+                          stateChangeCallBackSelector: supportedCCompilerSelectionChanged
+                        )
+                       )
+                     
+                    )
+                    extent: (Point 600 29)
+                  )
                  )
                
               )
@@ -12284,6 +12314,88 @@
 
     "Modified: / 09-08-2006 / 19:33:10 / fm"
     "Modified: / 16-09-2011 / 18:45:28 / cg"
+!
+
+setupForBCC
+    self cc value:'c:\borland\bcc55\bin\bcc32'.
+    self ccOptions value:'-w-'.
+    self stcIncludes value:'-I..\..\include -Ic:\Borland\bcc55\Include'.
+    self linkCommand value:'c:\borland\bcc55\bin\ilink32'.
+    self linkArgs value:'-L..\..\lib\bc -Lc:\Borland\bcc55\Lib -r -c -ap -Tpd -Gi -w-dup'.
+    self stcLibraries value:'import32.lib odbc32.lib glu32.lib opengl32.lib'.
+    self makeCommand value:'bmake'.
+
+    self updateModifiedChannel.
+    self supportedCCompilerSelection value:0
+!
+
+setupForGCC
+    self cc value:'gcc'.
+    self ccOptions value:''.
+    self stcIncludes value:'-I..\..\include'.
+    self linkCommand value:'gcc'.
+    self linkArgs value:''.
+    self stcLibraries value:''.
+    self makeCommand value:'make'.
+
+    self updateModifiedChannel.
+    self supportedCCompilerSelection value:0
+!
+
+setupForMINGW
+    ExternalBytes sizeofPointer == 4 ifTrue:[
+        self cc value:'C:\mingw32\bin\gcc'.
+    ] ifFalse:[
+        self cc value:'C:\mingw64\bin\gcc'.
+    ].
+    self ccOptions value:''.
+    self stcIncludes value:'-I..\..\include'.
+    self linkCommand value:(self cc value).
+    self linkArgs value:'-L..\..\lib\vc'.
+    self stcLibraries value:'import32.lib odbc32.lib glu32.lib opengl32.lib'.
+    self makeCommand value:'mingwmake'.
+
+    self updateModifiedChannel.
+    self supportedCCompilerSelection value:0
+!
+
+setupForMSVC
+    self cc value:'C:\Program Files\Microsoft Visual Studio 11.0\VC\BIN\cl'.
+    self ccOptions value:'/O1'.
+    self stcIncludes value:'-I..\..\include'.
+    self linkCommand value:'C:\Program Files\Microsoft Visual Studio 11.0\VC\BIN\cl\ilink32'.
+    self linkArgs value:'-L..\..\lib\vc'.
+    self stcLibraries value:'import32.lib odbc32.lib glu32.lib opengl32.lib'.
+    self makeCommand value:'vcmake'.
+
+    self updateModifiedChannel.
+    self supportedCCompilerSelection value:0
+!
+
+supportedCCompilerSelectionChanged
+    |idx spec compiler|
+
+    idx := self supportedCCompilerSelection value.
+    idx == 0 ifTrue:[^ self].
+
+    spec := self supportedCCompilerListSpec at:idx ifAbsent:[^ self].
+    compiler := spec second.
+    compiler == #gcc ifTrue:[
+        self setupForGCC.
+        ^ self.
+    ].
+    compiler == #bcc ifTrue:[
+        self setupForBCC.
+        ^ self.
+    ].
+    compiler == #msvc ifTrue:[
+        self setupForMSVC.
+        ^ self.
+    ].
+    compiler == #mingw ifTrue:[
+        self setupForMINGW.
+        ^ self.
+    ].
 ! !
 
 !AbstractSettingsApplication::STCCompilerSettingsAppl methodsFor:'aspects'!
@@ -12436,6 +12548,31 @@
         stcOptions onChangeSend:#updateModifiedChannel to:self.
     ].
     ^ stcOptions.
+!
+
+supportedCCompilerList
+    ^ self supportedCCompilerListSpec collect:[:s | s first].        
+!
+
+supportedCCompilerListSpec
+    OperatingSystem isMSWINDOWSlike ifTrue:[
+        ^ #(        
+            ('Borland CC v5.5 (bcc)'        #bcc) 
+            ('Microsoft Visual C (cl)'      #msvc) 
+            ('Mingw (gcc)'                  #mingw)
+         ).
+    ].
+
+    ^ #(        
+        ('GNU gcc'                      #gcc) 
+     ).
+!
+
+supportedCCompilerSelection
+    supportedCCompilerSelection isNil ifTrue:[
+        supportedCCompilerSelection := ValueHolder new.
+    ].
+    ^ supportedCCompilerSelection.
 ! !
 
 !AbstractSettingsApplication::STCCompilerSettingsAppl methodsFor:'help'!
@@ -17350,10 +17487,10 @@
 !AbstractSettingsApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.455 2013-02-20 10:50:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.456 2013-02-20 15:21:11 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.455 2013-02-20 10:50:14 cg Exp $'
-! !
-
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.456 2013-02-20 15:21:11 cg Exp $'
+! !
+