Logtalk 2.28.2 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1711 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
// =================================================================
|
||||
// Logtalk - Object oriented extension to Prolog
|
||||
// Release 2.27.1
|
||||
// Release 2.28.2
|
||||
//
|
||||
// Copyright (c) 1998-2006 Paulo Moura. All Rights Reserved.
|
||||
// =================================================================
|
||||
|
||||
if (ScriptEngineMajorVersion() < 5 || ScriptEngineMajorVersion() == 5 && ScriptEngineMinorVersion() < 6) {
|
||||
WScript.Echo('Error! WSH 5.6 or later version needed for running this script.');
|
||||
WScript.Quit(1);
|
||||
}
|
||||
|
||||
if (WScript.Arguments.Unnamed.Length > 0) {
|
||||
usage_help();
|
||||
WScript.Quit(0);
|
||||
@@ -12,17 +17,41 @@ if (WScript.Arguments.Unnamed.Length > 0) {
|
||||
|
||||
WScript.Echo('');
|
||||
WScript.Echo('Creating a shortcut named "Logtalk - SICStus Prolog" for running Logtalk with');
|
||||
WScript.Echo('SICStus Prolog 3.12 (edit the script if you are using other version)...');
|
||||
WScript.Echo('SICStus Prolog 4.0 or 3.12 (edit the script if you are using other version)...');
|
||||
WScript.Echo('');
|
||||
|
||||
var WshShell = new ActiveXObject("WScript.Shell");
|
||||
|
||||
var prolog_path = WshShell.RegRead("HKLM\\Software\\SICS\\SICStus3.12_win32\\SP_PATH") + "\\bin\\spwin.exe";
|
||||
var prolog_path;
|
||||
var prolog_path4;
|
||||
var prolog_path3;
|
||||
var config_file;
|
||||
|
||||
try {
|
||||
prolog_path4 = WshShell.RegRead("HKLM\\Software\\SICS\\SICStus4.0_win32\\SP_PATH") + "\\bin\\spwin.exe";
|
||||
}
|
||||
catch(e) {
|
||||
prolog_path4 = "not_installed.lgt";
|
||||
}
|
||||
try {
|
||||
prolog_path3 = WshShell.RegRead("HKLM\\Software\\SICS\\SICStus3.12_win32\\SP_PATH") + "\\bin\\spwin.exe";
|
||||
}
|
||||
catch(e) {
|
||||
prolog_path3 = "not_installed.lgt";
|
||||
}
|
||||
|
||||
var FSObject = new ActiveXObject("Scripting.FileSystemObject");
|
||||
|
||||
if (!FSObject.FileExists(prolog_path)) {
|
||||
WScript.Echo("Error! Cannot find spwin.exe at the expected place!");
|
||||
if (FSObject.FileExists(prolog_path4)) {
|
||||
prolog_path = prolog_path4;
|
||||
config_file = "sicstus4.config";
|
||||
}
|
||||
else if (FSObject.FileExists(prolog_path3)) {
|
||||
prolog_path = prolog_path3;
|
||||
config_file = "sicstus.config";
|
||||
}
|
||||
else {
|
||||
WScript.Echo("Error! Cannot find spwin.exe at the expected places!");
|
||||
WScript.Echo("Please, edit the script and update the location of the spwin.exe executable.");
|
||||
WScript.Quit(1);
|
||||
}
|
||||
@@ -57,7 +86,7 @@ if (!FSObject.FolderExists(logtalk_home + "\\bin"))
|
||||
|
||||
var f = FSObject.CreateTextFile(logtalk_home + "\\bin\\logtalk_sicstus.pl", true);
|
||||
|
||||
f.WriteLine(":- consult('$LOGTALKUSER/configs/sicstus.config').");
|
||||
f.WriteLine(":- consult('$LOGTALKUSER/configs/" + config_file + "').");
|
||||
f.WriteLine(":- consult('$LOGTALKHOME/compiler/logtalk.pl').");
|
||||
f.WriteLine(":- consult('$LOGTALKUSER/libpaths/libpaths.pl').");
|
||||
f.Close();
|
||||
@@ -68,9 +97,9 @@ if (!FSObject.FolderExists(ProgramsPath + "\\Logtalk"))
|
||||
FSObject.CreateFolder(ProgramsPath + "\\Logtalk");
|
||||
|
||||
var link = WshShell.CreateShortcut(ProgramsPath + "\\Logtalk\\Logtalk - SICStus Prolog.lnk");
|
||||
link.Arguments = "-l %LOGTALKHOME%\\bin\\logtalk_sicstus.pl";
|
||||
link.Description = "Runs Logtalk with SICStus Prolog";
|
||||
link.IconLocation = "app.exe,1";
|
||||
link.Arguments = '-l "%LOGTALKHOME%\\bin\\logtalk_sicstus.pl"';
|
||||
link.Description = 'Runs Logtalk with SICStus Prolog';
|
||||
link.IconLocation = 'app.exe,1';
|
||||
link.TargetPath = prolog_path;
|
||||
link.WindowStyle = 1;
|
||||
link.WorkingDirectory = logtalk_home;
|
||||
|
Reference in New Issue
Block a user