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\\OpenOffice.org\\UNO\\InstallPath\\";
6 var regKeyOfficeLocaleMachine = "HKEY_LOCAL_MACHINE\\Software\\OpenOffice.org\\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");
35 var oo_sdk_home=getSdkHome();
36 var oo_user_sdk_dir=WshSysEnv("APPDATA") + "\\" + oo_sdk_name;
37 var oo_user_sdk_env_script=oo_user_sdk_dir + "\\setsdkenv_windows.bat";
39 var office_home=getOfficeHome();
40 var office_base_home=getOfficeBaseHome();
41 var oo_sdk_ure_home=getUreHome();
43 var oo_sdk_make_home=getMakeHome();
44 var oo_sdk_zip_home=getZipHome();
45 var oo_sdk_vc8_used="";
46 var oo_sdk_windowssdk="";
47 var oo_sdk_cpp_home=getCppHome();
48 var oo_sdk_cli_home=getCliHome();
49 var oo_sdk_java_home=getJavaHome();
50 var oo_sdk_out=getOutputDir();
51 var sdk_auto_deployment=getAutoDeployment();
53 writeBatFile(oo_user_sdk_dir, oo_user_sdk_env_script);
56 "\n ******************************************************************\n" +
57 " * ... \"" + oo_user_sdk_env_script + "\"\n" +
58 " * batch file has been prepared.\n" +
59 " * This batch file will be used in the future to prepare your\n" +
60 " * personal configured SDK environment.\n" +
61 " ******************************************************************\n\n");
62 // " * For each time you want to use this configured SDK environment,\n" +
63 // " * you have to run the \"setsdkenv_windows.bat\" file in a new shell!\n" +
65 // done -------------------------------------------------------------------------
68 function skipChoice(msg)
70 stdout.Write("\n Do you want to skip the choice of " + msg + " (YES/NO) [YES]:");
71 var sChoice = stdin.ReadLine();
72 if (sChoice == "" || sChoice.toLowerCase() == "yes")
80 var sSuggestedHome = WshSysEnv("OO_SDK_HOME");
81 if (sSuggestedHome.length == 0) {
82 var scriptname = WScript.ScriptFullName;
83 sSuggestedHome = scriptname.substr(0,scriptname.length-10);
88 stdout.Write("\n Enter the Office Software Development Kit directory [" +
89 sSuggestedHome + "]:");
90 var sHome = stdin.ReadLine();
91 if (sHome.length == 0)
93 //No user input, use default.
94 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
96 stdout.WriteLine("\n Error: Could not find directory \"" +
97 sSuggestedHome + "\". An SDK is required, please" +
98 " specify the path to a valid installation.");
101 sHome = sSuggestedHome;
105 //validate the user input
106 if ( ! aFileSystemObject.FolderExists(sHome))
108 stdout.WriteLine("\n Error: The directory \"" + sHome +
109 "\" does not exist. Please enter the path to a" +
110 "valid SDK installation.");
114 //Check if this is an sdk folder by looking for the idl sub - dir
115 var idlDir = sHome + "\\idl";
116 if (! aFileSystemObject.FolderExists(idlDir))
118 stdout.WriteLine("\n Error: Could not find directory \"" +
119 idlDir + "\". An SDK is required, please specify " +
120 "the path to a valid SDK installation.");
124 if (aFileSystemObject.FileExists(sHome + "\\lib\\stlport_vc71_stldebug.lib")) {
125 stldebug="_stldebug";
132 function getOfficeOrUre()
134 var suggestion = "Office";
136 while (choice != "office" && choice != "ure") {
138 "\n Use an installed Office or an installed UNO Runtime"
139 + " Environment (Office/URE) [" + suggestion + "]:");
140 choice = stdin.ReadLine();
144 choice = choice.toLowerCase();
149 function getOfficeHome()
151 var sSuggestedHome = WshSysEnv("OFFICE_HOME");
152 if (sSuggestedHome.length == 0)
155 sSuggestedHome = WshShell.RegRead(regKeyOfficeCurrentUser);
156 //The registry entry points to the program folder but we need the
157 //installation folder
159 if (sSuggestedHome.length == 0)
162 sSuggestedHome = WshShell.RegRead(regKeyOfficeLocaleMachine);
163 //The registry entry points to the program folder but we need
164 //the installation folder
169 if ((index = sSuggestedHome.lastIndexOf("\\")) != -1)
170 sSuggestedHome = sSuggestedHome.substr(0, index);
172 if (sSuggestedHome.length == 0)
173 sSuggestedHome = searchOffice();
178 stdout.Write("\n Enter the Office base installation directory [" +
179 sSuggestedHome + "]:");
180 var sHome = stdin.ReadLine();
181 if (sHome.length == 0)
183 //No user input, use default.
184 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
186 stdout.WriteLine("\n Error: Could not find directory \"" +
187 sSuggestedHome + "\" An office installation is " +
188 "required, please specify the path to a valid " +
189 "office installation.");
193 sHome = sSuggestedHome;
196 //validate the user input
197 if ( ! aFileSystemObject.FolderExists(sHome))
199 stdout.WriteLine("\n Error: The directory \"" + sHome +
200 "\" does not exist. Please specify the path to " +
201 "a valid office installation.");
205 //Check if this is a valid office installtion folder by looking for the
206 //program sub-directory
207 var progDir = sHome + "\\program";
208 if (! aFileSystemObject.FolderExists(progDir))
210 stdout.WriteLine("\n Error: Could not find directory \"" +
211 progDir + "\". An office installation is required, " +
212 "please specify the path to a valid office " +
220 function searchOffice()
222 var tmp = oo_sdk_home;
226 if ((index = tmp.lastIndexOf("\\Basis")) != -1) {
227 tmp = tmp.substr(0, index);
230 if (aFileSystemObject.FileExists(tmp + "\\program\\soffice.exe")) {
238 function getOfficeBaseHome()
240 var officebase = oo_sdk_home;
241 var index=officebase.lastIndexOf("\\");
243 officebase = officebase.substr(0, index);
248 function getUreHome()
250 var tmpure = oo_sdk_home;
253 if ((index = tmpure.lastIndexOf("Basis")) != -1)
254 tmpure = tmpure.substr(0, index);
256 if (aFileSystemObject.FileExists(tmpure + "\\URE\\bin\\uno.exe")) {
257 ure = tmpure + "\URE";
263 var suggestion = WshSysEnv("OO_SDK_URE_HOME");
267 "\n Enter the URE installation directory [" + suggestion + "]:");
268 choice = stdin.ReadLine();
272 if (aFileSystemObject.FileExists(choice + "\\bin\\uno.exe")) {
275 stdout.WriteLine("\n Error: A valid URE installation is required.");
281 function getMakeHome()
283 var sSuggestedHome = WshSysEnv("OO_SDK_MAKE_HOME");
287 stdout.Write("\n Enter GNU make (3.79.1 or higher) tools directory [" +
288 sSuggestedHome + "]:");
289 var sHome = stdin.ReadLine();
290 if (sHome.length == 0)
292 //No user input, use default.
293 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
295 stdout.WriteLine("\n Error: Could not find directory \"" +
296 sSuggestedHome + "\". GNU make is required, " +
297 "please specify a GNU make tools directory.");
301 sHome = sSuggestedHome;
304 //validate the user input
305 if ( ! aFileSystemObject.FolderExists(sHome))
307 stdout.WriteLine("\n Error: The directory \"" + sHome +
308 "\" does not exist. GNU make is required, " +
309 "please specify a GNU make tools directory.");
313 //Check for the make executable
314 var sMakePath = sHome + "\\make.exe";
315 if (! aFileSystemObject.FileExists(sMakePath))
317 sMakePath = sHome + "\\mingw32-make.exe";
319 if (! aFileSystemObject.FileExists(sMakePath))
321 stdout.WriteLine("\n Error: Could not find \"" + sMakePath +
322 "\". GNU make is required, please specify a GNU " +
323 "make tools directory.");
330 function getZipHome()
332 var sSuggestedHome = WshSysEnv("OO_SDK_ZIP_HOME");
336 stdout.Write("\n Enter a zip (2.3 or higher) tools directory [" +
337 sSuggestedHome + "]:");
338 var sHome = stdin.ReadLine();
339 if (sHome.length == 0)
341 //No user input, use default.
342 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
344 stdout.WriteLine("\n Error: Could not find directory \"" +
345 sSuggestedHome + "\". zip is required, please " +
346 "specify a zip tools directory.");
350 sHome = sSuggestedHome;
354 //validate the user input
355 if ( ! aFileSystemObject.FolderExists(sHome))
357 stdout.WriteLine("\n Error: The directory \"" + sHome +
358 "\" does not exist. zip is required, please " +
359 "specify a zip tools directory.");
363 //Check for the make executable
364 var sZipPath = sHome + "\\zip.exe";
365 if (! aFileSystemObject.FileExists(sZipPath))
367 stdout.WriteLine("\n Error: Could not find \"" + sZipPath +
368 "\". zip is required, please specify a zip tools " +
376 function getCppHome()
378 var sSuggestedHome = WshSysEnv("OO_SDK_CPP_HOME");
379 if (sSuggestedHome.length == 0)
383 sVC = WshShell.RegRead(regKeyVCExpress90);
388 sVC = WshShell.RegRead(regKeyVC90);
391 // check Windows SDK if VC 9
395 oo_sdk_windowssdk = WshShell.RegRead(regKeyWindowsSDK);
401 sVC = WshShell.RegRead(regKeyVCExpress80);
407 sVC = WshShell.RegRead(regKeyVC80);
413 sVC = WshShell.RegRead(regKeyVCExpress80);
419 sVC = WshShell.RegRead(regKeyVC71);
425 if (aFileSystemObject.FileExists(sVC + "\\cl.exe"))
426 sSuggestedHome = sVC;
433 stdout.Write("\n Enter the directory of the C++ compiler (optional) [" +
434 sSuggestedHome + "]:");
435 var sHome = stdin.ReadLine();
436 if (sHome.length == 0)
438 //No user input, check OO_SDK_CPP_HOME or suggested value
439 if ( sSuggestedHome.length == 0 ) {
442 if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
444 stdout.WriteLine("\n Error: Could not find directory \"" +
445 sSuggestedHome + "\".");
451 sHome = sSuggestedHome;
454 //validate the user input
455 if ( ! aFileSystemObject.FolderExists(sHome))
457 stdout.WriteLine("\n Error: Could not find directory \"" +
464 //Check if the C++ compiler exist
465 var cl = sHome + "\\cl.exe";
466 var mt = sHome + "\\mt.exe";
468 if (! aFileSystemObject.FileExists(cl))
470 stdout.WriteLine("\n Error: Could not find the C++ compiler \""
475 if (aFileSystemObject.FileExists(mt)) {
476 oo_sdk_vc8_used="true";
482 if ( skipChoice("the C++ compiler") ) {
494 function getCliHome()
496 var sSuggestedHome = WshSysEnv("OO_SDK_CLI_HOME");
498 if (sSuggestedHome.length == 0)
501 var _ver = WshShell.RegRead(regKeyDotNet2_0);
504 sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
505 sSuggestedHome += sDirDotNet2_0;
506 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
510 if (sSuggestedHome.length == 0)
512 _ver = WshShell.RegRead(regKeyDotNet1_1);
515 sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot);
516 sSuggestedHome += sDirDotNet1_1;
517 if ( ! aFileSystemObject.FolderExists(sSuggestedHome))
527 stdout.Write("\n Enter the directory of the C# and VB.NET compilers (optional) [" + sSuggestedHome + "]:");
528 var sHome = stdin.ReadLine();
529 if (sHome.length == 0)
531 //No user input, check OO_SDK_CLI_HOME or suggested value
532 if ( sSuggestedHome.length == 0 ) {
535 if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
537 stdout.WriteLine("\n Error: Could not find directory \"" +
538 sSuggestedHome + "\".");
544 sHome = sSuggestedHome;
548 //validate the user input
549 if ( ! aFileSystemObject.FolderExists(sHome))
551 stdout.WriteLine("\n Error: The directory \"" + sHome +
552 "\" does not exist.");
558 //Check if the C# and VB.NET compiler exist
559 var csc = sHome + "\\csc.exe";
560 var vbc = sHome + "\\vbc.exe";
562 if (! aFileSystemObject.FileExists(csc))
564 stdout.WriteLine("\n Error: Could not find the C# compiler \"" +
568 if (! aFileSystemObject.FileExists(vbc))
570 stdout.WriteLine("\n Error: Could not find the VB.NET compiler \"" +
577 if ( skipChoice("the C# and VB.NET compilers") ) {
589 function getJavaHome()
591 var sSuggestedHome = WshSysEnv("OO_SDK_JAVA_HOME");
592 if (sSuggestedHome.length == 0)
595 var currentVersion = WshShell.RegRead(regKeyJDK + "CurrentVersion");
596 if (currentVersion.length > 0)
598 sSuggestedHome = WshShell.RegRead(regKeyJDK + currentVersion +
600 if ( ! aFileSystemObject.FolderExists(sSuggestedHome) )
609 stdout.Write("\n Enter JAVA SDK (1.4.1_01 or higher) installation directory (optional) [" + sSuggestedHome + "]:");
610 var sHome = stdin.ReadLine();
611 if (sHome.length == 0)
613 //No user input, check OO_SDK_JAVA_HOME or suggested value
614 if ( sSuggestedHome.length == 0 ) {
617 if ( !aFileSystemObject.FolderExists(sSuggestedHome) )
619 stdout.WriteLine("\n Error: Could not find directory \"" +
620 sSuggestedHome + "\".");
626 sHome = sSuggestedHome;
629 //validate the user input
630 if ( ! aFileSystemObject.FolderExists(sHome))
632 stdout.WriteLine("\n Error: The directory \"" + sHome +
633 "\" does not exist.");
639 //Check if this is an sdk folder by looking for the javac compiler
640 var javacompiler = sHome + "\\bin\\javac.exe";
641 if (! aFileSystemObject.FileExists(javacompiler))
643 stdout.WriteLine("\n Error: Could not find \"" +
644 javacompiler + "\".");
650 if ( skipChoice("the Java SDK") ) {
662 function getOutputDir()
664 var defaultdir = "c:\\" + oo_sdk_name;
665 var sSuggestedDir = WshSysEnv("OO_SDK_OUT");
666 if (sSuggestedDir.length == 0)
667 sSuggestedDir = defaultdir;
673 "\n Default output directory is the \"c:\\" + oo_sdk_name + "\".\n" +
674 " Enter an existent directory if you prefer a different one. But note" +
675 " that only\n a path without spaces is allowed because of a" +
676 " limitation of gnu make. (optional) [" + sSuggestedDir + "]:");
677 var sDir = stdin.ReadLine();
678 if (sDir.length == 0)
680 //No user input, check OO_SDK_OUT or suggested value
681 if ( sSuggestedDir.length == 0 ) {
684 if (sSuggestedDir == oo_user_sdk_dir || sSuggestedDir == defaultdir) {
685 var fso = new ActiveXObject("Scripting.FileSystemObject");
686 if ( !fso.FolderExists(sSuggestedDir) )
687 fso.CreateFolder(sSuggestedDir);
689 if ( !aFileSystemObject.FolderExists(sSuggestedDir) )
691 stdout.WriteLine("\n Error: Could not find directory \"" +
692 sSuggestedDir + "\".");
698 sDir = sSuggestedDir;
702 if (sDir.indexOf(' ') != -1) {
703 stdout.WriteLine("\n Error: your specified output directory " +
704 "\"" + sDir + "\" " +
705 "contains one or more spaces.\n That " +
706 "causes problems with gnu make. Please specifiy" +
707 " a directory without spaces.");
710 //validate the user input
711 if ( ! aFileSystemObject.FolderExists(sDir))
713 stdout.WriteLine("\n Error: Could not find directory \"" +
720 if ( skipChoice("a special output directory") ) {
732 function getAutoDeployment()
734 var sSuggestedAuto = WshSysEnv("SDK_AUTO_DEPLOYMENT");
735 if (sSuggestedAuto.length == 0)
736 sSuggestedAuto = "YES";
740 stdout.Write("\n Automatic deployment of UNO components (YES/NO) ["+
741 sSuggestedAuto + "]:");
742 var sAuto = stdin.ReadLine();
743 if (sAuto.length == 0)
744 sAuto = sSuggestedAuto;
747 sAutoU = sAuto.toUpperCase();
748 if (sAutoU != "YES" && sAutoU != "NO")
750 stdout.WriteLine("\n Error: The value \"" + sAuto + "\" is " +
751 "invalid. Please answer YES or NO.")
760 //The function uses sp2bv.exe to obtain a file URL from a
761 //system path. The URL is already escaped for use as bootstrap variable.
762 //($ -> \$). Then the resulting string is escaped for use in a bat file.
763 //That is % signs are made to double % (% -> %%);
764 function makeBootstrapFileUrl(systemPath)
766 var oExec = WshShell.Exec("sp2bv.exe \"" + systemPath + "\"");
770 if (!oExec.StdOut.AtEndOfStream)
772 var next = oExec.StdOut.Read(1);
784 function writeBatFile(fdir, file)
786 var fso = new ActiveXObject("Scripting.FileSystemObject");
787 if ( !fso.FolderExists(fdir) )
788 fso.CreateFolder(fdir);
789 var newFile = fso.CreateTextFile(file, true);
792 "REM This script sets all enviroment variables, which\n" +
793 "REM are necessary for building the examples of the Office Development Kit.\n" +
794 "REM The Script was developed for the operating systems Windows.\n" +
795 "REM The SDK name\n" +
796 "REM Example: set OO_SDK_NAME=openoffice3.0_sdk\n" +
797 "set OO_SDK_NAME=" + oo_sdk_name +
799 "REM Installation directory of the Software Development Kit.\n" +
800 "REM Example: set OO_SDK_HOME=C:\\Program Files\\OpenOffice.org\\Basic 3.0\\sdk\n" +
801 "set OO_SDK_HOME=" + oo_sdk_home +
803 "REM Office installation directory.\n" +
804 "REM Example: set OFFICE_HOME=C:\\Program Files\\OpenOffice.org 3\n" +
805 "set OFFICE_HOME=" + office_home +
807 "REM Example: set OFFICE_HOME=C:\\Program Files\\OpenOffice.org\\Basis 3.0\n" +
808 "set OFFICE_BASE_HOME=" + office_base_home +
810 "REM URE installation directory.\n" +
811 "REM Example: set OO_SDK_URE_HOME=C:\\Program Files\\OpenOffice.org\\URE\n" +
812 "set OO_SDK_URE_HOME=" + oo_sdk_ure_home +
814 "REM Directory of the make command.\n" +
815 "REM Example: set OO_SDK_MAKE_HOME=D:\\NextGenerationMake\\make\n" +
816 "set OO_SDK_MAKE_HOME=" + oo_sdk_make_home +
818 "REM Directory of the zip tool.\n" +
819 "REM Example: set OO_SDK_ZIP_HOME=D:\\infozip\\bin\n" +
820 "set OO_SDK_ZIP_HOME=" + oo_sdk_zip_home +
822 "REM Directory of the C++ compiler.\n" +
823 "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" +
824 "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home +
825 "\nset CPP_VC8=" + oo_sdk_vc8_used +
826 "\nset CPP_WINDOWS_SDK=" + oo_sdk_windowssdk +
828 "REM Directory of the C# and VB.NET compilers.\n" +
829 "REM Example:set OO_SDK_CLI_HOME=C:\\WINXP\\Microsoft.NET\\Framework\\v1.0.3705\n" +
830 "set OO_SDK_CLI_HOME=" + oo_sdk_cli_home +
832 "REM Java SDK installation directory.\n" +
833 "REM Example: set OO_SDK_JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_05\n" +
834 "set OO_SDK_JAVA_HOME=" + oo_sdk_java_home +
836 "REM Special output directory\n" +
837 "REM Example: set OO_SDK_OUT=C:\\" + oo_sdk_name + "\n" +
838 "set OO_SDK_OUT=" + oo_sdk_out +
840 "REM Automatic deployment\n" +
841 "REM Example: set SDK_AUTO_DEPLOYMENT=YES\n" +
842 "set SDK_AUTO_DEPLOYMENT=" + sdk_auto_deployment +
844 "set STLDEBUG=" + stldebug + "\n" +
845 "REM check stlport lib in 4NT shell\n" +
846 "REM if exist \"%OO_SDK_HOME%\\windows\\lib\\stlport_vc71_stldebug.lib\". (\n" +
847 "REM set STLDEBUG=_stldebug\n" +
849 "REM Check installation path for the StarOffice Development Kit.\n" +
850 "if not defined OO_SDK_HOME (\n" +
851 " echo Error: the variable OO_SDK_HOME is missing!\n" +
855 "REM Check installation path for the office.\n" +
856 "REM if not defined OFFICE_HOME (\n" +
857 "REM if not defined OO_SDK_URE_HOME (\n" +
858 "REM echo Error: either of the variables OFFICE_HOME and\n" +
859 "REM echo OO_SDK_URE_HOME is missing!\n" +
860 "REM goto :error\n" +
864 "REM Check installation path for GNU make.\n" +
865 "if not defined OO_SDK_MAKE_HOME (\n" +
866 " echo Error: the variable OO_SDK_MAKE_HOME is missing!\n" +
870 "REM Check installation path for the zip tool.\n" +
871 "if not defined OO_SDK_ZIP_HOME (\n" +
872 " echo Error: the variable OO_SDK_ZIP_HOME is missing!\n" +
876 "REM Set library path. \n" +
877 "set LIB=%OO_SDK_HOME%\\lib;%LIB%\n" +
878 "if defined CPP_WINDOWS_SDK (\n" +
879 " set LIB=%LIB%;%CPP_WINDOWS_SDK%\\lib\n" +
882 "REM Set office program path.\n" +
883 "if defined OFFICE_HOME (\n" +
884 " set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\\program\n" +
887 "REM Set office program path.\n" +
888 "if defined OFFICE_BASE_HOME (\n" +
889 " set OFFICE_BASE_PROGRAM_PATH=%OFFICE_BASE_HOME%\\program\n" +
892 "REM Set UNO path, necessary to ensure that the cpp examples using the\n" +
893 "REM new UNO bootstrap mechanism use the configured office installation\n" +
894 "REM (only set when using an Office).\n" +
895 "if defined OFFICE_HOME (\n" +
896 " set UNO_PATH=%OFFICE_PROGRAM_PATH%\n" +
899 "REM if defined OO_SDK_URE_HOME (\n" +
900 "set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\\bin\n" +
901 "set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\\bin\n" +
902 "set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\\java\n" +
904 "set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%\n" +
905 "set OO_SDK_OFFICE_LIB_DIR=%OFFICE_BASE_PROGRAM_PATH%\n" +
906 "set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_BASE_PROGRAM_PATH%\\classes\n" +
909 "REM Set classpath\n" +
910 "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" +
911 "REM if defined OFFICE_HOME (\n" +
912 "REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" +
915 "REM Add directory of the SDK tools to the path.\n" +
916 "set PATH=%OO_SDK_HOME%\\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
918 "REM Set PATH appropriate to the output directory\n" +
919 "if defined OO_SDK_OUT (\n" +
920 " set PATH=%OO_SDK_OUT%\\WINexample.out\\bin;%PATH%\n" +
922 " set PATH=%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" +
925 "REM Add directory of the command make to the path, if necessary.\n" +
926 "if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%\n" +
928 "REM Add directory of the zip tool to the path, if necessary.\n" +
929 "if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" +
931 "REM Add directory of the C++ compiler to the path, if necessary.\n" +
932 "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" +
934 "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" +
935 "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" +
937 "REM Add directory of the Java tools to the path, if necessary.\n" +
938 "if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\\bin;%OO_SDK_JAVA_HOME%\\jre\\bin;%PATH%\n" +
940 "REM Set environment for C++ compiler tools, if necessary.\n" +
941 "if defined OO_SDK_CPP_HOME call \"%OO_SDK_CPP_HOME%\\VCVARS32.bat\"\n" +
943 "REM Set tilte to identify the prepared shell.\n" +
944 "title Shell prepared for SDK\n" +
945 "\nREM Prepare shell with all necessary environment variables.\n" +
947 "echo ******************************************************************\n" +
949 "echo * SDK environment is prepared for Windows\n" +
951 "echo * SDK = %OO_SDK_HOME%\n" +
952 "echo * Office = %OFFICE_HOME%\n" +
953 "echo * Office Base = %OFFICE_BASE_HOME%\n" +
954 "echo * URE = %OO_SDK_URE_HOME%\n" +
955 "echo * Make = %OO_SDK_MAKE_HOME%\n" +
956 "echo * Zip = %OO_SDK_ZIP_HOME%\n" +
957 "echo * C++ Compiler = %OO_SDK_CPP_HOME%\n" +
958 "echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%\n" +
959 "echo * Java = %OO_SDK_JAVA_HOME%\n" +
960 "echo * Special Output directory = %OO_SDK_OUT%\n" +
961 "echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%\n" +
963 "echo ******************************************************************\n" +
968 "Error: Please insert the necessary environment variables into the batch file.\n" +