Win32: Initialize system path to also include %USERPROFILE%\.smalltalk jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 22 Apr 2016 21:13:32 +0100
branchjv
changeset 19637 aceade7525bb
parent 19636 cfa029c95cfc
child 19658 cb18e7c8fb6d
Win32: Initialize system path to also include %USERPROFILE%\.smalltalk ...to make it same as on UNIX. User settings are read from that directory too.
AbstractOperatingSystem.st
--- a/AbstractOperatingSystem.st	Fri Apr 22 08:34:39 2016 +0100
+++ b/AbstractOperatingSystem.st	Fri Apr 22 21:13:32 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -4757,17 +4755,17 @@
     "/
     appPath := self pathOfSTXExecutable.
     appPath notNil ifTrue:[
-	appDir := appPath asFilename directory.
-	appPath := appDir pathName.
-	(sysPath includes:appPath) ifFalse:[
-	    sysPath add:appPath.
-	].
-	appDir baseName = 'bin' ifTrue:[
-	    appPath := appDir directory pathName.
-	    (sysPath includes:appPath) ifFalse:[
-		sysPath add:appPath.
-	    ].
-	].
+        appDir := appPath asFilename directory.
+        appPath := appDir pathName.
+        (sysPath includes:appPath) ifFalse:[
+            sysPath add:appPath.
+        ].
+        appDir baseName = 'bin' ifTrue:[
+            appPath := appDir directory pathName.
+            (sysPath includes:appPath) ifFalse:[
+                sysPath add:appPath.
+            ].
+        ].
     ].
 
     "/
@@ -4775,48 +4773,51 @@
     "/
     homePath := self getHomeDirectory.
     homePath notNil ifTrue:[
-	"/
-	"/ a users private smalltalk directory in its home (login) directory
-	"/
-	OperatingSystem isUNIXlike ifTrue:[
-	    priv := '.smalltalk'.
-	] ifFalse:[
-	    priv := 'smalltalk'.
-	].
-	userPrivateSTXDir := homePath asFilename construct:priv.
-	(userPrivateSTXDir isDirectory) ifTrue:[
-	    userPrivateSTXDir := userPrivateSTXDir pathName.
-	    (sysPath includes:userPrivateSTXDir) ifFalse:[
-		sysPath add:userPrivateSTXDir
-	    ]
-	].
+        "/
+        "/ a users private smalltalk directory in its home (login) directory
+        "/
+        OperatingSystem isUNIXlike ifTrue:[
+            priv := #('.smalltalk')
+        ] ifFalse:[
+            priv := #('smalltalk' '.smalltalk')
+        ].
+        priv do:[:p |
+            userPrivateSTXDir := homePath asFilename construct:p.
+            (userPrivateSTXDir isDirectory) ifTrue:[
+                userPrivateSTXDir := userPrivateSTXDir pathName.
+                (sysPath includes:userPrivateSTXDir) ifFalse:[
+                    sysPath add:userPrivateSTXDir
+                ]
+            ].
+        ].
     ].
 
     "/
     "/ SMALLTALK_LIBDIR, STX_LIBDIR and STX_TOPDIR from the environment
     "/
     #(
-	'SMALLTALK_LIBDIR'
-	'STX_LIBDIR'
-	'STX_TOPDIR'
+        'SMALLTALK_LIBDIR'
+        'STX_LIBDIR'
+        'STX_TOPDIR'
      ) do:[:each |
-	p := OperatingSystem decodePath:(OperatingSystem getEnvironment:each).
-	p notNil ifTrue:[
-	    p := p asFilename pathName.
-	    (p asFilename isDirectory) ifTrue:[
-		(sysPath includes:p) ifFalse:[
-		     sysPath add:p
-		]
-	    ]
-	].
+        p := OperatingSystem decodePath:(OperatingSystem getEnvironment:each).
+        p notNil ifTrue:[
+            p := p asFilename pathName.
+            (p asFilename isDirectory) ifTrue:[
+                (sysPath includes:p) ifFalse:[
+                     sysPath add:p
+                ]
+            ]
+        ].
     ].
     ^ sysPath
 
     "
-	OperatingSystem defaultSystemPath
-    "
-
-    "Modified: / 24.12.1999 / 00:30:27 / cg"
+        OperatingSystem defaultSystemPath
+    "
+
+    "Modified: / 24-12-1999 / 00:30:27 / cg"
+    "Modified: / 22-04-2016 / 21:11:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 encodePath:pathName
@@ -7831,6 +7832,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !