home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
- // @Modified build 290 cm19990427 - added JDK1.2 notes
- // @Modified build 355 cm20000524 - removed JDK1.2 notes
-
- /**
- @Tool: validate~iterates over all the entries in the ApplicationHelpers
- map file and checks each path to see if it exists.
- @Note: This script only checks to see if the path exists. It does not know if
- the path is to the correct file or folder.
- @EndNote:
- @Example: Example output from the validate script:
- Checking file paths in ApplicationHelpers
- Path for key "html-help" is valid: D:\html\Htmlib95.hlp
- Path for key "NavigatorBrowser" is valid: H:\Netscape 4.03\Program\netscape.exe
- Path for key "msj-jview" is valid: C:\SDK-Java.20\bin\jview.exe
- Path for key "msj-jactivex" is valid: C:\SDK-Java.20\bin\jactivex.exe
- Path for key "jdk-runapplication_release" is valid: E:\Jdk1.1.4\bin\java.exe
- Path for key "jdk-appletviewer_debug" is valid: E:\Jdk1.1.4\bin\appletviewer_g.exe
- Path for key "jdk-runapplicationwindow" is valid: E:\Jdk1.1.4\bin\javaw.exe
- Path for key "jdk-compiler_debug" is valid: E:\Jdk1.1.4\bin\javac_g.exe
- Path for key "jdk-compiler_release" is valid: E:\Jdk1.1.4\bin\javac.exe
- Path for key "msj-jvc" is valid: C:\SDK-Java.20\bin\jvc.exe
- Path for key "msj-msjavah" is valid: C:\SDK-Java.20\bin\msjavah.exe
- Path for key "jdk-debugger" is valid: E:\Jdk1.1.4\bin\jdb.exe
- Path for key "jdk-runapplicationwindow_debug" is valid: E:\Jdk1.1.4\bin\javaw_g.exe
- Path for key "jdk-runapplication" is valid: E:\Jdk1.1.4\bin\java.exe
- Path for key "jdk-classes.zip" is valid: E:\Jdk1.1.4\lib\classes.zip
- Path for key "jdk-runapplication_debug" is valid: E:\Jdk1.1.4\bin\java_g.exe
- Path for key "msj-classvue" is valid: C:\SDK-Java.20\bin\classvue.exe
- Path for key "jdk-appletviewer" is valid: E:\Jdk1.1.4\bin\appletviewer.exe
- Path for key "msj-appletviewer" is valid: C:\SDK-Java.20\bin\appletviewer.exe
- Path for key "jdk-bin_directory" is valid: E:\Jdk1.1.4\bin
- Path for key "msj-bin_directory" is valid: C:\SDK-Java.20\bin
- Path for key "jdk-runapplicationwindow_release" is valid: E:\Jdk1.1.4\bin\javaw.exe
- Path for key "jdk-compiler" is valid: E:\Jdk1.1.4\bin\javac.exe
- Path for key "InternetExplorerBrowser" is valid: C:\Ie4\Iexplore.exe
- Path for key "jdk-javah" is valid: E:\Jdk1.1.4\bin\javah.exe
- Path for key "jdk-appletviewer_release" is valid: E:\Jdk1.1.4\bin\appletviewer.exe
- Path for key "msj-wjview" is valid: C:\SDK-Java.20\bin\wjview.exe
- Path for key "java-help" is valid: G:\Dippy\api.hlp
- Path for key "msj-jexegen" is valid: C:\SDK-Java.20\bin\jexegen.exe
- Path for key "DefaultHtmlBrowser" is valid: F:\Program Files\Microsoft Internet Explorer 4\Iexplore.exe
- No invalid files were found!
- @Note: These paths checked by this script are stored in the MapFile
- "ApplicationHelpers.map" which is located in your Ide/Data folder.
- @EndNote:
- @EndTool:
- @Summary: validate~checks configuration data
- */
-
- var output = getOutput();
-
- function DoCommand()
- {
- output.clear();
- output.writeLine("Checking file paths in ApplicationHelpers");
- var count = 0;
- var helpers = getMapFile("ApplicationHelpers");
- var position = helpers.getHeadPosition();
- while(position.valid)
- {
- var association = helpers.getNext(position);
- var file = association.value;
- if (file.type == "File" && !file.exists)
- {
- output.writeLine("The path for " + association.key + " is not valid");
- count += 1;
- }
- else
- {
- output.writeLine("Path for key \"" + association.key + "\" is valid: " +
- file.path);
- }
- }
-
- if (count == 0)
- {
- output.writeLine("No invalid files were found!");
- }
- else
- {
- if (count == 1)
- output.writeLine("" + count + " path is not valid.");
- else
- output.writeLine("" + count + " paths are not valid.");
- }
- }
-
- !!/Script
-