I think I was the author of what you are referring to.  Original message
below:

***  CLIP  ****
Yeah, I have it all working but it is a bad hack.  Not really the way it
should be done, and not very flexible.  It goes something like this in
install.pl:

# Top-level installation script
    my $top = get_value ('_meta', 'top');
    # Doucet
    my $other_app_install = create_other_app ();
    if (defined $top) {
        push @postinst_lines,
       .....
         # Doucet: install any other one-off apps that we defined
        (defined $other_app_install ? ("todo.pl $other_app_install") :
() ),
         # First step is to perform top-level install
         "todo.pl $top",
         "\ntodo.pl --go");
    }


# Doucet:  Recursive menu sub so that submenus can be supported # Return
values from submenus not implemented yet. sub DA_menu {
   my ($menu) = @_;
   for (;;) {
       # Pass in a menu header as the first element
       print "\n$menu->[0]\n";
       print map "$_. $menu->[$_ * 2 - 1]\n", 1 .. $#$menu / 2;
       print '> ';
       chomp (my $choice = readline *STDIN);
       if ($choice and $choice <= $#$menu / 2) {
           my $action = $menu->[$choice * 2];
           return if not defined $action;
           # check to see if the menu selection references a function
           # if so, do the function
           if (ref $action eq 'CODE'){ $action->() }
           # check to see if the menu selection references another
           # menu (i.e. a submenu).  If so show the sub menu (recursion)
           elsif (ref $action eq 'ARRAY'){ menu $action }
           # action is probably just a string. So return it
           else { return $action; }
       } else {
           print "Invalid choice: $choice\n"
       }
   }
}


sub create_other_app () {
    # Doucet: create a list of other apps to install that are not a part
of a standard package
    my $other_app_install;
    while (1) {
        my $app = DA_menu ( [
                            "Select Other applications to install",
                            "Acrobat full version" =>
"z:\\scripts\\acrobat.bat",
                            "PaintShop Pro 7 (Austin)" =>
"z:\\scripts\\psp7.bat aus",
                            "PaintShop Pro 7 (CA)" =>
"z:\\scripts\\psp7.bat ca",
#                            .....  A long list of other menu selection
options.
                            'Continue' => undef
                            ] );
        defined $app
            or last;
        $other_app_install .= " \"$app\"";
    }
    return $other_app_install;
}

*** End CLIP ***


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
jbeckley
Sent: Friday, August 08, 2003 12:20 PM
To: Unattended
Subject: [Unattended] Menu setup


A few days ago, a member of this list said he had his unattended 
installion setup to display a menu of extra software packages after he 
choose his main install.  He was kind enough to send me the code also.  
Before I could get the code from the message, I accidentally deleted the

email.  It was one of those days.  I was wondering if he would be kind 
enough to send me that one more time.  Thanks.

Justin




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to