here is the script for anyone curious how it works https://www.dropbox.com/s/w88umn72kx2tw6s/startupPharo.st?dl=0 On Wed, Dec 2, 2015 at 3:12 PM Dimitris Chloupis <kilon.alios@gmail.com> wrote:
Mariano does not work like that for me. The startup script executes only one time for each image that has not already executed the startup script. So as soon as it installs the libraries and I save then image it does not reinstall them the next time I open the image and I have not noticed any delays to the image startup. To do that I use the runOnce:True message. As a matter of fact I think I learned that from your blog post so I am a bit surprised you ask me that .
On Wed, Dec 2, 2015 at 2:56 PM Mariano Martinez Peck < marianopeck@gmail.com> wrote:
Dimitris...a bit off topic... but... isn't it a bit too much to load all your packages every time you start your image? I am sure it takes some seconds if not minutes (depending what to load). Since Smalltalk gives us persistency for free (image), why isn't it enough to simply build and save an image and use that one? And when needed, build another one. What I mean is....instead of loading everything in every image startup, load your packages and dependency only when creating new images...
On Wed, Dec 2, 2015 at 9:33 AM, Dimitris Chloupis <kilon.alios@gmail.com> wrote:
thanks phil that is very useful too, I will use it for managing my external pharo files :)
On Wed, Dec 2, 2015 at 1:57 PM phil@highoctane.be <phil@highoctane.be> wrote:
What's wrong about using FileLocator?
I am a late-bound reference. I refer to a file or directory in relation to a well-known location on the filesystem, called an origin. When asked to perform concrete operation, I look up the current location of my origin, and resolve my path against it.
Usage ---------- FileLocator vmDirectory parent pathString
'/Applications'
FileLocator desktop. FileLocator desktop basename.
FileLocator home basename. FileLocator image. FileLocator vmBinary asAbsolute pathString
'/Applications/CogVM.app/Contents/MacOS/CogVM' FileLocator vmBinary pathString '/Applications/CogVM.app/Contents/MacOS/CogVM'
On Wed, Dec 2, 2015 at 11:51 AM, Ferlicot D. Cyril < cyril.ferlicot@gmail.com> wrote:
Le 02/12/2015 11:35, Dimitris Chloupis a écrit :
I have a startup script that loads the libraries and project I mostly use, including my own, but I want that script to target specific folders and its subfolders , is this possible ?
Hi,
You can use "FileSystem workingDirectory" to get the directory of the image. Then you can use some condition to execute or not a block that contains your startup script.
-- Cyril Ferlicot
165 Avenue Bretagne Lille 59000 France
-- Mariano http://marianopeck.wordpress.com