*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 19 Dec 2005 19:04:13 +0100
changeset 672 43a67655f4f2
parent 671 d9e5c4238e71
child 673 1bfdb9c2b6d9
*** empty log message ***
h_win32.rc
patches
private.rc
smalltalk.rc
--- a/h_win32.rc	Fri Dec 16 16:43:29 2005 +0100
+++ b/h_win32.rc	Mon Dec 19 19:04:13 2005 +0100
@@ -15,14 +15,14 @@
 |k rel curr|
 
 rel := Smalltalk versionString.
-k := Win32OperatingSystem::RegistryEntry key:('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\',rel).
+k := Win32OperatingSystem registryEntry key:('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\',rel).
 k isNil ifTrue:[
-    k := Win32OperatingSystem::RegistryEntry key:'HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X'.
+    k := Win32OperatingSystem registryEntry key:'HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X'.
     k notNil ifTrue:[
 	curr := k valueNamed:'CurrentVersion'.
 	curr isString ifTrue:[
 	    k close.
-	    k := Win32OperatingSystem::RegistryEntry key:('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\',curr).
+	    k := Win32OperatingSystem registryEntry key:('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\',curr).
 	]
     ]
 ].
--- a/patches	Fri Dec 16 16:43:29 2005 +0100
+++ b/patches	Mon Dec 19 19:04:13 2005 +0100
@@ -20,24 +20,32 @@
 'patches [info]: installing patches...' infoPrintCR.
 !
 
-"/ future systems will read patches from a patch-directory,
-"/ called stxPatches. (we will deliver patch-sets in the future)
-"/ This is not yet implemented, but we are prepared here for
-"/ this ...
-"/ patches from that directory are read in alphabetic order;
+"/ read patches from two patch-directories, called 'stxPatches' and 'userPatches'.
+"/ (in the future, patch-sets will be delivered for that directory in the future)
+"/ This is not yet done, but we are prepared here for this ...
+"/
+"/ Patches from that directory are read in alphabetic order;
 "/ patches will be named them p_nnnn.st, where nnnn is a sequence-nr.
 
-|patchDir|
+#(
+    'stxPatches'
+    'userPatches'
+) do:[:patchDirName |
+    |patchDirOrNil patchDir|
 
-patchDir := 'stxPatches' asFilename.
-(patchDir exists and:[patchDir isDirectory and:[patchDir isReadable]]) ifTrue:[
-    patchDir directoryContents sort do:[:f |
-	|fn|
+    patchDirOrNil := Smalltalk getSystemFileName:patchDirName.
+    patchDirOrNil notNil ifTrue:[
+	patchDir := patchDirOrNil asFilename.
+	(patchDir exists and:[patchDir isDirectory and:[patchDir isReadable]]) ifTrue:[
+	    patchDir directoryContents sort do:[:f |
+		|fn|
 
-	fn := (patchDir construct:f) name.
-	('patches [info]: reading patchFile ''' , fn , '''...') infoPrintCR.
-	Smalltalk fileIn:fn.
-    ]
+		fn := (patchDir construct:f) name.
+		('patches [info]: reading patchFile ''' , fn , '''...') infoPrintCR.
+		Smalltalk fileIn:fn.
+	    ]
+	]
+    ].
 ].
 !
 
--- a/private.rc	Fri Dec 16 16:43:29 2005 +0100
+++ b/private.rc	Mon Dec 19 19:04:13 2005 +0100
@@ -91,7 +91,7 @@
     "/ MenuView defaultFont:(MenuView defaultFont size:10).
 ].
 
-"/ add my private directories to the searchPath ...
+"/ add my private directories to the systemPath ...
 "/ This does not make sense in your environment.
 "/ However, I leave the code here to show how its done.
 "/
@@ -217,44 +217,47 @@
 "/ startBlocks will be evaluated after the thread-scheduler have been started
 "/ and the displays event dispatcher is running.
 "/
-Smalltalk addStartBlock:[
-    "/
-    "/ start some views ...
-    "/ you can add all stuff you'd like to come up by default
-    "/ the first time.
-    "/
-
-    'private.rc [info]: starting main-menu...' infoPrintCR.
-    Text new. "/ to avoid visible messages in minitalk
-
-    NewLauncher open.
-    ((Smalltalk commandLineArguments includes:'--quick')
-    or:[(Smalltalk commandLineArguments includes:'--faststart')
-    or:[(Smalltalk commandLineArguments includes:'--fastStart')]])
-    ifFalse:[
+(Smalltalk commandLineArguments includes:'--browserWindow:') ifFalse:[
+    Smalltalk addStartBlock:[
 	"/
-	"/ disable this if you don't like the other window to come up
+	"/ start some views ...
+	"/ you can add all stuff you'd like to come up by default
+	"/ the first time.
 	"/
-	WorkspaceApplication openSystemWorkspace.
-    ].
+
+	'private.rc [info]: starting main-menu...' infoPrintCR.
+	Text new. "/ to avoid visible messages in minitalk
+
+	NewLauncher open.
 
-    "/
-    "/ start a SystemBrowser
-    "/ - I dont want one (using Launcher)
-    "/
-    "/ NewSystemBrowser open.
+	((Smalltalk commandLineArguments includes:'--quick')
+	or:[(Smalltalk commandLineArguments includes:'--faststart')
+	or:[(Smalltalk commandLineArguments includes:'--fastStart')]])
+	ifFalse:[
+	    "/
+	    "/ disable this if you don't like the other window to come up
+	    "/
+	    WorkspaceApplication openSystemWorkspace.
+	].
 
-    "/
-    "/ start a FileBrowser
-    "/ - I dont want one (using Launcher)
-    "/
-    "/ FileBrowserV2 open.
+	"/
+	"/ start a SystemBrowser
+	"/ - I dont want one (using Launcher)
+	"/
+	"/ NewSystemBrowser open.
 
-    "/
-    "/ start a Workspace
-    "/ - I dont want one (using Launcher)
-    "/
-    "/ WorkspaceApplication open.
+	"/
+	"/ start a FileBrowser
+	"/ - I dont want one (using Launcher)
+	"/
+	"/ FileBrowserV2 open.
+
+	"/
+	"/ start a Workspace
+	"/ - I dont want one (using Launcher)
+	"/
+	"/ WorkspaceApplication open.
+    ].
 ].
 
 !
--- a/smalltalk.rc	Fri Dec 16 16:43:29 2005 +0100
+++ b/smalltalk.rc	Mon Dec 19 19:04:13 2005 +0100
@@ -99,6 +99,9 @@
 
 |path|
 
+'systemPath before: ' print.
+Smalltalk systemPath printCR.
+
 (path := OperatingSystem getEnvironment:'STX_SYSTEMPATH') notNil ifTrue:[
     Smalltalk systemPath:(path asCollectionOfSubstringsSeparatedBy:$:)
 ] ifFalse:[
@@ -109,17 +112,27 @@
 	path := path asFilename directoryName.
 	('smalltalk.rc [info]: found gnu-smalltalk sources in ' , path , '; removed from systemPath.') infoPrintCR.
 	Smalltalk systemPath:(Smalltalk systemPath remove:path; yourself).
+    ].
+].
+
+(Smalltalk systemPath includes:(OperatingSystem pathOfSTXExecutable asFilename directoryName)) ifFalse:[
+    Smalltalk systemPath addFirst:(OperatingSystem pathOfSTXExecutable asFilename directoryName).
+].
+
+'../../../stx/libbasic' asFilename exists ifTrue:[
+    (Smalltalk systemPath includes:'../../../stx' asFilename pathName) ifFalse:[
+	Smalltalk systemPath addFirst:'../../../stx' asFilename pathName.
     ]
 ].
-'../../../stx/libbasic' asFilename exists ifTrue:[
-    Smalltalk systemPath addFirst:'../../../stx'.
-].
 
-"/ but, the current directory should always be first...
+"/ the current directory should always be first...
 (Smalltalk systemPath includes:'.') ifTrue:[
     Smalltalk systemPath remove:'.'.
 ].
-Smalltalk systemPath addFirst:'.'.
+(Smalltalk systemPath includes:'.' asFilename pathName) ifTrue:[
+    Smalltalk systemPath remove:'.' asFilename pathName.
+].
+Smalltalk systemPath addFirst:'.' asFilename pathName.
 
 (path := OperatingSystem getEnvironment:'STX_PACKAGEPATH') notNil ifTrue:[
     Smalltalk packagePath:(path asCollectionOfSubstringsSeparatedBy:$:).
@@ -144,6 +157,9 @@
     "/ 'packagePath: ' print. Smalltalk packagePath printCR.
 ].
 
+'systemPath: ' errorPrint. Smalltalk systemPath errorPrintCR.
+'packagePath: ' errorPrint. Smalltalk packagePath errorPrintCR.
+
 Smalltalk flushPathCaches.
 !
 
@@ -231,7 +247,9 @@
  or:[(args includes:'--noBanner')
  or:[(args includes:'--quick')
  or:[(args includes:'--faststart')
- or:[(args includes:'--fastStart')]]]]) ifFalse:[
+ or:[(args includes:'--fastStart')
+ or:[(args includes:'--browserWindow:')
+]]]]]) ifFalse:[
     Smalltalk fileIn:'showBanner.rc'.
 ].
 
@@ -437,7 +455,8 @@
      or:[(Smalltalk commandLineArguments includes:'--quick')
      or:[(Smalltalk commandLineArguments includes:'--faststart')
      or:[(Smalltalk commandLineArguments includes:'--fastStart')
-    ]]]) ifFalse:[
+     or:[(Smalltalk commandLineArguments includes:'--browserWindow:')
+    ]]]]) ifFalse:[
 	Smalltalk addStartBlock:[
 	    'smalltalk.rc [info]: show licence conditions...' infoPrintCR.
 	    LicenceBox autoload.
@@ -638,26 +657,34 @@
 "/ save an initial image; this will speedup the next startup
 "/ (since all autoload-stuff will already be initialized)
 "/
+((Smalltalk commandLineArguments includes:'--quick')
+or:[ (Smalltalk commandLineArguments includes:'--faststart')
+or:[ (Smalltalk commandLineArguments includes:'--fastStart')
+or:[ (Smalltalk commandLineArguments includes:'--browserWindow:')
+]]]) ifFalse:[
+    'st.img' asFilename exists ifFalse:[
+	'.' asFilename isWritable ifTrue:[
+	    |doneWithStartupStuff|
 
- 'st.img' asFilename exists ifFalse:[
-   '.' asFilename isWritable ifTrue:[
-     |doneWithStartupStuff|
-
-     doneWithStartupStuff := Semaphore new.
+	    doneWithStartupStuff := Semaphore new.
 
-     Smalltalk addStartBlock:[
-      [
-	  doneWithStartupStuff wait.
-	     'smalltalk.rc [info]: saving initial image for faster future startup...' infoPrintCR.
-	     ObjectMemory primSnapShotOn:'st.img'
-      ] forkAt:1
-     ].
+	    Smalltalk
+		addStartBlock:
+		[
+		    [
+			doneWithStartupStuff wait.
+			   'smalltalk.rc [info]: saving initial image for faster future startup...' infoPrintCR.
+			   ObjectMemory primSnapShotOn:'st.img'
+		    ] forkAt:1
+		].
 
-     Smalltalk addStartBlock:[
-      [
-	  Delay waitForSeconds:10.
-	  doneWithStartupStuff signal
-      ] forkAt:1
-     ].
-   ]
- ].
+	    Smalltalk addStartBlock:
+		[
+		    [
+			Delay waitForSeconds:10.
+			doneWithStartupStuff signal
+		    ] forkAt:1
+		].
+	]
+    ]
+].