Logtalk 2.22.0 files.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1191 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura
2004-11-29 20:36:31 +00:00
parent 2feba3d528
commit d6bbeaa734
165 changed files with 1120 additions and 861 deletions

View File

@@ -1,6 +1,6 @@
// =================================================================
// Logtalk - Object oriented extension to Prolog
// Release 2.21.6
// Release 2.22.0
//
// Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
// =================================================================
@@ -11,7 +11,8 @@ var WshProcessEnv = WshShell.Environment("PROCESS");
var WshSystemEnv = WshShell.Environment("SYSTEM");
var WshUserEnv = WshShell.Environment("USER");
var logtalk_home;
var logtalk_user;
if (WshProcessEnv.Item("LOGTALKHOME"))
logtalk_home = WshProcessEnv.Item("LOGTALKHOME");
else if (WshSystemEnv.Item("LOGTALKHOME"))
@@ -27,9 +28,14 @@ else {
if (WScript.Arguments.Unnamed.Length > 0)
usage_help();
var user_home = WshShell.SpecialFolders("MyDocuments")
var logtalk_user = user_home + "\\logtalk";
if (WshUserEnv.Item("LOGTALKUSER"))
logtalk_user = WshUserEnv.Item("LOGTALKUSER");
else {
logtalk_user = WshShell.SpecialFolders("MyDocuments") + "\\logtalk";
WshUserEnv.Item("LOGTALKUSER") = WshShell.SpecialFolders("MyDocuments") + "\\logtalk";
WScript.Echo("Defined user environment variable LOGTALKUSER.");
WScript.Echo("");
}
var fso = new ActiveXObject("Scripting.FileSystemObject");
@@ -39,23 +45,43 @@ if (fso.FolderExists(logtalk_user)) {
usage_help();
}
WScript.Echo("Creating directory " + logtalk_user + "...");
WScript.Echo("Creating LOGTALKUSER directory:");
WScript.Echo("");
WScript.Echo(" " + logtalk_user);
WScript.Echo("");
fso.CreateFolder(logtalk_user);
WScript.Echo("Copying Logtalk directories...");
WScript.Echo("Copying Logtalk files and directories...");
fso.CopyFolder(logtalk_home + "\\configs", logtalk_user + "\\configs");
fso.CopyFolder(logtalk_home + "\\examples", logtalk_user + "\\examples");
fso.CopyFolder(logtalk_home + "\\libpaths", logtalk_user + "\\libpaths");
fso.CopyFolder(logtalk_home + "\\library", logtalk_user + "\\library");
fso.CopyFolder(logtalk_home + "\\xml", logtalk_user + "\\xml");
WScript.Echo("Finished copying Logtalk directories.");
WScript.Echo("Finished copying Logtalk files directories.");
WScript.Echo("");
WScript.Echo("You may need to edit the contents of the file:");
WScript.Echo("");
WScript.Echo(" " + logtalk_user + "\\libpaths\\libpaths.pl");
WScript.Echo("");
WScript.Echo("to match your Prolog compiler and operating-system requirements or to");
WScript.Echo("add your own library paths.");
WScript.Echo("");
WScript.Echo("You may want to customize the default Logtalk compiler options by editing");
WScript.Echo("the configuration file for your Prolog compiler found in the directory:");
WScript.Echo("");
WScript.Echo(" " + logtalk_user + "\\configs");
WScript.Echo("");
WScript.Quit(0);
function usage_help() {
WScript.Echo("");
WScript.Echo("This script copies the Logtalk library, xml, and examples");
WScript.Echo("directories to the user home directory (My Documents\\logtalk).");
WScript.Echo("This script copies the Logtalk user-modifiable files and directories");
WScript.Echo("to the user home directory. The location can be set by the environment");
WScript.Echo("variable \%LOGTALKUSER\% (defaults to MyDocuments\\logtalk when the");
WScript.Echo("variable is not defined)");
WScript.Echo("");
WScript.Echo("Usage:");
WScript.Echo(" " + WScript.ScriptName + " help");