| … | |
… | |
| 31 | $system_setup_mode = undef; |
31 | $system_setup_mode = undef; |
| 32 | $mainDir = undef; |
32 | $mainDir = undef; |
| 33 | $perlPath = undef; |
33 | $perlPath = undef; |
| 34 | $cgiURL = undef; |
34 | $cgiURL = undef; |
| 35 | $htmlURL = undef; |
35 | $htmlURL = undef; |
|
|
36 | $htmlDir = undef; |
| 36 | $groupName = undef; |
37 | $groupName = undef; |
| 37 | $update_stuff_in_courses = undef; |
38 | $update_stuff_in_courses = undef; |
| 38 | $chgrp_files_and_dirs = undef; |
39 | $chgrp_files_and_dirs = undef; |
| 39 | $chmod_files_and_dirs = undef; |
40 | $chmod_files_and_dirs = undef; |
| 40 | $local_preprocessor = undef; |
41 | $local_preprocessor = undef; |
| … | |
… | |
| 122 | In order for generated HTML to be able to invoke CGI scripts, WeBWorK |
123 | In order for generated HTML to be able to invoke CGI scripts, WeBWorK |
| 123 | needs to know the URL which points to the main WeBWorK system cgi |
124 | needs to know the URL which points to the main WeBWorK system cgi |
| 124 | subdirectory. If both static HTML and CGIs reside on the same host |
125 | subdirectory. If both static HTML and CGIs reside on the same host |
| 125 | (which is true in most cases), you can omit the http://hostname section |
126 | (which is true in most cases), you can omit the http://hostname section |
| 126 | of the URL, but make sure the leading slash is present. |
127 | of the URL, but make sure the leading slash is present. |
|
|
128 | |
|
|
129 | }; |
|
|
130 | |
|
|
131 | my $HTML_DIR_TEXT = q{ |
|
|
132 | |
|
|
133 | The directory containing the WeBWorK system HTML files is known as the system |
|
|
134 | HTML directory. In order to dynamically generate system-wide public resources, I |
|
|
135 | need to know the location of the system HTML directory for this installation. |
| 127 | |
136 | |
| 128 | }; |
137 | }; |
| 129 | |
138 | |
| 130 | my $HTML_URL_TEXT = q{ |
139 | my $HTML_URL_TEXT = q{ |
| 131 | |
140 | |
| … | |
… | |
| 251 | } |
260 | } |
| 252 | } |
261 | } |
| 253 | $cgiURL .= "/" unless $cgiURL =~ m"/$"; # ensure trailing slash |
262 | $cgiURL .= "/" unless $cgiURL =~ m"/$"; # ensure trailing slash |
| 254 | } |
263 | } |
| 255 | print "CGI URL is: $cgiURL\n"; |
264 | print "CGI URL is: $cgiURL\n"; |
|
|
265 | |
|
|
266 | #################### system HTML directory |
|
|
267 | |
|
|
268 | unless(defined $htmlDir) { |
|
|
269 | page($HTML_DIR_TEXT); |
|
|
270 | $htmlDir = questionString("Where is the WeBWorK system HTML directory?", "${mainDir}../system_html/"); |
|
|
271 | $htmlDir .= '/' unless $htmlDir =~ m|/$|; # ensure trailing slash |
|
|
272 | } |
|
|
273 | print "We'll use $htmlDir as WeBWorK's system HTML directory.\n"; |
| 256 | |
274 | |
| 257 | #################### HTML URL |
275 | #################### HTML URL |
| 258 | |
276 | |
| 259 | unless(defined $htmlURL) { |
277 | unless(defined $htmlURL) { |
| 260 | page($HTML_URL_TEXT); |
278 | page($HTML_URL_TEXT); |
| … | |
… | |
| 398 | } |
416 | } |
| 399 | |
417 | |
| 400 | print "done fixing #! and \"use\" lines.\n\n"; |
418 | print "done fixing #! and \"use\" lines.\n\n"; |
| 401 | |
419 | |
| 402 | #################### write webworkConfig.pm file |
420 | #################### write webworkConfig.pm file |
| 403 | # uses: $mainDir, $cgiURL, $htmlURL |
421 | # uses: $mainDir, $cgiURL, $htmlDir, $htmlURL |
| 404 | |
422 | |
| 405 | print "Writing lib/webworkConfig.pm file...\n"; |
423 | print "Writing lib/webworkConfig.pm file...\n"; |
| 406 | open CONFIG_FILE, ">${mainDir}lib/webworkConfig.pm"; |
424 | open CONFIG_FILE, ">${mainDir}lib/webworkConfig.pm"; |
| 407 | print CONFIG_FILE<<END_OF_CONFIG_FILE; |
425 | print CONFIG_FILE<<END_OF_CONFIG_FILE; |
| 408 | package Global; |
426 | package Global; |
| … | |
… | |
| 421 | # scripts are found in the directory referred to by \$cgiWebworkURL, which is |
439 | # scripts are found in the directory referred to by \$cgiWebworkURL, which is |
| 422 | # usually webwork/system/cgi. |
440 | # usually webwork/system/cgi. |
| 423 | \$cgiDebugMode = 0; |
441 | \$cgiDebugMode = 0; |
| 424 | |
442 | |
| 425 | \$mainDirectory = "$mainDir"; |
443 | \$mainDirectory = "$mainDir"; |
|
|
444 | \$htmlWebworkDir = "$htmlDir"; |
| 426 | \$htmlWebworkURL = "$htmlURL"; |
445 | \$htmlWebworkURL = "$htmlURL"; |
| 427 | \$cgiWebworkURL = "$cgiURL"; |
446 | \$cgiWebworkURL = "$cgiURL"; |
| 428 | \$cgiWebworkURL .= "cgi-scripts/" unless \$cgiDebugMode; |
447 | \$cgiWebworkURL .= "cgi-scripts/" unless \$cgiDebugMode; |
| 429 | |
448 | |
| 430 | 1; |
449 | 1; |
| … | |
… | |
| 445 | # Copyright (c) 1995-2001 WeBWorK Team, University of Rochester |
464 | # Copyright (c) 1995-2001 WeBWorK Team, University of Rochester |
| 446 | # All rights reserved |
465 | # All rights reserved |
| 447 | ################################################################################ |
466 | ################################################################################ |
| 448 | |
467 | |
| 449 | use lib '${mainDir}lib/'; |
468 | use lib '${mainDir}lib/'; |
|
|
469 | use lib '${mainDir}courseScripts/'; |
| 450 | |
470 | |
| 451 | 1; |
471 | 1; |
| 452 | END_OF_INIT_FILE |
472 | END_OF_INIT_FILE |
| 453 | close INIT_FILE; |
473 | close INIT_FILE; |
| 454 | } |
474 | } |