"color := [:colorCode :text|
FileStream stderr
"set the color"
nextPut: Character escape; nextPut: $[; print: colorCode; nextPut:
$m;
nextPutAll: text; crlf;
"reset the color"
nextPut: Character escape; nextPutAll: '[0m'.
]."
Nice ideas in that startup , thanks Phil, can you explain this part ?
"UHHHH hahahah ;) On your face!"
hehe I forget all the time :D
"I was just curious on how you build your scripts. "
Thats why I asked I was curious how you guys make your startup scripts too
" have gone another way. Basically, I have build scripts which I use to
build different images (for different clients, apps or tools). I use this
scripts explicitly each time I want to build a new image. These built
scripts end up using Metacello at some point.
"
What you mean when you say "build scripts"
do you mean makefiles ?
I also use a makefile too
"Ephestos/Ephestos.image:
mkdir Ephestos
cd Ephestos; wget -O- get.pharo.org/alpha+vmLatest | bash
mv Ephestos/Pharo.image Ephestos/Ephestos.image
Ephestos/pharo-ui Ephestos/Ephestos.image
clean:
rm -rf Ephestos/
run: Ephestos/Ephestos.image
Ephestos/pharo-ui Ephestos/Ephestos.image"
I like the idea of a startup that detects the image name and if finds a
keyword follows a specific set of actions. Diffirent keywords , different
image setups :)
On Wed, Dec 2, 2015 at 3:45 PM Mariano Martinez Peck <[email protected]>
wrote:
> On Wed, Dec 2, 2015 at 10:12 AM, Dimitris Chloupis <[email protected]>
> 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 .
>>
>>
> UHHHH hahahah ;) On your face!
> Good point about #runOnce:. I forgot about that. And yeah, you can also
> manually check if the libs are already loaded or not.
> I was just curious on how you build your scripts.
> I have gone another way. Basically, I have build scripts which I use to
> build different images (for different clients, apps or tools). I use this
> scripts explicitly each time I want to build a new image. These built
> scripts end up using Metacello at some point.
>
> Then I have startup preferences but are normally related to settings,
> preferences, look and feel, and some other. Some of those settings are
> already setup by my build scripts, but these startup helps when I am
> exploring new Pharo fresh images.
>
> Anyway, I just wanted to know how you were handling that. Keep using what
> works best for you!
>
>
>
>
>>
>>
>> On Wed, Dec 2, 2015 at 2:56 PM Mariano Martinez Peck <
>> [email protected]> 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 <[email protected]
>>> > 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 [email protected] <[email protected]>
>>>> 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 <
>>>>> [email protected]> 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
>>>>>>
>>>>>> http://www.synectique.eu
>>>>>>
>>>>>> 165 Avenue Bretagne
>>>>>> Lille 59000 France
>>>>>>
>>>>>>
>>>>>
>>>
>>>
>>> --
>>> Mariano
>>> http://marianopeck.wordpress.com
>>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>