diff:
@@ -2,8 +2,7 @@ action
closeWindowsAndOpenDevelopmentEnvironment
PanelMorph allInstancesDo: [ :pm | pm delete ].
self new closeAllWindows.
- Workspace open contents: 'PharoLauncher open.'.
PharoLauncher browse.
+ Workspace open contents: 'PharoLauncher open.'.
"PanelMorph comes from use of #openWorldWithSpec"
\ No newline at end of file
-
\ No newline at end of file

diff:
@@ -6,4 +6,8 @@ settingsOn: aBuilder
parent: #pharoLauncher;
target: self;
label: 'Enable development environment' translated;
- description: 'Missing a feature? Add it yourself.' translated.
\ No newline at end of file
+ description: 'Missing a feature? Hey come join in!
+Add your custom feature then share back to...
+ MCSmalltalkhubRepository
+ owner: ''Pharo''
+ project: ''PharoLauncher'' ' translated.
\ No newline at end of file

diff:
+selection
+quitOnLaunch
+ ^ self class quitOnLaunch.
\ No newline at end of file

original_message:
https://pharo.fogbugz.com/default.asp?11899 (update)
Settings Browser - Enable Development Environment

Restore required instance-method #quitOnLaunch.

Fine tune setting description and windows opened when enabling development environment.


message:
Starting Launcher should remember Templates list from previous invocation
When disabling development environment, needed to run PhLDeployementScript class >> doAll.

change_type: MODIFY

diff:
@@ -3,4 +3,4 @@ isDeployed: aBoolean
IsDeployed := aBoolean.
aBoolean
ifTrue: [ self closeWindowsAndOpenDevelopmentEnvironment ]
- ifFalse: [ self closeWindowsAndOpenLauncher ]
\ No newline at end of file
+ ifFalse: [ self new doAll. self closeWindowsAndOpenLauncher ]
\ No newline at end of file

license: MIT License

repo: pharo-project/pharo-launcher

original_message:
Starting Launcher should remember Templates list from previous invocation
https://pharo.fogbugz.com/default.asp?11925

When disabling development environment, needed to run PhLDeployementScript class >> doAll.


message:
Launcher Settings Browser - Enable Development Environment (updated)
Added  PhLDeploymentScript>>undoAll  and supporting methods to fully reverse  #doAll  when 'Development environment' is enabled.
Removed  #isDeployed:  since its logic was inverted. Replaced by  #developmentEnvironemtEnabled:

diff:
@@ -2,7 +2,6 @@ action
closeWindowsAndOpenDevelopmentEnvironment
PanelMorph allInstancesDo: [ :pm | pm delete ].
self new closeAllWindows.
- PharoLauncher browse.
Workspace open contents: 'PharoLauncher open.'.
"PanelMorph comes from use of #openWorldWithSpec"
\ No newline at end of file

change_type: ADD

diff:
+settings
+deactivateDeployed
+ IsDeployed := false
\ No newline at end of file

diff:
+settings
+developmentEnvironmentEnabled: aBoolean
+ aBoolean
+ ifTrue:
+ [ self new undoAll.
+ self closeWindowsAndOpenDevelopmentEnvironment
+ ]
+ ifFalse:
+ [ self new doAll.
+ self closeWindowsAndOpenLauncher
+ ].
\ No newline at end of file

diff:
+settings
+developmentEnvironmentEnabled
+ ^ self isDeployed not
\ No newline at end of file

change_type: DELETE

diff:
-settings
-isDeployed: aBoolean
- IsDeployed := aBoolean.
- aBoolean
- ifTrue: [ self closeWindowsAndOpenDevelopmentEnvironment ]
- ifFalse: [ self new doAll. self closeWindowsAndOpenLauncher ]
\ No newline at end of file

