2 // This file is part of the LibreOffice project.
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 // This file incorporates work covered by the following license notice:
10 // Licensed to the Apache Software Foundation (ASF) under one or more
11 // contributor license agreements. See the NOTICE file distributed
12 // with this work for additional information regarding copyright
13 // ownership. The ASF licenses this file to you under the Apache
14 // License, Version 2.0 (the "License"); you may not use this file
15 // except in compliance with the License. You may obtain a copy of
16 // the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 // This script asks for variables, which are necessary for building the
19 // examples of the Office Development Kit. The script duplicates the template
20 // script and inserts the variables into the copied script.
21 // The Script was developed for the operating systems Microsoft Windows.
22 var regKeyOfficeCurrentUser
= "HKEY_CURRENT_USER\\Software\\LibreOffice\\UNO\\InstallPath\\";
23 var regKeyOfficeLocaleMachine
= "HKEY_LOCAL_MACHINE\\Software\\LibreOffice\\UNO\\InstallPath\\";
24 var regKeyDotNetInstallRoot
= "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\InstallRoot";
25 var regKeyDotNet1_1
= "HKLM\\Software\\Microsoft\\.NETFramework\\policy\\v1.1\\4322";
26 var sDirDotNet1_1
= "v1.1.4322";
27 var regKeyDotNet2_0
= "HKLM\\Software\\Microsoft\\.NETFramework\\Policy\\v2.0\\50727";
28 var sDirDotNet2_0
= "v2.0.50727";
30 var regKeyJDK
= "HKLM\\Software\\JavaSoft\\Java Development Kit\\";
31 //var regKeyVC70 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir";
32 //var regKeyVC71 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir";
33 var regKeyVC90
= "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir";
35 //var regKeyVCExpress80 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\8.0\\Setup\\VC\\ProductDir";
36 var regKeyVCExpress90
= "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir";
38 var regKeyWindowsSDK
= "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\CurrentInstallFolder";
40 var WshShell
= WScript
.CreateObject("WScript.Shell");
41 var WshSysEnv
= WshShell
.Environment("process");
42 var aFileSystemObject
= new ActiveXObject("Scripting.FileSystemObject");
43 var stdin
= WScript
.StdIn
;
44 var stdout
= WScript
.StdOut
;
46 stdout
.WriteLine("\n" +
47 " *** Configure your SDK environment ***\n\n" +
48 " NOTE: This script is working only for Windows 2000, Windows XP or newer versions!\n");
50 var oo_sdk_name
=WshSysEnv("OO_SDK_NAME");
51 var oo_sdk_home
=getSdkHome();
52 var oo_user_sdk_dir
=WshSysEnv("APPDATA") + "\\" + oo_sdk_name
;
53 var oo_user_sdk_env_script
=oo_user_sdk_dir
+ "\\setsdkenv_windows.bat";
55 var office_home
=getOfficeHome();
56 var oo_sdk_ure_home
=office_home
+ "\\URE";
58 var oo_sdk_make_home
=getMakeHome();
59 var oo_sdk_zip_home
=getZipHome();
60 var oo_sdk_manifest_used
="";
61 var oo_sdk_windowssdk
="";
62 var oo_sdk_cpp_home
=getCppHome();
63 var oo_sdk_cli_home
=getCliHome();
64 var oo_sdk_java_home
=getJavaHome();
65 var oo_sdk_out
=getOutputDir();
66 var sdk_auto_deployment
=getAutoDeployment();
68 writeBatFile(oo_user_sdk_dir
, oo_user_sdk_env_script
);
71 "\n ******************************************************************\n" +
72 " * ... \"" + oo_user_sdk_env_script
+ "\"\n" +
73 " * batch file has been prepared.\n" +
74 " * This batch file will be used in the future to prepare your\n" +
75 " * personal configured SDK environment.\n" +
76 " ******************************************************************\n\n");
77 // " * For each time you want to use this configured SDK environment,\n" +
78 // " * you have to run the \"setsdkenv_windows.bat\" file in a new shell!\n" +
80 // done -------------------------------------------------------------------------
83 function skipChoice(msg
)
85 stdout
.Write("\n Do you want to skip the choice of " + msg
+ " (YES/NO) [YES]:");
86 var sChoice
= stdin
.ReadLine();
87 if (sChoice
== "" || sChoice
.toLowerCase() == "yes")
95 var sSuggestedHome
= WshSysEnv("OO_SDK_HOME");
96 if (sSuggestedHome
.length
== 0) {
97 var scriptname
= WScript
.ScriptFullName
;
98 sSuggestedHome
= scriptname
.substr(0,scriptname
.length
-10);
103 stdout
.Write("\n Enter the Office Software Development Kit directory [" +
104 sSuggestedHome
+ "]:");
105 var sHome
= stdin
.ReadLine();
106 if (sHome
.length
== 0)
108 //No user input, use default.
109 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
111 stdout
.WriteLine("\n Error: Could not find directory \"" +
112 sSuggestedHome
+ "\". An SDK is required, please" +
113 " specify the path to a valid installation.");
116 sHome
= sSuggestedHome
;
120 //validate the user input
121 if ( ! aFileSystemObject
.FolderExists(sHome
))
123 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
124 "\" does not exist. Please enter the path to a" +
125 "valid SDK installation.");
129 //Check if this is an sdk folder by looking for the idl sub - dir
130 var idlDir
= sHome
+ "\\idl";
131 if (! aFileSystemObject
.FolderExists(idlDir
))
133 stdout
.WriteLine("\n Error: Could not find directory \"" +
134 idlDir
+ "\". An SDK is required, please specify " +
135 "the path to a valid SDK installation.");
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")) {
225 function getMakeHome()
227 var sSuggestedHome
= WshSysEnv("OO_SDK_MAKE_HOME");
231 stdout
.Write("\n Enter GNU make (3.79.1 or higher) tools directory [" +
232 sSuggestedHome
+ "]:");
233 var sHome
= stdin
.ReadLine();
234 if (sHome
.length
== 0)
236 //No user input, use default.
237 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
239 stdout
.WriteLine("\n Error: Could not find directory \"" +
240 sSuggestedHome
+ "\". GNU make is required, " +
241 "please specify a GNU make tools directory.");
245 sHome
= sSuggestedHome
;
248 //validate the user input
249 if ( ! aFileSystemObject
.FolderExists(sHome
))
251 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
252 "\" does not exist. GNU make is required, " +
253 "please specify a GNU make tools directory.");
257 //Check for the make executable
258 var sMakePath
= sHome
+ "\\make.exe";
259 if (! aFileSystemObject
.FileExists(sMakePath
))
261 sMakePath
= sHome
+ "\\mingw32-make.exe";
263 if (! aFileSystemObject
.FileExists(sMakePath
))
265 stdout
.WriteLine("\n Error: Could not find \"" + sMakePath
+
266 "\". GNU make is required, please specify a GNU " +
267 "make tools directory.");
274 function getZipHome()
276 var sSuggestedHome
= WshSysEnv("OO_SDK_ZIP_HOME");
280 stdout
.Write("\n Enter a zip (2.3 or higher) tools directory [" +
281 sSuggestedHome
+ "]:");
282 var sHome
= stdin
.ReadLine();
283 if (sHome
.length
== 0)
285 //No user input, use default.
286 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
288 stdout
.WriteLine("\n Error: Could not find directory \"" +
289 sSuggestedHome
+ "\". zip is required, please " +
290 "specify a zip tools directory.");
294 sHome
= sSuggestedHome
;
298 //validate the user input
299 if ( ! aFileSystemObject
.FolderExists(sHome
))
301 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
302 "\" does not exist. zip is required, please " +
303 "specify a zip tools directory.");
307 //Check for the make executable
308 var sZipPath
= sHome
+ "\\zip.exe";
309 if (! aFileSystemObject
.FileExists(sZipPath
))
311 stdout
.WriteLine("\n Error: Could not find \"" + sZipPath
+
312 "\". zip is required, please specify a zip tools " +
320 function getCppHome()
322 var sSuggestedHome
= WshSysEnv("OO_SDK_CPP_HOME");
323 if (sSuggestedHome
.length
== 0)
327 sVC
= WshShell
.RegRead(regKeyVCExpress90
);
332 sVC
= WshShell
.RegRead(regKeyVC90
);
335 // check Windows SDK if VC 9
338 oo_sdk_manifest_used
="true";
340 oo_sdk_windowssdk
= WshShell
.RegRead(regKeyWindowsSDK
);
346 sVC
= WshShell
.RegRead(regKeyVCExpress80
);
349 oo_sdk_manifest_used
="true";
354 sVC
= WshShell
.RegRead(regKeyVC80
);
357 oo_sdk_manifest_used
="true";
362 sVC
= WshShell
.RegRead(regKeyVC71
);
368 if (aFileSystemObject
.FileExists(sVC
+ "\\cl.exe"))
369 sSuggestedHome
= sVC
;
376 stdout
.Write("\n Enter the directory of the C++ compiler (optional) [" +
377 sSuggestedHome
+ "]:");
378 var sHome
= stdin
.ReadLine();
379 if (sHome
.length
== 0)
381 //No user input, check OO_SDK_CPP_HOME or suggested value
382 if ( sSuggestedHome
.length
== 0 ) {
385 if ( !aFileSystemObject
.FolderExists(sSuggestedHome
) )
387 stdout
.WriteLine("\n Error: Could not find directory \"" +
388 sSuggestedHome
+ "\".");
394 sHome
= sSuggestedHome
;
397 //validate the user input
398 if ( ! aFileSystemObject
.FolderExists(sHome
))
400 stdout
.WriteLine("\n Error: Could not find directory \"" +
407 //Check if the C++ compiler exist
408 var cl
= sHome
+ "\\cl.exe";
409 var mt
= sHome
+ "\\mt.exe";
411 if (! aFileSystemObject
.FileExists(cl
))
413 stdout
.WriteLine("\n Error: Could not find the C++ compiler \""
418 if (aFileSystemObject
.FileExists(mt
)) {
419 oo_sdk_vc8_used
="true";
425 if ( skipChoice("the C++ compiler") ) {
437 function getCliHome()
439 var sSuggestedHome
= WshSysEnv("OO_SDK_CLI_HOME");
441 if (sSuggestedHome
.length
== 0)
444 var _ver
= WshShell
.RegRead(regKeyDotNet2_0
);
447 sSuggestedHome
= WshShell
.RegRead(regKeyDotNetInstallRoot
);
448 sSuggestedHome
+= sDirDotNet2_0
;
449 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
453 if (sSuggestedHome
.length
== 0)
455 _ver
= WshShell
.RegRead(regKeyDotNet1_1
);
458 sSuggestedHome
= WshShell
.RegRead(regKeyDotNetInstallRoot
);
459 sSuggestedHome
+= sDirDotNet1_1
;
460 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
))
470 stdout
.Write("\n Enter the directory of the C# and VB.NET compilers (optional) [" + sSuggestedHome
+ "]:");
471 var sHome
= stdin
.ReadLine();
472 if (sHome
.length
== 0)
474 //No user input, check OO_SDK_CLI_HOME or suggested value
475 if ( sSuggestedHome
.length
== 0 ) {
478 if ( !aFileSystemObject
.FolderExists(sSuggestedHome
) )
480 stdout
.WriteLine("\n Error: Could not find directory \"" +
481 sSuggestedHome
+ "\".");
487 sHome
= sSuggestedHome
;
491 //validate the user input
492 if ( ! aFileSystemObject
.FolderExists(sHome
))
494 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
495 "\" does not exist.");
501 //Check if the C# and VB.NET compiler exist
502 var csc
= sHome
+ "\\csc.exe";
503 var vbc
= sHome
+ "\\vbc.exe";
505 if (! aFileSystemObject
.FileExists(csc
))
507 stdout
.WriteLine("\n Error: Could not find the C# compiler \"" +
511 if (! aFileSystemObject
.FileExists(vbc
))
513 stdout
.WriteLine("\n Error: Could not find the VB.NET compiler \"" +
520 if ( skipChoice("the C# and VB.NET compilers") ) {
532 function getJavaHome()
534 var sSuggestedHome
= WshSysEnv("OO_SDK_JAVA_HOME");
535 if (sSuggestedHome
.length
== 0)
538 var currentVersion
= WshShell
.RegRead(regKeyJDK
+ "CurrentVersion");
539 if (currentVersion
.length
> 0)
541 sSuggestedHome
= WshShell
.RegRead(regKeyJDK
+ currentVersion
+
543 if ( ! aFileSystemObject
.FolderExists(sSuggestedHome
) )
552 stdout
.Write("\n Enter JAVA SDK (1.4.1_01 or higher) installation directory (optional) [" + sSuggestedHome
+ "]:");
553 var sHome
= stdin
.ReadLine();
554 if (sHome
.length
== 0)
556 //No user input, check OO_SDK_JAVA_HOME or suggested value
557 if ( sSuggestedHome
.length
== 0 ) {
560 if ( !aFileSystemObject
.FolderExists(sSuggestedHome
) )
562 stdout
.WriteLine("\n Error: Could not find directory \"" +
563 sSuggestedHome
+ "\".");
569 sHome
= sSuggestedHome
;
572 //validate the user input
573 if ( ! aFileSystemObject
.FolderExists(sHome
))
575 stdout
.WriteLine("\n Error: The directory \"" + sHome
+
576 "\" does not exist.");
582 //Check if this is an sdk folder by looking for the javac compiler
583 var javacompiler
= sHome
+ "\\bin\\javac.exe";
584 if (! aFileSystemObject
.FileExists(javacompiler
))
586 stdout
.WriteLine("\n Error: Could not find \"" +
587 javacompiler
+ "\".");
593 if ( skipChoice("the Java SDK") ) {
605 function getOutputDir()
607 var defaultdir
= "c:\\" + oo_sdk_name
;
608 var sSuggestedDir
= WshSysEnv("OO_SDK_OUT");
609 if (sSuggestedDir
.length
== 0)
610 sSuggestedDir
= defaultdir
;
616 "\n Default output directory is the \"c:\\" + oo_sdk_name
+ "\".\n" +
617 " Enter an existent directory if you prefer a different one. But note" +
618 " that only\n a path without spaces is allowed because of a" +
619 " limitation of gnu make. (optional) [" + sSuggestedDir
+ "]:");
620 var sDir
= stdin
.ReadLine();
621 if (sDir
.length
== 0)
623 //No user input, check OO_SDK_OUT or suggested value
624 if ( sSuggestedDir
.length
== 0 ) {
627 if (sSuggestedDir
== oo_user_sdk_dir
|| sSuggestedDir
== defaultdir
) {
628 var fso
= new ActiveXObject("Scripting.FileSystemObject");
629 if ( !fso
.FolderExists(sSuggestedDir
) )
630 fso
.CreateFolder(sSuggestedDir
);
632 if ( !aFileSystemObject
.FolderExists(sSuggestedDir
) )
634 stdout
.WriteLine("\n Error: Could not find directory \"" +
635 sSuggestedDir
+ "\".");
641 sDir
= sSuggestedDir
;
645 if (sDir
.indexOf(' ') != -1) {
646 stdout
.WriteLine("\n Error: your specified output directory " +
647 "\"" + sDir
+ "\" " +
648 "contains one or more spaces.\n That " +
649 "causes problems with gnu make. Please specifiy" +
650 " a directory without spaces.");
653 //validate the user input
654 if ( ! aFileSystemObject
.FolderExists(sDir
))
656 stdout
.WriteLine("\n Error: Could not find directory \"" +
663 if ( skipChoice("a special output directory") ) {
675 function getAutoDeployment()
677 var sSuggestedAuto
= WshSysEnv("SDK_AUTO_DEPLOYMENT");
678 if (sSuggestedAuto
.length
== 0)
679 sSuggestedAuto
= "YES";
683 stdout
.Write("\n Automatic deployment of UNO components (YES/NO) ["+
684 sSuggestedAuto
+ "]:");
685 var sAuto
= stdin
.ReadLine();
686 if (sAuto
.length
== 0)
687 sAuto
= sSuggestedAuto
;
690 sAutoU
= sAuto
.toUpperCase();
691 if (sAutoU
!= "YES" && sAutoU
!= "NO")
693 stdout
.WriteLine("\n Error: The value \"" + sAuto
+ "\" is " +
694 "invalid. Please answer YES or NO.")
703 //The function uses sp2bv.exe to obtain a file URL from a
704 //system path. The URL is already escaped for use as bootstrap variable.
705 //($ -> \$). Then the resulting string is escaped for use in a bat file.
706 //That is % signs are made to double % (% -> %%);
707 function makeBootstrapFileUrl(systemPath
)
709 var oExec
= WshShell
.Exec("sp2bv.exe \"" + systemPath
+ "\"");
713 if (!oExec
.StdOut
.AtEndOfStream
)
715 var next
= oExec
.StdOut
.Read(1);
727 function writeBatFile(fdir
, file
)
729 var fso
= new ActiveXObject("Scripting.FileSystemObject");
730 if ( !fso
.FolderExists(fdir
) )
731 fso
.CreateFolder(fdir
);
732 var newFile
= fso
.CreateTextFile(file
, true);
736 "REM This script sets all enviroment variables, which\n" +
737 "REM are necessary for building the examples of the Office Development Kit.\n" +
738 "REM The Script was developed for the operating systems Windows.\n" +
739 "REM The SDK name\n" +
740 "REM Example: set OO_SDK_NAME=libreoffice3.4_sdk\n" +
741 "set OO_SDK_NAME=" + oo_sdk_name
+
743 "REM Installation directory of the Software Development Kit.\n" +
744 "REM Example: set OO_SDK_HOME=C:\\Program Files\\LibreOffice 3\\sdk\n" +
745 "set OO_SDK_HOME=" + oo_sdk_home
+
747 "REM Office installation directory.\n" +
748 "REM Example: set OFFICE_HOME=C:\\Program Files\\LibreOffice 3\n" +
749 "set OFFICE_HOME=" + office_home
+
751 "REM URE installation directory.\n" +
752 "REM Example: set OO_SDK_URE_HOME=C:\\Program Files\\LibreOffice 3\\URE\n" +
753 "set OO_SDK_URE_HOME=" + oo_sdk_ure_home
+
755 "REM Directory of the make command.\n" +
756 "REM Example: set OO_SDK_MAKE_HOME=D:\\NextGenerationMake\\make\n" +
757 "set OO_SDK_MAKE_HOME=" + oo_sdk_make_home
+
759 "REM Directory of the zip tool.\n" +
760 "REM Example: set OO_SDK_ZIP_HOME=D:\\infozip\\bin\n" +
761 "set OO_SDK_ZIP_HOME=" + oo_sdk_zip_home
+
763 "REM Directory of the C++ compiler.\n" +
764 "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" +
765 "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home
+
766 "\nset CPP_MANIFEST=" + oo_sdk_manifest_used
+
767 "\nset CPP_WINDOWS_SDK=" + oo_sdk_windowssdk
+
769 "REM Directory of the C# and VB.NET compilers.\n" +
770 "REM Example:set OO_SDK_CLI_HOME=C:\\WINXP\\Microsoft.NET\\Framework\\v1.0.3705\n" +
771 "set OO_SDK_CLI_HOME=" + oo_sdk_cli_home
+
773 "REM Java SDK installation directory.\n" +
774 "REM Example: set OO_SDK_JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_05\n" +
775 "set OO_SDK_JAVA_HOME=" + oo_sdk_java_home
+
777 "REM Special output directory\n" +
778 "REM Example: set OO_SDK_OUT=C:\\" + oo_sdk_name
+ "\n" +
779 "set OO_SDK_OUT=" + oo_sdk_out
+
781 "REM Automatic deployment\n" +
782 "REM Example: set SDK_AUTO_DEPLOYMENT=YES\n" +
783 "set SDK_AUTO_DEPLOYMENT=" + sdk_auto_deployment
+
785 "REM Check installation path for the Office Development Kit.\n" +
786 "if not defined OO_SDK_HOME (\n" +
787 " echo Error: the variable OO_SDK_HOME is missing!\n" +
791 "REM Check installation path for the office.\n" +
792 "REM if not defined OFFICE_HOME (\n" +
793 "REM if not defined OO_SDK_URE_HOME (\n" +
794 "REM echo Error: either of the variables OFFICE_HOME and\n" +
795 "REM echo OO_SDK_URE_HOME is missing!\n" +
796 "REM goto :error\n" +
800 "REM Check installation path for GNU make.\n" +
801 "if not defined OO_SDK_MAKE_HOME (\n" +
802 " echo Error: the variable OO_SDK_MAKE_HOME is missing!\n" +
806 "REM Check installation path for the zip tool.\n" +
807 "if not defined OO_SDK_ZIP_HOME (\n" +
808 " echo Error: the variable OO_SDK_ZIP_HOME is missing!\n" +
812 "REM Set library path. \n" +
813 "set LIB=%OO_SDK_HOME%\\lib;%LIB%\n" +
814 "if defined CPP_WINDOWS_SDK (\n" +
815 " set LIB=%LIB%;%CPP_WINDOWS_SDK%\\lib\n" +
818 "REM Set office program path.\n" +
819 "if defined OFFICE_HOME (\n" +
820 " set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\\program\n" +
823 "REM Set UNO path, necessary to ensure that the cpp examples using the\n" +
824 "REM new UNO bootstrap mechanism use the configured office installation\n" +
825 "REM (only set when using an Office).\n" +
826 "if defined OFFICE_HOME (\n" +
827 " set UNO_PATH=%OFFICE_PROGRAM_PATH%\n" +
830 "REM if defined OO_SDK_URE_HOME (\n" +
831 "set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\\bin\n" +
832 "set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\\bin\n" +
833 "set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\\java\n" +
835 "set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%\n" +
836 "set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%\n" +
837 "set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\\classes\n" +
840 "REM Set classpath\n" +
841 "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" +
842 "REM if defined OFFICE_HOME (\n" +
843 "REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
846 "REM Add directory of the SDK tools to the path.\n" +
847 "set PATH=%OO_SDK_HOME%\\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
849 "REM Set PATH appropriate to the output directory\n" +
850 "if defined OO_SDK_OUT (\n" +
851 " set PATH=%OO_SDK_OUT%\\WINexample.out\\bin;%PATH%\n" +
853 " set PATH=%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
856 "REM Add directory of the command make to the path, if necessary.\n" +
857 "if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%\n" +
859 "REM Add directory of the zip tool to the path, if necessary.\n" +
860 "if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" +
862 "REM Add directory of the C++ compiler to the path, if necessary.\n" +
863 "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" +
865 "REM Add directory of the Win SDK to the path, if necessary.\n" +
866 "if defined CPP_WINDOWS_SDK (\n" +
867 " set PATH=%CPP_WINDOWS_SDK%\\bin;%PATH%\n" +
868 " set INCLUDE=%CPP_WINDOWS_SDK%\\Include;%INCLUDE%\n" +
870 "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" +
871 "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" +
873 "REM Add directory of the Java tools to the path, if necessary.\n" +
874 "if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\\bin;%OO_SDK_JAVA_HOME%\\jre\\bin;%PATH%\n" +
876 "REM Set environment for C++ compiler tools, if necessary.\n" +
877 "if defined OO_SDK_CPP_HOME call \"%OO_SDK_CPP_HOME%\\VCVARS32.bat\"\n" +
879 "REM Set tilte to identify the prepared shell.\n" +
880 "title Shell prepared for SDK\n" +
881 "\nREM Prepare shell with all necessary environment variables.\n" +
883 "echo ******************************************************************\n" +
885 "echo * SDK environment is prepared for Windows\n" +
887 "echo * SDK = %OO_SDK_HOME%\n" +
888 "echo * Office = %OFFICE_HOME%\n" +
889 "echo * URE = %OO_SDK_URE_HOME%\n" +
890 "echo * Make = %OO_SDK_MAKE_HOME%\n" +
891 "echo * Zip = %OO_SDK_ZIP_HOME%\n" +
892 "echo * C++ Compiler = %OO_SDK_CPP_HOME%\n" +
893 "echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%\n" +
894 "echo * Java = %OO_SDK_JAVA_HOME%\n" +
895 "echo * Special Output directory = %OO_SDK_OUT%\n" +
896 "echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%\n" +
898 "echo ******************************************************************\n" +
903 "Error: Please insert the necessary environment variables into the batch file.\n" +