#!/usr/bin/perl -w

BEGIN {
   # Look for the library
   @pos = split /:/,$ENV{PATH};

   $0 =~ s!/[^/]*$!!;
   if(length($0) > 2) {
      push @pos, $0;
   }

   foreach (@pos)
   {
      s/bin$/lib/;
      if(-f "$_/Gen.pm") {
         $libdir = $_ ;
         last;
      }
   } 

   die "Couldn't find the Architecture library (Gen.pm).\nI checked in @pos using your PATH variable (replacing bin with lib) and this executable's path.\n" if !defined($libdir);

   push @INC, "$libdir"; 
}


use Gen qw(genwindow);

die "Usage: genwindow framemat glassmat name width_in ht_in frame_thk_in npanesx npanesz" if($#ARGV < 7); 

genwindow($ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3], $ARGV[4], $ARGV[5], $ARGV[6], $ARGV[7]);