diff:
@@ -2,7 +2,7 @@ settings
settingsOn: aBuilder
<systemsettings>
<pharoLauncherSettings>
- (aBuilder setting: #isDeployed)
+ (aBuilder setting: #developmentEnvironmentEnabled)
parent: #pharoLauncher;
target: self;
label: 'Enable development environment' translated;

diff:
+public
+activateDeprecationWarnings
+ Deprecation raiseWarning: true
\ No newline at end of file

diff:
+actions
+activateStartupActions
+ StartupPreferencesLoader allowStartupScript: true.
\ No newline at end of file

diff:
+public
+deactivateDeployed
+ self class deactivateDeployed
\ No newline at end of file

diff:
+actions
+doRaiseWarningForMissingChangesOrSourcesFiles
+ PharoFilesOpener default setInformAboutReadOnlyChanges.
\ No newline at end of file

diff:
+public
+removeFromStartupList
+ Smalltalk removeFromStartUpList: PhLDeployementScript
\ No newline at end of file

diff:
+public
+undoAll
+ self
+ activateStartupActions;
+ doRaiseWarningForMissingChangesOrSourcesFiles;
+ activateDeprecationWarnings;
+ deactivateDeployed;
+ removeFromStartupList
\ No newline at end of file

diff:
accessing
openSettings
- SettingBrowser browse: #( #pharoLauncherSettings )
\ No newline at end of file
+ PharoLauncher openSettings
\ No newline at end of file

diff:
+opening
+openSettings
+ SettingBrowser browse: #( #pharoLauncherSettings )
\ No newline at end of file

original_message:
Launcher Settings Browser - Enable Development Environment (updated) https://pharo.fogbugz.com/default.asp?11899

Added  PhLDeploymentScript>>undoAll  and supporting methods to fully reverse  #doAll  when 'Development environment' is enabled.

Removed  #isDeployed:  since its logic was inverted. Replaced by  #developmentEnvironemtEnabled:


diff:
+printing
+showNativeFolder
+ OSProcess command: self showNativeFolderCommandString.
\ No newline at end of file

diff:
+printing
+showNativeFolderCommandString
+ | folderPath |
+ folderPath := Path withAll: file pathSegments allButLast.
+ OSProcess isWindows ifTrue: [ ^ 'cmd.exe /C "start ' , folderPath printString , ' " ' ].
+ ^nil.
+
+ "
+ This method returns a string for OSProcess to execute to display an OS folder outside the image.
+ Other OS platforms need to be fleshed out here. This is not very OO, but is the simplest first pass.
+ "
\ No newline at end of file

original_message:
https://pharo.fogbugz.com/default.asp?12015
Image context menu - 'Show in folder'

Support for UI to... Get native OS shell outside Launcher to display folder that contains selected image.

#showNativeFolderCommandString so far only implemented for MS Windows. This needs to be fleshed out for other platforms.


diff:
+selection
+canShowNativeFolder
+ ^ self selectedImage showNativeFolderCommandString notNil
\ No newline at end of file

diff:
menu
imagesMenu: menu
(menu add: 'Launch image' target: self selector: #launchImage) enablementSelector: #has1AndJust1ImageSelected.
- menu addLine.
+ (menu addLine).
(menu add: 'Rename' target: self selector: #renameImage) enablementSelector: #has1AndJust1ImageSelected.
(menu add: 'Copy' target: self selector: #copyImage) enablementSelector: #has1AndJust1ImageSelected.
- menu add: 'Delete' target: self selector: #deleteImages
\ No newline at end of file
+ (menu add: 'Delete' target: self selector: #deleteImages).
+ (menu add: 'Show In Folder' target: self selector: #showNativeFolder) enablementSelector: #canShowNativeFolder.
+
\ No newline at end of file

diff:
+image action
+showNativeFolder
+ | image |
+ self ensureSingleImageSelectedOr: [ ^self ].
+ image := self selectedImage.
+ image showNativeFolder
\ No newline at end of file

original_message:
https://pharo.fogbugz.com/default.asp?12015
Image context menu - 'Show in folder'

For the Images Pane, added 'Show In Folder' context menu item to use native OS shell outside Launcher to display folder that contains selected image.

Requires Pharo-Launcher-Core-BenComan.81.


message: Changes some descriptions for Settings Browser items.

diff:
@@ -6,8 +6,6 @@ settingsOn: aBuilder
parent: #pharoLauncher;
target: self;
label: 'Enable development environment' translated;
- description: 'Missing a feature? Hey come join in!
-Add your custom feature then share back to...
- MCSmalltalkhubRepository
- owner: ''Pharo''
- project: ''PharoLauncher'' ' translated.
\ No newline at end of file
+ description: 'Missing a feature? Hey come join in! Add your custom feature.
+When enabled, exits the Launcher application into the Pharo development environment.
+When disabled, closes all windows and locks Launcher as the only running application. ' translated.
\ No newline at end of file

diff:
@@ -9,7 +9,7 @@ settingsOn: aBuilder
[ (aBuilder setting: #quitOnLaunch)
label: 'Quit On Launch' translated;
target: PharoLauncher;
- description: 'When enabled, the Launcher application quits after the next image is launched. ' , String cr , 'When disabled, the Launcher application remains alive after an image is Launced.' translated.
+ description: 'When enabled, Launcher quits when an image is launched. ' , String cr , 'When disabled, Launcher stays alive when an image is launched.' translated.
(aBuilder setting: #templatesClearedOnStartup)
label: 'Templates cleared at startup' translated;

diff:
@@ -5,5 +5,5 @@ imagesMenu: menu
(menu add: 'Rename' target: self selector: #renameImage) enablementSelector: #has1AndJust1ImageSelected.
(menu add: 'Copy' target: self selector: #copyImage) enablementSelector: #has1AndJust1ImageSelected.
(menu add: 'Delete' target: self selector: #deleteImages).
- (menu add: 'Show in folder' target: self selector: #showNativeFolder) enablementSelector: #has1AndJust1ImageSelected.
+ (menu add: 'Show In Folder' target: self selector: #showNativeFolder) enablementSelector: #canShowNativeFolder.
\ No newline at end of file


message: Neutral refactoring of #setTemplateGroup:imageGroup: to push #isNil test into method with intention realing name.

diff:
@@ -6,6 +6,8 @@ settingsOn: aBuilder
parent: #pharoLauncher;
target: self;
label: 'Enable development environment' translated;
- description: 'Missing a feature? Hey come join in! Add your custom feature.
-When enabled, exits the Launcher application into the Pharo development environment.
-When disabled, closes all windows and locks Launcher as the only running application. ' translated.
\ No newline at end of file
+ description: 'Missing a feature? Hey come join in!
+Add your custom feature then share back to...
+ MCSmalltalkhubRepository
+ owner: ''Pharo''
+ project: ''PharoLauncher'' ' translated.
\ No newline at end of file

diff:
@@ -9,7 +9,7 @@ settingsOn: aBuilder
[ (aBuilder setting: #quitOnLaunch)
label: 'Quit On Launch' translated;
target: PharoLauncher;
- description: 'When enabled, Launcher quits when an image is launched. ' , String cr , 'When disabled, Launcher stays alive when an image is launched.' translated.
+ description: 'When enabled, the Launcher application quits after the next image is launched. ' , String cr , 'When disabled, the Launcher application remains alive after an image is Launced.' translated.
(aBuilder setting: #templatesClearedOnStartup)
label: 'Templates cleared at startup' translated;

diff:
-selection
-canShowNativeFolder
- ^ self selectedImage showNativeFolderCommandString notNil
\ No newline at end of file

diff:
@@ -5,5 +5,5 @@ imagesMenu: menu
(menu add: 'Rename' target: self selector: #renameImage) enablementSelector: #has1AndJust1ImageSelected.
(menu add: 'Copy' target: self selector: #copyImage) enablementSelector: #has1AndJust1ImageSelected.
(menu add: 'Delete' target: self selector: #deleteImages).
- (menu add: 'Show In Folder' target: self selector: #showNativeFolder) enablementSelector: #canShowNativeFolder.
+ (menu add: 'Show in folder' target: self selector: #showNativeFolder) enablementSelector: #has1AndJust1ImageSelected.
\ No newline at end of file

diff:
initialization
setTemplateGroup: aTemplateRepository imageGroup: anImageGroup
- (self class templatesClearedOnStartup or: [ TemplateRepository isNil ] )
+ (self templatesMissingOnStartup or: self templatesClearedOnStartup)
ifTrue: [ TemplateRepository := aTemplateRepository ].
imageGroup := anImageGroup
\ No newline at end of file

diff:
+initialization
+templatesClearedOnStartup
+ ^ self class templatesClearedOnStartup
\ No newline at end of file

diff:
+initialization
+templatesMissingOnStartup
+ ^ TemplateRepository isNil
\ No newline at end of file


message: Move Settings button from PhLTitlebarModel to PhLStatusbar.

diff:
@@ -3,4 +3,5 @@ specLayout
<spec: #default>
^ SpecLayout composed
add: #labelModel;
+ add: #settingsButton origin: 1@0 corner: 1@1 offsetOrigin: -23@0 offsetCorner: 0@0;
yourself
\ No newline at end of file

diff:
initialization
initializeWidgets
labelModel := self newLabel.
+
+ (settingsButton := self newButton)
+ icon: Smalltalk ui icons alertIcon;
+ action: [ self openSettings ];
+ state: false.

diff:
+protocol
+openSettings
+ PharoLauncher openSettings
\ No newline at end of file

change_type: RENAME

diff:
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
- "labelModel"
+ "labelModel",
+ "settingsButton"
],
"name" : "PhLStatusbar",
"type" : "normal"

diff:
@@ -3,6 +3,5 @@ specLayout
<spec: #default>
^ SpecLayout composed
add: #label;
- add: #settingsButton origin: 1@0 corner: 1@1 offsetOrigin: -50@0 offsetCorner: -23@0;
add: #refreshButton origin: 1@0 corner: 1@1 offsetOrigin: -23@0 offsetCorner: 0@0;
yourself
\ No newline at end of file

diff:
@@ -8,7 +8,3 @@ initializeWidgets
action: refreshAction;
state: false.
\ No newline at end of file
- (settingsButton := self newButton)
- icon: Smalltalk ui icons alertIcon;
- action: [ self openSettings ];
- state: false.
\ No newline at end of file

diff:
-accessing
-openSettings
- PharoLauncher openSettings
\ No newline at end of file

diff:
"instvars" : [
"label",
"refreshButton",
- "refreshAction",
- "settingsButton"
+ "refreshAction"
],
"name" : "PhLTitlebarModel",
"type" : "normal"

diff:
initialization
setTemplateGroup: aTemplateRepository imageGroup: anImageGroup
- (self templatesMissingOnStartup or: self templatesClearedOnStartup)
+ (self class templatesClearedOnStartup or: [ TemplateRepository isNil ] )
ifTrue: [ TemplateRepository := aTemplateRepository ].
imageGroup := anImageGroup
\ No newline at end of file

diff:
-initialization
-templatesClearedOnStartup
- ^ self class templatesClearedOnStartup
\ No newline at end of file

diff:
-initialization
-templatesMissingOnStartup
- ^ TemplateRepository isNil
\ No newline at end of file


message: Re-word a Settings description.

diff:
@@ -9,10 +9,12 @@ settingsOn: aBuilder
[ (aBuilder setting: #quitOnLaunch)
label: 'Quit On Launch' translated;
target: PharoLauncher;
- description: 'When enabled, Launcher quits when an image is launched. ' , String cr , 'When disabled, Launcher stays alive when an image is launched.' translated.
+ description: 'When enabled, Launcher quits when an image is launched. ' , String cr ,
+ 'When disabled, Launcher stays alive when an image is launched.' translated.
(aBuilder setting: #templatesClearedOnStartup)
label: 'Templates cleared at startup' translated;
target: PharoLauncher;
- description: 'When enabled, starting Launcher will clear the previous Templates list. ' , String cr , 'When disabled, starting Launcher will remember the Templates from the previosu time it was running.' translated.
+ description: 'When enabled, Launcher startup clears the Templates List. ' , String cr ,
+ 'When disabled, Launcher startup retains the Templates List from last run.' translated.
]
\ No newline at end of file

original_message: Re-word a Settings description.


message: add nice icons to menu

diff:
menu
imagesMenu: menu
- (menu add: 'Launch image' target: self selector: #launchImage) enablementSelector: #has1AndJust1ImageSelected.
+ menu addTitle: ' Pharo Launcher ' icon: (Smalltalk ui icons pharoIcon).
+ (menu add: 'Launch image' target: self selector: #launchImage)
+ icon: Smalltalk ui icons processBrowserIcon;
+ enablementSelector: #has1AndJust1ImageSelected.
(menu addLine).
(menu add: 'Rename' target: self selector: #renameImage) enablementSelector: #has1AndJust1ImageSelected.
(menu add: 'Copy' target: self selector: #copyImage) enablementSelector: #has1AndJust1ImageSelected.
(menu add: 'Delete' target: self selector: #deleteImages).
(menu addLine).
- (menu add: 'Show in folder' target: self selector: #showNativeFolder) enablementSelector: #has1AndJust1ImageSelected.
+ (menu add: 'Show in folder' target: self selector: #showNativeFolder)
+ icon: Smalltalk ui icons openIcon;
+ enablementSelector: #has1AndJust1ImageSelected.
\ No newline at end of file

original_message: add nice icons to menu


message: use config icon in statusbar instead of alter to stay consistent

diff:
@@ -3,6 +3,6 @@ initializeWidgets
labelModel := self newLabel.
(settingsButton := self newButton)
- icon: Smalltalk ui icons alertIcon;
+ icon: Smalltalk ui icons configurationIcon;
action: [ self openSettings ];
state: false.


message: Template Repository settings work better as a group.

diff:
+testing
+isApplicable
+ ^ true
\ No newline at end of file

diff:
{
"commentStamp" : "<historical>",
- "super" : "PhLGeneralCommand",
+ "super" : "PhLImageCommand",
"category" : "PharoLauncher-Core-Commands",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
- "name" : "PhLRefreshImageRepositoryCommand",
+ "name" : "PhLRefreshImagesCommand",
"type" : "normal"
}
\ No newline at end of file

diff:
{
"commentStamp" : "<historical>",
- "super" : "PhLGeneralCommand",
+ "super" : "PhLTemplateCommand",
"category" : "PharoLauncher-Core-Commands",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
- "name" : "PhLRefreshTemplateRepositoryCommand",
+ "name" : "PhLRefreshTemplateGroupsCommand",
"type" : "normal"
}
\ No newline at end of file

diff:
@@ -2,10 +2,16 @@ settings
settingsOn: aBuilder
<systemsettings>
<pharoLauncherSettings>
- self allGroups
- do: [ :group |
+ (aBuilder group: #templateGroupRepositories)
+ label: 'Choose Template Repositories' ;
+ description: 'Configure which Template Repositories to show' translated ;
+ parent: #pharoLauncher;
+ with:
+ [ self allGroups do:
+ [ :group |
(aBuilder setting: ('want' , group name capitalized) asLegalSelector)
label: 'Display ' , group name , ' projects';
- parent: #pharoLauncher;
target: self;
- description: 'When enabled, projects from ' , group name , ' will be presented' ]
\ No newline at end of file
+ description: 'When enabled, projects from ' , group name , ' will be presented'
+ ].
+ ].
\ No newline at end of file


message: To open the external source of a template in an external web browser, copies the Template URL to the system clipboard for pasting into external web browser.

diff:
+Open the source of a template in an external web browser.
\ No newline at end of file

diff:
+as yet unclassified
+group
+ ^3
\ No newline at end of file

diff:
+as yet unclassified
+title
+ ^ 'Open template source location'
\ No newline at end of file

diff:
+as yet unclassified
+execute
+ | sourceURLstring baseCutIndex baseURLString |
+ sourceURLstring := context singleTemplate url asString.
+ baseCutIndex := sourceURLstring findString: '/lastSuccessfulBuild' .
+ baseURLString := sourceURLstring first: baseCutIndex - 1.
+
+ "Here each platform should invoke its web browser, but for now... "
+ Clipboard clipboardText: baseURLString.
+ self inform: baseURLString , String crlf , 'copied to clipboard'.

diff:
+{
+ "commentStamp" : "<historical>",
+ "super" : "PhLTemplateCommand",
+ "category" : "PharoLauncher-Core-Commands",
+ "classinstvars" : [ ],
+ "pools" : [ ],
+ "classvars" : [ ],
+ "instvars" : [ ],
+ "name" : "PhLOpenSourceTemplateCommand",
+ "type" : "normal"
+}
\ No newline at end of file

diff:
@@ -2,16 +2,10 @@ settings
settingsOn: aBuilder
<systemsettings>
<pharoLauncherSettings>
- (aBuilder group: #templateGroupRepositories)
- label: 'Choose Template Repositories' ;
- description: 'Configure which Template Repositories to show' translated ;
- parent: #pharoLauncher;
- with:
- [ self allGroups do:
- [ :group |
+ self allGroups
+ do: [ :group |
(aBuilder setting: ('want' , group name capitalized) asLegalSelector)
label: 'Display ' , group name , ' projects';
+ parent: #pharoLauncher;
target: self;
- description: 'When enabled, projects from ' , group name , ' will be presented'
- ].
- ].
\ No newline at end of file
+ description: 'When enabled, projects from ' , group name , ' will be presented' ]
\ No newline at end of file


message:
Code Critics fixes:
Style > Unclassified methods
* PhLRefreshImageRepositoryCommand class>>group
Unclassified rules > Repeated methods in the trait composition
* Removed methods { #children. #isImage. #isTemplate. #isTemplateGroup) from classes PhLError & PhLObject
* Moved PhLRenameImageCommmand>>execute into protocol 'action'

diff:
-accessing
-children
- ^ #()
\ No newline at end of file

diff:
-testing
-isImage
- ^ false
\ No newline at end of file

diff:
-testing
-isTemplate
- ^ false
\ No newline at end of file

diff:
-testing
-isTemplateGroup
- ^ false
\ No newline at end of file

diff:
-testing
-isError
- ^ false
\ No newline at end of file

diff:
-as yet unclassified
+accessing
group
^ 3
\ No newline at end of file

diff:
-accessing
+action
execute
| name |
name := self newImageName.


message:
Code Critics fixes:
Design flaws > Variables not referenced
* Removed 'imageContextHolder' from PharoLauncher
Design flaws > Refers to class name instead of "self class"
* Fixed PharoLauncher class>>settingsOn:
* Fixed PhLDeploymentScript>>addToStartupList
* Fixed PhLDeploymentScript>>removeFromStartupList

diff:
public
addToStartupList
- Smalltalk addToStartUpList: PhLDeploymentScript
\ No newline at end of file
+ Smalltalk addToStartUpList: self class
\ No newline at end of file

diff:
public
removeFromStartupList
- Smalltalk removeFromStartUpList: PhLDeploymentScript
\ No newline at end of file
+ Smalltalk removeFromStartUpList: self class.
\ No newline at end of file

diff:
"templatesModel",
"statusbarModel",
"quitOnLaunchCheckBoxModel",
- "imageRepository",
- "imageContextHolder"
+ "imageRepository"
],
"name" : "PharoLauncher",
"type" : "normal"


message:
Only when 'Development Environment' is enabled, add menu item 'Debug Sample Command' to the 'Existing Images' context menu.
This triggers a deliberate halt left in production code to help users wanting to extend the system to discover how commands are triggered. Now inspect the 'context' instance variable and define your operation on it.

diff:
+A PhLDebugSampleCommand is provided simply as an example to assist users to learn how they might add their own commands to PharoLauncher.
\ No newline at end of file

diff:
+as yet unclassified
+group
+ ^99
\ No newline at end of file

diff:
+as yet unclassified
+title
+ ^ 'Debug Sample Command'
\ No newline at end of file

diff:
+action
+execute
+ "
+ This is a deliberate halt left in production code to help users wanting to extend
+ the system to discover how commands are triggered. Now inspect the 'context'
+ instance variable and define your operation on it.
+
+ See PharoLauncher>>commandClassesForXXXX and senders for how to register commands.
+ "
+
+ Halt now.
+
\ No newline at end of file

diff:
+testing
+isApplicable
+ ^ PhLDeploymentScript developmentEnvironmentEnabled
\ No newline at end of file

diff:
+{
+ "commentStamp" : "<historical>",
+ "super" : "PhLImageCommand",
+ "category" : "PharoLauncher-Spec",
+ "classinstvars" : [ ],
+ "pools" : [ ],
+ "classvars" : [ ],
+ "instvars" : [ ],
+ "name" : "PhLDebugSampleCommand",
+ "type" : "normal"
+}
\ No newline at end of file


original_message:
Added test to improve #makeUniqueImageName:among:
https://pharo.fogbugz.com/f/cases/12533


message: Improve #makeUniqueImageName:among:

diff:
action
makeUniqueImageName: baseImageName among: existingImageNames
+ "Provide a reasonable default image name using the next incremental count for images with similar basenames"
+ "See #testMakeUniqueImageName for samples"
+
| similarbaseImageNames existingUniquifiers nextUniquifier separator |
separator := '-'.
- similarbaseImageNames := existingImageNames
- select: [ :imageName | imageName = baseImageName or: (imageName beginsWith: baseImageName) ].
- similarbaseImageNames ifEmpty: [ ^ baseImageName ].
+ similarbaseImageNames := existingImageNames select: [ :imageName | imageName beginsWith: baseImageName ].
existingUniquifiers := similarbaseImageNames
collect: [ :imageName | | suffix |
suffix := imageName allButFirst: baseImageName size.
(suffix beginsWith: separator)
- ifTrue: [ (suffix allButFirst: separator size) asInteger ]
- ifFalse: 0].
+ ifTrue: [ (suffix allButFirst: separator size) initialIntegerOrNil ]
+ ifFalse: 0]
+ thenSelect: #notNil.
+ existingUniquifiers ifEmpty: [ ^ baseImageName ].
nextUniquifier := existingUniquifiers max + 1.
^ baseImageName , separator , (nextUniquifier printPaddedWith: $0 to: 2)
\ No newline at end of file


message: Remerge enhancement The issue with it that I previously encountered has resolved itself, presumably with progression of upstream packages.

diff:
+accessing
+metaInfoFileName
+ ^ 'meta-inf.ston'
\ No newline at end of file

diff:
@@ -5,4 +5,5 @@ extractTo: aDirectory named: aString
| extractionDirectory |
extractionDirectory := self extractZipArchive: self zipArchive to: aDirectory.
self relocateImageFilesFrom: extractionDirectory to: aDirectory withName: aString.
- extractionDirectory deleteAll
\ No newline at end of file
+ extractionDirectory deleteAll.
+ self generateMetaInformationTo: aDirectory
\ No newline at end of file

diff:
+actions
+generateMetaInformationTo: aDirectory
+ | metainf |
+
+ metainf := Dictionary new.
+ metainf at: 'template' put: self.
+
+ aDirectory / (PhLAbstractTemplate metaInfoFileName)
+ writeStreamDo: [ : stream | stream nextPutAll: (STON toString: metainf) ]
\ No newline at end of file

diff:
I'm the abstract superclass of all commands. I implement the command pattern. My main entry methods are #execute and #isApplicable.
-I rely on the existence of a context (instance of PhLContext) to query and change my environment.
\ No newline at end of file
+I rely on the existence of a context (instance of PhLCommandContext) to query and change my environment.
\ No newline at end of file

diff:
+accessing
+file
+ ^file
\ No newline at end of file

diff:
+Refresh the currently selected image.
+It will first drop the current local image and fetch a fres version of the template. The name of the local image will not be updated.
\ No newline at end of file

diff:
+accessing
+icon
+ ^ Smalltalk ui icons refreshIcon
\ No newline at end of file

diff:
+accessing
+title
+ ^ 'Refresh image'
\ No newline at end of file

diff:
+private
+askConfirmation
+ | confirmMessage |
+
+ confirmMessage := 'Are you sure you want to refresh this image?' , Character cr asString,
+ 'It will override the existing image and you may loose changes.'.
+ ^ context newConfirmation
+ message: (confirmMessage withNoLineLongerThan: 60) , '?';
+ confirm.
\ No newline at end of file

diff:
+action
+execute
+ self askConfirmation
+ ifTrue: [ context selectedImages
+ do: [ :image | | template |
+ template := self templateFor: image.
+ context imageRepository
+ deleteImages: { image };
+ extractTemplate: template to: image name ]
+ ]
+

diff:
+testing
+isApplicable
+ ^ context hasAtLeastOneImageSelected
\ No newline at end of file

diff:
+private
+templateFor: anImage
+ | metainf metainfFile |
+
+ metainfFile := anImage file parent / (PhLAbstractTemplate metaInfoFileName).
+ metainfFile readStreamDo: [ :stream | metainf := STON fromStream: stream ].
+ ^ metainf at: #template.
\ No newline at end of file

diff:
+{
+ "commentStamp" : "<historical>",
+ "super" : "PhLImageCommand",
+ "category" : "PharoLauncher-Core-Commands",
+ "classinstvars" : [ ],
+ "pools" : [ ],
+ "classvars" : [ ],
+ "instvars" : [ ],
+ "name" : "PhLRefreshImageCommand",
+ "type" : "normal"
+}
\ No newline at end of file

original_message: Remerge enhancement #12457. The issue with it that I previously encountered has resolved itself, presumably with progression of upstream packages.


message: Minor update to confirm message for

diff:
@@ -2,8 +2,8 @@ private
askConfirmation
| confirmMessage |
- confirmMessage := 'Are you sure you want to refresh this image?' , Character cr asString,
- 'It will override the existing image and you may loose changes.'.
+ confirmMessage := 'Are you sure you want to recreate this image?' , Character cr asString,
+ 'This will overwrite the existing image and you will lose changes.'.
^ context newConfirmation
message: (confirmMessage withNoLineLongerThan: 60) , '?';
confirm.
\ No newline at end of file

original_message: Minor update to confirm message for https://pharo.fogbugz.com/f/cases/12457


message: Renamed class PhLRefreshImageCommand to PhLRecreateImageCommand to align with rename of menu item in .35

diff:
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
- "name" : "PhLRefreshImageCommand",
+ "name" : "PhLRecreateImageCommand",
"type" : "normal"
}
\ No newline at end of file


message:
Moved the load of meta info to creation of PhLImage objects at startup.
PhLDirectoryBasedImageRepository>>imageFromDirectory: and PhLImage>>originTemplate assumed the responsibility of PhLRecreateImageCommand>>templateFor:
PhLRecreateImageCommand>>isApplicable was modified to show only if originTemplate notNil.

diff:
@@ -2,10 +2,18 @@ private
imageFromDirectory: aDirectory
"Create an instance of PhLImage representing the Pharo image in aDirectory"
- | imageName imageFiles changeFiles |
+ | imageName imageFiles changeFiles meta |
imageName := aDirectory basename.
imageFiles := aDirectory filesMatching: imageName , '.image'.
changeFiles := aDirectory filesMatching: imageName , '.changes'.
+
+ meta := Dictionary new.
+ (aDirectory filesMatching: PhLAbstractTemplate metaInfoFileName) do:
+ [ :metaFile | metaFile readStreamDo:
+ [ :stream | [ meta addAll: (STON fromStream: stream) ] on: Error do: [ Transcript crShow: 'PharoLauncher error: meta info ' , metaFile asString ].
+ ]
+ ].
+
^ (imageFiles size ~= 1 or: [ changeFiles size ~= 1 ])
ifTrue: [ nil ]
- ifFalse: [ PhLImage location: imageFiles first ]
\ No newline at end of file
+ ifFalse: [ PhLImage location: imageFiles first meta: meta ]
\ No newline at end of file

diff:
-instance creation
-location: aFile
- ^ self new
- setLocation: aFile;
- yourself
\ No newline at end of file

diff:
+instance creation
+location: aFile meta: aDictionary
+ ^ self new
+ setLocation: aFile meta: aDictionary;
+ yourself
\ No newline at end of file

diff:
+initialize-release
+originTemplate
+ ^ meta at: #template ifAbsent: [ nil ]
\ No newline at end of file

diff:
-initialize-release
-setLocation: aFile
- file := aFile
\ No newline at end of file

diff:
+initialize-release
+setLocation: aFile meta: aDictionary
+ file := aFile.
+ meta := aDictionary.
+
\ No newline at end of file

diff:
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
- "file"
+ "file",
+ "meta"
],
"name" : "PhLImage",
"type" : "normal"

diff:
@@ -3,7 +3,7 @@ execute
self askConfirmation
ifTrue: [ context selectedImages
do: [ :image | | template |
- template := self templateFor: image.
+ template := image originTemplate.
context imageRepository
deleteImages: { image };
extractTemplate: template to: image name ]

diff:
testing
isApplicable
- ^ context hasAtLeastOneImageSelected
\ No newline at end of file
+ ^ context hasAtLeastOneImageSelected and:
+ [ context selectedImages allSatisfy: [ :image | image originTemplate notNil ] ].
\ No newline at end of file

diff:
-private
-templateFor: anImage
- | metainf metainfFile |
-
- metainfFile := anImage file parent / (PhLAbstractTemplate metaInfoFileName).
- metainfFile readStreamDo: [ :stream | metainf := STON fromStream: stream ].
- ^ metainf at: #template.
\ No newline at end of file


message:
Temporary package for observing the cause of
Trimmed down what need to be observed to show issue and its resolution.
This should be deleted from the repository when case is resolved.

diff:
+instance creation
+defaultReset
+ Default := nil.
\ No newline at end of file

diff:
announcements
contentsChanged
"Called me to announce that I changed"
- Transcript crShow: thisContext printString , ' ' , announcer hash printString.
+
wantNotification
ifTrue: [ announcer announce: ValueChanged new ]
\ No newline at end of file

diff:
@@ -2,5 +2,4 @@ initialization
initialize
super initialize.
announcer := Announcer new.
- Transcript crShow: thisContext printString , ' announcer=' , announcer hash printString.
wantNotification := true.
\ No newline at end of file

diff:
announcements
whenChangedSend: aSelector to: aReceiver
- Transcript crShow: thisContext printString , ' ' , aSelector printString , ' ' , aReceiver printString , ' ' , self hash printString , '-->' , announcer hash printString.
- self halt.
announcer when: ValueChanged send: aSelector to: aReceiver
\ No newline at end of file

original_message:
Temporary package for observing the cause of https://pharo.fogbugz.com/f/cases/12640/PhLTitledTreeModel-refresh-called-too-often

Trimmed down what need to be observed to show issue and its resolution.

This should be deleted from the repository when case is resolved.


message:
Unsubscribe from repositories when window is closed.
Requires SLICE-Issue-12677-subscribe-to-window-closed-event-outside-of-initialize-BenComan.2

diff:
@@ -3,4 +3,5 @@ repository: aRepository
self assert: self repository isNil description: 'Changing the repository is not allowed because we would have to change the context as well'.
repositoryHolder value: aRepository.
self repository whenChangedSend: #refresh to: self.
+ self whenWindowClosed: [ self repository unsubscribe: self ] .
self refresh
\ No newline at end of file


message:
Removed PhLDirectoryBasedImageRepository>>metaFromDirectory: that was redundant after move to PhLImage.
Changed error message to use PhLUIInformation.

diff:
-private
-metaFromDirectory: aDirectory
- | meta |
-
- meta := Dictionary new.
- (aDirectory filesMatching: PhLAbstractTemplate metaInfoFileName)
- do: [ :metaFile |
- metaFile readStreamDo: [ :stream |
- [ meta addAll: (STON fromStream: stream) ]
- on: Error
- do: [ Transcript crShow: 'PharoLauncher error: meta info ' , metaFile asString ] ] ].
- ^ meta
\ No newline at end of file

diff:
@@ -6,7 +6,9 @@ metaFromDirectory: aDirectory
(aDirectory filesMatching: PhLAbstractTemplate metaInfoFileName)
do: [ :metaFile |
metaFile readStreamDo: [ :stream |
- [ myMeta addAll: (STON fromStream: stream) ]
+ [ myMeta addAll: (STON fromStream: stream) . 1/0 ]
on: Error
- do: [ Transcript crShow: 'PharoLauncher error: meta info ' , metaFile asString ] ] ].
+ do: [ PhLUIInformation new
+ message: ('PharoLauncher error: meta info {1}' format: { metaFile asString }) ;
+ inform ] ] ].
^ myMeta
\ No newline at end of file


message: Issue 13048 slow image resolved by cleaning dangling references caused by memory leak. Thanks Nicolai.

diff:
+A ConfigurationOfPharoLauncher is
\ No newline at end of file

diff:
@@ -2,4 +2,4 @@ symbolic versions
stable: spec
<symbolicVersion: #'stable'>
- spec for: #'common' version: '0.2.0'.
+ spec for: #'common' version: '0.2.1'.

diff:
+versions
+version021: spec
+ <version: '0.2.1' imports: #('0.1-baseline' )>
+
+ spec for: #'common' do: [
+ spec blessing: #'stable'.
+ spec description: 'version 0.2.1'.
+ spec author: 'BenComan'.
+ spec timestamp: '9/22/2014 23:50'.
+ spec
+ project: 'XMLParser' with: '1.6.5';
+ project: 'OSProcess' with: '4.5.8';
+ project: 'JSON' with: '1.0';
+ project: 'Ston' with: '0.9'.
+ spec
+ package: #'PharoLauncher-Core' with: 'PharoLauncher-Core-NicolaiHess.64';
+ package: #'PharoLauncher-Spec' with: 'PharoLauncher-Spec-NicolaiHess.35';
+ package: #'PharoLauncher-Tests-Core' with: 'PharoLauncher-Tests-Core-TimMackinnon.9'. ].

diff:
{
- "commentStamp" : "",
+ "commentStamp" : "<historical>",
"super" : "Object",
"category" : "ConfigurationOfPharoLauncher",
"classinstvars" : [ ],


message: Added PhLCopyPathname to copy the selected image pathname to the system clipboard.

diff: +Copy the selected image pathname to the system clipboard.

diff:
+action
+group
+ ^ 3
\ No newline at end of file

diff:
+accessing
+icon
+ ^ Smalltalk ui icons smallInfoIcon
\ No newline at end of file

diff:
+accessing
+title
+ ^ 'Copy pathname'
\ No newline at end of file

diff:
+action
+execute
+ Clipboard clipboardText:
+ $" asString,
+ context singleImage file fullName ,
+ $" asString.

diff:
+{
+ "commentStamp" : "BenComan 11/23/2014 17:12",
+ "super" : "PhLImageCommand",
+ "category" : "PharoLauncher-Core-Commands",
+ "classinstvars" : [ ],
+ "pools" : [ ],
+ "classvars" : [ ],
+ "instvars" : [ ],
+ "name" : "PhLCopyPathname",
+ "type" : "normal"
+}
\ No newline at end of file


message: Just add class commentaries

diff:
-A ConfigurationOfPharoLauncher is
\ No newline at end of file
+A ConfigurationOfPharoLauncher is usefull to configure the launcher
+
+-> Type "ConfigurationOfPharoLauncher loadBleedingEdge" to load the latest versions of the mcz files defined for this project.
+
+-> Type "ConfigurationOfPharoLauncher loadDevelopment" to load the development version defined for this platform.
+
+-> Type "ConfigurationOfPharoLauncher load" to load the stable version defined for this platform (Recommanded to be used on this platform)

diff:
{
- "commentStamp" : "<historical>",
+ "commentStamp" : "v 2/16/2015 16:54",
"super" : "Object",
"category" : "ConfigurationOfPharoLauncher",
"classinstvars" : [ ],

original_message: Just add class commentaries


diff:
@@ -6,4 +6,4 @@ asLegalSelector
toUse := self select: [:char | char isAlphaNumeric].
(toUse size = 0 or: [ toUse first isLetter not ])
ifTrue: [ toUse := 'v', toUse ].
- ^ toUse withFirstCharacterDownshifted asSymbol.
\ No newline at end of file
+ ^ toUse uncapitalized asSymbol.
\ No newline at end of file

original_message:
do not use deprecated method #withFirstCharacterDownshifted
(use uncapitalized instead)
in Pharo4.0 Latest update: #40493


message: pharo 40 deprecated ones

diff:
@@ -13,6 +13,6 @@ version024: spec
project: 'JSON' with: '1.0';
project: 'Ston' with: '0.10'.
spec
- package: #'PharoLauncher-Core' with: 'PharoLauncher-Core-DamienCassou.69';
- package: #'PharoLauncher-Spec' with: 'PharoLauncher-Spec-DamienCassou.37';
+ package: #'PharoLauncher-Core' with: 'PharoLauncher-Core-TorstenBergmann.70';
+ package: #'PharoLauncher-Spec' with: 'PharoLauncher-Spec-TorstenBergmann.38';
package: #'PharoLauncher-Tests-Core' with: 'PharoLauncher-Tests-Core-TimMackinnon.9'. ].

original_message: pharo 40 deprecated ones


message: 50 was already added. 40 is stable and not beta.

diff:
@@ -13,6 +13,6 @@ version025: spec
project: 'JSON' with: '1.0';
project: 'Ston' with: '0.10'.
spec
- package: #'PharoLauncher-Core' with: 'PharoLauncher-Core-TorstenBergmann.71';
+ package: #'PharoLauncher-Core' with: 'PharoLauncher-Core-TorstenBergmann.72';
package: #'PharoLauncher-Spec' with: 'PharoLauncher-Spec-TorstenBergmann.38';
package: #'PharoLauncher-Tests-Core' with: 'PharoLauncher-Tests-Core-TimMackinnon.9'. ].


message: [CLEAN]: Properly categorize one method

diff:
-action
+accessing
newImageName
^ newImageName ifNil: [ newImageName := context requestNewImageName: context singleTemplateName ]
\ No newline at end of file

original_message: [CLEAN]: Properly categorize one method


message: Update Moose images in Common tools to account for 5.1 release, and 6.0 as new beta

diff:
-private
-moose49
- ^ PhLRemoteTemplate name: 'Moose Suite 4.9 (old stable)' url: 'https://dl.dropboxusercontent.com/u/18323746/Moose/moose_suite_4_9-image.zip' asUrl
\ No newline at end of file

diff:
private
moose50
- ^ PhLRemoteTemplate name: 'Moose Suite 5.0 (stable)' url: 'http://moosetechnology.org/res/download/moose_image_5_0.zip' asUrl
\ No newline at end of file
+ ^ PhLRemoteTemplate name: 'Moose Suite 5.0 (old stable)' url: 'http://moosetechnology.org/res/download/moose_image_5_0.zip' asUrl
\ No newline at end of file

diff:
private
moose51
- ^ PhLRemoteTemplate name: 'Moose Suite 5.1 (beta)' url: 'https://ci.inria.fr/moose/job/moose-5.1/lastSuccessfulBuild/artifact/moose-5.1.zip' asUrl
\ No newline at end of file
+ ^ PhLRemoteTemplate name: 'Moose Suite 5.1 (stable)' url: 'https://ci.inria.fr/moose/job/moose-5.1/lastSuccessfulBuild/artifact/moose-5.1.zip' asUrl
\ No newline at end of file

diff:
+private
+moose60
+ ^ PhLRemoteTemplate name: 'Moose Suite 6.0 (beta)' url: 'https://ci.inria.fr/moose/job/moose-6.0/lastSuccessfulBuild/artifact/moose-6.0.zip' asUrl
\ No newline at end of file


message: Update Moose images in Common tools to account for 5.1 release, and 6.0 as new beta. The last version updated the constructors, this one updates the list. N.B. Requires post load `PhLTemplateGroupRepository resetGroups`

diff:
@@ -7,8 +7,8 @@ forCommonTools
(self pharo40).
(self pharo30).
(self pharo20).
+ (self moose60).
(self moose51).
- (self moose50).
- (self moose49)};
+ (self moose50)};
isHighlighted: true;
yourself
\ No newline at end of file


message: Settings could use FilePathEncoder to help the user with VMPaths.

diff:
@@ -11,6 +11,7 @@ settingsOn: aBuilder
(aBuilder setting: #vmFullPath)
label: 'VM Full Path' translated;
+ type: #FilePathEncoder;
parent: #pharoLauncher;
target: self;
description: 'When set, this is the full path (including executable name) to the VM used to launch an image. ' , String cr ,
@@ -19,6 +20,7 @@ settingsOn: aBuilder
(aBuilder setting: #spurFullPath)
label: 'Spur VM Full Path' translated;
+ type: #FilePathEncoder;
parent: #pharoLauncher;
target: self;
description: 'When set, this is the full path (including executable name) to the Spur VM used to launch an image in Spur format. ' , String cr ,


message: Add PreSpur images to PharoLauncher.

diff:
+instance creation
+pharo50PreSpur
+ ^ self name: 'Pharo 5.0 - PreSpur (beta)' url: 'http://files.pharo.org/image/50-preSpur/' asZnUrl
\ No newline at end of file

diff:
@@ -11,6 +11,7 @@ groups
Groups at: PhLHTTPListingTemplateGroup pharo30 put: true.
Groups at: PhLHTTPListingTemplateGroup pharo40 put: true.
Groups at: PhLHTTPListingTemplateGroup pharo50 put: true.
+ Groups at: PhLHTTPListingTemplateGroup pharo50PreSpur put: true.
Groups at: PhLFixedURLsTemplateGroup forCommonTools put: true.
Groups at: PhLLocalTemplateGroup default put: true.
^ Groups ]
\ No newline at end of file

original_message: Add PreSpur images to PharoLauncher.


diff:
action
launch: aFullPathString
"Use the VM that launched the current image to launch me"
+
| vmCommand imagePath |
- vmCommand := aFullPathString isEmpty ifTrue: [Smalltalk vm fullPath asString] ifFalse: [ aFullPathString ] .
+ vmCommand := aFullPathString isEmpty
+ ifTrue: [ Smalltalk vm fullPath asString ]
+ ifFalse: [ aFullPathString ].
imagePath := file pathString.
- ^OSProcess command: $' asString , vmCommand , ''' ''' , imagePath, ''''.
\ No newline at end of file
+ ^ OSProcess command: vmCommand , ' "' , imagePath , '"'
\ No newline at end of file

original_message: Solve issue: Pharo images are not launching with the latest dev configuration of the launcher #13


message: resolvve a morphic bug that happens when we want to open the pharo launcher window

diff:
@@ -9,7 +9,6 @@ initializeWidgets
doubleClick: [ self doubleClick ];
hasChildrenBlock: [ :item | item hasChildren ];
childrenBlock: [ :item | item children ].
- tree whenBuiltDo:[:t | t widget widget
- rowColorForEven: self theme backgroundColor lighter odd: self theme backgroundColor darker].
+ tree whenBuiltDo:[:t | t widget rowColorForEven: self theme backgroundColor lighter odd: self theme backgroundColor darker].
toolbar := self newCommandToolbar.
tree whenSelectedItemsChanged: [ self context ifNotNil: [ self updateContext ] ]
\ No newline at end of file


message:
pharo4.x -> '0.2.9
common -> '0.2.10'

diff:
symbolic versions
stable: spec
- <symbolicVersion: #'stable'>
-
- spec for: #'common' version: '0.2.9'.
-
+ <symbolicVersion: #stable>
spec for: #'pharo3.x' version: '0.2.6'.
+ spec for: #'pharo4.x' version: '0.2.9'.
+ spec for: #common version: '0.2.10'
\ No newline at end of file

diff:
+versions
+version0210: spec
+ <version: '0.2.10' imports: #('0.1-baseline' )>
+
+ spec for: #'common' do: [
+ spec blessing: #'stable'.
+ spec description: 'version 0.2.10'.
+ spec author: 'VincentBlondeau'.
+ spec timestamp: '1/14/2016 10:45'.
+ spec
+ project: 'XMLParser' with: '2.5.7';
+ project: 'OSProcess' with: '4.6.4';
+ project: 'JSON' with: '1.2';
+ project: 'Ston' with: '0.15'.
+ spec
+ package: #'PharoLauncher-Core' with: 'PharoLauncher-Core-CyrilFerlicot.88';
+ package: #'PharoLauncher-Spec' with: 'PharoLauncher-Spec-VincentBlondeau.44';
+ package: #'PharoLauncher-Tests-Core' with: 'PharoLauncher-Tests-Core-TimMackinnon.9'. ].


message: use new startup system of Pharo5

diff:
class initialization
initialize
super initialize.
- Smalltalk addToStartUpList: self
\ No newline at end of file
+ SessionManager default registerSystemClassNamed: self name
\ No newline at end of file

original_message: use new startup system of Pharo5


message: fix shell explore on Windows to browse image folder from context menu (Necessary for newer Pharo without NativeBoost, therefore use an UFFI call)

diff:
*pharoLauncher-Core-Commands
privOpenFileBrowserOn: pathString
- NBWin32Shell shellExplore: pathString
+ self privShellExplore: pathString
\ No newline at end of file

diff:
+*pharoLauncher-Core-Commands
+privShellExecute: lpOperation file: lpFile parameters: lpParameters directory: lpDirectory show: nShowCmd
+
+ ^self ffiCall: #(
+ FFIConstantHandle ShellExecuteA(
+ 0,
+ char* lpOperation,
+ char* lpFile,
+ char* lpParameters,
+ char* lpDirectory,
+ int nShowCmd)) module: #shell32
+

diff:
+*pharoLauncher-Core-Commands
+privShellExplore: folder
+ "
+ self privShellExplore: 'c:\'
+ "
+
+ ^self privShellExecute: 'explore' file: folder parameters: '' directory: '' show: 5 "SW_SHOW"
\ No newline at end of file


message: 0.2.12 with fix for Windows browse folder

diff:
@@ -2,7 +2,7 @@ symbolic versions
stable: spec
<symbolicVersion: #'stable'>
- spec for: #'common' version: '0.2.11'.
+ spec for: #'common' version: '0.2.12'.
spec for: #'pharo3.x' version: '0.2.6'.

diff:
+versions
+version0212: spec
+ <version: '0.2.12' imports: #('0.1-baseline' )>
+
+ spec for: #'common' do: [
+ spec blessing: #'stable'.
+ spec description: 'version 0.2.12
+Run on Pharo 5.0. Fixes the browse folder problem on Windows'.
+ spec author: 'TorstenBergmann'.
+ spec timestamp: '5/18/2016 09:25'.
+ spec
+ project: 'XMLParser' with: '2.7.6';
+ project: 'OSProcess' with: '4.6.4';
+ project: 'JSON' with: '1.2';
+ project: 'Ston' with: '0.19'.
+ spec
+ package: #'PharoLauncher-Core' with: 'PharoLauncher-Core-TorstenBergmann.103';
+ package: #'PharoLauncher-Spec' with: 'PharoLauncher-Spec-ChristopheDemarey.47';
+ package: #'PharoLauncher-Tests-Core' with: 'PharoLauncher-Tests-Core-ChristopheDemarey.11'. ].


message: added a filter for the images

diff:
@@ -5,7 +5,7 @@ version0212: spec
spec for: #'common' do: [
spec blessing: #'stable'.
spec description: 'version 0.2.12
-Run on Pharo 5.0. Fixes the browse folder problem on Windows'.
+Run on Pharo 5.0. Fixes the browse folder problem on Windows and added a filter for the images'.
spec author: 'TorstenBergmann'.
spec timestamp: '5/18/2016 09:25'.
spec
@@ -15,5 +15,5 @@ Run on Pharo 5.0. Fixes the browse folder problem on Windows'.
project: 'Ston' with: '0.19'.
spec
package: #'PharoLauncher-Core' with: 'PharoLauncher-Core-TorstenBergmann.103';
- package: #'PharoLauncher-Spec' with: 'PharoLauncher-Spec-ChristopheDemarey.47';
+ package: #'PharoLauncher-Spec' with: 'PharoLauncher-Spec-TorstenBergmann.48';
package: #'PharoLauncher-Tests-Core' with: 'PharoLauncher-Tests-Core-ChristopheDemarey.11'. ].

original_message: added a filter for the images


message: Add Moose 6.1 to the launcher.

diff:
@@ -8,6 +8,7 @@ forCommonTools
(self pharo40).
(self pharo30).
(self pharo20).
+ (self moose61).
(self moose60).
(self moose51).
(self moose50)};

diff:
private
moose50
- ^ PhLRemoteTemplate name: 'Moose Suite 5.0 (old stable)' url: 'http://moosetechnology.org/res/download/moose_image_5_0.zip' asUrl
\ No newline at end of file
+ ^ PhLRemoteTemplate name: 'Moose Suite 5.0' url: 'http://moosetechnology.org/res/download/moose_image_5_0.zip' asUrl
\ No newline at end of file

diff:
private
moose51
- ^ PhLRemoteTemplate name: 'Moose Suite 5.1 (stable)' url: 'https://ci.inria.fr/moose/job/moose-5.1/lastSuccessfulBuild/artifact/moose-5.1.zip' asUrl
\ No newline at end of file
+ ^ PhLRemoteTemplate name: 'Moose Suite 5.1 (old stable)' url: 'https://ci.inria.fr/moose/job/moose-5.1/lastSuccessfulBuild/artifact/moose-5.1.zip' asUrl
\ No newline at end of file

diff:
private
moose60
- ^ PhLRemoteTemplate name: 'Moose Suite 6.0 (beta)' url: 'https://ci.inria.fr/moose/job/moose-6.0/lastSuccessfulBuild/artifact/moose-6.0.zip' asUrl
\ No newline at end of file
+ ^ PhLRemoteTemplate name: 'Moose Suite 6.0 (stable)' url: 'https://ci.inria.fr/moose/job/moose-6.0/lastSuccessfulBuild/artifact/moose-6.0.zip' asUrl
\ No newline at end of file

diff:
+private
+moose61
+ ^ PhLRemoteTemplate name: 'Moose Suite 6.1 (beta)' url: 'https://ci.inria.fr/moose/job/moose-6.1/lastSuccessfulBuild/artifact/moose-6.1.zip' asUrl
\ No newline at end of file

original_message: Add Moose 6.1 to the launcher.


message:
Adopt to Pharo 70 already
after loading ensure to run
PhLTemplateGroupRepository resetGroups.

diff:
@@ -3,7 +3,9 @@ forCommonTools
^ self new
setName: 'Common tools'
Templates:
- { (self pharo60).
+
+ { (self pharo70).
+ (self pharo60).
(self pharo50).
(self pharo40).
(self pharo30).

diff:
private
pharo50
- ^ PhLRemoteTemplate name: 'Pharo 5.0 (stable)' url: 'http://files.pharo.org/image/50/latest.zip' asUrl
\ No newline at end of file
+ ^ PhLRemoteTemplate name: 'Pharo 5.0' url: 'http://files.pharo.org/image/50/latest.zip' asUrl
\ No newline at end of file

diff:
private
pharo60
- ^ PhLRemoteTemplate name: 'Pharo 6.0 (beta)' url: 'http://files.pharo.org/image/60/latest.zip' asUrl
\ No newline at end of file
+ ^ PhLRemoteTemplate name: 'Pharo 6.0 (stable)' url: 'http://files.pharo.org/image/60/latest.zip' asUrl
\ No newline at end of file

diff:
+private
+pharo70
+ ^ PhLRemoteTemplate name: 'Pharo 7.0 (alpha)' url: 'http://files.pharo.org/image/70/latest.zip' asUrl
\ No newline at end of file

diff:
instance creation
pharo50
- ^ self name: 'Pharo 5.0 (stable)' url: 'http://files.pharo.org/image/50/' asZnUrl
\ No newline at end of file
+ ^ self name: 'Pharo 5.0' url: 'http://files.pharo.org/image/50/' asZnUrl
\ No newline at end of file

diff:
instance creation
pharo60
- ^ self name: 'Pharo 6.0 (beta)' url: 'http://files.pharo.org/image/60/' asZnUrl
\ No newline at end of file
+ ^ self name: 'Pharo 6.0' url: 'http://files.pharo.org/image/60/' asZnUrl
\ No newline at end of file

diff:
+instance creation
+pharo70
+ ^ self name: 'Pharo 7.0 (beta)' url: 'http://files.pharo.org/image/70/' asZnUrl
\ No newline at end of file

diff:
@@ -12,6 +12,7 @@ groups
Groups at: PhLHTTPListingTemplateGroup pharo40 put: true.
Groups at: PhLHTTPListingTemplateGroup pharo50 put: true.
Groups at: PhLHTTPListingTemplateGroup pharo60 put: true.
+ Groups at: PhLHTTPListingTemplateGroup pharo70 put: true.
Groups at: PhLFixedURLsTemplateGroup forCommonTools put: true.
Groups at: PhLLocalTemplateGroup default put: true.
^ Groups ]
\ No newline at end of file

diff:
-as yet unclassified
+settings
wantPharo30oldstable
^ true
\ No newline at end of file

diff:
-as yet unclassified
+settings
wantPharo40stable
^ true
\ No newline at end of file

diff:
-as yet unclassified
+settings
wantPharo60beta
^ true
\ No newline at end of file

diff:
+settings
+wantPharo70alpha
+ ^ true
\ No newline at end of file


message: Clean settings

diff:
@@ -6,22 +6,6 @@ settingsOn: aBuilder
label: 'Quit On Launch' translated;
parent: #pharoLauncher;
target: self;
- description: 'When enabled, Launcher quits when an image is launched. ' , String cr ,
- 'When disabled, Launcher stays alive when an image is launched.' translated.
-
- (aBuilder setting: #vmFullPath)
- label: 'VM Full Path' translated;
- type: #FilePathEncoder;
- parent: #pharoLauncher;
- target: self;
- description: 'When set, this is the full path (including executable name) to the VM used to launch an image. ' , String cr ,
- 'When empty, Launcher uses it''s internal VM.', String cr,
- 'NOTE: This path might need to escape some whitespace characters e.g. "/Pharo\ 3.0/Pharo".' translated.
-
- (aBuilder setting: #spurFullPath)
- label: 'Spur VM Full Path' translated;
- type: #FilePathEncoder;
- parent: #pharoLauncher;
- target: self;
- description: 'When set, this is the full path (including executable name) to the Spur VM used to launch an image in Spur format. ' , String cr ,
- 'NOTE: This path might need to escape some whitespace characters e.g. "/Pharo\ 3.0/Pharo".' translated.
\ No newline at end of file
+ description:
+ 'When enabled, Launcher quits when an image is launched. ' , String cr
+ , 'When disabled, Launcher stays alive when an image is launched.' translated
\ No newline at end of file

diff:
-accessing
-spurFullPath: anObject
- SpurFullPath := anObject
\ No newline at end of file

diff:
-accessing
-spurFullPath
- ^ SpurFullPath ifNil: [ '' ]
\ No newline at end of file

diff:
-accessing
-vmFullPath: anObject
- VmFullPath := anObject
\ No newline at end of file

diff:
-accessing
-vmFullPath
- ^ VmFullPath ifNil: [ '' ]
\ No newline at end of file

diff:
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [
- "QuitOnLaunch",
- "SpurFullPath",
- "VmFullPath"
+ "QuitOnLaunch"
],
"instvars" : [ ],
"name" : "PhLLaunchImageCommand",

diff:
+settings
+settingsOn: aBuilder
+ <systemsettings>
+ <pharoLauncherSettings>
+ (aBuilder setting: #vmStore)
+ label: 'VMs Directory' translated;
+ type: #Directory;
+ parent: #pharoLauncher;
+ target: self;
+ default: (PlatformResolver forCurrentPlatform launcherUserFilesLocation / 'vms') pathString;
+ description:
+ 'Path to the directory containing all the VMs to launcher your Pharo images.' , String cr
+ , 'You must have the read/write rights on this folder.' , String cr
+ , 'NOTE: This path might need to escape some whitespace characters e.g. "/Pharo\ 3.0/Pharo".' translated
\ No newline at end of file

diff:
+accessing
+vmStore: anObject
+ VMStore := anObject asFileReference.
+ VMStore ensureCreateDirectory
\ No newline at end of file

diff:
+accessing
+vmStore
+ ^ VMStore ifNil: [ VMStore := (PlatformResolver forCurrentPlatform launcherUserFilesLocation / 'vms') ensureCreateDirectory ]
\ No newline at end of file

diff:
@@ -3,4 +3,4 @@ ensureIsExecutable: aPath
"Unzipping with Pharo does not preserve unix rights and so, the pahro VM executable does not have the execution permission.
We have to set it explicitely on Unix and OS X."
Smalltalk os isWindows
- ifFalse: [ OSProcess thisOSProcess waitForCommand: 'chmod u+x ' , aPath ]
\ No newline at end of file
+ ifFalse: [ OSProcess waitForCommand: 'chmod u+x ' , aPath ]
\ No newline at end of file

diff:
accessing
vmStore
- ^ (PlatformResolver forCurrentPlatform launcherUserFilesLocation / 'vms') ensureCreateDirectory
\ No newline at end of file
+ ^ self class vmStore
\ No newline at end of file

diff:
"category" : "PharoLauncher-Core-Model",
"classinstvars" : [ ],
"pools" : [ ],
- "classvars" : [ ],
+ "classvars" : [
+ "VMStore"
+ ],
"instvars" : [
"imageFile",
"imageFormatNumber",

original_message: Clean settings


message: Added hard-reset of persistant state in all class variables.  Helps pick up new template repos like "Pharo 7(beta)".

diff:
+as yet unclassified
+hardResetPersistanceState: dontCare
+ |packages|
+ SystemWindow allSubInstances do:[:w| w delete].
+ self inform: 'PharoLauncher state reset'.
+ World doOneCycle.
+ 1000 milliSeconds wait. "To help user perception that *something* was reset"
+
+ packages := RPackageOrganizer default packages select:[:p|
+ (p name includesSubstring: 'PharoLauncher') ].
+ packages do: [:p| p definedClasses do:[:class|
+ class classPool keys do: [ :k | class classPool at: k put: nil ] ]].
+
+ self open.
\ No newline at end of file

diff:
+as yet unclassified
+hardResetPersistanceState
+ ^false
\ No newline at end of file

diff:
@@ -11,4 +11,15 @@ settingsOn: aBuilder
target: PharoLauncher;
description:
'When enabled, Launcher startup clears the Templates List. ' , String cr
- , 'When disabled, Launcher startup retains the Templates List from last run.' translated ]
\ No newline at end of file
+ , 'When disabled, Launcher startup retains the Templates List from last run.' translated.
+
+ (aBuilder setting: #hardResetPersistanceState)
+ label: 'Hard reset persistant state' translated;
+ target: PharoLauncher;
+ description:
+ 'When PharoLauncher is updated through Monticello' , String cr,
+ 'sometimes you need to clear persistant state to pick up new changes.' , String cr,
+ 'Clicking this box is a one-shot action, i.e. this state is also reset'
+ translated
+
+ ]
\ No newline at end of file


message: Rearranged the order of settings.

diff:
@@ -6,4 +6,5 @@ settingsOn: aBuilder
label: 'Location of your images' translated;
parent: #pharoLauncher;
target: self;
+ order: 40;
description: 'A directory where all your Pharo images will be saved and launched'
\ No newline at end of file

diff:
@@ -6,6 +6,7 @@ settingsOn: aBuilder
label: 'Quit On Launch' translated;
parent: #pharoLauncher;
target: self;
+ order: 30;
description:
'When enabled, Launcher quits when an image is launched. ' , String cr
, 'When disabled, Launcher stays alive when an image is launched.' translated
\ No newline at end of file

diff:
@@ -5,7 +5,7 @@ networkSettingsOn: aBuilder
label: 'Use HTTP proxy' translated;
parent: #pharoLauncher;
target: NetworkSystemSettings;
- noOrdering;
+ order: 10;
description:
'If checked then the you will be able to set a port number and a server name. If unchecked, then no http proxy is used.'
translated;

diff:
@@ -7,6 +7,7 @@ settingsOn: aBuilder
type: #Directory;
parent: #pharoLauncher;
target: self;
+ order: 50;
default: (PlatformResolver forCurrentPlatform launcherUserFilesLocation / 'vms') pathString;
description:
'Path to the directory containing all the VMs to launcher your Pharo images.' , String cr

original_message: Rearranged the order of settings.


message:
Rearranged the order of settings.
Reduced delay before restarting PharoLauncher when reseting persistant state.

diff:
@@ -5,6 +5,7 @@ settingsOn: aBuilder
(aBuilder setting: #developmentEnvironmentEnabled)
parent: #pharoLauncher;
target: self;
+ order: 60;
label: 'Enable development environment' translated;
description: 'Missing a feature? Hey come join in! Add your custom feature.
When enabled, exits the Launcher application into the Pharo development environment.

diff:
@@ -4,7 +4,7 @@ hardResetPersistanceState: dontCare
SystemWindow allSubInstances do:[:w| w delete].
self inform: 'PharoLauncher state reset'.
World doOneCycle.
- 1000 milliSeconds wait. "To help user perception that *something* was reset"
+ 500 milliSeconds wait. "To help user perception that *something* was reset"
packages := RPackageOrganizer default packages select:[:p|
(p name includesSubstring: 'PharoLauncher') ].

diff:
@@ -8,6 +8,7 @@ settingsOn: aBuilder
with: [
(aBuilder setting: #templatesClearedOnStartup)
label: 'Templates cleared at startup' translated;
+ order: 20;
target: PharoLauncher;
description:
'When enabled, Launcher startup clears the Templates List. ' , String cr
@@ -16,10 +17,12 @@ settingsOn: aBuilder
(aBuilder setting: #hardResetPersistanceState)
label: 'Hard reset persistant state' translated;
target: PharoLauncher;
+ order: 70;
description:
- 'When PharoLauncher is updated through Monticello' , String cr,
+ 'When PharoLauncher is updated through Monticello ' ,
'sometimes you need to clear persistant state to pick up new changes.' , String cr,
- 'Clicking this box is a one-shot action, i.e. this state is also reset'
+ 'Clicking this box is a one-shot action, i.e. this state is also reset.', String cr,
+ 'Note, all open windows are clsoed and the application restarted.'
translated
]
\ No newline at end of file


message: Ensure vms directory is created when we try to access it.

diff:
@@ -2,6 +2,7 @@ private
availableVirtualMachinesIn: aFileReference
| vmsOnDisk |
vmsOnDisk := Dictionary new.
+ aFileReference ensureCreateDirectory.
aFileReference directories
reject: [ :entry | entry basename = 'private' ]
thenDo: [ :entry | | vm |


message:
Fix the template groups for Pharo 7. One can now give a filter pattern/regex per version group.
pharo70
^ self
name: 'Pharo 7.0 (development version)'
url: 'http://files.pharo.org/image/70/' asZnUrl
filterPattern: 'href="(Pharo-7.0.0-alpha.build.[^"]*.zip)"'

diff:
+defaults
+defaultFilterPattern
+ "Returns the default filter pattern (Pharo6). The parenthesis here are important because this is what we want to extract for each match. The #subexpression must correspond to the index of this pair of parenthesis"
+ ^'href="([^"]*.zip)"'
\ No newline at end of file

diff:
+instance creation
+name: aString url: anUrl filterPattern: aPatternString
+ ^ self new
+ setName: aString url: anUrl filterPattern: aPatternString;
+ yourself
\ No newline at end of file

diff:
instance creation
pharo70
- ^ self name: 'Pharo 7.0 (development version)' url: 'http://files.pharo.org/image/70/' asZnUrl
\ No newline at end of file
+ ^ self
+ name: 'Pharo 7.0 (development version)'
+ url: 'http://files.pharo.org/image/70/' asZnUrl
+ filterPattern: 'href="(Pharo-7.0.0-alpha.build.[^"]*.zip)"'
\ No newline at end of file

diff:
-accessing
-regex
- "Cache the regex tree so that we don't recompute it all the time"
- ^ Regex ifNil: [ Regex := RxParser parse: 'href="([^"]*.zip)"' "the parenthesis here are important because this is what we want to extract for each match. The #subexpression must correspond to the index of this pair of parenthesis."]
\ No newline at end of file

diff:
+accessing
+regexCache
+ "Cache the regex per version so that we don't recompute it all the time"
+ ^ RegexCache ifNil: [ RegexCache := Dictionary new ]
\ No newline at end of file

diff:
accessing
regex
- ^ self class regex
\ No newline at end of file
+ ^ self class regexCache at: self name asSymbol
\ No newline at end of file

diff:
initialize-release
setName: aName url: anUrl
name := aName.
- url := anUrl
\ No newline at end of file
+ url := anUrl.
+ self class regexCache at: aName asSymbol put: (RxParser parse: self class defaultFilterPattern)
\ No newline at end of file

diff:
+initialize-release
+setName: aName url: anUrl filterPattern: aPatternString
+ name := aName.
+ url := anUrl.
+ self class regexCache at: aName asSymbol put: (RxParser parse: aPatternString)
\ No newline at end of file

diff:
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [
- "Regex"
+ "RegexCache"
],
"instvars" : [
"url",


message:
V1.2:
Break the PharoLauncher-Core Package into PharoLauncher-Core and PharoLauncher-Download
PharoLauncher-Download contains only the utilities to download the vm and images
Tests are split too

diff:
+baselines
+baseline12: spec
+ <version: '1.2-baseline'>
+
+ spec for: #'common' do: [
+ spec blessing: #'baseline'.
+ spec repository: 'http://smalltalkhub.com/mc/Pharo/PharoLauncher/main/'.
+ spec
+ project: 'JSON' with: [
+ spec
+ className: #ConfigurationOfJSON;
+ versionString: #'stable';
+ repository: 'http://smalltalkhub.com/mc/PharoExtras/JSON/main/' ];
+ project: 'OSProcess' with: [
+ spec
+ className: #ConfigurationOfOSProcess;
+ versionString: #'stable';
+ loads: #('Core with Output' );
+ repository: 'http://www.squeaksource.com/MetacelloRepository' ];
+ project: 'ProcessWrapper' with: [
+ spec
+ className: #ConfigurationOfProcessWrapper;
+ versionString: #'bleedingEdge';
+ loads: #('Core' );
+ repository: 'http://smalltalkhub.com/mc/hernan/ProcessWrapper/main/' ];
+ project: 'Ston' with: [
+ spec
+ className: #ConfigurationOfSton;
+ versionString: #'stable';
+ repository: 'http://ss3.gemstone.com/ss/STON' ];
+ project: 'XMLParser' with: [
+ spec
+ className: #ConfigurationOfXMLParser;
+ versionString: #'stable';
+ loads: #('Core' );
+ repository: 'http://smalltalkhub.com/mc/PharoExtras/XMLParser/main/' ].
+ spec
+ package: #'PharoLauncher-Core' with: [
+ spec requires: #(#'PharoLauncher-Download' 'XMLParser' 'Ston' 'JSON' ). ];
+ package: #'PharoLauncher-Download' with: [
+ spec requires: #('OSProcess' ). ];
+ package: #'PharoLauncher-Spec' with: [
+ spec requires: #(#'PharoLauncher-Core' ). ];
+ package: #'PharoLauncher-Tests-Core' with: [
+ spec requires: #(#'PharoLauncher-Core' ). ];
+ package: #'PharoLauncher-Tests-Download' with: [
+ spec requires: #(#'PharoLauncher-Download' ). ].
+ spec
+ group: 'Default' with: #(#'PharoLauncher-Tests-Core' #'PharoLauncher-Tests-Download' #'PharoLauncher-Core' #'PharoLauncher-Download' #'PharoLauncher-Spec' );
+ group: 'Download' with: #(#'PharoLauncher-Download' #'PharoLauncher-Tests-Download' ). ].

diff:
@@ -2,4 +2,4 @@ symbolic versions
development: spec
<symbolicVersion: #'development'>
- spec for: #'common' version: '1.0-baseline'.
+ spec for: #'common' version: '1.2-baseline'.

original_message:
V1.2:
- Break the PharoLauncher-Core Package into PharoLauncher-Core and PharoLauncher-Download
- PharoLauncher-Download contains only the utilities to download the vm and images
- Tests are split too


message: Set up https (works better with corporate proxies)

diff:
accessing
sourcesFileUrlFor: anImageVersionString
"$1: IMAGE_VERSION"
- ^ 'http://files.pharo.org/get-files/{1}/sources.zip'
+ ^ 'https://files.pharo.org/get-files/{1}/sources.zip'
format: {anImageVersionString}
\ No newline at end of file

diff:
@@ -4,4 +4,4 @@ vmUrlTemplate
$2: VM_ARCH
$3: OS
$4: VM_STATUS"
- ^ 'http://files.pharo.org/get-files/{1}/pharo{2}-{3}-{4}.zip'
\ No newline at end of file
+ ^ 'https://files.pharo.org/get-files/{1}/pharo{2}-{3}-{4}.zip'
\ No newline at end of file

diff:
SystemOrganization addCategory: #'PharoLauncher-Download'!
-SystemOrganization addCategory: 'PharoLauncher-Download-Core'!
-SystemOrganization addCategory: 'PharoLauncher-Download-Exceptions'!
-SystemOrganization addCategory: 'PharoLauncher-Download-Manifest'!
+SystemOrganization addCategory: #'PharoLauncher-Download-Core'!
+SystemOrganization addCategory: #'PharoLauncher-Download-Exceptions'!
+SystemOrganization addCategory: #'PharoLauncher-Download-Manifest'!


message: make the tests compatibles to a Windows OS with a slow internet connection

diff:
+tests
+replaceOSByMacIn: url
+ ^ (url copyReplaceAll: 'linux' with: 'mac') copyReplaceAll: 'win' with: 'mac'
\ No newline at end of file

diff:
tests
testCanDetect32BitsImage
| version |
-
+ self timeLimit: 60 seconds.
version := PhLVirtualMachineManager imageFormatNumberFromStream: self thirtyTwoBitsHeader.
self assert: (PhLVirtualMachineManager is32bits: version)
\ No newline at end of file

diff:
tests
testCanDetect64BitsImage
| version |
-
- ZnConstants defaultMaximumEntitySize: 25 * 1024 * 1024. "25 Mb"
+ self timeLimit: 60 seconds.
version := PhLVirtualMachineManager imageFormatNumberFromStream: self sixtyFourBitsHeader.
self assert: (PhLVirtualMachineManager is64bits: version)
\ No newline at end of file

diff:
tests
testCanDetectPreSpurImage
| version |
-
+ self timeLimit: 60 seconds.
version := PhLVirtualMachineManager imageFormatNumberFromStream: self preSpurHeader.
self assert: (PhLVirtualMachineManager isPreSpur: version)
\ No newline at end of file

diff:
tests
testPharo50PreSpurImageUrlIsCorrect
| url |
- url := (PhLVirtualMachineManager new
+ url := PhLVirtualMachineManager new
imageFormatNumber: PhLVirtualMachineManager imageFormatPreSpur;
imageVersion: '50';
- vmUrl).
- self
- assert: (url copyReplaceAll: 'linux' with: 'mac')
- equals: 'http://files.pharo.org/get-files/50-preSpur/pharo-mac-stable.zip'
\ No newline at end of file
+ vmUrl.
+ self assert: (self replaceOSByMacIn: url) equals: 'https://files.pharo.org/get-files/50-preSpur/pharo-mac-stable.zip'
\ No newline at end of file

diff:
tests
testPharo60VmUrlIsCorrect
| url |
- url := (PhLVirtualMachineManager new
+ url := PhLVirtualMachineManager new
imageFormatNumber: PhLVirtualMachineManager imageFormat32bits;
imageVersion: '60';
- vmUrl).
- self
- assert: (url copyReplaceAll: 'linux' with: 'mac')
- equals: 'http://files.pharo.org/get-files/60/pharo-mac-stable.zip'
\ No newline at end of file
+ vmUrl.
+ self assert: (self replaceOSByMacIn: url) equals: 'https://files.pharo.org/get-files/60/pharo-mac-stable.zip'
\ No newline at end of file

diff:
@@ -6,5 +6,5 @@ testPharo70Vm64BitsUrlIsCorrect
imageVersion: '70';
vmUrl).
self
- assert: (url copyReplaceAll: 'linux' with: 'mac')
- equals: 'http://files.pharo.org/get-files/70/pharo64-mac-stable.zip'
\ No newline at end of file
+ assert: (self replaceOSByMacIn: url)
+ equals: 'https://files.pharo.org/get-files/70/pharo64-mac-stable.zip'
\ No newline at end of file

diff:
@@ -6,5 +6,5 @@ testPharo70VmUrlIsCorrect
imageVersion: '70';
vmUrl).
self
- assert: (url copyReplaceAll: 'linux' with: 'mac')
- equals: 'http://files.pharo.org/get-files/70/pharo-mac-stable.zip'
\ No newline at end of file
+ assert: (self replaceOSByMacIn: url)
+ equals: 'https://files.pharo.org/get-files/70/pharo-mac-stable.zip'
\ No newline at end of file

diff:
@@ -6,5 +6,5 @@ testPreSpurImageUrlIsCorrect
imageVersion: '40';
vmUrl).
self
- assert: (url copyReplaceAll: 'linux' with: 'mac')
- equals: 'http://files.pharo.org/get-files/40/pharo-mac-stable.zip'
\ No newline at end of file
+ assert: (self replaceOSByMacIn: url)
+ equals: 'https://files.pharo.org/get-files/40/pharo-mac-stable.zip'
\ No newline at end of file


message: Add ProcessWrapper class exists testing

diff:
testing
isCommandAvailable: aCommand
- ^ Smalltalk os isWindows
- ifTrue: [ (ProcessWrapper new
+ Smalltalk os isWindows
+ ifTrue: [ Smalltalk
+ at: #ProcessWrapper
+ ifPresent: [ :processWrapperClass |
+ ^ (processWrapperClass new
useStderr;
waitForExit;
startWithShellCommand: aCommand;
- yourself) stderrStream atEnd ]
- ifFalse: [ (OSProcess waitForCommand: aCommand) succeeded ]
\ No newline at end of file
+ yourself) stderrStream atEnd ] ].
+ ^ (OSProcess waitForCommand: aCommand) succeeded
\ No newline at end of file

diff:
instance creation
waitForCommand: aCommand
^ self new
- process: (Smalltalk os isWindows
+ process: ((Smalltalk os isWindows and: [ Smalltalk includesKey: #ProcessWrapper ])
ifTrue: [ self waitForWindowsCommand: aCommand ]
ifFalse: [ self waitForLinuxCommand: aCommand ]);
yourself
\ No newline at end of file

diff:
instance creation
waitForWindowsCommand: aCommand
- ^ ProcessWrapper new
+ ^ (Smalltalk at: #ProcessWrapper) new
startWithShellCommand: aCommand;
waitForExit;
yourself
\ No newline at end of file

original_message: Add ProcessWrapper class exists testing


message: still imrpoving windows support

diff:
instance creation
windowsCommand: aCommand
- ^ ProcessWrapper new
+ ^ (Smalltalk at: #ProcessWrapper) new
startWithShellCommand: aCommand;
yourself
\ No newline at end of file

original_message: still imrpoving windows support


message: update baseline with os process

diff:
@@ -38,7 +38,7 @@ baseline12: spec
package: #'PharoLauncher-Core' with: [
spec requires: #(#'PharoLauncher-Download' 'XMLParser' 'Ston' 'JSON' ). ];
package: #'PharoLauncher-Download' with: [
- spec requires: #('OSProcess' ). ];
+ spec requires: #('OSProcess' 'ProcessWrapper'). ];
package: #'PharoLauncher-Spec' with: [
spec requires: #(#'PharoLauncher-Core' ). ];
package: #'PharoLauncher-Tests-Core' with: [

original_message: update baseline with os process


message: canunzip should return false if the ProcessWrapperClass is not installed

diff:
@@ -8,5 +8,6 @@ isCommandAvailable: aCommand
useStderr;
waitForExit;
startWithShellCommand: aCommand;
- yourself) stderrStream atEnd ] ].
+ yourself) stderrStream atEnd ].
+ ^ false ].
^ (OSProcess waitForCommand: aCommand) succeeded
\ No newline at end of file

diff:
unzipping
unzip: aZipFileReference to: outputDirectory
+self halt.
outputDirectory ensureCreateDirectory.
self canUseSytemZip
ifTrue: [ self systemUnzip: aZipFileReference to: outputDirectory ]


message: remove halt...

diff:
unzipping
unzip: aZipFileReference to: outputDirectory
-self halt.
outputDirectory ensureCreateDirectory.
self canUseSytemZip
ifTrue: [ self systemUnzip: aZipFileReference to: outputDirectory ]

original_message: remove halt...


message: Improve the error display on error while downloading the image

diff:
-error handling
-imageDeterminationErrorAlert: error
- ^ UIManager default
- alert: error longDescription
- title: error name
- configure: [ :morph | (morph findDeeplyA: TextMorph) unlock ]
\ No newline at end of file

diff:
@@ -4,4 +4,4 @@ launchWithSettings: usePharoSettings
vmCommand := (PhLVirtualMachineManager forImage: file pathString) vm.
^ PhLProcessWrapper command: (self launchCommandWith: vmCommand useSettings: usePharoSettings) ]
on: PhLImageVersionDeterminationError
- do: [ :error | self imageDeterminationErrorAlert: error ]
\ No newline at end of file
+ do: [ :error | error uiAlert ]
\ No newline at end of file

diff:
action
launchImage: aPhLImage
- aPhLImage launchWithSettings: true.
+ [ aPhLImage launchWithSettings: true ] on: PhLError do: [ :error | error uiAlert ].
self class quitOnLaunch
ifTrue: [ self quit ]
\ No newline at end of file


message:
Add a cleaning of the vm/private folder in case of error (solve https://github.com/pharo-project/pharo-launcher/issues/88)
Add new exception if the executable is not found inside the folder
Minor code cleaning

diff:
+ui
+uiAlert
+ UIManager default
+ alert: self longDescription
+ title: self name
+ configure: [ :morph | (morph findDeeplyA: TextMorph) unlock ]
\ No newline at end of file

diff:
+Error thrown when Pharo Launcher did not succeed to find a Pharo binary or executable inside a given folder.
+Probably, the folder should be deleted as the VM are only cached
\ No newline at end of file

diff:
+signalling
+signalKind: aKindOfApp inPath: aString
+ ^ self new
+ kindOfApplication: aKindOfApp;
+ path: aString;
+ signal
\ No newline at end of file

diff:
+accessing
+kindOfApplication: string
+ kindOfApplication := string
\ No newline at end of file

diff:
+accessing
+longDescription
+ ^ 'Cannot detect Pharo ', kindOfApplication ,' in ', path, '.', String cr, 'Delete the folder and retry! It can also due to a corruption of the downloaded file...'
\ No newline at end of file

diff:
+accessing
+name
+ ^ 'Pharo Executable Not Found'
\ No newline at end of file

diff:
+accessing
+path: string
+ path := string
\ No newline at end of file

diff:
+{
+ "commentStamp" : "VincentBlondeau 4/12/2018 16:15",
+ "super" : "PhLError",
+ "category" : "PharoLauncher-Download-Exceptions",
+ "classinstvars" : [ ],
+ "pools" : [ ],
+ "classvars" : [ ],
+ "instvars" : [
+ "path",
+ "kindOfApplication"
+ ],
+ "name" : "PhLExecutableNotFoundError",
+ "type" : "normal"
+}
\ No newline at end of file

diff:
-Error throw when Pharo Launcher did not succeed to determine the Pharo version of the image to launch.
+Error thrown when Pharo Launcher did not succeed to determine the Pharo version of the image to launch.
Probably, the run command failed.
I hold the command run to determoine the version so that it can be reused for debugging purposes.
\ No newline at end of file

diff:
{
- "commentStamp" : "ChristopheDemarey 1/4/2018 10:59",
+ "commentStamp" : "VincentBlondeau 4/12/2018 16:13",
"super" : "PhLError",
"category" : "PharoLauncher-Download-Exceptions",
"classinstvars" : [ ],

diff:
@@ -3,19 +3,14 @@ initializeOn: aFolder
| executables |
executables := aFolder allChildrenMatching: self class executableName.
Smalltalk os isUnix
- ifTrue: [
- executables
- select: #isFile
- thenDo: [ :fileRef | self ensureIsExecutable: fileRef fullName ].
+ ifTrue: [ executables select: #isFile thenDo: [ :fileRef | self ensureIsExecutable: fileRef fullName ].
"On linux, either the VM exe is at the top level or a bash script at the top level has to be used"
executableRef := executables
detect: [ :fileRef | fileRef parent = aFolder ]
- ifNone: [ self error: 'Cannot detect Pharo executable in ' , aFolder fullName ].
+ ifNone: [ PhLExecutableNotFoundError signalKind: 'executable' inPath: aFolder fullName ].
vmBinaryRef := executables
- detect: [ :fileRef |
- fileRef binaryReadStreamDo: [ :stream | (stream next: 4) = self class elfMagicNumber ] ]
- ifNone: [ self error: 'Cannot detect Pharo VM binary in ' , aFolder fullName ] ]
- ifFalse: [ executableRef := vmBinaryRef := executables
- detect: #isFile
- ifNone: [ self error: 'Cannot detect Pharo executable in ' , aFolder fullName ] ].
- self ensureIsExecutable: executableRef fullName.
\ No newline at end of file
+ detect: [ :fileRef | fileRef binaryReadStreamDo: [ :stream | (stream next: 4) = self class elfMagicNumber ] ]
+ ifNone: [ PhLExecutableNotFoundError signalKind: 'VM binary' inPath: aFolder fullName ] ]
+ ifFalse:
+ [ executableRef := vmBinaryRef := executables detect: #isFile ifNone: [ PhLExecutableNotFoundError signalKind: 'executable' inPath: aFolder fullName ] ].
+ self ensureIsExecutable: executableRef fullName
\ No newline at end of file

diff:
querying
availableVirtualMachinesOnDiskByImageFormat
- ^ self availableVirtualMachinesIn: self privateVmStore
\ No newline at end of file
+ ^[ self availableVirtualMachinesIn: self privateVmStore] on: PhLExecutableNotFoundError do: [ :ex | self privateVmStore deleteAllChildren. ex retry ]
\ No newline at end of file

original_message:
- Add a cleaning of the vm/private folder in case of error (solve https://github.com/pharo-project/pharo-launcher/issues/88)
- Add new exception if the executable is not found inside the folder
- Minor code cleaning


diff:
settings
templatesClearedOnStartup
- ^ TemplatesClearedOnStartup ifNil: [ TemplatesClearedOnStartup := true ].
\ No newline at end of file
+ ^ TemplatesClearedOnStartup ifNil: [ TemplatesClearedOnStartup := false ].
\ No newline at end of file

original_message:
change default of template cleared at startup to false instead of true
https://github.com/pharo-project/pharo-launcher/issues/102


message: copy now copy all the contents of the image folder and renaming is much more faster because does not imply a copy but just a moveTo: and a renaming

diff:
@@ -4,9 +4,6 @@ copyImageNamed: sourceName to: targetName
self ensureNoImageWithName: targetName.
targetDirectory := self prepareForNewImageNamed: targetName.
sourceDirectory := self directoryForImageNamed: sourceName.
- sourceDirectory children
- do: [ :file |
- | targetFilename |
- targetFilename := self newNameForFile: file whenRelocatingToImageNamed: targetName.
- file copyTo: targetDirectory / targetFilename ].
- self contentsChanged.
\ No newline at end of file
+ CopyVisitor copy: sourceDirectory to: targetDirectory.
+ self renameImageInFolder: targetDirectory to: targetName.
+ self contentsChanged
\ No newline at end of file

diff:
+private
+renameImageInFolder: targetDirectory to: newName
+ targetDirectory children
+ do: [ :file |
+ | targetFilename |
+ targetFilename := self
+ newNameForFile: file
+ whenRelocatingToImageNamed: newName.
+ file basename = targetFilename
+ ifFalse: [ file renameTo: targetFilename ] ]
\ No newline at end of file

diff:
@@ -2,12 +2,8 @@ action
renameImageNamed: oldName to: newName
| sourceDirectory targetDirectory |
self ensureNoImageWithName: newName.
- targetDirectory := self prepareForNewImageNamed: newName.
+ targetDirectory := self directoryForImageNamed: newName. "Do not create a new directory to ensure that the moveTo will succeed"
sourceDirectory := self directoryForImageNamed: oldName.
- sourceDirectory children
- do: [ :file |
- | targetFilename |
- targetFilename := self newNameForFile: file whenRelocatingToImageNamed: newName.
- file moveTo: targetDirectory / targetFilename ].
- sourceDirectory delete.
- self contentsChanged.
\ No newline at end of file
+ sourceDirectory moveTo: targetDirectory.
+ self renameImageInFolder: targetDirectory to: newName.
+ self contentsChanged
\ No newline at end of file


message: Add the possibility to rename a local template

diff:
+as yet unclassified
+renameTo: aString
+ name := aString
\ No newline at end of file

diff:
+as yet unclassified
+renameTo: aString
+ super renameTo: aString.
+ zipFile renameTo: aString, '.zip'
\ No newline at end of file

diff:
accessing
group
- ^ 2
\ No newline at end of file
+ ^ 3
\ No newline at end of file

diff:
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
- "instvars" : [
- "newImageName"
- ],
+ "instvars" : [ ],
"name" : "PhLRemoveTemplateCommand",
"type" : "normal"
}
\ No newline at end of file

diff:
+Rename the selected template
\ No newline at end of file

diff:
+accessing
+group
+ ^ 2
\ No newline at end of file

diff:
+accessing
+icon
+ ^ self iconNamed: #workspace
\ No newline at end of file

diff:
+accessing
+title
+ ^ 'Rename template'
\ No newline at end of file

diff:
+action
+execute
+ | name |
+ name := self newImageName.
+ name ifNil: [ ^ self ].
+ self
+ ensure: (context isNewLocalTemplateNameValid: name).
+ context singleTemplate renameTo: name.
+ context templateRepositoryChanged
\ No newline at end of file

diff:
+testing
+isApplicable
+ ^ super isApplicable and: [ context hasSingleLocalTemplateSelected ]
\ No newline at end of file

diff:
+accessing
+newImageName
+ ^ newImageName ifNil: [ newImageName := context requestNewImageName: context singleTemplateName ]
\ No newline at end of file

diff:
+{
+ "commentStamp" : "VincentBlondeau 5/24/2018 13:30",
+ "super" : "PhLTemplateCommand",
+ "category" : "PharoLauncher-Core-Commands",
+ "classinstvars" : [ ],
+ "pools" : [ ],
+ "classvars" : [ ],
+ "instvars" : [
+ "newImageName"
+ ],
+ "name" : "PhLRenameTemplateCommand",
+ "type" : "normal"
+}
\ No newline at end of file


message: Import command: Inform user if he selects a directory instead of an image.

diff:
@@ -6,7 +6,10 @@ importImage
extensions: #('image')
path: FileLocator home
preview: false.
- imagePath ifNil: [ ^ self ].
- imagePath asFileReference isDirectory
- ifTrue: [ ^ self ].
+ imagePath ifNil: [
+ self inform: 'No path selected. Import failed.'.
+ ^ self ].
+ imagePath asFileReference isDirectory ifTrue: [
+ self inform: 'The file selected is a directory and not a Pharo image. Import failed.'.
+ ^ self ].
self import: imagePath
\ No newline at end of file


message:
[Enh]: Improved Image Widget
Add Origin Template Column
Simplify Timestamp Printing

diff:
-initialize-release
+accessing
originTemplate
^ self meta at: #template ifAbsent: [ nil ]
\ No newline at end of file

diff:
+accessing
+originTemplateName
+
+ ^ self originTemplate ifNotNil: [ :t | t name ] ifNil: [ '' ]
\ No newline at end of file

original_message:
[Enh]: Improved Image Widget

- Add Origin Template Column
- Simplify Timestamp Printing


message:
Fix [Enh]: Improved Image Widget
Add Origin Template Column
Simplify Timestamp Printing

diff:
initialization
initializeWidgets
- | detailsColumn imageColumn |
+ | detailsColumn imageColumn timestampColumn |
super initializeWidgets.
- (detailsColumn := TreeColumnModel new)
+ (timestampColumn := TreeColumnModel new)
headerLabel: 'Last Modified';
headerAction: [ self sortContentByDateModfied ];
- displayBlock: [ :item | item content file modificationTime ].
+ displayBlock: [ :item |
+ | timestamp |
+ timestamp := item content file modificationTime.
+ timestamp asDate yyyymmdd, ' ', timestamp asTime print24 ];
+ initialWidth: 250.
+
+ (detailsColumn := TreeColumnModel new)
+ headerLabel: 'Template';
+ headerAction: [ self sortContentByTemplate ];
+ displayBlock: [ :item | item content originTemplateName ].
imageColumn := tree columns first.
imageColumn
@@ -15,4 +24,4 @@ initializeWidgets
headerAction: [ self sortContentByName ];
initialWidth: 350.
- tree columns: (tree columns copyWith: detailsColumn).
\ No newline at end of file
+ tree columns: (tree columns, { timestampColumn. detailsColumn }).
\ No newline at end of file

diff:
+private - filtering
+sortContentByTemplate
+
+ self sortTreeWith: [:item1 :item2 | item1 originTemplateName > item2 originTemplateName ]
+
\ No newline at end of file

original_message:
Fix #130 [Enh]: Improved Image Widget

- Add Origin Template Column
- Simplify Timestamp Printing


message: Fix - Only Warn RE 32-bit on Linux 64

diff:
@@ -10,7 +10,7 @@ launchWithSettings: usePharoSettings
do: [ :error | error uiAlert ] ]
on: PhLArchitectureMismatchWarning
do: [ :warning | | |
- (PhLLaunchImageCommand warnOnArchMismatch and: [ architectureWarningEnabled ])
+ (Smalltalk os isUnix64 and: [ PhLLaunchImageCommand warnOnArchMismatch and: [ architectureWarningEnabled ] ])
ifTrue: [
architectureWarningEnabled := false. "only raise one warning"
continue := YesNoDialogWithTickBoxWindow confirm: warning longDescription label: warning name. ].

original_message: Fix #129 - Only Warn RE 32-bit on Linux 64


message: fix broken file

diff:
@@ -2,5 +2,4 @@ SystemOrganization addCategory: #'PharoLauncher-Core'!
SystemOrganization addCategory: 'PharoLauncher-Core-Commands'!
SystemOrganization addCategory: 'PharoLauncher-Core-Model'!
SystemOrganization addCategory: 'PharoLauncher-Core-Settings'!
-el'!
SystemOrganization addCategory: #'PharoLauncher-Core-Settings'!

original_message: fix broken file


message: remove category duplicity

diff:
@@ -2,4 +2,3 @@ SystemOrganization addCategory: #'PharoLauncher-Core'!
SystemOrganization addCategory: 'PharoLauncher-Core-Commands'!
SystemOrganization addCategory: 'PharoLauncher-Core-Model'!
SystemOrganization addCategory: 'PharoLauncher-Core-Settings'!
-SystemOrganization addCategory: #'PharoLauncher-Core-Settings'!

original_message: remove category duplicity


message: Part of automatic transformations of `#asIcon`

diff:
accessing
icon
- ^ #smallNewIcon asIcon
\ No newline at end of file
+ ^ self iconNamed: #smallNewIcon
\ No newline at end of file

diff:
accessing
icon
- ^ #smallDeleteIcon asIcon
\ No newline at end of file
+ ^ self iconNamed: #smallDeleteIcon
\ No newline at end of file

diff:
accessing
icon
- ^ #smallDoItIcon asIcon
\ No newline at end of file
+ ^ self iconNamed: #smallDoItIcon
\ No newline at end of file

diff:
accessing
icon
- ^ #configurationIcon asIcon
\ No newline at end of file
+ ^ self iconNamed: #configurationIcon
\ No newline at end of file

diff:
accessing
icon
- ^ #smallQuitIcon asIcon
\ No newline at end of file
+ ^ self iconNamed: #smallQuitIcon
\ No newline at end of file

diff:
accessing
icon
- ^ #smallUpdateIcon asIcon
\ No newline at end of file
+ ^ self iconNamed: #smallUpdateIcon
\ No newline at end of file

diff:
@@ -2,3 +2,5 @@ SystemOrganization addCategory: #'PharoLauncher-Core'!
SystemOrganization addCategory: 'PharoLauncher-Core-Commands'!
SystemOrganization addCategory: 'PharoLauncher-Core-Model'!
SystemOrganization addCategory: 'PharoLauncher-Core-Settings'!
+el'!
+SystemOrganization addCategory: #'PharoLauncher-Core-Settings'!

original_message: Part of #151: automatic transformations of `#asIcon`


message: remove PhLTObject

diff:
-testing
-hasChildren
- ^ false
\ No newline at end of file

diff:
-testing
-isError
- ^ true
\ No newline at end of file

diff:
{
- "classtraitcomposition" : "PhLTObject classTrait",
- "classvars" : [ ],
- "instvars" : [ ],
- "name" : "PhLError",
"commentStamp" : "<historical>",
"super" : "Error",
- "traitcomposition" : "PhLTObject - {#isError}",
- "type" : "normal",
+ "category" : "PharoLauncher-Core-Exceptions",
"classinstvars" : [ ],
"pools" : [ ],
- "category" : "PharoLauncher-Core-Exceptions"
+ "classvars" : [ ],
+ "instvars" : [ ],
+ "name" : "PhLError",
+ "type" : "normal"
}
\ No newline at end of file

diff:
{
- "classtraitcomposition" : "PhLTObject classTrait",
- "classvars" : [ ],
- "instvars" : [ ],
- "name" : "PhLObject",
"commentStamp" : "<historical>",
"super" : "Object",
- "traitcomposition" : "PhLTObject",
- "type" : "normal",
+ "category" : "PharoLauncher-Core-Model",
"classinstvars" : [ ],
"pools" : [ ],
- "category" : "PharoLauncher-Core-Model"
+ "classvars" : [ ],
+ "instvars" : [ ],
+ "name" : "PhLObject",
+ "type" : "normal"
}
\ No newline at end of file

diff:
-Trait of everything the user can act on
\ No newline at end of file

diff:
-testing
-isError
- ^ false
\ No newline at end of file

diff:
-{
- "commentStamp" : "<historical>",
- "classinstvars" : [ ],
- "category" : "PharoLauncher-Core-Exceptions",
- "instvars" : [ ],
- "name" : "PhLTObject"
-}
\ No newline at end of file

original_message: remove PhLTObject


message: Only upload files if not in PR

old_path: Jenkinsfile

new_path: Jenkinsfile

diff:
@@ -16,11 +16,16 @@ try {
}
}
parallel builders
+
+ //Only upload files if not in a PR (i.e., CHANGE_ID not empty)
+ echo "In Branch/PR " + (env.CHANGE_ID?.trim())
+ if (!env.CHANGE_ID?.trim()) {
node('linux') {
stage('Upload finalization') {
finalizeUpload(params.VERSION)
}
}
+ }
} catch(exception) {
currentBuild.result = 'FAILURE'
throw exception

original_message: Only upload files if not in PR


message: Avoid all uploading steps

diff:
@@ -17,15 +17,11 @@ try {
}
parallel builders
- //Only upload files if not in a PR (i.e., CHANGE_ID not empty)
- echo "In Branch/PR " + (env.CHANGE_ID?.trim())
- if (!env.CHANGE_ID?.trim()) {
node('linux') {
stage('Upload finalization') {
finalizeUpload(params.VERSION)
}
}
- }
} catch(exception) {
currentBuild.result = 'FAILURE'
throw exception
@@ -138,6 +134,10 @@ def notifyBuild() {
}
def cleanUploadFolderIfNeeded(launcherVersion) {
+ //Only upload files if not in a PR (i.e., CHANGE_ID not empty)
+ echo "In Branch/PR " + (env.CHANGE_ID?.trim())
+ if (isPullRequest()) return;
+
sshagent (credentials: ['b5248b59-a193-4457-8459-e28e9eb29ed7']) {
sh "ssh -o StrictHostKeyChecking=no \
pharoorgde@ssh.cluster023.hosting.ovh.net rm -rf files/pharo-launcher/tmp-${launcherVersion}"
@@ -145,6 +145,10 @@ def cleanUploadFolderIfNeeded(launcherVersion) {
}
def finalizeUpload(launcherVersion) {
+ //Only upload files if not in a PR (i.e., CHANGE_ID not empty)
+ echo "In Branch/PR " + (env.CHANGE_ID?.trim())
+ if (isPullRequest()) return;
+
sshagent (credentials: ['b5248b59-a193-4457-8459-e28e9eb29ed7']) {
sh "ssh -o StrictHostKeyChecking=no \
pharoorgde@ssh.cluster023.hosting.ovh.net rm -rf files/pharo-launcher/${launcherVersion}"
@@ -154,6 +158,10 @@ def finalizeUpload(launcherVersion) {
}
def upload(file, launcherVersion) {
+ //Only upload files if not in a PR (i.e., CHANGE_ID not empty)
+ echo "In Branch/PR " + (env.CHANGE_ID?.trim())
+ if (isPullRequest()) return;
+
def expandedFileName = sh(returnStdout: true, script: "echo ${file}").trim()
sshagent (credentials: ['b5248b59-a193-4457-8459-e28e9eb29ed7']) {
sh "ssh -o StrictHostKeyChecking=no \
@@ -171,3 +179,7 @@ def isBleedingEdgeVersion() {
def fileNameArchSuffix(architecture) {
return (architecture == '32') ? 'x86' : 'x64'
}
+
+def isPullRequest() {
+ return env.CHANGE_ID?.trim()
+}
\ No newline at end of file

original_message: Avoid all uploading steps


message: Avoid concurrent builds

diff:
#!/usr/bin/env groovy
+//Set configurable properties
properties([parameters([
string(name: 'VERSION', defaultValue: 'bleedingEdge', description: 'Which Pharo Launcher version to build?'),
string(name: 'PHARO', defaultValue: '61', description: 'Which Pharo image version to use?'),
string(name: 'VM', defaultValue: 'vm', description: 'Which Pharo vm to use?')
])])
+//Avoid concurrent builds
+properties([disableConcurrentBuilds()])
+
try {
def builders = [:]
builders['32'] = { buildArchitecture('32') }

original_message: Avoid concurrent builds


message: Define properties only once

diff:
#!/usr/bin/env groovy
//Set configurable properties
-properties([parameters([
+properties([
+ parameters([
string(name: 'VERSION', defaultValue: 'bleedingEdge', description: 'Which Pharo Launcher version to build?'),
string(name: 'PHARO', defaultValue: '61', description: 'Which Pharo image version to use?'),
- string(name: 'VM', defaultValue: 'vm', description: 'Which Pharo vm to use?')
-])])
-
+ string(name: 'VM', defaultValue: 'vm', description: 'Which Pharo vm to use?')]),
//Avoid concurrent builds
-properties([disableConcurrentBuilds()])
+ disableConcurrentBuilds()
+])
try {
def builders = [:]

original_message: Define properties only once


message: Better message errors

diff:
@@ -138,9 +138,11 @@ def notifyBuild() {
}
def cleanUploadFolderIfNeeded(launcherVersion) {
+ if (isPullRequest()) {
//Only upload files if not in a PR (i.e., CHANGE_ID not empty)
- echo "In Branch/PR " + (env.CHANGE_ID?.trim())
- if (isPullRequest()) return;
+ echo "[DO NO UPLOAD] In PR " + (env.CHANGE_ID?.trim())
+ return;
+ }
sshagent (credentials: ['b5248b59-a193-4457-8459-e28e9eb29ed7']) {
sh "ssh -o StrictHostKeyChecking=no \
@@ -149,9 +151,11 @@ def cleanUploadFolderIfNeeded(launcherVersion) {
}
def finalizeUpload(launcherVersion) {
+ if (isPullRequest()) {
//Only upload files if not in a PR (i.e., CHANGE_ID not empty)
- echo "In Branch/PR " + (env.CHANGE_ID?.trim())
- if (isPullRequest()) return;
+ echo "[DO NO UPLOAD] In PR " + (env.CHANGE_ID?.trim())
+ return;
+ }
sshagent (credentials: ['b5248b59-a193-4457-8459-e28e9eb29ed7']) {
sh "ssh -o StrictHostKeyChecking=no \
@@ -162,9 +166,11 @@ def finalizeUpload(launcherVersion) {
}
def upload(file, launcherVersion) {
+ if (isPullRequest()) {
//Only upload files if not in a PR (i.e., CHANGE_ID not empty)
- echo "In Branch/PR " + (env.CHANGE_ID?.trim())
- if (isPullRequest()) return;
+ echo "[DO NO UPLOAD] In PR " + (env.CHANGE_ID?.trim())
+ return;
+ }
def expandedFileName = sh(returnStdout: true, script: "echo ${file}").trim()
sshagent (credentials: ['b5248b59-a193-4457-8459-e28e9eb29ed7']) {

original_message: Better message errors