1 // This script asks for variables, which are necessary for building the
2 // examples of the Office Development Kit. The script duplicates the template
3 // script and inserts the variables into the copied script.
4 // The Script was developed for the operating systems Microsoft Windows.
5 var regKeyOfficeCurrentUser = "HKEY_CURRENT_USER\\Software\\LibreOffice\\UNO\\InstallPath\\";
6 var regKeyOfficeLocaleMachine = "HKEY_LOCAL_MACHINE\\Software\\LibreOffice\\UNO\\InstallPath\\";
7 var regKeyDotNetInstallRoot = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\InstallRoot";
8 var regKeyDotNet1_1 = "HKLM\\Software\\Microsoft\\.NETFramework\\policy\\v1.1\\4322";
9 var sDirDotNet1_1 = "v1.1.4322";
10 var regKeyDotNet2_0 = "HKLM\\Software\\Microsoft\\.NETFramework\\Policy\\v2.0\\50727";
11 var sDirDotNet2_0 = "v2.0.50727";
13 var regKeyJDK = "HKLM\\Software\\JavaSoft\\Java Development Kit\\";
14 //var regKeyVC70 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir";
15 //var regKeyVC71 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir";
16 var regKeyVC90 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir";
18 //var regKeyVCExpress80 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\8.0\\Setup\\VC\\ProductDir";
19 var regKeyVCExpress90 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir";
21 var regKeyWindowsSDK = "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\CurrentInstallFolder";
23 var WshShell = WScript.CreateObject("WScript.Shell");
24 var WshSysEnv = WshShell.Environment("process");
25 var aFileSystemObject = new ActiveXObject("Scripting.FileSystemObject");
26 var stdin = WScript.StdIn;
27 var stdout = WScript.StdOut;
29 stdout.WriteLine("\n" +
30 " *** Configure your SDK environment ***\n\n" +
31 " NOTE: This script is working only for Windows 2000, Windows XP or newer versions!\n");
33 var oo_sdk_name=WshSysEnv("OO_SDK_NAME");
34 var oo_sdk_home=getSdkHome();
35 var oo_user_sdk_dir=WshSysEnv("APPDATA") + "\\" + oo_sdk_name;
36 var oo_user_sdk_env_script=oo_user_sdk_dir + "\\setsdkenv_windows.bat";
38 var office_home=getOfficeHome();
39 var oo_sdk_ure_home=getUreHome();
41 var oo_sdk_make_home=getMakeHome();
42 var oo_sdk_zip_home=getZipHome();
43 var oo_sdk_manifest_used="";
44 var oo_sdk_windowssdk="";
45 var oo_sdk_cpp_home=getCppHome();
46 var oo_sdk_cli_home=getCliHome();
47 var oo_sdk_java_home=getJavaHome();
48 var oo_sdk_out=getOutputDir();
49 var sdk_auto_deployment=getAutoDeployment();
51 writeBatFile(oo_user_sdk_dir, oo_user_sdk_env_script);
54 "\n ******************************************************************\n" +
55 " * ... \"" + oo_user_sdk_env_script + "\"\n" +
56 " * batch file has been prepared.\n" +
57 " * This batch file will be used in the future to prepare your\n" +
58 " * personal configured SDK environment.\n" +
59 " ******************************************************************\n\n");
60 // " * For each time you want to use this configured SDK environment,\n" +
61 // " * you have to run the \"setsdkenv_windows.bat\" file in a new shell!\n" +
63 // done -------------------------------------------------------------------------
66 function skipChoice(msg)
68 stdout.Write("\n Do you want to skip the choice of " + msg + " (YES/NO) [YES]:");
69 var sChoice = stdin.ReadLine();
70 if (sChoice == "" || sChoice.toLowerCase() == "yes")
78 var sSuggestedHome = WshSysEnv("OO_SDK_HOME");
79 if (sSuggestedHome.length == 0) {
80 var scriptname = WScript.ScriptFullName;
81 sSuggestedHome = scriptname.substr(0,scriptname.length-10);
86 stdout.Write("\n Enter the Office Software Development Kit directory [" +
87 sSuggestedHome + "]:");
88 var sHome = stdin.ReadLine();
89 if (sHome.length == 0)
91 //No user input, use default.
92 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
94 stdout.WriteLine("\n Error: Could not find directory \"" +
95 sSuggestedHome + "\". An SDK is required, please" +
96 " specify the path to a valid installation.");
99 sHome = sSuggestedHome;
103 //validate the user input
104 if ( ! aFileSystemObject.FolderExists(sHome))
106 stdout.WriteLine("\n Error: The directory \"" + sHome +
107 "\" does not exist. Please enter the path to a" +
108 "valid SDK installation.");
112 //Check if this is an sdk folder by looking for the idl sub - dir
113 var idlDir = sHome + "\\idl";
114 if (! aFileSystemObject.FolderExists(idlDir))
116 stdout.WriteLine("\n Error: Could not find directory \"" +
117 idlDir + "\". An SDK is required, please specify " +
118 "the path to a valid SDK installation.");
126 function getOfficeOrUre()
128 var suggestion = "Office";
130 while (choice != "office" && choice != "ure") {
132 "\n Use an installed Office or an installed UNO Runtime"
133 + " Environment (Office/URE) [" + suggestion + "]:");
134 choice = stdin.ReadLine();
138 choice = choice.toLowerCase();
143 function getOfficeHome()
145 var sSuggestedHome = WshSysEnv("OFFICE_HOME");
146 if (sSuggestedHome.length == 0)
149 sSuggestedHome = WshShell.RegRead(regKeyOfficeCurrentUser);
150 //The registry entry points to the program folder but we need the
151 //installation folder
153 if (sSuggestedHome.length == 0)
156 sSuggestedHome = WshShell.RegRead(regKeyOfficeLocaleMachine);
157 //The registry entry points to the program folder but we need
158 //the installation folder
163 if ((index = sSuggestedHome.lastIndexOf("\\")) != -1)
164 sSuggestedHome = sSuggestedHome.substr(0, index);
166 if (sSuggestedHome.length == 0)
167 sSuggestedHome = searchOffice();
172 stdout.Write("\n Enter the Office base installation directory [" +
173 sSuggestedHome + "]:");
174 var sHome = stdin.ReadLine();
175 if (sHome.length == 0)
177 //No user input, use default.
178 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
180 stdout.WriteLine("\n Error: Could not find directory \"" +
181 sSuggestedHome + "\" An office installation is " +
182 "required, please specify the path to a valid " +
183 "office installation.");
187 sHome = sSuggestedHome;
190 //validate the user input
191 if ( ! aFileSystemObject.FolderExists(sHome))
193 stdout.WriteLine("\n Error: The directory \"" + sHome +
194 "\" does not exist. Please specify the path to " +
195 "a valid office installation.");
199 //Check if this is a valid office installtion folder by looking for the
200 //program sub-directory
201 var progDir = sHome + "\\program";
202 if (! aFileSystemObject.FolderExists(progDir))
204 stdout.WriteLine("\n Error: Could not find directory \"" +
205 progDir + "\". An office installation is required, " +
206 "please specify the path to a valid office " +
214 function searchOffice()
216 var tmp = oo_sdk_home;
218 if (aFileSystemObject.FileExists(tmp + "\\program\\soffice.exe")) {
226 function getUreHome()
228 var tmpure = oo_sdk_home;
231 if (aFileSystemObject.FileExists(tmpure + "\\URE\\bin\\uno.exe")) {
232 ure = tmpure + "\URE";
238 var suggestion = WshSysEnv("OO_SDK_URE_HOME");
242 "\n Enter the URE installation directory [" + suggestion + "]:");
243 choice = stdin.ReadLine();
247 if (aFileSystemObject.FileExists(choice + "\\bin\\uno.exe")) {
250 stdout.WriteLine("\n Error: A valid URE installation is required.");
256 function getMakeHome()
258 var sSuggestedHome = WshSysEnv("OO_SDK_MAKE_HOME");
262 stdout.Write("\n Enter GNU make (3.79.1 or higher) tools directory [" +
263 sSuggestedHome + "]:");
264 var sHome = stdin.ReadLine();
265 if (sHome.length == 0)
267 //No user input, use default.
268 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
270 stdout.WriteLine("\n Error: Could not find directory \"" +
271 sSuggestedHome + "\". GNU make is required, " +
272 "please specify a GNU make tools directory.");
276 sHome = sSuggestedHome;
279 //validate the user input
280 if ( ! aFileSystemObject.FolderExists(sHome))
282 stdout.WriteLine("\n Error: The directory \"" + sHome +
283 "\" does not exist. GNU make is required, " +
284 "please specify a GNU make tools directory.");
288 //Check for the make executable
289 var sMakePath = sHome + "\\make.exe";
290 if (! aFileSystemObject.FileExists(sMakePath))
292 sMakePath = sHome + "\\mingw32-make.exe";
294 if (! aFileSystemObject.FileExists(sMakePath))
296 stdout.WriteLine("\n Error: Could not find \"" + sMakePath +
297 "\". GNU make is required, please specify a GNU " +
298 "make tools directory.");
305 function getZipHome()
307 var sSuggestedHome = WshSysEnv("OO_SDK_ZIP_HOME");
311 stdout.Write("\n Enter a zip (2.3 or higher) tools directory [" +
312 sSuggestedHome + "]:");
313 var sHome = stdin.ReadLine();
314 if (sHome.length == 0)
316 //No user input, use default.
317 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
319 stdout.WriteLine("\n Error: Could not find directory \"" +
320 sSuggestedHome + "\". zip is required, please " +
321 "specify a zip tools directory.");
325 sHome = sSuggestedHome;
329 //validate the user input
330 if ( ! aFileSystemObject.FolderExists(sHome))
332 stdout.WriteLine("\n Error: The directory \"" + sHome +
333 "\" does not exist. zip is required, please " +
334 "specify a zip tools directory.");
338 //Check for the make executable
339 var sZipPath = sHome + "\\zip.exe";
340 if (! aFileSystemObject.FileExists(sZipPath))
342 stdout.WriteLine("\n Error: Could not find \"" + sZipPath +
343 "\". zip is required, please specify a zip tools " +
351 function getCppHome()
353 var sSuggestedHome = WshSysEnv("OO_SDK_CPP_HOME");
354 if (sSuggestedHome.length == 0)
358 sVC = WshShell.RegRead(regKeyVCExpress90);
363 sVC = WshShell.RegRead(regKeyVC90);
366 // check Windows SDK if VC 9
369 oo_sdk_manifest_used="true";
371 oo_sdk_windowssdk = WshShell.RegRead(regKeyWindowsSDK);
377 sVC = WshShell.RegRead(regKeyVCExpress80);
380 oo_sdk_manifest_used="true";
385 sVC = WshShell.RegRead(regKeyVC80);
388 oo_sdk_manifest_used="true";
393 sVC = WshShell.RegRead(regKeyVC71);
399 if (aFileSystemObject.FileExists(sVC + "\\cl.exe"))
400 sSuggestedHome = sVC;
407 stdout.Write("\n Enter the directory of the C++ compiler (optional) [" +
408 sSuggestedHome + "]:");
409 var sHome = stdin.ReadLine();
410 if (sHome.length == 0)
412 //No user input, check OO_SDK_CPP_HOME or suggested value
413 if ( sSuggestedHome.length == 0 ) {
416 if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
418 stdout.WriteLine("\n Error: Could not find directory \"" +
419 sSuggestedHome + "\".");
425 sHome = sSuggestedHome;
428 //validate the user input
429 if ( ! aFileSystemObject.FolderExists(sHome))
431 stdout.WriteLine("\n Error: Could not find directory \"" +
438 //Check if the C++ compiler exist
439 var cl = sHome + "\\cl.exe";
440 var mt = sHome + "\\mt.exe";
442 if (! aFileSystemObject.FileExists(cl))
444 stdout.WriteLine("\n Error: Could not find the C++ compiler \""
449 if (aFileSystemObject.FileExists(mt)) {
450 oo_sdk_vc8_used="true";
456 if ( skipChoice("the C++ compiler") ) {
468 function getCliHome()
470 var sSuggestedHome = WshSysEnv("OO_SDK_CLI_HOME");
472 if (sSuggestedHome.length == 0)
475 var _ver = WshShell.RegRead(regKeyDotNet2_0);
478 sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
479 sSuggestedHome += sDirDotNet2_0;
480 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
484 if (sSuggestedHome.length == 0)
486 _ver = WshShell.RegRead(regKeyDotNet1_1);
489 sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
490 sSuggestedHome += sDirDotNet1_1;
491 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
501 stdout.Write("\n Enter the directory of the C# and VB.NET compilers (optional) [" + sSuggestedHome + "]:");
502 var sHome = stdin.ReadLine();
503 if (sHome.length == 0)
505 //No user input, check OO_SDK_CLI_HOME or suggested value
506 if ( sSuggestedHome.length == 0 ) {
509 if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
511 stdout.WriteLine("\n Error: Could not find directory \"" +
512 sSuggestedHome + "\".");
518 sHome = sSuggestedHome;
522 //validate the user input
523 if ( ! aFileSystemObject.FolderExists(sHome))
525 stdout.WriteLine("\n Error: The directory \"" + sHome +
526 "\" does not exist.");
532 //Check if the C# and VB.NET compiler exist
533 var csc = sHome + "\\csc.exe";
534 var vbc = sHome + "\\vbc.exe";
536 if (! aFileSystemObject.FileExists(csc))
538 stdout.WriteLine("\n Error: Could not find the C# compiler \"" +
542 if (! aFileSystemObject.FileExists(vbc))
544 stdout.WriteLine("\n Error: Could not find the VB.NET compiler \"" +
551 if ( skipChoice("the C# and VB.NET compilers") ) {
563 function getJavaHome()
565 var sSuggestedHome = WshSysEnv("OO_SDK_JAVA_HOME");
566 if (sSuggestedHome.length == 0)
569 var currentVersion = WshShell.RegRead(regKeyJDK + "CurrentVersion");
570 if (currentVersion.length > 0)
572 sSuggestedHome = WshShell.RegRead(regKeyJDK + currentVersion +
574 if ( ! aFileSystemObject.FolderExists(sSuggestedHome) )
583 stdout.Write("\n Enter JAVA SDK (1.4.1_01 or higher) installation directory (optional) [" + sSuggestedHome + "]:");
584 var sHome = stdin.ReadLine();
585 if (sHome.length == 0)
587 //No user input, check OO_SDK_JAVA_HOME or suggested value
588 if ( sSuggestedHome.length == 0 ) {
591 if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
593 stdout.WriteLine("\n Error: Could not find directory \"" +
594 sSuggestedHome + "\".");
600 sHome = sSuggestedHome;
603 //validate the user input
604 if ( ! aFileSystemObject.FolderExists(sHome))
606 stdout.WriteLine("\n Error: The directory \"" + sHome +
607 "\" does not exist.");
613 //Check if this is an sdk folder by looking for the javac compiler
614 var javacompiler = sHome + "\\bin\\javac.exe";
615 if (! aFileSystemObject.FileExists(javacompiler))
617 stdout.WriteLine("\n Error: Could not find \"" +
618 javacompiler + "\".");
624 if ( skipChoice("the Java SDK") ) {
636 function getOutputDir()
638 var defaultdir = "c:\\" + oo_sdk_name;
639 var sSuggestedDir = WshSysEnv("OO_SDK_OUT");
640 if (sSuggestedDir.length == 0)
641 sSuggestedDir = defaultdir;
647 "\n Default output directory is the \"c:\\" + oo_sdk_name + "\".\n" +
648 " Enter an existent directory if you prefer a different one. But note" +
649 " that only\n a path without spaces is allowed because of a" +
650 " limitation of gnu make. (optional) [" + sSuggestedDir + "]:");
651 var sDir = stdin.ReadLine();
652 if (sDir.length == 0)
654 //No user input, check OO_SDK_OUT or suggested value
655 if ( sSuggestedDir.length == 0 ) {
658 if (sSuggestedDir == oo_user_sdk_dir || sSuggestedDir == defaultdir) {
659 var fso = new ActiveXObject("Scripting.FileSystemObject");
660 if ( !fso.FolderExists(sSuggestedDir) )
661 fso.CreateFolder(sSuggestedDir);
663 if ( !aFileSystemObject.FolderExists(sSuggestedDir) )
665 stdout.WriteLine("\n Error: Could not find directory \"" +
666 sSuggestedDir + "\".");
672 sDir = sSuggestedDir;
676 if (sDir.indexOf(' ') != -1) {
677 stdout.WriteLine("\n Error: your specified output directory " +
678 "\"" + sDir + "\" " +
679 "contains one or more spaces.\n That " +
680 "causes problems with gnu make. Please specifiy" +
681 " a directory without spaces.");
684 //validate the user input
685 if ( ! aFileSystemObject.FolderExists(sDir))
687 stdout.WriteLine("\n Error: Could not find directory \"" +
694 if ( skipChoice("a special output directory") ) {
706 function getAutoDeployment()
708 var sSuggestedAuto = WshSysEnv("SDK_AUTO_DEPLOYMENT");
709 if (sSuggestedAuto.length == 0)
710 sSuggestedAuto = "YES";
714 stdout.Write("\n Automatic deployment of UNO components (YES/NO) ["+
715 sSuggestedAuto + "]:");
716 var sAuto = stdin.ReadLine();
717 if (sAuto.length == 0)
718 sAuto = sSuggestedAuto;
721 sAutoU = sAuto.toUpperCase();
722 if (sAutoU != "YES" && sAutoU != "NO")
724 stdout.WriteLine("\n Error: The value \"" + sAuto + "\" is " +
725 "invalid. Please answer YES or NO.")
734 //The function uses sp2bv.exe to obtain a file URL from a
735 //system path. The URL is already escaped for use as bootstrap variable.
736 //($ -> \$). Then the resulting string is escaped for use in a bat file.
737 //That is % signs are made to double % (% -> %%);
738 function makeBootstrapFileUrl(systemPath)
740 var oExec = WshShell.Exec("sp2bv.exe \"" + systemPath + "\"");
744 if (!oExec.StdOut.AtEndOfStream)
746 var next = oExec.StdOut.Read(1);
758 function writeBatFile(fdir, file)
760 var fso = new ActiveXObject("Scripting.FileSystemObject");
761 if ( !fso.FolderExists(fdir) )
762 fso.CreateFolder(fdir);
763 var newFile = fso.CreateTextFile(file, true);
767 "REM This script sets all enviroment variables, which\n" +
768 "REM are necessary for building the examples of the Office Development Kit.\n" +
769 "REM The Script was developed for the operating systems Windows.\n" +
770 "REM The SDK name\n" +
771 "REM Example: set OO_SDK_NAME=libreoffice3.4_sdk\n" +
772 "set OO_SDK_NAME=" + oo_sdk_name +
774 "REM Installation directory of the Software Development Kit.\n" +
775 "REM Example: set OO_SDK_HOME=C:\\Program Files\\LibreOffice 3\\sdk\n" +
776 "set OO_SDK_HOME=" + oo_sdk_home +
778 "REM Office installation directory.\n" +
779 "REM Example: set OFFICE_HOME=C:\\Program Files\\LibreOffice 3\n" +
780 "set OFFICE_HOME=" + office_home +
782 "REM URE installation directory.\n" +
783 "REM Example: set OO_SDK_URE_HOME=C:\\Program Files\\LibreOffice 3\\URE\n" +
784 "set OO_SDK_URE_HOME=" + oo_sdk_ure_home +
786 "REM Directory of the make command.\n" +
787 "REM Example: set OO_SDK_MAKE_HOME=D:\\NextGenerationMake\\make\n" +
788 "set OO_SDK_MAKE_HOME=" + oo_sdk_make_home +
790 "REM Directory of the zip tool.\n" +
791 "REM Example: set OO_SDK_ZIP_HOME=D:\\infozip\\bin\n" +
792 "set OO_SDK_ZIP_HOME=" + oo_sdk_zip_home +
794 "REM Directory of the C++ compiler.\n" +
795 "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" +
796 "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home +
797 "\nset CPP_MANIFEST=" + oo_sdk_manifest_used +
798 "\nset CPP_WINDOWS_SDK=" + oo_sdk_windowssdk +
800 "REM Directory of the C# and VB.NET compilers.\n" +
801 "REM Example:set OO_SDK_CLI_HOME=C:\\WINXP\\Microsoft.NET\\Framework\\v1.0.3705\n" +
802 "set OO_SDK_CLI_HOME=" + oo_sdk_cli_home +
804 "REM Java SDK installation directory.\n" +
805 "REM Example: set OO_SDK_JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_05\n" +
806 "set OO_SDK_JAVA_HOME=" + oo_sdk_java_home +
808 "REM Special output directory\n" +
809 "REM Example: set OO_SDK_OUT=C:\\" + oo_sdk_name + "\n" +
810 "set OO_SDK_OUT=" + oo_sdk_out +
812 "REM Automatic deployment\n" +
813 "REM Example: set SDK_AUTO_DEPLOYMENT=YES\n" +
814 "set SDK_AUTO_DEPLOYMENT=" + sdk_auto_deployment +
816 "REM Check installation path for the Office Development Kit.\n" +
817 "if not defined OO_SDK_HOME (\n" +
818 " echo Error: the variable OO_SDK_HOME is missing!\n" +
822 "REM Check installation path for the office.\n" +
823 "REM if not defined OFFICE_HOME (\n" +
824 "REM if not defined OO_SDK_URE_HOME (\n" +
825 "REM echo Error: either of the variables OFFICE_HOME and\n" +
826 "REM echo OO_SDK_URE_HOME is missing!\n" +
827 "REM goto :error\n" +
831 "REM Check installation path for GNU make.\n" +
832 "if not defined OO_SDK_MAKE_HOME (\n" +
833 " echo Error: the variable OO_SDK_MAKE_HOME is missing!\n" +
837 "REM Check installation path for the zip tool.\n" +
838 "if not defined OO_SDK_ZIP_HOME (\n" +
839 " echo Error: the variable OO_SDK_ZIP_HOME is missing!\n" +
843 "REM Set library path. \n" +
844 "set LIB=%OO_SDK_HOME%\\lib;%LIB%\n" +
845 "if defined CPP_WINDOWS_SDK (\n" +
846 " set LIB=%LIB%;%CPP_WINDOWS_SDK%\\lib\n" +
849 "REM Set office program path.\n" +
850 "if defined OFFICE_HOME (\n" +
851 " set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\\program\n" +
854 "REM Set UNO path, necessary to ensure that the cpp examples using the\n" +
855 "REM new UNO bootstrap mechanism use the configured office installation\n" +
856 "REM (only set when using an Office).\n" +
857 "if defined OFFICE_HOME (\n" +
858 " set UNO_PATH=%OFFICE_PROGRAM_PATH%\n" +
861 "REM if defined OO_SDK_URE_HOME (\n" +
862 "set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\\bin\n" +
863 "set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\\bin\n" +
864 "set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\\java\n" +
866 "set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%\n" +
867 "set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%\n" +
868 "set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\\classes\n" +
871 "REM Set classpath\n" +
872 "set CLASSPATH=%OO_SDK_URE_JAVA_DIR%\\juh.jar;%OO_SDK_URE_JAVA_DIR%\\jurt.jar;%OO_SDK_URE_JAVA_DIR%\\ridl.jar;%OO_SDK_URE_JAVA_DIR%\\unoloader.jar;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
873 "REM if defined OFFICE_HOME (\n" +
874 "REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
877 "REM Add directory of the SDK tools to the path.\n" +
878 "set PATH=%OO_SDK_HOME%\\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
880 "REM Set PATH appropriate to the output directory\n" +
881 "if defined OO_SDK_OUT (\n" +
882 " set PATH=%OO_SDK_OUT%\\WINexample.out\\bin;%PATH%\n" +
884 " set PATH=%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
887 "REM Add directory of the command make to the path, if necessary.\n" +
888 "if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%\n" +
890 "REM Add directory of the zip tool to the path, if necessary.\n" +
891 "if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" +
893 "REM Add directory of the C++ compiler to the path, if necessary.\n" +
894 "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" +
896 "REM Add directory of the Win SDK to the path, if necessary.\n" +
897 "if defined CPP_WINDOWS_SDK (\n" +
898 " set PATH=%CPP_WINDOWS_SDK%\\bin;%PATH%\n" +
899 " set INCLUDE=%CPP_WINDOWS_SDK%\\Include;%INCLUDE%\n" +
901 "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" +
902 "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" +
904 "REM Add directory of the Java tools to the path, if necessary.\n" +
905 "if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\\bin;%OO_SDK_JAVA_HOME%\\jre\\bin;%PATH%\n" +
907 "REM Set environment for C++ compiler tools, if necessary.\n" +
908 "if defined OO_SDK_CPP_HOME call \"%OO_SDK_CPP_HOME%\\VCVARS32.bat\"\n" +
910 "REM Set tilte to identify the prepared shell.\n" +
911 "title Shell prepared for SDK\n" +
912 "\nREM Prepare shell with all necessary environment variables.\n" +
914 "echo ******************************************************************\n" +
916 "echo * SDK environment is prepared for Windows\n" +
918 "echo * SDK = %OO_SDK_HOME%\n" +
919 "echo * Office = %OFFICE_HOME%\n" +
920 "echo * URE = %OO_SDK_URE_HOME%\n" +
921 "echo * Make = %OO_SDK_MAKE_HOME%\n" +
922 "echo * Zip = %OO_SDK_ZIP_HOME%\n" +
923 "echo * C++ Compiler = %OO_SDK_CPP_HOME%\n" +
924 "echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%\n" +
925 "echo * Java = %OO_SDK_JAVA_HOME%\n" +
926 "echo * Special Output directory = %OO_SDK_OUT%\n" +
927 "echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%\n" +
929 "echo ******************************************************************\n" +
934 "Error: Please insert the necessary environment variables into the batch file.\n" +