The worst-tasting Vanilla Family member

brian_d_foy on 2007-10-30T14:28:00

I'm currently pushing through "the grind" for the new Perl::Dist and Strawberry Perl releases, running the build process over and over again, tweaking and bug-fixing as I go. I've burned about 20 hours of CPU in the last week or so.

I'm happy with the binary-installation phase (which sets up gcc and dmake and friends) and the Perl compilation phase (at least for 5.8.8) and I'm now into the "toolchain distributions" phase.

This involves fetching a pre-defined set of distributions and running "perl Makefile.PL; make; make test; make install" on them (without the ability to recursively resolve deps) to get the CPAN toolchain up to scratch.

The 4th phase once this works is the "CPAN module" phase, which uses the upgraded toolchain to install a variety of modules from the CPAN using CPAN.pm and friends.

This is the phase that most people building custom Perl installs (the cat-in-a-box concept for example) will probably want to customize, to install whatever it is they are interested in.

One minor problem when building dists is that the fixed paths and the fact you can't use a distribution (say, Strawberry) to build a new version of that distribution.

To assist with this problem, I'm going to shortly release a "Perl::Dist::Bootstrap" module, and matching .exe installer.

This will be a Strawberry-like distribution, but which will install to an out-of-the-way C:\bootstrap-perl location, and will come with Perl::Dist and all it's dependencies pre-installed.

So the final process for creating a new Vanilla Family distribution becomes:

1. Install Windows
2. Install the Bootstrap Perl executable
3. Check out your distribution module from version control
4. Run perldist My::Distribution to create the Perl distribution
I am pretty close to having a first experimental release completed, and I'll be doing a dev release of both it and the new Perl::Dist code in the next few days.

Update:

It would appear that the toolchain distribution install phase is working fully now, so I'll be commiting everything and dropping some test releases.


Small addition: Set dynamic path to the toolchain

Corion on 2007-10-30T09:01:52

I keep meaning to contribute the following .bat file which sets up the environment for a console dynamically. This first snippet can be called from any .cmd file or from within cmd.exe:

@echo off
SET BASE=%~dp0
path %BASE%\perl\bin;%BASE%\mingw\bin;%BASE%\dmake\bin;%PATH%

Another thing - you provide only a .exe file - I found it very convenient to also have a .zip file which does not try installation into write-protected directories like anywhere on c:\ - if it's not too much hassle, it would be great if you offer that as a second option.

Re:Small addition: Set dynamic path to the toolcha

Alias on 2007-10-30T09:25:49

Unfortunately, for Perl 5.8.8 the installation path is hard-coded into Perl, so it has to be done that way.

Perl 5.10.0 changes that a bit, and although the initial release of Strawberry 5.10.0 will be hard-coded as well, we'll look at making it movable after release.

HOWEVER, one advantage of moving beyond a config-file driven methodology is that it opens the door to a "Perl from Scratch" idea, where if you want a Perl that installs to a certain place you might, for example do the following.

perldist --installdir D:\perl Perl::Dist::Strawberry
perldist would grind away silently for about an hour, and spit out an installer for Strawberry tailored to install to the directory you want.

Re:Small addition: Set dynamic path to the toolcha

Corion on 2007-10-30T10:15:19

"Hardcoded into Perl" on Win32 just means patching Config.pm respectively Config_heavy.pl, so the "it has to be done that way" can be remedied by a oneliner to change the installation path. @INC is built dynamically on Win32 anyway, so if you're not using CPAN or the toolchain, you don't even need to mess with Config.pm, Config_heavy.pl or CPAN/Config.pm at all.

"%~dp0\perl\bin\perl.exe" -pi.bak -e "BEGIN{$target=shift} s/c:\\strawberry\\/$target/gi" "%~dp0" lib/Config_heavy.pl lib/Config.pm lib/CPAN/Config.pm

should work, but I haven't tested/automated that part yet

Re:Small addition: Set dynamic path to the toolcha

Alias on 2007-10-30T11:42:46

How very interesting :)

thanks

markjugg on 2007-10-30T14:28:00

Thanks for your work on this Adam.

I don't use Windows, but I may one day want to deploy a custom Perl app there!