11 # I wonder if I should add the ability to put the Docs and Design etc
12 # directories in apropriate spots, like
13 # /usr/local/share/stem (site) or /usr/share/stem (vendor)
17 my $version_from = File::Spec->catfile( File::Spec->curdir, 'lib', 'Stem.pm' );
19 my $build = BuildStem->new(
20 #my $build = $class->new(
21 module_name => 'Stem',
22 dist_version_from => $version_from,
23 requires => \%requires,
24 dist_abstract => 'ABSTRACT GOES HERE',
27 recursive_test_files => 1,
28 create_makefile_pl => 'passthrough'
33 $build->is_unixish() || die "Stem currently only installs properly on *nix-like platforms.\n";
35 ### this will come in handy for some refactoring...
36 ## $build->config( 'install_base' )
40 Stem comes with a utility called 'run_stem' which takes care of things
41 like initalizing Stem with a configuration file and controlling it's
42 operation via various parameters you can pass in as environment
43 variables or command line arguments.
45 Stem configuration files are used to create and initialize Stem Cells
46 (objects). run_stem can search a path list for config files, so you
47 can set that list of directories here.
49 Note that you can easily override this path with either a shell environment
50 variable or on the command line of run_stem. See the documentation on
51 run_stem for how so do this.
53 The last directory in the list is where the standard and demo Stem
54 configuration files will be installed.
58 my $conf_path = $build->prompt(
59 "Please enter a list of directory paths separated by ':'\n",
60 '.:~/.stem/conf:/usr/local/stem/conf'
62 $build->config_data(conf_path => $conf_path);
66 print "\n\nChecking to see if you have a good C compiler...\n\n" ;
67 if ( $build->have_c_compiler() ) {
71 ssfe (Split Screen Front End) is a compiled program optionally used by
72 the Stem demonstration scripts that provides a full screen interface
73 with command line editing and history. It is not required to run Stem
74 but it makes the demonstrations easier to work with and they look much
75 nicer. To use ssfe add the '-s' option when you run any demonstration
76 script. You can also use ssfe for your own programs. If you build ssfe
77 it will be installed in the demo/ directory. You may copy it to a place
78 in your $PATH is you wish.
81 my $build_ssfe = $build->y_n("Do you want to build ssfe?\n", 'y');
82 $build->config_data(build_ssfe => $build_ssfe);
88 Stem comes with a variety of demos to show how to get started and do some
89 basic things. If you wish, they can be configured to run locally out of the
93 my $build_demos = $build->y_n("\nDo you want to build the demos?\n",'y');
94 $build->config_data(build_demos => $build_demos);
98 my $telnet_path = $build->find_binary( 'telnet' ) || '' ;
99 while ( ! -x $telnet_path && ! $build->_is_unattended() ) {
102 telnet was not found on this system. you can't run the demo programs
103 without telnet. Make sure you enter a valid path to telnet or some other
106 NOTE: If you don't have an telnet, you can still run the demo scripts
107 by hand. Run a *_demo script and see what telnet commands it
108 issues. The run those telnet commands using your telnet or another
112 $telnet_path = $build->prompt(
113 "Enter the path to telnet "
114 . "(or another compatible telnet client)",
118 $build->config_data( telnet_path => $telnet_path ) ;
122 my $xterm_path = $build->find_binary( 'xterm' ) || '' ;
123 while ( ! -x $xterm_path && ! $build->_is_unattended() ) {
127 xterm was not found on this system. you can't run the demo programs
128 without xterm. Make sure you enter a valid path to xterm or some other
131 NOTE: If you don't have an xterm, you can still run the demo scripts
132 by hand. Run a *_demo script and see what commands it issues. Take the
133 part after the -e and run that command in its own terminal window.
136 $xterm_path = $build->prompt(
137 "Enter the path to xterm "
138 . "(or another compatible terminal emulator)",
142 $build->config_data( xterm_path => $xterm_path ) ;
148 my $script_dest = $build->install_destination('script') ;
149 my $run_stem_path = File::Spec->catfile( $script_dest, 'run_stem' ) ;
150 $build->config_data( run_stem_path => $run_stem_path ) ;
155 my $bin_path = $build->install_destination('bin') ;
156 $build->config_data( bin_path => $bin_path ) ;
158 $build->config_data( perl_path => $build->config( 'perlpath' ) ) ;
160 # Several different prefixes... which one to use??
161 #$build->config_data( prefix => $build->prefix() ) ;
162 $build->config_data( prefix => $build->config( 'install_base' ) ) ;
165 $build->config_data( config_done => 1 ) ;
168 #print Dumper \%{ $build->config_data() };
171 $build->create_build_script() ;