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
=office_home
+ "\\URE";
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 getOfficeHome()
128 var sSuggestedHome
= WshSysEnv("OFFICE_HOME");
129 if (sSuggestedHome
.length
== 0)
132 sSuggestedHome
= WshShell
.RegRead(regKeyOfficeCurrentUser
);
133 //The registry entry points to the program folder but we need the
134 //installation folder
136 if (sSuggestedHome
.length
== 0)
139 sSuggestedHome
= WshShell
.RegRead(regKeyOfficeLocaleMachine
);
140 //The registry entry points to the program folder but we need
141 //the installation folder
146 if ((index
= sSuggestedHome
.lastIndexOf("\\")) != -1)
147 sSuggestedHome
= sSuggestedHome
.substr(0, index
);
149 if (sSuggestedHome
.length
== 0)
150 sSuggestedHome
= searchOffice();
155 stdout
.Write("\n Enter the Office base installation directory [" +
156 sSuggestedHome
+ "]:");
157 var sHome
= stdin
.ReadLine();
158 if (sHome
.length
== 0)
160 //No user input, use default.
161 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
163 stdout
.WriteLine("\n Error: Could not find directory \"" +
164 sSuggestedHome
+ "\" An office installation is " +
165 "required, please specify the path to a valid " +
166 "office installation.");
170 sHome
= sSuggestedHome
;
173 //validate the user input
174 if ( ! aFileSystemObject
.FolderExists(sHome
))
176 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
177 "\" does not exist. Please specify the path to " +
178 "a valid office installation.");
182 //Check if this is a valid office installtion folder by looking for the
183 //program sub-directory
184 var progDir
= sHome
+ "\\program";
185 if (! aFileSystemObject
.FolderExists(progDir
))
187 stdout
.WriteLine("\n Error: Could not find directory \"" +
188 progDir
+ "\". An office installation is required, " +
189 "please specify the path to a valid office " +
197 function searchOffice()
199 var tmp
= oo_sdk_home
;
201 if (aFileSystemObject
.FileExists(tmp
+ "\\program\\soffice.exe")) {
208 function getMakeHome()
210 var sSuggestedHome
= WshSysEnv("OO_SDK_MAKE_HOME");
214 stdout
.Write("\n Enter GNU make (3.79.1 or higher) tools directory [" +
215 sSuggestedHome
+ "]:");
216 var sHome
= stdin
.ReadLine();
217 if (sHome
.length
== 0)
219 //No user input, use default.
220 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
222 stdout
.WriteLine("\n Error: Could not find directory \"" +
223 sSuggestedHome
+ "\". GNU make is required, " +
224 "please specify a GNU make tools directory.");
228 sHome
= sSuggestedHome
;
231 //validate the user input
232 if ( ! aFileSystemObject
.FolderExists(sHome
))
234 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
235 "\" does not exist. GNU make is required, " +
236 "please specify a GNU make tools directory.");
240 //Check for the make executable
241 var sMakePath
= sHome
+ "\\make.exe";
242 if (! aFileSystemObject
.FileExists(sMakePath
))
244 sMakePath
= sHome
+ "\\mingw32-make.exe";
246 if (! aFileSystemObject
.FileExists(sMakePath
))
248 stdout
.WriteLine("\n Error: Could not find \"" + sMakePath
+
249 "\". GNU make is required, please specify a GNU " +
250 "make tools directory.");
257 function getZipHome()
259 var sSuggestedHome
= WshSysEnv("OO_SDK_ZIP_HOME");
263 stdout
.Write("\n Enter a zip (2.3 or higher) tools directory [" +
264 sSuggestedHome
+ "]:");
265 var sHome
= stdin
.ReadLine();
266 if (sHome
.length
== 0)
268 //No user input, use default.
269 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
271 stdout
.WriteLine("\n Error: Could not find directory \"" +
272 sSuggestedHome
+ "\". zip is required, please " +
273 "specify a zip tools directory.");
277 sHome
= sSuggestedHome
;
281 //validate the user input
282 if ( ! aFileSystemObject
.FolderExists(sHome
))
284 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
285 "\" does not exist. zip is required, please " +
286 "specify a zip tools directory.");
290 //Check for the make executable
291 var sZipPath
= sHome
+ "\\zip.exe";
292 if (! aFileSystemObject
.FileExists(sZipPath
))
294 stdout
.WriteLine("\n Error: Could not find \"" + sZipPath
+
295 "\". zip is required, please specify a zip tools " +
303 function getCppHome()
305 var sSuggestedHome
= WshSysEnv("OO_SDK_CPP_HOME");
306 if (sSuggestedHome
.length
== 0)
310 sVC
= WshShell
.RegRead(regKeyVCExpress90
);
315 sVC
= WshShell
.RegRead(regKeyVC90
);
318 // check Windows SDK if VC 9
321 oo_sdk_manifest_used
="true";
323 oo_sdk_windowssdk
= WshShell
.RegRead(regKeyWindowsSDK
);
329 sVC
= WshShell
.RegRead(regKeyVCExpress80
);
332 oo_sdk_manifest_used
="true";
337 sVC
= WshShell
.RegRead(regKeyVC80
);
340 oo_sdk_manifest_used
="true";
345 sVC
= WshShell
.RegRead(regKeyVC71
);
351 if (aFileSystemObject
.FileExists(sVC
+ "\\cl.exe"))
352 sSuggestedHome
= sVC
;
359 stdout
.Write("\n Enter the directory of the C++ compiler (optional) [" +
360 sSuggestedHome
+ "]:");
361 var sHome
= stdin
.ReadLine();
362 if (sHome
.length
== 0)
364 //No user input, check OO_SDK_CPP_HOME or suggested value
365 if ( sSuggestedHome
.length
== 0 ) {
368 if ( !aFileSystemObject
.FolderExists(sSuggestedHome
) )
370 stdout
.WriteLine("\n Error: Could not find directory \"" +
371 sSuggestedHome
+ "\".");
377 sHome
= sSuggestedHome
;
380 //validate the user input
381 if ( ! aFileSystemObject
.FolderExists(sHome
))
383 stdout
.WriteLine("\n Error: Could not find directory \"" +
390 //Check if the C++ compiler exist
391 var cl
= sHome
+ "\\cl.exe";
392 var mt
= sHome
+ "\\mt.exe";
394 if (! aFileSystemObject
.FileExists(cl
))
396 stdout
.WriteLine("\n Error: Could not find the C++ compiler \""
401 if (aFileSystemObject
.FileExists(mt
)) {
402 oo_sdk_vc8_used
="true";
408 if ( skipChoice("the C++ compiler") ) {
420 function getCliHome()
422 var sSuggestedHome
= WshSysEnv("OO_SDK_CLI_HOME");
424 if (sSuggestedHome
.length
== 0)
427 var _ver
= WshShell
.RegRead(regKeyDotNet2_0
);
430 sSuggestedHome
= WshShell
.RegRead(regKeyDotNetInstallRoot
);
431 sSuggestedHome
+= sDirDotNet2_0
;
432 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
436 if (sSuggestedHome
.length
== 0)
438 _ver
= WshShell
.RegRead(regKeyDotNet1_1
);
441 sSuggestedHome
= WshShell
.RegRead(regKeyDotNetInstallRoot
);
442 sSuggestedHome
+= sDirDotNet1_1
;
443 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
453 stdout
.Write("\n Enter the directory of the C# and VB.NET compilers (optional) [" + sSuggestedHome
+ "]:");
454 var sHome
= stdin
.ReadLine();
455 if (sHome
.length
== 0)
457 //No user input, check OO_SDK_CLI_HOME or suggested value
458 if ( sSuggestedHome
.length
== 0 ) {
461 if ( !aFileSystemObject
.FolderExists(sSuggestedHome
) )
463 stdout
.WriteLine("\n Error: Could not find directory \"" +
464 sSuggestedHome
+ "\".");
470 sHome
= sSuggestedHome
;
474 //validate the user input
475 if ( ! aFileSystemObject
.FolderExists(sHome
))
477 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
478 "\" does not exist.");
484 //Check if the C# and VB.NET compiler exist
485 var csc
= sHome
+ "\\csc.exe";
486 var vbc
= sHome
+ "\\vbc.exe";
488 if (! aFileSystemObject
.FileExists(csc
))
490 stdout
.WriteLine("\n Error: Could not find the C# compiler \"" +
494 if (! aFileSystemObject
.FileExists(vbc
))
496 stdout
.WriteLine("\n Error: Could not find the VB.NET compiler \"" +
503 if ( skipChoice("the C# and VB.NET compilers") ) {
515 function getJavaHome()
517 var sSuggestedHome
= WshSysEnv("OO_SDK_JAVA_HOME");
518 if (sSuggestedHome
.length
== 0)
521 var currentVersion
= WshShell
.RegRead(regKeyJDK
+ "CurrentVersion");
522 if (currentVersion
.length
> 0)
524 sSuggestedHome
= WshShell
.RegRead(regKeyJDK
+ currentVersion
+
526 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
) )
535 stdout
.Write("\n Enter JAVA SDK (1.4.1_01 or higher) installation directory (optional) [" + sSuggestedHome
+ "]:");
536 var sHome
= stdin
.ReadLine();
537 if (sHome
.length
== 0)
539 //No user input, check OO_SDK_JAVA_HOME or suggested value
540 if ( sSuggestedHome
.length
== 0 ) {
543 if ( !aFileSystemObject
.FolderExists(sSuggestedHome
) )
545 stdout
.WriteLine("\n Error: Could not find directory \"" +
546 sSuggestedHome
+ "\".");
552 sHome
= sSuggestedHome
;
555 //validate the user input
556 if ( ! aFileSystemObject
.FolderExists(sHome
))
558 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
559 "\" does not exist.");
565 //Check if this is an sdk folder by looking for the javac compiler
566 var javacompiler
= sHome
+ "\\bin\\javac.exe";
567 if (! aFileSystemObject
.FileExists(javacompiler
))
569 stdout
.WriteLine("\n Error: Could not find \"" +
570 javacompiler
+ "\".");
576 if ( skipChoice("the Java SDK") ) {
588 function getOutputDir()
590 var defaultdir
= "c:\\" + oo_sdk_name
;
591 var sSuggestedDir
= WshSysEnv("OO_SDK_OUT");
592 if (sSuggestedDir
.length
== 0)
593 sSuggestedDir
= defaultdir
;
599 "\n Default output directory is the \"c:\\" + oo_sdk_name
+ "\".\n" +
600 " Enter an existent directory if you prefer a different one. But note" +
601 " that only\n a path without spaces is allowed because of a" +
602 " limitation of gnu make. (optional) [" + sSuggestedDir
+ "]:");
603 var sDir
= stdin
.ReadLine();
604 if (sDir
.length
== 0)
606 //No user input, check OO_SDK_OUT or suggested value
607 if ( sSuggestedDir
.length
== 0 ) {
610 if (sSuggestedDir
== oo_user_sdk_dir
|| sSuggestedDir
== defaultdir
) {
611 var fso
= new ActiveXObject("Scripting.FileSystemObject");
612 if ( !fso
.FolderExists(sSuggestedDir
) )
613 fso
.CreateFolder(sSuggestedDir
);
615 if ( !aFileSystemObject
.FolderExists(sSuggestedDir
) )
617 stdout
.WriteLine("\n Error: Could not find directory \"" +
618 sSuggestedDir
+ "\".");
624 sDir
= sSuggestedDir
;
628 if (sDir
.indexOf(' ') != -1) {
629 stdout
.WriteLine("\n Error: your specified output directory " +
630 "\"" + sDir
+ "\" " +
631 "contains one or more spaces.\n That " +
632 "causes problems with gnu make. Please specifiy" +
633 " a directory without spaces.");
636 //validate the user input
637 if ( ! aFileSystemObject
.FolderExists(sDir
))
639 stdout
.WriteLine("\n Error: Could not find directory \"" +
646 if ( skipChoice("a special output directory") ) {
658 function getAutoDeployment()
660 var sSuggestedAuto
= WshSysEnv("SDK_AUTO_DEPLOYMENT");
661 if (sSuggestedAuto
.length
== 0)
662 sSuggestedAuto
= "YES";
666 stdout
.Write("\n Automatic deployment of UNO components (YES/NO) ["+
667 sSuggestedAuto
+ "]:");
668 var sAuto
= stdin
.ReadLine();
669 if (sAuto
.length
== 0)
670 sAuto
= sSuggestedAuto
;
673 sAutoU
= sAuto
.toUpperCase();
674 if (sAutoU
!= "YES" && sAutoU
!= "NO")
676 stdout
.WriteLine("\n Error: The value \"" + sAuto
+ "\" is " +
677 "invalid. Please answer YES or NO.")
686 //The function uses sp2bv.exe to obtain a file URL from a
687 //system path. The URL is already escaped for use as bootstrap variable.
688 //($ -> \$). Then the resulting string is escaped for use in a bat file.
689 //That is % signs are made to double % (% -> %%);
690 function makeBootstrapFileUrl(systemPath
)
692 var oExec
= WshShell
.Exec("sp2bv.exe \"" + systemPath
+ "\"");
696 if (!oExec
.StdOut
.AtEndOfStream
)
698 var next
= oExec
.StdOut
.Read(1);
710 function writeBatFile(fdir
, file
)
712 var fso
= new ActiveXObject("Scripting.FileSystemObject");
713 if ( !fso
.FolderExists(fdir
) )
714 fso
.CreateFolder(fdir
);
715 var newFile
= fso
.CreateTextFile(file
, true);
719 "REM This script sets all enviroment variables, which\n" +
720 "REM are necessary for building the examples of the Office Development Kit.\n" +
721 "REM The Script was developed for the operating systems Windows.\n" +
722 "REM The SDK name\n" +
723 "REM Example: set OO_SDK_NAME=libreoffice3.4_sdk\n" +
724 "set OO_SDK_NAME=" + oo_sdk_name
+
726 "REM Installation directory of the Software Development Kit.\n" +
727 "REM Example: set OO_SDK_HOME=C:\\Program Files\\LibreOffice 3\\sdk\n" +
728 "set OO_SDK_HOME=" + oo_sdk_home
+
730 "REM Office installation directory.\n" +
731 "REM Example: set OFFICE_HOME=C:\\Program Files\\LibreOffice 3\n" +
732 "set OFFICE_HOME=" + office_home
+
734 "REM URE installation directory.\n" +
735 "REM Example: set OO_SDK_URE_HOME=C:\\Program Files\\LibreOffice 3\\URE\n" +
736 "set OO_SDK_URE_HOME=" + oo_sdk_ure_home
+
738 "REM Directory of the make command.\n" +
739 "REM Example: set OO_SDK_MAKE_HOME=D:\\NextGenerationMake\\make\n" +
740 "set OO_SDK_MAKE_HOME=" + oo_sdk_make_home
+
742 "REM Directory of the zip tool.\n" +
743 "REM Example: set OO_SDK_ZIP_HOME=D:\\infozip\\bin\n" +
744 "set OO_SDK_ZIP_HOME=" + oo_sdk_zip_home
+
746 "REM Directory of the C++ compiler.\n" +
747 "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" +
748 "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home
+
749 "\nset CPP_MANIFEST=" + oo_sdk_manifest_used
+
750 "\nset CPP_WINDOWS_SDK=" + oo_sdk_windowssdk
+
752 "REM Directory of the C# and VB.NET compilers.\n" +
753 "REM Example:set OO_SDK_CLI_HOME=C:\\WINXP\\Microsoft.NET\\Framework\\v1.0.3705\n" +
754 "set OO_SDK_CLI_HOME=" + oo_sdk_cli_home
+
756 "REM Java SDK installation directory.\n" +
757 "REM Example: set OO_SDK_JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_05\n" +
758 "set OO_SDK_JAVA_HOME=" + oo_sdk_java_home
+
760 "REM Special output directory\n" +
761 "REM Example: set OO_SDK_OUT=C:\\" + oo_sdk_name
+ "\n" +
762 "set OO_SDK_OUT=" + oo_sdk_out
+
764 "REM Automatic deployment\n" +
765 "REM Example: set SDK_AUTO_DEPLOYMENT=YES\n" +
766 "set SDK_AUTO_DEPLOYMENT=" + sdk_auto_deployment
+
768 "REM Check installation path for the Office Development Kit.\n" +
769 "if not defined OO_SDK_HOME (\n" +
770 " echo Error: the variable OO_SDK_HOME is missing!\n" +
774 "REM Check installation path for the office.\n" +
775 "REM if not defined OFFICE_HOME (\n" +
776 "REM if not defined OO_SDK_URE_HOME (\n" +
777 "REM echo Error: either of the variables OFFICE_HOME and\n" +
778 "REM echo OO_SDK_URE_HOME is missing!\n" +
779 "REM goto :error\n" +
783 "REM Check installation path for GNU make.\n" +
784 "if not defined OO_SDK_MAKE_HOME (\n" +
785 " echo Error: the variable OO_SDK_MAKE_HOME is missing!\n" +
789 "REM Check installation path for the zip tool.\n" +
790 "if not defined OO_SDK_ZIP_HOME (\n" +
791 " echo Error: the variable OO_SDK_ZIP_HOME is missing!\n" +
795 "REM Set library path. \n" +
796 "set LIB=%OO_SDK_HOME%\\lib;%LIB%\n" +
797 "if defined CPP_WINDOWS_SDK (\n" +
798 " set LIB=%LIB%;%CPP_WINDOWS_SDK%\\lib\n" +
801 "REM Set office program path.\n" +
802 "if defined OFFICE_HOME (\n" +
803 " set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\\program\n" +
806 "REM Set UNO path, necessary to ensure that the cpp examples using the\n" +
807 "REM new UNO bootstrap mechanism use the configured office installation\n" +
808 "REM (only set when using an Office).\n" +
809 "if defined OFFICE_HOME (\n" +
810 " set UNO_PATH=%OFFICE_PROGRAM_PATH%\n" +
813 "REM if defined OO_SDK_URE_HOME (\n" +
814 "set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\\bin\n" +
815 "set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\\bin\n" +
816 "set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\\java\n" +
818 "set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%\n" +
819 "set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%\n" +
820 "set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\\classes\n" +
823 "REM Set classpath\n" +
824 "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" +
825 "REM if defined OFFICE_HOME (\n" +
826 "REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
829 "REM Add directory of the SDK tools to the path.\n" +
830 "set PATH=%OO_SDK_HOME%\\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
832 "REM Set PATH appropriate to the output directory\n" +
833 "if defined OO_SDK_OUT (\n" +
834 " set PATH=%OO_SDK_OUT%\\WINexample.out\\bin;%PATH%\n" +
836 " set PATH=%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
839 "REM Add directory of the command make to the path, if necessary.\n" +
840 "if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%\n" +
842 "REM Add directory of the zip tool to the path, if necessary.\n" +
843 "if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" +
845 "REM Add directory of the C++ compiler to the path, if necessary.\n" +
846 "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" +
848 "REM Add directory of the Win SDK to the path, if necessary.\n" +
849 "if defined CPP_WINDOWS_SDK (\n" +
850 " set PATH=%CPP_WINDOWS_SDK%\\bin;%PATH%\n" +
851 " set INCLUDE=%CPP_WINDOWS_SDK%\\Include;%INCLUDE%\n" +
853 "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" +
854 "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" +
856 "REM Add directory of the Java tools to the path, if necessary.\n" +
857 "if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\\bin;%OO_SDK_JAVA_HOME%\\jre\\bin;%PATH%\n" +
859 "REM Set environment for C++ compiler tools, if necessary.\n" +
860 "if defined OO_SDK_CPP_HOME call \"%OO_SDK_CPP_HOME%\\VCVARS32.bat\"\n" +
862 "REM Set tilte to identify the prepared shell.\n" +
863 "title Shell prepared for SDK\n" +
864 "\nREM Prepare shell with all necessary environment variables.\n" +
866 "echo ******************************************************************\n" +
868 "echo * SDK environment is prepared for Windows\n" +
870 "echo * SDK = %OO_SDK_HOME%\n" +
871 "echo * Office = %OFFICE_HOME%\n" +
872 "echo * URE = %OO_SDK_URE_HOME%\n" +
873 "echo * Make = %OO_SDK_MAKE_HOME%\n" +
874 "echo * Zip = %OO_SDK_ZIP_HOME%\n" +
875 "echo * C++ Compiler = %OO_SDK_CPP_HOME%\n" +
876 "echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%\n" +
877 "echo * Java = %OO_SDK_JAVA_HOME%\n" +
878 "echo * Special Output directory = %OO_SDK_OUT%\n" +
879 "echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%\n" +
881 "echo ******************************************************************\n" +
886 "Error: Please insert the necessary environment variables into the batch file.\n" +