symbolic links in doc;
authorClaus Gittinger <cg@exept.de>
Thu, 02 Mar 2000 12:47:51 +0100
changeset 1367 e761ba85d5ac
parent 1366 ffb95ba845ec
child 1368 ce2820258d1b
symbolic links in doc; remove Makefiles there
STXInstaller.st
--- a/STXInstaller.st	Mon Feb 28 15:10:45 2000 +0100
+++ b/STXInstaller.st	Thu Mar 02 12:47:51 2000 +0100
@@ -644,7 +644,7 @@
 !
 
 createSymbolicLinks
-    |msg dirsToMake numDirs nDone|
+    |msg dirsToMake numDirs nDone languages cmd|
 
     OperatingSystem isUNIXlike ifFalse:[^ self].
 
@@ -652,12 +652,11 @@
     actionTextHolder value:nil.
     actionTextHolder value:msg.
 
-    commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...'); endEntry.
-
     installWhat == #full ifTrue:[
+        commandTraceView showCR:(resources string:'setting up symbolic links in doc ...'); endEntry.
         OperatingSystem executeCommand:('(cd ' , fullDir , '/doc/online ; make links)').
     ] ifFalse:[
-        OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
+"/        OperatingSystem executeCommand:('(cd ' , stxLibDir , '/doc/online ; make links)').
 
         commandTraceView showCR:(resources string:'setting up symbolic links in lib ...'); endEntry.
 
@@ -684,6 +683,44 @@
         ].
     ].
 
+    installDocFiles ifTrue:[
+        msg := (resources array:#('ST/X Installation' '' 'creating symbolic links' '' '' '')) asStringCollection.
+        actionTextHolder value:nil.
+        actionTextHolder value:msg.
+
+        commandTraceView showCR:(resources string:'setting up symbolic links in doc/online ...'); endEntry.
+
+        languages := #(
+                        'english'
+                        'german'
+                        'french'
+                        'italian'
+                        'spanish'
+                        'japanese'
+                      ).
+        languages := languages select:[:l | (stxDocDir , '/online/' , l) asFilename exists].
+
+        languages do:[:thisLang |
+            |langDir|
+
+            langDir := stxDocDir , '/online/' , thisLang.
+            languages do:[:otherLang |
+                otherLang ~= thisLang ifTrue:[
+                    cmd := '(cd ' , langDir , ' ; ln -s ../' , otherLang , ' .)'.
+                    commandTraceView showCR:cmd; endEntry.
+                    OperatingSystem executeCommand:cmd.
+                ]
+            ].
+
+            cmd := '(cd ' , langDir , ' ; ln -s ../icons .)'.
+            commandTraceView showCR:cmd; endEntry.
+             OperatingSystem executeCommand:cmd.
+
+            cmd := '(cd ' , langDir , ' ; ln -s ../pictures .)'.
+            commandTraceView showCR:cmd; endEntry.
+             OperatingSystem executeCommand:cmd.
+        ]
+    ]
     "Created: / 17.7.1996 / 15:24:19 / cg"
     "Modified: / 31.5.1999 / 14:46:36 / cg"
 !
@@ -860,6 +897,32 @@
 
     "Created: / 31.5.1999 / 13:05:09 / cg"
     "Modified: / 23.12.1999 / 23:36:53 / cg"
+!
+
+removeMakefilesInDoc
+    |cmd msg|
+
+    OperatingSystem isUNIXlike ifFalse:[ ^ self ].
+
+    installDocFiles ifTrue:[
+        msg := (resources array:#('ST/X Installation' '' 'removing useless makefiles in doc' '' '' '')) asStringCollection.
+        actionTextHolder value:nil.
+        actionTextHolder value:msg.
+
+        commandTraceView showCR:(resources string:'removing useless makefiles in doc ...'); endEntry.
+
+        #(
+            'Make.proto'
+            'nt.mak'
+            'vms.mak'
+            'Makefile'
+        ) do:[:toRemove |
+            cmd := '(cd ' , stxDocDir , ' ; find . -name ''' , toRemove , ''' -exec rm {} \; )'.
+
+            commandTraceView showCR:cmd; endEntry.
+             OperatingSystem executeCommand:cmd.
+        ]
+    ]
 ! !
 
 !STXInstaller methodsFor:'startup'!
@@ -1481,6 +1544,8 @@
                       ].
                       self changeWritability.
                       self createSymbolicLinks.
+                      self removeMakefilesInDoc.
+
                       OperatingSystem isMSWINDOWSlike ifTrue:[
                           self createRegistryEntries.
                       ].