makecat.PL (interchange-5.8.2) | : | makecat.PL (interchange-5.10.0) | ||
---|---|---|---|---|
skipping to change at line 116 | skipping to change at line 116 | |||
--interchangeuser=username The user ID which runs Interchange | --interchangeuser=username The user ID which runs Interchange | |||
--serverconf=filename Location of httpd.conf | --serverconf=filename Location of httpd.conf | |||
--vendroot=filename Location of Interchange software | --vendroot=filename Location of Interchange software | |||
--homedir=directory Use instead of \$HOME to set defaults | --homedir=directory Use instead of \$HOME to set defaults | |||
Required: | Required: | |||
--catroot=directory Directory where Interchange catalog files go | --catroot=directory Directory where Interchange catalog files go | |||
--cgidir=directory The directory the CGI link should go to | --cgidir=directory The directory the CGI link should go to | |||
--servername=server Name of server (www.whatever.domain) | --servername=server Name of server (www.whatever.domain) | |||
--cgiurl=url_fragment The path to the CGI link (no server name) | --cgiurl=url_fragment The path to the CGI link (no server name) | |||
--demotype=template The template catalog (standard is the default) | --demotype=template The template catalog (strap is the default) | |||
--mailorderto=email Email address to send orders | --mailorderto=email Email address to send orders | |||
Optional: | Optional: | |||
--catalogconf=file Specify separate configuration file for catalogs | --catalogconf=file Specify separate configuration file for catalogs | |||
--catuser=username The user files should be owned by (if root) | --catuser=username The user files should be owned by (if root) | |||
--sharedir=directory The directory where shared admin images go | --sharedir=directory The directory where shared admin images go | |||
--shareurl=url The URL to prefix shared admin images with | --shareurl=url The URL to prefix shared admin images with | |||
--imagedir=directory The directory where template images go | --imagedir=directory The directory where template images go | |||
--imageurl=url The URL to prefix images with | --imageurl=url The URL to prefix images with | |||
--linkmode=mode UNIX or INET (link program vlink or tlink) | --linkmode=mode UNIX or INET (link program vlink or tlink) | |||
skipping to change at line 271 | skipping to change at line 271 | |||
used to set the defaults for naming the catalog, executable, | used to set the defaults for naming the catalog, executable, | |||
and directory, so you will have to type in this name frequently. | and directory, so you will have to type in this name frequently. | |||
NOTE: This will be the name of 'vlink' or 'tlink', the link CGI | NOTE: This will be the name of 'vlink' or 'tlink', the link CGI | |||
program. Depending on your CGI setup, it may also have the | program. Depending on your CGI setup, it may also have the | |||
extension .cgi added. | extension .cgi added. | |||
Only the characters [-a-zA-Z0-9_] are allowed, and it is strongly suggested | Only the characters [-a-zA-Z0-9_] are allowed, and it is strongly suggested | |||
that the catalog name be all lower case. | that the catalog name be all lower case. | |||
If you are doing the demo for the first time, you might use "standard". | If you are doing the demo for the first time, you might use "strap". | |||
EOF | EOF | |||
$catalog_name = prompt ("Catalog name? "); | $catalog_name = prompt ("Catalog name? "); | |||
} | } | |||
die "$catalog_name -- $USAGE\n" unless $catalog_name =~ /^[-\w]+$/; | die "$catalog_name -- $USAGE\n" unless $catalog_name =~ /^[-\w]+$/; | |||
if($Conf{homedir}) { | if($Conf{homedir}) { | |||
die "Directory set with --homedir=$Conf{homedir} is not a directory.\n" | die "Directory set with --homedir=$Conf{homedir} is not a directory.\n" | |||
unless -d $Conf{homedir}; | unless -d $Conf{homedir}; | |||
skipping to change at line 447 | skipping to change at line 447 | |||
interchangeuser => sub { return 'everybody' if $Windows; | interchangeuser => sub { return 'everybody' if $Windows; | |||
get_id(); }, | get_id(); }, | |||
interchangegroup=> '', | interchangegroup=> '', | |||
servername => sub { | servername => sub { | |||
return Sys::Hostname::hostname() || $Config{myhostname}; | return Sys::Hostname::hostname() || $Config{myhostname}; | |||
}, | }, | |||
linkmode => 'UNIX', | linkmode => 'UNIX', | |||
documentroot => $ENV{MVC_DOCUMENTROOT} || $DocrootDefault, | documentroot => $ENV{MVC_DOCUMENTROOT} || $DocrootDefault, | |||
cgidir => $ENV{MVC_CGIDIR} || $CgiDefault, | cgidir => $ENV{MVC_CGIDIR} || $CgiDefault, | |||
cgibase => $ENV{MVC_CGIBASE} || $CgiUrlDefault, | cgibase => $ENV{MVC_CGIBASE} || $CgiUrlDefault, | |||
demotype => $ENV{MVC_DEMOTYPE} || 'standard', | demotype => $ENV{MVC_DEMOTYPE} || 'strap', | |||
catuser => sub { | catuser => sub { | |||
$ENV{MVC_CATUSER} || | $ENV{MVC_CATUSER} || | |||
($isroot ? '' : $Conf{'in terchangeuser'}) | ($isroot ? '' : $Conf{'in terchangeuser'}) | |||
}, | }, | |||
mailorderto => | mailorderto => | |||
sub { return 'webmaster' if $Win dows; | sub { return 'webmaster' if $Win dows; | |||
if($Conf{servername} =~ s :(/~[^/]+)$:: ) { | if($Conf{servername} =~ s :(/~[^/]+)$:: ) { | |||
$Tilde = $1; | $Tilde = $1; | |||
} | } | |||
$Conf{catuser} }, | $Conf{catuser} }, | |||
skipping to change at line 568 | skipping to change at line 568 | |||
} | } | |||
else { | else { | |||
return $Prefix{$parm}; | return $Prefix{$parm}; | |||
} | } | |||
} | } | |||
my %History = ( | my %History = ( | |||
demotype => sub { | demotype => sub { | |||
my @dir; | my @dir; | |||
@dir = sort map { s:(.*)/.*:$1:; $_ } glob("*/catalog.cfg"); | @dir = sort map { s:(.*)/.*:$1:; $_ } glob("*/catalog.cfg"); | |||
@dir = grep $_ ne 'standard', @di | @dir = grep $_ ne 'strap', @dir; | |||
r; | unshift(@dir, 'strap') if -f 'str | |||
unshift(@dir, 'standard') if -f ' | ap/catalog.cfg'; | |||
standard/catalog.cfg'; | unshift(@dir, 'standard') | |||
if -f 'standard/catalog. | ||||
cfg' | ||||
and $catalog_name =~ /^st | ||||
andard/; | ||||
unshift(@dir, 'foundation') | unshift(@dir, 'foundation') | |||
if -f 'foundation/catalo g.cfg' | if -f 'foundation/catalo g.cfg' | |||
and $catalog_name =~ /^fo undation/; | and $catalog_name =~ /^fo undation/; | |||
unshift(@dir, 'construct') | unshift(@dir, 'construct') | |||
if -f 'construct/catalog .cfg' | if -f 'construct/catalog .cfg' | |||
and $catalog_name =~ /^co nstruct/; | and $catalog_name =~ /^co nstruct/; | |||
unshift(@dir, 'barry') | unshift(@dir, 'barry') | |||
if -f 'barry/catalog.cfg ' | if -f 'barry/catalog.cfg ' | |||
and $catalog_name =~ /^ba rry/; | and $catalog_name =~ /^ba rry/; | |||
unshift(@dir, 'art') | unshift(@dir, 'art') | |||
skipping to change at line 2448 | skipping to change at line 2451 | |||
or a username: | or a username: | |||
www.foo.com/~bar | www.foo.com/~bar | |||
For testing on your local machine, just use C<localhost>. | For testing on your local machine, just use C<localhost>. | |||
=item --cgiurl=url_fragment | =item --cgiurl=url_fragment | |||
The path to the CGI link (no server name). For a catalog named | The path to the CGI link (no server name). For a catalog named | |||
C<standard>, this would normally be one of: | C<strap>, this would normally be one of: | |||
--cgiurl=/cgi-bin/standard | --cgiurl=/cgi-bin/strap | |||
or | or | |||
--cgiurl=/standard.cgi | --cgiurl=/strap.cgi | |||
=item --demotype=template | =item --demotype=template | |||
The template catalog. The default is <standard>. | The template catalog. The default is <strap>. | |||
=item --mailorderto=email | =item --mailorderto=email | |||
Email address to send orders | Email address to send orders | |||
=item --catuser=username | =item --catuser=username | |||
The user files should be owned by (option only operative if C<root>). | The user files should be owned by (option only operative if C<root>). | |||
=back | =back | |||
skipping to change at line 2547 | skipping to change at line 2550 | |||
C<makecat> needs a template catalog to operate on. The I<Foundation | C<makecat> needs a template catalog to operate on. The I<Foundation | |||
Store> demo template is distributed with Interchange. You can | Store> demo template is distributed with Interchange. You can | |||
also look for additional demo catalogs (mostly for ideas) at | also look for additional demo catalogs (mostly for ideas) at | |||
http://www.icdevgroup.org/ | http://www.icdevgroup.org/ | |||
B<IMPORTANT NOTE:> You only make a catalog once. All further configuration | B<IMPORTANT NOTE:> You only make a catalog once. All further configuration | |||
is done by editing the files within the I<catalog directory>. | is done by editing the files within the I<catalog directory>. | |||
A catalog template contains an image of a configured catalog. The best | A catalog template contains an image of a configured catalog. The best | |||
way to see what the makecat program does is to configure the 'standard' | way to see what the makecat program does is to configure the 'strap' | |||
demo and then run a recursive C<diff> on the template and configured | demo and then run a recursive C<diff> on the template and configured | |||
catalog directories: | catalog directories: | |||
diff -r interchange/standard catalogs/standard | diff -r interchange/strap catalogs/strap | |||
You will see that the files are mostly the same, except that certain | You will see that the files are mostly the same, except that certain | |||
macro strings have been replaced with the answers you gave to the script. | macro strings have been replaced with the answers you gave to the script. | |||
For example, if you answered C<www.mydomain.com> at the prompt | For example, if you answered C<www.mydomain.com> at the prompt | |||
for server name, then you would see this difference in the catalog.cfg file: | for server name, then you would see this difference in the catalog.cfg file: | |||
# template | # template | |||
Variable SERVER_NAME __MVC_SERVERNAME__ | Variable SERVER_NAME __MVC_SERVERNAME__ | |||
# configured catalog | # configured catalog | |||
skipping to change at line 2578 | skipping to change at line 2581 | |||
MVC_BASEDIR MVC_IMAGEDIR | MVC_BASEDIR MVC_IMAGEDIR | |||
MVC_CATROOT MVC_IMAGEURL | MVC_CATROOT MVC_IMAGEURL | |||
MVC_CATUSER MVC_MAILORDERTO | MVC_CATUSER MVC_MAILORDERTO | |||
MVC_CGIBASE MVC_MINIVENDGROUP | MVC_CGIBASE MVC_MINIVENDGROUP | |||
MVC_CGIDIR MVC_MINIVENDUSER | MVC_CGIDIR MVC_MINIVENDUSER | |||
MVC_CGIURL MVC_SAMPLEHTML | MVC_CGIURL MVC_SAMPLEHTML | |||
MVC_DEMOTYPE MVC_SAMPLEURL | MVC_DEMOTYPE MVC_SAMPLEURL | |||
MVC_DOCUMENTROOT MVC_VENDROOT | MVC_DOCUMENTROOT MVC_VENDROOT | |||
MVC_ENCRYPTOR | MVC_ENCRYPTOR | |||
(Not all of these are present in the standard template, and | (Not all of these are present in the strap template, and | |||
quite a few more may be defined.) In fact, any environment variable that | quite a few more may be defined.) In fact, any environment variable that | |||
is set and begins with MVC_ will be substituted for by the C<makecat> | is set and begins with MVC_ will be substituted for by the C<makecat> | |||
script. So if you wanted to set up a configurable parameter to customize | script. So if you wanted to set up a configurable parameter to customize | |||
the COMPANY variable in catalog.cfg, you could run a pre-qualifying | the COMPANY variable in catalog.cfg, you could run a pre-qualifying | |||
script that set the environment variable MVC_COMPANY and then place in | script that set the environment variable MVC_COMPANY and then place in | |||
the catalog.cfg file: | the catalog.cfg file: | |||
Variable COMPANY __MVC_COMPANY__ | Variable COMPANY __MVC_COMPANY__ | |||
All files within a template directory are substituted for macros, | All files within a template directory are substituted for macros, | |||
not just the catalog.cfg file. There are two special directories | not just the catalog.cfg file. There are two special directories | |||
named C<html> and C<images>. These will be recursively copied to | named C<html> and C<images>. These will be recursively copied to | |||
the directories defined as SampleHTML and ImageDir. | the directories defined as SampleHTML and ImageDir. | |||
B<IMPORTANT NOTE:> The template directory is located in the Interchange | B<IMPORTANT NOTE:> The template directory is located in the Interchange | |||
software directory, i.e. where C<interchange.cfg> resides. You normally do | software directory, i.e. where C<interchange.cfg> resides. You normally do | |||
not edit files in the template directory. If you want to try creating | not edit files in the template directory. If you want to try creating | |||
your own template, it is recommended that you name it something besides | your own template, it is recommended that you name it something besides | |||
standard and copy the C<standard> demo directory to it as a starting point. | strap and copy the C<strap> demo directory to it as a starting point. | |||
Templates are normally placed in the Interchange base directory, but can | Templates are normally placed in the Interchange base directory, but can | |||
be located anywhere -- the script will prompt you for location if it | be located anywhere -- the script will prompt you for location if it | |||
cannot find a template. | cannot find a template. | |||
In addition to the standard parameters prompted for by Interchange, and | In addition to the standard parameters prompted for by Interchange, and | |||
the standard catalog creation procedure, you may define four other | the standard catalog creation procedure, you may define four other | |||
files in the C<config> directory of the template: | files in the C<config> directory of the template: | |||
additional_fields -- file with more parameters for macro substitution | additional_fields -- file with more parameters for macro substitution | |||
additional_help -- extended description for the additional_fields | additional_help -- extended description for the additional_fields | |||
skipping to change at line 2650 | skipping to change at line 2653 | |||
mysqladmin create __MVC_CATALOGNAME__ | mysqladmin create __MVC_CATALOGNAME__ | |||
We need to create an SQL database for your Interchange | We need to create an SQL database for your Interchange | |||
database tables. | database tables. | |||
This will cause the prompt: | This will cause the prompt: | |||
We need to create an SQL database for your Interchange | We need to create an SQL database for your Interchange | |||
database tables. | database tables. | |||
Run command "mysqladmin create test_standard"? | Run command "mysqladmin create test_strap"? | |||
If the response is "y" or "yes", then the command will be run | If the response is "y" or "yes", then the command will be run | |||
by passing it through the Perl system() function. As with any | by passing it through the Perl system() function. As with any | |||
of the additional configuration files, MVC_PARAM macro substitution | of the additional configuration files, MVC_PARAM macro substitution | |||
is done on the command and help. Obviously you must have proper | is done on the command and help. Obviously you must have proper | |||
permissions for the command. | permissions for the command. | |||
The file I<config/postcopy_commands> is exactly the same as I<precopy_commands> | The file I<config/postcopy_commands> is exactly the same as I<precopy_commands> | |||
except you are prompted I<after> the catalog files are copied and | except you are prompted I<after> the catalog files are copied and | |||
macro substitution is performed on all files. | macro substitution is performed on all files. | |||
skipping to change at line 2704 | skipping to change at line 2707 | |||
Information on subscribing to the list, and general information and | Information on subscribing to the list, and general information and | |||
documentation for Interchange is at: | documentation for Interchange is at: | |||
http://www.icdevgroup.org/ | http://www.icdevgroup.org/ | |||
=cut | =cut | |||
__END__ | __END__ | |||
[catalog standard] | [catalog strap] | |||
basedir = | basedir = | |||
catroot = | catroot = | |||
catuser = | catuser = | |||
cgibase = | cgibase = | |||
cgibin = | cgibin = | |||
cgidir = | cgidir = | |||
cgiurl = | cgiurl = | |||
demotype = standard | demotype = strap | |||
documentroot = | documentroot = | |||
imagedir = | imagedir = | |||
imageurl = | imageurl = | |||
mailorderto = | mailorderto = | |||
interchangegroup= | interchangegroup= | |||
interchangeuser = | interchangeuser = | |||
samplehtml = | samplehtml = | |||
sampleurl = | sampleurl = | |||
servername = | servername = | |||
vendroot = | vendroot = | |||
End of changes. 15 change blocks. | ||||
18 lines changed or deleted | 22 lines changed or added |