[FIX] SqueakMap

ned at bike-nomad.com ned at bike-nomad.com
Wed Apr 9 13:47:35 UTC 2003


from preamble:

"Change Set:		squeakmap-1_06
Date:			9 April 2003
Author:			Göran Hultgren

Apr. 9 (Ned Konz): Changed SARInstaller logic so that the 3.4 version
will be loaded for any non-3.2 version.

Feb. 7 (Ned Konz & Göran Hultgren): added 3.5xxxx so that SARInstaller
can get loaded. This assumes that SARInstaller will keep on working for
3.5beta, 3.5gamma and 3.5.

This is 'SqueakMap' version 1.06. From this version all code has been
moved out into a separate package called 'SqueakMap Base'. This
changeset is now only a 'dynamic load script' that loads 'SqueakMap
Base' and other packages in the correct order in the preamble (see
below).

Do not however use this script as a template for your own 'load scripts'
- it is special since it assumes SqueakMap isn't installed yet.

For more details on changes in SM 1.06 look at the package 'SqueakMap
Base'.
"

| dir server addr answer |
(SystemVersion current highestUpdate < 5104) ifTrue: [
	self inform: 'SqueakMap can only be installed in 3.2.1 or 3.4alpha
update 5104 or later. If you are below update 5104 - load updates and
try again!!
I will now halt this filein so you can abort it.

(3.2.1 is the maintenance branch of 3.2
so there is no real point in staying at 3.2)'.
	self error: 'File-in aborted, abandon this notifier'].

Socket initializeNetwork.
server _ #('map1.squeakfoundation.org' 'map2.squeakfoundation.org'
'map.squeak.org' 'map.bluefish.se' 'marvin.bluefish.se:8000')
		detect: [:srv |
			addr _ NetNameResolver addressForName: (srv upTo: $:) timeout: 5.
			addr ifNil: [(self confirm: (srv upTo: $:), ' can not be resolved in
DNS.
This may be because you are behind a proxy and then you can safely
proceed. Proceed?') ifTrue:[addr _ 1]].
			addr notNil and: [
				answer _ HTTPSocket httpGet: ('http://', srv, '/sm/ping').
				answer isString not and: [answer contents = 'pong']]]
		ifNone: [^ self inform: 'Sorry, no SqueakMap master server
responding.'].
	server ifNotNil: ["Ok, found an SqueakMap server"
		ChangeSorter newChangesFromStream:
			((('http://', server, '/sm/packagebyname/squeakmapbase/downloadurl')
			asUrl retrieveContents content) asUrl retrieveContents content
unzipped
			readStream)
		named: 'SqueakMap Base'].

SMSqueakMap allInstancesDo: [:map |
	dir _ map instVarNamed: 'dir'.
	(dir isKindOf: FileDirectory) ifTrue:[
		(dir pathName = (FileDirectory default directoryNamed: (dir
localName)) pathName)
			ifTrue:[map instVarNamed: 'dir' put: dir localName]
			ifFalse:[self inform: 'Oops. There is an SMSqueakMap instance with a
log directory not placed in the default directory. Move the directory
there before confirming!!'.
				map instVarNamed: 'dir' put: dir localName]]].

"Mark 'SqueakMap' and 'SqueakMap Base' as installed."
SMSqueakMap default noteInstalledPackage:
'4f0b9db6-8add-43aa-8d6b-53e6a0ea8442' version: '1.06'.
SMSqueakMap default noteInstalledPackage: 
'fffa45d3-2459-4b7d-b594-9cfae17c864d' version: '1.05'.

self inform: 'SqueakMap 1.06 has been installed in the image.
Will now continue with installing SM Package Loader -
a simple UI tool for SqueakMap and support for all known
extra package formats (DVS, SAR) at the time of publishing SqueakMap
1.06.
First the map will be updated.'.


"SM Package Loader, PackageInfo, DVS"
Cursor wait showWhile: [
SMSqueakMap default loadUpdates installPackageWithId:
'047a3b12-7e52-4c5d-be8b-d06635fc4f1c';
installPackageWithId: '73fb0862-5f49-4b90-b899-c0101335b7c5';
installPackageWithId: '100d59d0-bf81-4e74-a4fe-5a2fd0c6b4ec'.

"The correct version of SARInstaller"
(Smalltalk version beginsWith: 'Squeak3.2')
	ifTrue:[SMSqueakMap default installPackageWithId:
'45940402-2e22-4e56-9f37-304f39f19efc']
	ifFalse:[SMSqueakMap default installPackageWithId:
'16dff307-ff49-4996-a216-957989e92d48'].

"Just open one without asking"
SMLoader open
!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SqueakMap.cs.gz
Type: application/octet-stream
Size: 1913 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030409/d4a94e48/SqueakMap.cs.obj


More information about the Squeak-dev mailing list