Launcher.st
changeset 491 8c30fe86b0e9
parent 490 b11f789fa391
child 492 829b4872bca3
--- a/Launcher.st	Fri Apr 19 16:44:21 1996 +0200
+++ b/Launcher.st	Fri Apr 19 17:18:48 1996 +0200
@@ -1192,8 +1192,8 @@
 miscSettings
     |box check logDoits shadows updChanges changeFileName returnFocus
      loadBinaries compileLazy hostNameInLabel useManager localSourceFirst 
-     showAccelerators
-     component localCheck oldIndent|
+     showAccelerators sourceCacheDir cacheEntry
+     component localCheck oldIndent nm fn|
 
     "/
     "/ extract relevant system settings ...
@@ -1207,6 +1207,7 @@
     useManager := (Smalltalk at:#SourceCodeManager) notNil asValue.
     localSourceFirst := Class tryLocalSourceFirst asValue.
     showAccelerators := MenuView showAcceleratorKeys asValue.
+    sourceCacheDir := nil asValue.
 
     loadBinaries := Smalltalk loadBinaries asValue.
     compileLazy := Autoload compileLazy asValue.
@@ -1248,15 +1249,26 @@
     oldIndent := box leftIndent.
     box leftIndent:30.
     localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst.
+    localCheck enableChannel:useManager.
+
+    cacheEntry := box 
+                    addLabelledInputField:(resources string:'source cache directory:')
+                    adjust:#right
+                    on:sourceCacheDir 
+                    tabable:true
+                    separateAtX:0.5.
+    cacheEntry immediateAccept:true; acceptOnLeave:false.
     box leftIndent:oldIndent.
-    localCheck enableChannel:useManager.
 
     (AbstractSourceCodeManager isNil 
     or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[
         useManager value:false.
+        cacheEntry disable.
         check disable.
         localCheck value:true.
 "/        localCheck disable
+    ] ifFalse:[
+        sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
     ].
 
     box addHorizontalLine.
@@ -1295,13 +1307,28 @@
                 Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager)
             ].
             Class tryLocalSourceFirst:(localSourceFirst value).
+            nm := sourceCacheDir value.
+            (fn := nm asFilename) exists ifFalse:[
+                (self confirm:(nm , ' does not exists\create ?' withCRs)) ifTrue:[
+                    fn makeDirectory; 
+                       makeReadableForAll;
+                       makeWritableForAll;
+                       makeExecutableForAll.
+                ]
+            ].
+            (fn exists 
+            and:[fn isDirectory
+            and:[fn isReadable
+            and:[fn isWritable]]]) ifTrue:[
+                AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value).
+            ]
         ] ifFalse:[
             Smalltalk at:#SourceCodeManager put:nil
         ]
     ].
     box destroy
 
-    "Modified: 13.4.1996 / 13:51:30 / cg"
+    "Modified: 19.4.1996 / 16:55:37 / cg"
 !
 
 printerSettings
@@ -2508,5 +2535,5 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.107 1996-04-19 14:44:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.108 1996-04-19 15:18:48 cg Exp $'
 ! !