Installer quirk idea :) (Was: Re: [squeak-dev] The Inbox: AlienInstaller-mha.4.mcz)

Igor Stasenko siguctua at gmail.com
Fri Sep 4 07:58:11 UTC 2009


We discussed a bit the procedure, how to make it easy and convenient to install
a multiple packages using Installer in a convenient way.

Prerequisites:
- you having a multiple packages , and need some untrivial steps to
complete installation, which usually can't be handled
purely by MC
- for that, you creating a MyPackage-Installer package and put it in
same repository as your project located.

Now, what we want is:
- load the MyPackage-Installer package

- for all its classes, which implement #install method, run them.
then after we're finished, unload the MyPackage-Installer package,
because it is no longer needed, since its only job is
to load the actual project to image.

I think it could be as simple as adding this to Installer, so you could type:

Installer autoInstallFromMC: urlToRepository

then installer should list the repository files, try to find the
package with name, which ends with 'Installer' string,
and then load it and continue with the steps i described above.

2009/9/4  <commits at source.squeak.org>:
> A new version of AlienInstaller was added to project The Inbox:
> http://source.squeak.org/inbox/AlienInstaller-mha.4.mcz
>
> ==================== Summary ====================
>
> Name: AlienInstaller-mha.4
> Author: mha
> Time: 4 September 2009, 9:33:33 am
> UUID: 12c65287-2707-43b1-895e-638d4b8ed545
> Ancestors: AlienInstaller-mha.3
>
> added script to have Alien installation proceed automatically
>
> =============== Diff against AlienInstaller-mha.1 ===============
>
> Item was added:
> + ----- Method: AlienInstaller class>>postInstallInitialization (in category 'installation') -----
> + postInstallInitialization
> +       #( ParseNode Alien AlienLibrary FFICallbackThunk Callback UnsafeAlien )
> +               do: [ :c | c initialize ]
> +               displayingProgress: 'Initializing ...'!
>
> Item was added:
>
> Item was added:
> + ----- Method: AlienInstaller class>>recompileAlien (in category 'installation') -----
> + recompileAlien
> +       (PackageInfo named: 'Alien') methods
> +               do: [:ea | ea actualClass recompile: ea methodSymbol]
> +               displayingProgress: 'Recompiling...'!
>
> Item was changed:
>  ----- Method: AlienInstaller class>>install (in category 'installation') -----
>  install
>        | repository |
>        repository := (Installer repository: 'http://www.squeaksource.com/') project: 'Alien'.
> +       #( 'Alien-Core' 'Alien-CoreTest' 'Alien-Examples' 'Alien-LibC' )
> -       #( 'Alien-Core-First' 'Alien-Core' 'Alien-Examples' 'Alien-LibC' 'Alien-CoreTest' 'Alien-Last-Class-Initialize' )
>                do: [ :p | repository install: p ]
>                displayingProgress: 'Installing Alien packages ...'.
> +       self
> +               recompileAlien;
> +               postInstallInitialization!
> -       (PackageInfo named: 'Alien') methods
> -               do: [:ea | ea actualClass recompile: ea methodSymbol]
> -               displayingProgress: 'Recompiling...'!
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list