'From Squeak6.1alpha of 20 September 2022 [latest update: #22219] on 22 September 2022 at 1:26:52 pm'!
"Change Set: vm-update-reminder
Date: 22 September 2022
Author: Christoph Thiede
Tot the 'update completed' dialog, adds a short reminder if a newer OSVM release is available. For different VMs, the reminder will not appear. The latest release number is stored in SystemVersion>>#recommendedVMBuildNumber and should be updated after each VM release. See http://lists.squeakfoundation.org/pipermail/vm-dev/2022-September/038412.html."!
!MCMcmUpdater methodsFor: 'private' stamp: 'ct 9/22/2022 13:15'!
updateMessageFor: previousUpdateLevel
^ ('Update completed.
Version: {1}
Update: {3}{2}
Url: {4}{10}>
Map: ''{5}''
CI status:
{9}{10}>{6}.{11}' translated format: {
SystemVersion current version.
SystemVersion current highestUpdate.
previousUpdateLevel = SystemVersion current highestUpdate
ifTrue: ['']
ifFalse: [previousUpdateLevel asString, ' -> '].
self repository.
MCMcmUpdater updateMapName.
SystemVersion current description ifEmpty: [''] ifNotEmpty: [:d |
'
{1}'
format: {
d.
Preferences standardButtonFont familyName.
Preferences standardButtonFont pointSize.
}].
SystemVersion current ciStatusBadgeUrl.
SystemVersion current ciStatusPageUrl.
SystemVersion current ciStatusTimestamp ifNil: ['(build inaccessible!!)' translated].
"mt: Avoid triggering the Windows Defender. See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217346.html"
'a'.
SystemVersion current recommendedVMUpdateInfo ifNil: [''] ifNotNil: [:info |
'
A newer VM is recommended ({1} -> {2})!! Visit the project page{4}> to download it.' translated
format: {
info key.
info value.
SystemVersion current vmUpdateURL.
'a'. "avoid Windows Defender again"
Preferences standardButtonFont familyName.
Preferences standardButtonFont pointSize
}]
}) asTextFromHtml! !
!SmalltalkImage methodsFor: 'system attributes' stamp: 'ct 9/22/2022 13:18'!
isRunningOpenSmalltalkVM
^ [#('CoInterpreter' 'StackInterpreter') includes: (self interpreterClass copyUpTo: Character space)]
on: Error "unsupported primitives"
do: [:ex | false]! !
!SmalltalkImage methodsFor: 'system attributes' stamp: 'ct 9/22/2022 12:58'!
openSmalltalkVMBuildNumber
| matcher |
self isRunningOpenSmalltalkVM ifFalse: [^ nil].
matcher := 'VM\: (\d+).*' asRegex.
(matcher matches: self platformSourceVersion) ifFalse: [^ nil].
^ (matcher subexpression: 2) asNumber! !
!SystemReporter methodsFor: 'reporting' stamp: 'ct 9/22/2022 12:52'!
reportVM: aStream
| howToBuild |
self header: 'Virtual Machine' on: aStream.
aStream
nextPutAll: Smalltalk vm vmFileName; cr;
nextPutAll: Smalltalk vm vmVersion; cr.
Smalltalk vm buildDate
ifNotNil: [:string | aStream nextPutAll: string; cr].
[Smalltalk vm platformSourceVersion
ifNotNil: [:v | aStream nextPutAll: 'platform sources revision ', v; cr]]
on: Warning do: ["unsupported primitive"].
[Smalltalk vm interpreterSourceVersion
ifNotNil: [:v | aStream nextPutAll: 'VMMaker versionString ', v; cr]]
on: Warning do: ["unsupported primitive"].
[Smalltalk vm interpreterClass
ifNotNil: [:string | aStream nextPutAll: string; cr].
Smalltalk vm cogitClass
ifNotNil: [:string | aStream nextPutAll: string; cr]
] on: Error do: ["unsupported primitives"].
Smalltalk vm isRunningOpenSmalltalkVM ifTrue:
[howToBuild := 'Visit https://github.com/OpenSmalltalk/opensmalltalk-vm; follow the\"Clone or download" instructions, then read the top-level README.md\and HowToBuild files in the top-level build directory for your\platform(s), build.macos64x64/HowToBuild, build.win32x86/HowToBuild, etc.' withCRs].
howToBuild ifNil: [^self].
aStream cr.
self header: 'To Build A Similar Virtual Machine' on: aStream.
aStream nextPutAll: howToBuild; cr! !
!SystemVersion methodsFor: 'accessing' stamp: 'ct 9/22/2022 13:05'!
recommendedVMBuildNumber
^ 202206021410! !
!SystemVersion methodsFor: 'accessing' stamp: 'ct 9/22/2022 13:11'!
recommendedVMUpdateInfo
| currentNumber |
currentNumber := Smalltalk openSmalltalkVMBuildNumber ifNil: [^ nil].
currentNumber >= self recommendedVMBuildNumber ifTrue: [^ nil].
^ currentNumber -> self recommendedVMBuildNumber! !
!SystemVersion methodsFor: 'accessing' stamp: 'ct 9/22/2022 13:12'!
vmUpdateURL
^ 'https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/202206021410'! !