1d71964d5SAndrew Rist// ************************************************************* 2d71964d5SAndrew Rist// 3d71964d5SAndrew Rist// Licensed to the Apache Software Foundation (ASF) under one 4d71964d5SAndrew Rist// or more contributor license agreements. See the NOTICE file 5d71964d5SAndrew Rist// distributed with this work for additional information 6d71964d5SAndrew Rist// regarding copyright ownership. The ASF licenses this file 7d71964d5SAndrew Rist// to you under the Apache License, Version 2.0 (the 8d71964d5SAndrew Rist// "License"); you may not use this file except in compliance 9d71964d5SAndrew Rist// with the License. You may obtain a copy of the License at 10d71964d5SAndrew Rist// 11d71964d5SAndrew Rist// http://www.apache.org/licenses/LICENSE-2.0 12d71964d5SAndrew Rist// 13d71964d5SAndrew Rist// Unless required by applicable law or agreed to in writing, 14d71964d5SAndrew Rist// software distributed under the License is distributed on an 15d71964d5SAndrew Rist// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16d71964d5SAndrew Rist// KIND, either express or implied. See the License for the 17d71964d5SAndrew Rist// specific language governing permissions and limitations 18d71964d5SAndrew Rist// under the License. 19d71964d5SAndrew Rist// 20d71964d5SAndrew Rist// ************************************************************* 21cdf0e10cSrcweir// This script asks for variables, which are necessary for building the 22cdf0e10cSrcweir// examples of the Office Development Kit. The script duplicates the template 23cdf0e10cSrcweir// script and inserts the variables into the copied script. 24cdf0e10cSrcweir// The Script was developed for the operating systems Microsoft Windows. 25*599cc5b4SOliver-Rainer Wittmannvar regKeyOfficeCurrentUser = "HKEY_CURRENT_USER\\Software\\OpenOffice\\UNO\\InstallPath\\"; 26*599cc5b4SOliver-Rainer Wittmannvar regKeyOfficeLocaleMachine = "HKEY_LOCAL_MACHINE\\Software\\OpenOffice\\UNO\\InstallPath\\"; 27cdf0e10cSrcweirvar regKeyDotNetInstallRoot = "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\InstallRoot"; 28cdf0e10cSrcweirvar regKeyDotNet1_1 = "HKLM\\Software\\Microsoft\\.NETFramework\\policy\\v1.1\\4322"; 29cdf0e10cSrcweirvar sDirDotNet1_1 = "v1.1.4322"; 30cdf0e10cSrcweirvar regKeyDotNet2_0 = "HKLM\\Software\\Microsoft\\.NETFramework\\Policy\\v2.0\\50727"; 31cdf0e10cSrcweirvar sDirDotNet2_0 = "v2.0.50727"; 32cdf0e10cSrcweir 33cdf0e10cSrcweirvar regKeyJDK = "HKLM\\Software\\JavaSoft\\Java Development Kit\\"; 34cdf0e10cSrcweir//var regKeyVC70 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir"; 35cdf0e10cSrcweir//var regKeyVC71 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir"; 36cdf0e10cSrcweirvar regKeyVC90 = "HKLM\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VC\\ProductDir"; 37cdf0e10cSrcweir 38cdf0e10cSrcweir//var regKeyVCExpress80 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\8.0\\Setup\\VC\\ProductDir"; 39cdf0e10cSrcweirvar regKeyVCExpress90 = "HKLM\\SOFTWARE\\Microsoft\\VCExpress\\9.0\\Setup\\VC\\ProductDir"; 40cdf0e10cSrcweir 41cdf0e10cSrcweirvar regKeyWindowsSDK = "HKLM\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\CurrentInstallFolder"; 42cdf0e10cSrcweir 43cdf0e10cSrcweirvar WshShell = WScript.CreateObject("WScript.Shell"); 44cdf0e10cSrcweirvar WshSysEnv = WshShell.Environment("process"); 45cdf0e10cSrcweirvar aFileSystemObject = new ActiveXObject("Scripting.FileSystemObject"); 46cdf0e10cSrcweirvar stdin = WScript.StdIn; 47cdf0e10cSrcweirvar stdout = WScript.StdOut; 48cdf0e10cSrcweir 49cdf0e10cSrcweirstdout.WriteLine("\n" + 50cdf0e10cSrcweir" *** Configure your SDK environment ***\n\n" + 51cdf0e10cSrcweir" NOTE: This script is working only for Windows 2000, Windows XP or newer versions!\n"); 52cdf0e10cSrcweir 53cdf0e10cSrcweirvar oo_sdk_name=WshSysEnv("OO_SDK_NAME"); 54cdf0e10cSrcweirvar stldebug=""; 55cdf0e10cSrcweirvar oo_sdk_home=getSdkHome(); 56cdf0e10cSrcweirvar oo_user_sdk_dir=WshSysEnv("APPDATA") + "\\" + oo_sdk_name; 57cdf0e10cSrcweirvar oo_user_sdk_env_script=oo_user_sdk_dir + "\\setsdkenv_windows.bat"; 58cdf0e10cSrcweir 59cdf0e10cSrcweirvar office_home=getOfficeHome(); 60cdf0e10cSrcweirvar office_base_home=getOfficeBaseHome(); 61cdf0e10cSrcweirvar oo_sdk_ure_home=getUreHome(); 62cdf0e10cSrcweir 63cdf0e10cSrcweirvar oo_sdk_make_home=getMakeHome(); 64cdf0e10cSrcweirvar oo_sdk_zip_home=getZipHome(); 65985d02c7SAriel Constenla-Hailevar oo_sdk_cat_home=getCatHome(); 66985d02c7SAriel Constenla-Hailevar oo_sdk_sed_home=getSedHome(); 67cdf0e10cSrcweirvar oo_sdk_manifest_used=""; 68cdf0e10cSrcweirvar oo_sdk_windowssdk=""; 69cdf0e10cSrcweirvar oo_sdk_cpp_home=getCppHome(); 70cdf0e10cSrcweirvar oo_sdk_cli_home=getCliHome(); 71cdf0e10cSrcweirvar oo_sdk_java_home=getJavaHome(); 72cdf0e10cSrcweirvar oo_sdk_out=getOutputDir(); 73cdf0e10cSrcweirvar sdk_auto_deployment=getAutoDeployment(); 74cdf0e10cSrcweir 75cdf0e10cSrcweirwriteBatFile(oo_user_sdk_dir, oo_user_sdk_env_script); 76cdf0e10cSrcweir 77cdf0e10cSrcweirstdout.Write( 78cdf0e10cSrcweir "\n ******************************************************************\n" + 79cdf0e10cSrcweir " * ... \"" + oo_user_sdk_env_script + "\"\n" + 80cdf0e10cSrcweir " * batch file has been prepared.\n" + 81cdf0e10cSrcweir " * This batch file will be used in the future to prepare your\n" + 82cdf0e10cSrcweir " * personal configured SDK environment.\n" + 83cdf0e10cSrcweir " ******************************************************************\n\n"); 84cdf0e10cSrcweir// " * For each time you want to use this configured SDK environment,\n" + 85cdf0e10cSrcweir// " * you have to run the \"setsdkenv_windows.bat\" file in a new shell!\n" + 86cdf0e10cSrcweir 87cdf0e10cSrcweir// done ------------------------------------------------------------------------- 88cdf0e10cSrcweir 89cdf0e10cSrcweir 90cdf0e10cSrcweirfunction skipChoice(msg) 91cdf0e10cSrcweir{ 92cdf0e10cSrcweir stdout.Write("\n Do you want to skip the choice of " + msg + " (YES/NO) [YES]:"); 93cdf0e10cSrcweir var sChoice = stdin.ReadLine(); 94cdf0e10cSrcweir if (sChoice == "" || sChoice.toLowerCase() == "yes") 95cdf0e10cSrcweir return true; 96cdf0e10cSrcweir 97cdf0e10cSrcweir return false; 98cdf0e10cSrcweir} 99cdf0e10cSrcweir 100cdf0e10cSrcweirfunction getSdkHome() 101cdf0e10cSrcweir{ 102cdf0e10cSrcweir var sSuggestedHome = WshSysEnv("OO_SDK_HOME"); 103cdf0e10cSrcweir if (sSuggestedHome.length == 0) { 104cdf0e10cSrcweir var scriptname = WScript.ScriptFullName; 105cdf0e10cSrcweir sSuggestedHome = scriptname.substr(0,scriptname.length-10); 106cdf0e10cSrcweir } 107cdf0e10cSrcweir 108cdf0e10cSrcweir while(true) 109cdf0e10cSrcweir { 110cdf0e10cSrcweir stdout.Write("\n Enter the Office Software Development Kit directory [" + 111cdf0e10cSrcweir sSuggestedHome + "]:"); 112cdf0e10cSrcweir var sHome = stdin.ReadLine(); 113cdf0e10cSrcweir if (sHome.length == 0) 114cdf0e10cSrcweir { 115cdf0e10cSrcweir //No user input, use default. 116cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sSuggestedHome)) 117cdf0e10cSrcweir { 118cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 119cdf0e10cSrcweir sSuggestedHome + "\". An SDK is required, please" + 120cdf0e10cSrcweir " specify the path to a valid installation."); 121cdf0e10cSrcweir continue; 122cdf0e10cSrcweir } 123cdf0e10cSrcweir sHome = sSuggestedHome; 124cdf0e10cSrcweir } 125cdf0e10cSrcweir else 126cdf0e10cSrcweir { 127cdf0e10cSrcweir //validate the user input 128cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sHome)) 129cdf0e10cSrcweir { 130cdf0e10cSrcweir stdout.WriteLine("\n Error: The directory \"" + sHome + 131cdf0e10cSrcweir "\" does not exist. Please enter the path to a" + 132cdf0e10cSrcweir "valid SDK installation."); 133cdf0e10cSrcweir continue; 134cdf0e10cSrcweir } 135cdf0e10cSrcweir } 136cdf0e10cSrcweir //Check if this is an sdk folder by looking for the idl sub - dir 137cdf0e10cSrcweir var idlDir = sHome + "\\idl"; 138cdf0e10cSrcweir if (! aFileSystemObject.FolderExists(idlDir)) 139cdf0e10cSrcweir { 140cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 141cdf0e10cSrcweir idlDir + "\". An SDK is required, please specify " + 142cdf0e10cSrcweir "the path to a valid SDK installation."); 143cdf0e10cSrcweir continue; 144cdf0e10cSrcweir } 145cdf0e10cSrcweir 146cdf0e10cSrcweir if (aFileSystemObject.FileExists(sHome + "\\lib\\stlport_vc71_stldebug.lib")) { 147cdf0e10cSrcweir stldebug="_stldebug"; 148cdf0e10cSrcweir } 149cdf0e10cSrcweir 150cdf0e10cSrcweir return sHome; 151cdf0e10cSrcweir } 152cdf0e10cSrcweir} 153cdf0e10cSrcweir 154cdf0e10cSrcweirfunction getOfficeOrUre() 155cdf0e10cSrcweir{ 156cdf0e10cSrcweir var suggestion = "Office"; 157cdf0e10cSrcweir var choice; 158cdf0e10cSrcweir while (choice != "office" && choice != "ure") { 159cdf0e10cSrcweir stdout.Write( 160cdf0e10cSrcweir "\n Use an installed Office or an installed UNO Runtime" 161cdf0e10cSrcweir + " Environment (Office/URE) [" + suggestion + "]:"); 162cdf0e10cSrcweir choice = stdin.ReadLine(); 163cdf0e10cSrcweir if (choice == "") { 164cdf0e10cSrcweir choice = suggestion; 165cdf0e10cSrcweir } 166cdf0e10cSrcweir choice = choice.toLowerCase(); 167cdf0e10cSrcweir } 168cdf0e10cSrcweir return choice; 169cdf0e10cSrcweir} 170cdf0e10cSrcweir 171cdf0e10cSrcweirfunction getOfficeHome() 172cdf0e10cSrcweir{ 173cdf0e10cSrcweir var sSuggestedHome = WshSysEnv("OFFICE_HOME"); 174cdf0e10cSrcweir if (sSuggestedHome.length == 0) 175cdf0e10cSrcweir { 176cdf0e10cSrcweir try { 177cdf0e10cSrcweir sSuggestedHome = WshShell.RegRead(regKeyOfficeCurrentUser); 178cdf0e10cSrcweir //The registry entry points to the program folder but we need the 179cdf0e10cSrcweir //installation folder 180cdf0e10cSrcweir } catch(exc) {} 181cdf0e10cSrcweir if (sSuggestedHome.length == 0) 182cdf0e10cSrcweir { 183cdf0e10cSrcweir try { 184cdf0e10cSrcweir sSuggestedHome = WshShell.RegRead(regKeyOfficeLocaleMachine); 185cdf0e10cSrcweir //The registry entry points to the program folder but we need 186cdf0e10cSrcweir //the installation folder 187cdf0e10cSrcweir } catch (exc) {} 188cdf0e10cSrcweir } 189cdf0e10cSrcweir 190cdf0e10cSrcweir var index=0; 191cdf0e10cSrcweir if ((index = sSuggestedHome.lastIndexOf("\\")) != -1) 192cdf0e10cSrcweir sSuggestedHome = sSuggestedHome.substr(0, index); 193cdf0e10cSrcweir 194cdf0e10cSrcweir if (sSuggestedHome.length == 0) 195cdf0e10cSrcweir sSuggestedHome = searchOffice(); 196cdf0e10cSrcweir } 197cdf0e10cSrcweir 198cdf0e10cSrcweir while(true) 199cdf0e10cSrcweir { 200cdf0e10cSrcweir stdout.Write("\n Enter the Office base installation directory [" + 201cdf0e10cSrcweir sSuggestedHome + "]:"); 202cdf0e10cSrcweir var sHome = stdin.ReadLine(); 203cdf0e10cSrcweir if (sHome.length == 0) 204cdf0e10cSrcweir { 205cdf0e10cSrcweir //No user input, use default. 206cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sSuggestedHome)) 207cdf0e10cSrcweir { 208cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 209cdf0e10cSrcweir sSuggestedHome + "\" An office installation is " + 210cdf0e10cSrcweir "required, please specify the path to a valid " + 211cdf0e10cSrcweir "office installation."); 212cdf0e10cSrcweir sSuggestedHome = ""; 213cdf0e10cSrcweir continue; 214cdf0e10cSrcweir } 215cdf0e10cSrcweir sHome = sSuggestedHome; 216cdf0e10cSrcweir } else 217cdf0e10cSrcweir { 218cdf0e10cSrcweir //validate the user input 219cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sHome)) 220cdf0e10cSrcweir { 221cdf0e10cSrcweir stdout.WriteLine("\n Error: The directory \"" + sHome + 222cdf0e10cSrcweir "\" does not exist. Please specify the path to " + 223cdf0e10cSrcweir "a valid office installation."); 224cdf0e10cSrcweir continue; 225cdf0e10cSrcweir } 226cdf0e10cSrcweir } 227cdf0e10cSrcweir //Check if this is a valid office installtion folder by looking for the 228cdf0e10cSrcweir //program sub-directory 229cdf0e10cSrcweir var progDir = sHome + "\\program"; 230cdf0e10cSrcweir if (! aFileSystemObject.FolderExists(progDir)) 231cdf0e10cSrcweir { 232cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 233cdf0e10cSrcweir progDir + "\". An office installation is required, " + 234cdf0e10cSrcweir "please specify the path to a valid office " + 235cdf0e10cSrcweir "installation."); 236cdf0e10cSrcweir continue; 237cdf0e10cSrcweir } 238cdf0e10cSrcweir return sHome; 239cdf0e10cSrcweir } 240cdf0e10cSrcweir} 241cdf0e10cSrcweir 242cdf0e10cSrcweirfunction searchOffice() 243cdf0e10cSrcweir{ 244cdf0e10cSrcweir var tmp = oo_sdk_home; 245cdf0e10cSrcweir var officepath =""; 246cdf0e10cSrcweir var index=-1; 247cdf0e10cSrcweir 248cdf0e10cSrcweir if ((index = tmp.lastIndexOf("\\Basis")) != -1) { 249cdf0e10cSrcweir tmp = tmp.substr(0, index); 250cdf0e10cSrcweir } 251cdf0e10cSrcweir 252cdf0e10cSrcweir if (aFileSystemObject.FileExists(tmp + "\\program\\soffice.exe")) { 253cdf0e10cSrcweir return tmp; 254cdf0e10cSrcweir } 255cdf0e10cSrcweir 256cdf0e10cSrcweir return ""; 257cdf0e10cSrcweir} 258cdf0e10cSrcweir 259cdf0e10cSrcweir 260cdf0e10cSrcweirfunction getOfficeBaseHome() 261cdf0e10cSrcweir{ 262cdf0e10cSrcweir var officebase = oo_sdk_home; 263cdf0e10cSrcweir var index=officebase.lastIndexOf("\\"); 264cdf0e10cSrcweir 265cdf0e10cSrcweir officebase = officebase.substr(0, index); 266cdf0e10cSrcweir 267cdf0e10cSrcweir return officebase; 268cdf0e10cSrcweir} 269cdf0e10cSrcweir 270cdf0e10cSrcweirfunction getUreHome() 271cdf0e10cSrcweir{ 272cdf0e10cSrcweir var tmpure = oo_sdk_home; 273cdf0e10cSrcweir var ure = ""; 274cdf0e10cSrcweir var index=0; 275cdf0e10cSrcweir if ((index = tmpure.lastIndexOf("Basis")) != -1) 276cdf0e10cSrcweir tmpure = tmpure.substr(0, index); 277cdf0e10cSrcweir 278cdf0e10cSrcweir if (aFileSystemObject.FileExists(tmpure + "\\URE\\bin\\uno.exe")) { 279cdf0e10cSrcweir ure = tmpure + "\URE"; 280cdf0e10cSrcweir } 281cdf0e10cSrcweir 282cdf0e10cSrcweir return ure; 283cdf0e10cSrcweir 284cdf0e10cSrcweir/* 285cdf0e10cSrcweir var suggestion = WshSysEnv("OO_SDK_URE_HOME"); 286cdf0e10cSrcweir var choice; 287cdf0e10cSrcweir for (;;) { 288cdf0e10cSrcweir stdout.Write( 289cdf0e10cSrcweir "\n Enter the URE installation directory [" + suggestion + "]:"); 290cdf0e10cSrcweir choice = stdin.ReadLine(); 291cdf0e10cSrcweir if (choice == "") { 292cdf0e10cSrcweir choice = suggestion; 293cdf0e10cSrcweir } 294cdf0e10cSrcweir if (aFileSystemObject.FileExists(choice + "\\bin\\uno.exe")) { 295cdf0e10cSrcweir break; 296cdf0e10cSrcweir } 297cdf0e10cSrcweir stdout.WriteLine("\n Error: A valid URE installation is required."); 298cdf0e10cSrcweir } 299cdf0e10cSrcweir return choice; 300cdf0e10cSrcweir*/ 301cdf0e10cSrcweir} 302cdf0e10cSrcweir 303cdf0e10cSrcweirfunction getMakeHome() 304cdf0e10cSrcweir{ 305cdf0e10cSrcweir var sSuggestedHome = WshSysEnv("OO_SDK_MAKE_HOME"); 306cdf0e10cSrcweir 307cdf0e10cSrcweir while(true) 308cdf0e10cSrcweir { 309cdf0e10cSrcweir stdout.Write("\n Enter GNU make (3.79.1 or higher) tools directory [" + 310cdf0e10cSrcweir sSuggestedHome + "]:"); 311cdf0e10cSrcweir var sHome = stdin.ReadLine(); 312cdf0e10cSrcweir if (sHome.length == 0) 313cdf0e10cSrcweir { 314cdf0e10cSrcweir //No user input, use default. 315cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sSuggestedHome)) 316cdf0e10cSrcweir { 317cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 318cdf0e10cSrcweir sSuggestedHome + "\". GNU make is required, " + 319cdf0e10cSrcweir "please specify a GNU make tools directory."); 320cdf0e10cSrcweir sSuggestedHome = ""; 321cdf0e10cSrcweir continue; 322cdf0e10cSrcweir } 323cdf0e10cSrcweir sHome = sSuggestedHome; 324cdf0e10cSrcweir } else 325cdf0e10cSrcweir { 326cdf0e10cSrcweir //validate the user input 327cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sHome)) 328cdf0e10cSrcweir { 329cdf0e10cSrcweir stdout.WriteLine("\n Error: The directory \"" + sHome + 330cdf0e10cSrcweir "\" does not exist. GNU make is required, " + 331cdf0e10cSrcweir "please specify a GNU make tools directory."); 332cdf0e10cSrcweir continue; 333cdf0e10cSrcweir } 334cdf0e10cSrcweir } 335cdf0e10cSrcweir //Check for the make executable 336cdf0e10cSrcweir var sMakePath = sHome + "\\make.exe"; 337cdf0e10cSrcweir if (! aFileSystemObject.FileExists(sMakePath)) 338cdf0e10cSrcweir { 339cdf0e10cSrcweir sMakePath = sHome + "\\mingw32-make.exe"; 340cdf0e10cSrcweir } 341cdf0e10cSrcweir if (! aFileSystemObject.FileExists(sMakePath)) 342cdf0e10cSrcweir { 343cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find \"" + sMakePath + 344cdf0e10cSrcweir "\". GNU make is required, please specify a GNU " + 345cdf0e10cSrcweir "make tools directory."); 346cdf0e10cSrcweir continue; 347cdf0e10cSrcweir } 348cdf0e10cSrcweir return sHome; 349cdf0e10cSrcweir } 350cdf0e10cSrcweir} 351cdf0e10cSrcweir 352cdf0e10cSrcweirfunction getZipHome() 353cdf0e10cSrcweir{ 354cdf0e10cSrcweir var sSuggestedHome = WshSysEnv("OO_SDK_ZIP_HOME"); 355cdf0e10cSrcweir 356cdf0e10cSrcweir while(true) 357cdf0e10cSrcweir { 358cdf0e10cSrcweir stdout.Write("\n Enter a zip (2.3 or higher) tools directory [" + 359cdf0e10cSrcweir sSuggestedHome + "]:"); 360cdf0e10cSrcweir var sHome = stdin.ReadLine(); 361cdf0e10cSrcweir if (sHome.length == 0) 362cdf0e10cSrcweir { 363cdf0e10cSrcweir //No user input, use default. 364cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sSuggestedHome)) 365cdf0e10cSrcweir { 366cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 367cdf0e10cSrcweir sSuggestedHome + "\". zip is required, please " + 368cdf0e10cSrcweir "specify a zip tools directory."); 369cdf0e10cSrcweir sSuggestedHome = ""; 370cdf0e10cSrcweir continue; 371cdf0e10cSrcweir } 372cdf0e10cSrcweir sHome = sSuggestedHome; 373cdf0e10cSrcweir } 374cdf0e10cSrcweir else 375cdf0e10cSrcweir { 376cdf0e10cSrcweir //validate the user input 377cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sHome)) 378cdf0e10cSrcweir { 379cdf0e10cSrcweir stdout.WriteLine("\n Error: The directory \"" + sHome + 380cdf0e10cSrcweir "\" does not exist. zip is required, please " + 381cdf0e10cSrcweir "specify a zip tools directory."); 382cdf0e10cSrcweir continue; 383cdf0e10cSrcweir } 384cdf0e10cSrcweir } 385cdf0e10cSrcweir //Check for the make executable 386cdf0e10cSrcweir var sZipPath = sHome + "\\zip.exe"; 387cdf0e10cSrcweir if (! aFileSystemObject.FileExists(sZipPath)) 388cdf0e10cSrcweir { 389cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find \"" + sZipPath + 390cdf0e10cSrcweir "\". zip is required, please specify a zip tools " + 391cdf0e10cSrcweir "directory."); 392cdf0e10cSrcweir continue; 393cdf0e10cSrcweir } 394cdf0e10cSrcweir return sHome; 395cdf0e10cSrcweir } 396cdf0e10cSrcweir} 397cdf0e10cSrcweir 398985d02c7SAriel Constenla-Hailefunction getCatHome() 399985d02c7SAriel Constenla-Haile{ 400985d02c7SAriel Constenla-Haile var sSuggestedHome = WshSysEnv("OO_SDK_CAT_HOME"); 401985d02c7SAriel Constenla-Haile 402985d02c7SAriel Constenla-Haile while(true) 403985d02c7SAriel Constenla-Haile { 404985d02c7SAriel Constenla-Haile stdout.Write("\n Enter a cat (2.0 or higher) tools directory [" + 405985d02c7SAriel Constenla-Haile sSuggestedHome + "]:"); 406985d02c7SAriel Constenla-Haile var sHome = stdin.ReadLine(); 407985d02c7SAriel Constenla-Haile if (sHome.length == 0) 408985d02c7SAriel Constenla-Haile { 409985d02c7SAriel Constenla-Haile //No user input, use default. 410985d02c7SAriel Constenla-Haile if ( ! aFileSystemObject.FolderExists(sSuggestedHome)) 411985d02c7SAriel Constenla-Haile { 412985d02c7SAriel Constenla-Haile stdout.WriteLine("\n Error: Could not find directory \"" + 413985d02c7SAriel Constenla-Haile sSuggestedHome + "\". cat is required, please " + 414985d02c7SAriel Constenla-Haile "specify a cat tools directory." + 415985d02c7SAriel Constenla-Haile "\nYou can get cat from " + 416985d02c7SAriel Constenla-Haile "http://sourceforge.net/projects/unxutils/files/latest/download"); 417985d02c7SAriel Constenla-Haile sSuggestedHome = ""; 418985d02c7SAriel Constenla-Haile continue; 419985d02c7SAriel Constenla-Haile } 420985d02c7SAriel Constenla-Haile sHome = sSuggestedHome; 421985d02c7SAriel Constenla-Haile } 422985d02c7SAriel Constenla-Haile else 423985d02c7SAriel Constenla-Haile { 424985d02c7SAriel Constenla-Haile //validate the user input 425985d02c7SAriel Constenla-Haile if ( ! aFileSystemObject.FolderExists(sHome)) 426985d02c7SAriel Constenla-Haile { 427985d02c7SAriel Constenla-Haile stdout.WriteLine("\n Error: The directory \"" + sHome + 428985d02c7SAriel Constenla-Haile "\" does not exist. cat is required, please " + 429985d02c7SAriel Constenla-Haile "specify a cat tools directory." + 430985d02c7SAriel Constenla-Haile "\nYou can get cat from " + 431985d02c7SAriel Constenla-Haile "http://sourceforge.net/projects/unxutils/files/latest/download"); 432985d02c7SAriel Constenla-Haile continue; 433985d02c7SAriel Constenla-Haile } 434985d02c7SAriel Constenla-Haile } 435985d02c7SAriel Constenla-Haile //Check for the make executable 436985d02c7SAriel Constenla-Haile var sCatPath = sHome + "\\cat.exe"; 437985d02c7SAriel Constenla-Haile if (! aFileSystemObject.FileExists(sCatPath)) 438985d02c7SAriel Constenla-Haile { 439985d02c7SAriel Constenla-Haile stdout.WriteLine("\n Error: Could not find \"" + sCatPath + 440985d02c7SAriel Constenla-Haile "\". cat is required, please specify a cat tools " + 441985d02c7SAriel Constenla-Haile "directory." + 442985d02c7SAriel Constenla-Haile "\nYou can get cat from " + 443985d02c7SAriel Constenla-Haile "http://sourceforge.net/projects/unxutils/files/latest/download"); 444985d02c7SAriel Constenla-Haile continue; 445985d02c7SAriel Constenla-Haile } 446985d02c7SAriel Constenla-Haile return sHome; 447985d02c7SAriel Constenla-Haile } 448985d02c7SAriel Constenla-Haile} 449985d02c7SAriel Constenla-Haile 450985d02c7SAriel Constenla-Hailefunction getSedHome() 451985d02c7SAriel Constenla-Haile{ 452985d02c7SAriel Constenla-Haile var sSuggestedHome = WshSysEnv("OO_SDK_SED_HOME"); 453985d02c7SAriel Constenla-Haile 454985d02c7SAriel Constenla-Haile while(true) 455985d02c7SAriel Constenla-Haile { 456985d02c7SAriel Constenla-Haile stdout.Write("\n Enter a sed (3.02 or higher) tools directory [" + 457985d02c7SAriel Constenla-Haile sSuggestedHome + "]:"); 458985d02c7SAriel Constenla-Haile var sHome = stdin.ReadLine(); 459985d02c7SAriel Constenla-Haile if (sHome.length == 0) 460985d02c7SAriel Constenla-Haile { 461985d02c7SAriel Constenla-Haile //No user input, use default. 462985d02c7SAriel Constenla-Haile if ( ! aFileSystemObject.FolderExists(sSuggestedHome)) 463985d02c7SAriel Constenla-Haile { 464985d02c7SAriel Constenla-Haile stdout.WriteLine("\n Error: Could not find directory \"" + 465985d02c7SAriel Constenla-Haile sSuggestedHome + "\". sed is required, please " + 466985d02c7SAriel Constenla-Haile "specify a sed tools directory." + 467985d02c7SAriel Constenla-Haile "\nYou can get sed from " + 468985d02c7SAriel Constenla-Haile "http://sourceforge.net/projects/unxutils/files/latest/download"); 469985d02c7SAriel Constenla-Haile sSuggestedHome = ""; 470985d02c7SAriel Constenla-Haile continue; 471985d02c7SAriel Constenla-Haile } 472985d02c7SAriel Constenla-Haile sHome = sSuggestedHome; 473985d02c7SAriel Constenla-Haile } 474985d02c7SAriel Constenla-Haile else 475985d02c7SAriel Constenla-Haile { 476985d02c7SAriel Constenla-Haile //validate the user input 477985d02c7SAriel Constenla-Haile if ( ! aFileSystemObject.FolderExists(sHome)) 478985d02c7SAriel Constenla-Haile { 479985d02c7SAriel Constenla-Haile stdout.WriteLine("\n Error: The directory \"" + sHome + 480985d02c7SAriel Constenla-Haile "\" does not exist. sed is required, please " + 481985d02c7SAriel Constenla-Haile "specify a sed tools directory." + 482985d02c7SAriel Constenla-Haile "\nYou can get sed from " + 483985d02c7SAriel Constenla-Haile "http://sourceforge.net/projects/unxutils/files/latest/download"); 484985d02c7SAriel Constenla-Haile continue; 485985d02c7SAriel Constenla-Haile } 486985d02c7SAriel Constenla-Haile } 487985d02c7SAriel Constenla-Haile //Check for the make executable 488985d02c7SAriel Constenla-Haile var sSedPath = sHome + "\\sed.exe"; 489985d02c7SAriel Constenla-Haile if (! aFileSystemObject.FileExists(sSedPath)) 490985d02c7SAriel Constenla-Haile { 491985d02c7SAriel Constenla-Haile stdout.WriteLine("\n Error: Could not find \"" + sSedPath + 492985d02c7SAriel Constenla-Haile "\". sed is required, please specify a sed tools " + 493985d02c7SAriel Constenla-Haile "directory." + 494985d02c7SAriel Constenla-Haile "\nYou can get sed from " + 495985d02c7SAriel Constenla-Haile "http://sourceforge.net/projects/unxutils/files/latest/download"); 496985d02c7SAriel Constenla-Haile continue; 497985d02c7SAriel Constenla-Haile } 498985d02c7SAriel Constenla-Haile return sHome; 499985d02c7SAriel Constenla-Haile } 500985d02c7SAriel Constenla-Haile} 501985d02c7SAriel Constenla-Haile 502cdf0e10cSrcweirfunction getCppHome() 503cdf0e10cSrcweir{ 504cdf0e10cSrcweir var sSuggestedHome = WshSysEnv("OO_SDK_CPP_HOME"); 505cdf0e10cSrcweir if (sSuggestedHome.length == 0) 506cdf0e10cSrcweir { 507cdf0e10cSrcweir var sVC=""; 508cdf0e10cSrcweir try { 509cdf0e10cSrcweir sVC = WshShell.RegRead(regKeyVCExpress90); 510cdf0e10cSrcweir }catch (exc) {} 511cdf0e10cSrcweir if (sVC.length == 0) 512cdf0e10cSrcweir { 513cdf0e10cSrcweir try { 514cdf0e10cSrcweir sVC = WshShell.RegRead(regKeyVC90); 515cdf0e10cSrcweir }catch (exc) {} 516cdf0e10cSrcweir } 517cdf0e10cSrcweir // check Windows SDK if VC 9 518cdf0e10cSrcweir if (sVC.length > 0) 519cdf0e10cSrcweir { 520cdf0e10cSrcweir oo_sdk_manifest_used="true"; 521cdf0e10cSrcweir try { 522cdf0e10cSrcweir oo_sdk_windowssdk = WshShell.RegRead(regKeyWindowsSDK); 523cdf0e10cSrcweir }catch (exc) {} 524cdf0e10cSrcweir } 525cdf0e10cSrcweir if (sVC.length == 0) 526cdf0e10cSrcweir { 527cdf0e10cSrcweir try { 528cdf0e10cSrcweir sVC = WshShell.RegRead(regKeyVCExpress80); 529cdf0e10cSrcweir }catch (exc) {} 530cdf0e10cSrcweir if (sVC.length > 0) 531cdf0e10cSrcweir oo_sdk_manifest_used="true"; 532cdf0e10cSrcweir } 533cdf0e10cSrcweir if (sVC.length == 0) 534cdf0e10cSrcweir { 535cdf0e10cSrcweir try { 536cdf0e10cSrcweir sVC = WshShell.RegRead(regKeyVC80); 537cdf0e10cSrcweir }catch (exc) {} 538cdf0e10cSrcweir if (sVC.length > 0) 539cdf0e10cSrcweir oo_sdk_manifest_used="true"; 540cdf0e10cSrcweir } 541cdf0e10cSrcweir if (sVC.length == 0) 542cdf0e10cSrcweir { 543cdf0e10cSrcweir try { 544cdf0e10cSrcweir sVC = WshShell.RegRead(regKeyVC71); 545cdf0e10cSrcweir }catch (exc) {} 546cdf0e10cSrcweir } 547cdf0e10cSrcweir if (sVC.length > 0) 548cdf0e10cSrcweir { 549cdf0e10cSrcweir sVC += "bin"; 550cdf0e10cSrcweir if (aFileSystemObject.FileExists(sVC + "\\cl.exe")) 551cdf0e10cSrcweir sSuggestedHome = sVC; 552cdf0e10cSrcweir } 553cdf0e10cSrcweir } 554cdf0e10cSrcweir 555cdf0e10cSrcweir var bSkip = false; 556cdf0e10cSrcweir while(true) 557cdf0e10cSrcweir { 558cdf0e10cSrcweir stdout.Write("\n Enter the directory of the C++ compiler (optional) [" + 559cdf0e10cSrcweir sSuggestedHome + "]:"); 560cdf0e10cSrcweir var sHome = stdin.ReadLine(); 561cdf0e10cSrcweir if (sHome.length == 0) 562cdf0e10cSrcweir { 563cdf0e10cSrcweir //No user input, check OO_SDK_CPP_HOME or suggested value 564cdf0e10cSrcweir if ( sSuggestedHome.length == 0 ) { 565cdf0e10cSrcweir bSkip = true; 566cdf0e10cSrcweir } else { 567cdf0e10cSrcweir if ( !aFileSystemObject.FolderExists(sSuggestedHome) ) 568cdf0e10cSrcweir { 569cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 570cdf0e10cSrcweir sSuggestedHome + "\"."); 571cdf0e10cSrcweir sSuggestedHome = ""; 572cdf0e10cSrcweir bSkip = true; 573cdf0e10cSrcweir } 574cdf0e10cSrcweir } 575cdf0e10cSrcweir 576cdf0e10cSrcweir sHome = sSuggestedHome; 577cdf0e10cSrcweir } else 578cdf0e10cSrcweir { 579cdf0e10cSrcweir //validate the user input 580cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sHome)) 581cdf0e10cSrcweir { 582cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 583cdf0e10cSrcweir sHome + "\"."); 584cdf0e10cSrcweir bSkip = true; 585cdf0e10cSrcweir } 586cdf0e10cSrcweir } 587cdf0e10cSrcweir 588cdf0e10cSrcweir if ( !bSkip) { 589cdf0e10cSrcweir //Check if the C++ compiler exist 590cdf0e10cSrcweir var cl = sHome + "\\cl.exe"; 591cdf0e10cSrcweir var mt = sHome + "\\mt.exe"; 592cdf0e10cSrcweir 593cdf0e10cSrcweir if (! aFileSystemObject.FileExists(cl)) 594cdf0e10cSrcweir { 595cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find the C++ compiler \"" 596cdf0e10cSrcweir + cl + "\"."); 597cdf0e10cSrcweir sHome = ""; 598cdf0e10cSrcweir bSkip = true; 599cdf0e10cSrcweir } else { 600cdf0e10cSrcweir if (aFileSystemObject.FileExists(mt)) { 601cdf0e10cSrcweir oo_sdk_vc8_used="true"; 602cdf0e10cSrcweir } 603cdf0e10cSrcweir } 604cdf0e10cSrcweir } 605cdf0e10cSrcweir 606cdf0e10cSrcweir if ( bSkip ) { 607cdf0e10cSrcweir if ( skipChoice("the C++ compiler") ) { 608cdf0e10cSrcweir return ""; 609cdf0e10cSrcweir } else { 610cdf0e10cSrcweir bSkip = false; 611cdf0e10cSrcweir continue; 612cdf0e10cSrcweir } 613cdf0e10cSrcweir } 614cdf0e10cSrcweir 615cdf0e10cSrcweir return sHome; 616cdf0e10cSrcweir } 617cdf0e10cSrcweir} 618cdf0e10cSrcweir 619cdf0e10cSrcweirfunction getCliHome() 620cdf0e10cSrcweir{ 621cdf0e10cSrcweir var sSuggestedHome = WshSysEnv("OO_SDK_CLI_HOME"); 622cdf0e10cSrcweir 623cdf0e10cSrcweir if (sSuggestedHome.length == 0) 624cdf0e10cSrcweir { 625cdf0e10cSrcweir try { 626cdf0e10cSrcweir var _ver = WshShell.RegRead(regKeyDotNet2_0); 627cdf0e10cSrcweir if (_ver.length > 0) 628cdf0e10cSrcweir { 629cdf0e10cSrcweir sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot); 630cdf0e10cSrcweir sSuggestedHome += sDirDotNet2_0; 631cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sSuggestedHome)) 632cdf0e10cSrcweir sSuggestedHome = ""; 633cdf0e10cSrcweir } 634cdf0e10cSrcweir 635cdf0e10cSrcweir if (sSuggestedHome.length == 0) 636cdf0e10cSrcweir { 637cdf0e10cSrcweir _ver = WshShell.RegRead(regKeyDotNet1_1); 638cdf0e10cSrcweir if (_ver.length > 0) 639cdf0e10cSrcweir { 640cdf0e10cSrcweir sSuggestedHome = WshShell.RegRead(regKeyDotNetInstallRoot); 641cdf0e10cSrcweir sSuggestedHome += sDirDotNet1_1; 642cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sSuggestedHome)) 643cdf0e10cSrcweir sSuggestedHome = ""; 644cdf0e10cSrcweir } 645cdf0e10cSrcweir } 646cdf0e10cSrcweir } catch (exc) {} 647cdf0e10cSrcweir } 648cdf0e10cSrcweir 649cdf0e10cSrcweir var bSkip = false; 650cdf0e10cSrcweir while(true) 651cdf0e10cSrcweir { 652cdf0e10cSrcweir stdout.Write("\n Enter the directory of the C# and VB.NET compilers (optional) [" + sSuggestedHome + "]:"); 653cdf0e10cSrcweir var sHome = stdin.ReadLine(); 654cdf0e10cSrcweir if (sHome.length == 0) 655cdf0e10cSrcweir { 656cdf0e10cSrcweir //No user input, check OO_SDK_CLI_HOME or suggested value 657cdf0e10cSrcweir if ( sSuggestedHome.length == 0 ) { 658cdf0e10cSrcweir bSkip = true; 659cdf0e10cSrcweir } else { 660cdf0e10cSrcweir if ( !aFileSystemObject.FolderExists(sSuggestedHome) ) 661cdf0e10cSrcweir { 662cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 663cdf0e10cSrcweir sSuggestedHome + "\"."); 664cdf0e10cSrcweir sSuggestedHome = ""; 665cdf0e10cSrcweir bSkip = true; 666cdf0e10cSrcweir } 667cdf0e10cSrcweir } 668cdf0e10cSrcweir 669cdf0e10cSrcweir sHome = sSuggestedHome; 670cdf0e10cSrcweir } 671cdf0e10cSrcweir else 672cdf0e10cSrcweir { 673cdf0e10cSrcweir //validate the user input 674cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sHome)) 675cdf0e10cSrcweir { 676cdf0e10cSrcweir stdout.WriteLine("\n Error: The directory \"" + sHome + 677cdf0e10cSrcweir "\" does not exist."); 678cdf0e10cSrcweir bSkip = true; 679cdf0e10cSrcweir } 680cdf0e10cSrcweir } 681cdf0e10cSrcweir 682cdf0e10cSrcweir if ( !bSkip ) { 683cdf0e10cSrcweir //Check if the C# and VB.NET compiler exist 684cdf0e10cSrcweir var csc = sHome + "\\csc.exe"; 685cdf0e10cSrcweir var vbc = sHome + "\\vbc.exe"; 686cdf0e10cSrcweir 687cdf0e10cSrcweir if (! aFileSystemObject.FileExists(csc)) 688cdf0e10cSrcweir { 689cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find the C# compiler \"" + 690cdf0e10cSrcweir csc + "\"."); 691cdf0e10cSrcweir bSkip = true; 692cdf0e10cSrcweir } 693cdf0e10cSrcweir if (! aFileSystemObject.FileExists(vbc)) 694cdf0e10cSrcweir { 695cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find the VB.NET compiler \"" + 696cdf0e10cSrcweir vbc + "\"."); 697cdf0e10cSrcweir bSkip = true; 698cdf0e10cSrcweir } 699cdf0e10cSrcweir } 700cdf0e10cSrcweir 701cdf0e10cSrcweir if ( bSkip ) { 702cdf0e10cSrcweir if ( skipChoice("the C# and VB.NET compilers") ) { 703cdf0e10cSrcweir return ""; 704cdf0e10cSrcweir } else { 705cdf0e10cSrcweir bSkip = false; 706cdf0e10cSrcweir continue; 707cdf0e10cSrcweir } 708cdf0e10cSrcweir } 709cdf0e10cSrcweir 710cdf0e10cSrcweir return sHome; 711cdf0e10cSrcweir } 712cdf0e10cSrcweir} 713cdf0e10cSrcweir 714cdf0e10cSrcweirfunction getJavaHome() 715cdf0e10cSrcweir{ 716cdf0e10cSrcweir var sSuggestedHome = WshSysEnv("OO_SDK_JAVA_HOME"); 717cdf0e10cSrcweir if (sSuggestedHome.length == 0) 718cdf0e10cSrcweir { 719cdf0e10cSrcweir try { 720cdf0e10cSrcweir var currentVersion = WshShell.RegRead(regKeyJDK + "CurrentVersion"); 721cdf0e10cSrcweir if (currentVersion.length > 0) 722cdf0e10cSrcweir { 723cdf0e10cSrcweir sSuggestedHome = WshShell.RegRead(regKeyJDK + currentVersion + 724cdf0e10cSrcweir "\\JavaHome"); 725cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sSuggestedHome) ) 726cdf0e10cSrcweir sSuggestedHome = ""; 727cdf0e10cSrcweir } 728cdf0e10cSrcweir } catch (exc) {} 729cdf0e10cSrcweir } 730cdf0e10cSrcweir 731cdf0e10cSrcweir var bSkip = false; 732cdf0e10cSrcweir while(true) 733cdf0e10cSrcweir { 734cdf0e10cSrcweir stdout.Write("\n Enter JAVA SDK (1.4.1_01 or higher) installation directory (optional) [" + sSuggestedHome + "]:"); 735cdf0e10cSrcweir var sHome = stdin.ReadLine(); 736cdf0e10cSrcweir if (sHome.length == 0) 737cdf0e10cSrcweir { 738cdf0e10cSrcweir //No user input, check OO_SDK_JAVA_HOME or suggested value 739cdf0e10cSrcweir if ( sSuggestedHome.length == 0 ) { 740cdf0e10cSrcweir bSkip = true; 741cdf0e10cSrcweir } else { 742cdf0e10cSrcweir if ( !aFileSystemObject.FolderExists(sSuggestedHome) ) 743cdf0e10cSrcweir { 744cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 745cdf0e10cSrcweir sSuggestedHome + "\"."); 746cdf0e10cSrcweir sSuggestedHome = ""; 747cdf0e10cSrcweir bSkip=true; 748cdf0e10cSrcweir } 749cdf0e10cSrcweir } 750cdf0e10cSrcweir 751cdf0e10cSrcweir sHome = sSuggestedHome; 752cdf0e10cSrcweir } else 753cdf0e10cSrcweir { 754cdf0e10cSrcweir //validate the user input 755cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sHome)) 756cdf0e10cSrcweir { 757cdf0e10cSrcweir stdout.WriteLine("\n Error: The directory \"" + sHome + 758cdf0e10cSrcweir "\" does not exist."); 759cdf0e10cSrcweir bSkip = true; 760cdf0e10cSrcweir } 761cdf0e10cSrcweir } 762cdf0e10cSrcweir 763cdf0e10cSrcweir if ( !bSkip) { 764cdf0e10cSrcweir //Check if this is an sdk folder by looking for the javac compiler 765cdf0e10cSrcweir var javacompiler = sHome + "\\bin\\javac.exe"; 766cdf0e10cSrcweir if (! aFileSystemObject.FileExists(javacompiler)) 767cdf0e10cSrcweir { 768cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find \"" + 769cdf0e10cSrcweir javacompiler + "\"."); 770cdf0e10cSrcweir bSkip = true; 771cdf0e10cSrcweir } 772cdf0e10cSrcweir } 773cdf0e10cSrcweir 774cdf0e10cSrcweir if ( bSkip ) { 775cdf0e10cSrcweir if ( skipChoice("the Java SDK") ) { 776cdf0e10cSrcweir return ""; 777cdf0e10cSrcweir } else { 778cdf0e10cSrcweir bSkip = false; 779cdf0e10cSrcweir continue; 780cdf0e10cSrcweir } 781cdf0e10cSrcweir } 782cdf0e10cSrcweir 783cdf0e10cSrcweir return sHome; 784cdf0e10cSrcweir } 785cdf0e10cSrcweir} 786cdf0e10cSrcweir 787cdf0e10cSrcweirfunction getOutputDir() 788cdf0e10cSrcweir{ 789cdf0e10cSrcweir var defaultdir = "c:\\" + oo_sdk_name; 790cdf0e10cSrcweir var sSuggestedDir = WshSysEnv("OO_SDK_OUT"); 791cdf0e10cSrcweir if (sSuggestedDir.length == 0) 792cdf0e10cSrcweir sSuggestedDir = defaultdir; 793cdf0e10cSrcweir 794cdf0e10cSrcweir var bSkip = false; 795cdf0e10cSrcweir while(true) 796cdf0e10cSrcweir { 797cdf0e10cSrcweir stdout.Write( 798cdf0e10cSrcweir "\n Default output directory is the \"c:\\" + oo_sdk_name + "\".\n" + 799cdf0e10cSrcweir " Enter an existent directory if you prefer a different one. But note" + 800cdf0e10cSrcweir " that only\n a path without spaces is allowed because of a" + 801cdf0e10cSrcweir " limitation of gnu make. (optional) [" + sSuggestedDir + "]:"); 802cdf0e10cSrcweir var sDir = stdin.ReadLine(); 803cdf0e10cSrcweir if (sDir.length == 0) 804cdf0e10cSrcweir { 805cdf0e10cSrcweir //No user input, check OO_SDK_OUT or suggested value 806cdf0e10cSrcweir if ( sSuggestedDir.length == 0 ) { 807cdf0e10cSrcweir bSkip = true; 808cdf0e10cSrcweir } else { 809cdf0e10cSrcweir if (sSuggestedDir == oo_user_sdk_dir || sSuggestedDir == defaultdir) { 810cdf0e10cSrcweir var fso = new ActiveXObject("Scripting.FileSystemObject"); 811cdf0e10cSrcweir if ( !fso.FolderExists(sSuggestedDir) ) 812cdf0e10cSrcweir fso.CreateFolder(sSuggestedDir); 813cdf0e10cSrcweir } 814cdf0e10cSrcweir if ( !aFileSystemObject.FolderExists(sSuggestedDir) ) 815cdf0e10cSrcweir { 816cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 817cdf0e10cSrcweir sSuggestedDir + "\"."); 818cdf0e10cSrcweir sSuggestedDir = ""; 819cdf0e10cSrcweir bSkip = true; 820cdf0e10cSrcweir } 821cdf0e10cSrcweir } 822cdf0e10cSrcweir 823cdf0e10cSrcweir sDir = sSuggestedDir; 824cdf0e10cSrcweir } 825cdf0e10cSrcweir else 826cdf0e10cSrcweir { 827cdf0e10cSrcweir if (sDir.indexOf(' ') != -1) { 828cdf0e10cSrcweir stdout.WriteLine("\n Error: your specified output directory " + 829cdf0e10cSrcweir "\"" + sDir + "\" " + 830cdf0e10cSrcweir "contains one or more spaces.\n That " + 831cdf0e10cSrcweir "causes problems with gnu make. Please specifiy" + 832cdf0e10cSrcweir " a directory without spaces."); 833cdf0e10cSrcweir bSkip = true; 834cdf0e10cSrcweir } 835cdf0e10cSrcweir //validate the user input 836cdf0e10cSrcweir if ( ! aFileSystemObject.FolderExists(sDir)) 837cdf0e10cSrcweir { 838cdf0e10cSrcweir stdout.WriteLine("\n Error: Could not find directory \"" + 839cdf0e10cSrcweir sDir + "\"."); 840cdf0e10cSrcweir bSkip = true; 841cdf0e10cSrcweir } 842cdf0e10cSrcweir } 843cdf0e10cSrcweir 844cdf0e10cSrcweir if ( bSkip ) { 845cdf0e10cSrcweir if ( skipChoice("a special output directory") ) { 846cdf0e10cSrcweir return ""; 847cdf0e10cSrcweir } else { 848cdf0e10cSrcweir bSkip = false; 849cdf0e10cSrcweir continue; 850cdf0e10cSrcweir } 851cdf0e10cSrcweir } 852cdf0e10cSrcweir 853cdf0e10cSrcweir return sDir; 854cdf0e10cSrcweir } 855cdf0e10cSrcweir} 856cdf0e10cSrcweir 857cdf0e10cSrcweirfunction getAutoDeployment() 858cdf0e10cSrcweir{ 859cdf0e10cSrcweir var sSuggestedAuto = WshSysEnv("SDK_AUTO_DEPLOYMENT"); 860cdf0e10cSrcweir if (sSuggestedAuto.length == 0) 861cdf0e10cSrcweir sSuggestedAuto = "YES"; 862cdf0e10cSrcweir 863cdf0e10cSrcweir while(true) 864cdf0e10cSrcweir { 865cdf0e10cSrcweir stdout.Write("\n Automatic deployment of UNO components (YES/NO) ["+ 866cdf0e10cSrcweir sSuggestedAuto + "]:"); 867cdf0e10cSrcweir var sAuto = stdin.ReadLine(); 868cdf0e10cSrcweir if (sAuto.length == 0) 869cdf0e10cSrcweir sAuto = sSuggestedAuto; 870cdf0e10cSrcweir else 871cdf0e10cSrcweir { 872cdf0e10cSrcweir sAutoU = sAuto.toUpperCase(); 873cdf0e10cSrcweir if (sAutoU != "YES" && sAutoU != "NO") 874cdf0e10cSrcweir { 875cdf0e10cSrcweir stdout.WriteLine("\n Error: The value \"" + sAuto + "\" is " + 876cdf0e10cSrcweir "invalid. Please answer YES or NO.") 877cdf0e10cSrcweir continue; 878cdf0e10cSrcweir } 879cdf0e10cSrcweir sAuto = sAutoU; 880cdf0e10cSrcweir } 881cdf0e10cSrcweir return sAuto; 882cdf0e10cSrcweir } 883cdf0e10cSrcweir} 884cdf0e10cSrcweir 885cdf0e10cSrcweir//The function uses sp2bv.exe to obtain a file URL from a 886cdf0e10cSrcweir//system path. The URL is already escaped for use as bootstrap variable. 887cdf0e10cSrcweir//($ -> \$). Then the resulting string is escaped for use in a bat file. 888cdf0e10cSrcweir//That is % signs are made to double % (% -> %%); 889cdf0e10cSrcweirfunction makeBootstrapFileUrl(systemPath) 890cdf0e10cSrcweir{ 891cdf0e10cSrcweir var oExec = WshShell.Exec("sp2bv.exe \"" + systemPath + "\""); 892cdf0e10cSrcweir var output=""; 893cdf0e10cSrcweir while (true) 894cdf0e10cSrcweir { 895cdf0e10cSrcweir if (!oExec.StdOut.AtEndOfStream) 896cdf0e10cSrcweir { 897cdf0e10cSrcweir var next = oExec.StdOut.Read(1); 898cdf0e10cSrcweir if (next == '%') 899cdf0e10cSrcweir output += "%%"; 900cdf0e10cSrcweir else 901cdf0e10cSrcweir output += next; 902cdf0e10cSrcweir } 903cdf0e10cSrcweir else 904cdf0e10cSrcweir break; 905cdf0e10cSrcweir } 906cdf0e10cSrcweir return output; 907cdf0e10cSrcweir} 908cdf0e10cSrcweir 909cdf0e10cSrcweirfunction writeBatFile(fdir, file) 910cdf0e10cSrcweir{ 911cdf0e10cSrcweir var fso = new ActiveXObject("Scripting.FileSystemObject"); 912cdf0e10cSrcweir if ( !fso.FolderExists(fdir) ) 913cdf0e10cSrcweir fso.CreateFolder(fdir); 914cdf0e10cSrcweir var newFile = fso.CreateTextFile(file, true); 915cdf0e10cSrcweir 916cdf0e10cSrcweir newFile.Write( 917cdf0e10cSrcweir "@echo off\n" + 918cdf0e10cSrcweir "REM This script sets all enviroment variables, which\n" + 919cdf0e10cSrcweir "REM are necessary for building the examples of the Office Development Kit.\n" + 920cdf0e10cSrcweir "REM The Script was developed for the operating systems Windows.\n" + 921cdf0e10cSrcweir "REM The SDK name\n" + 9224f913391SAriel Constenla-Haile "REM Example: set OO_SDK_NAME=openoffice4.0_sdk\n" + 923cdf0e10cSrcweir "set OO_SDK_NAME=" + oo_sdk_name + 924cdf0e10cSrcweir "\n\n" + 925cdf0e10cSrcweir "REM Installation directory of the Software Development Kit.\n" + 926*599cc5b4SOliver-Rainer Wittmann "REM Example: set OO_SDK_HOME=C:\\Program Files\\OpenOffice\\Basic 4.0\\sdk\n" + 927cdf0e10cSrcweir "set OO_SDK_HOME=" + oo_sdk_home + 928cdf0e10cSrcweir "\n\n" + 929cdf0e10cSrcweir "REM Office installation directory.\n" + 930*599cc5b4SOliver-Rainer Wittmann "REM Example: set OFFICE_HOME=C:\\Program Files\\OpenOffice 4\n" + 931cdf0e10cSrcweir "set OFFICE_HOME=" + office_home + 932cdf0e10cSrcweir "\n\n" + 933*599cc5b4SOliver-Rainer Wittmann "REM Example: set OFFICE_HOME=C:\\Program Files\\OpenOffice\\Basis 4.0\n" + 934cdf0e10cSrcweir "set OFFICE_BASE_HOME=" + office_base_home + 935cdf0e10cSrcweir "\n\n" + 936cdf0e10cSrcweir "REM URE installation directory.\n" + 937*599cc5b4SOliver-Rainer Wittmann "REM Example: set OO_SDK_URE_HOME=C:\\Program Files\\OpenOffice\\URE\n" + 938cdf0e10cSrcweir "set OO_SDK_URE_HOME=" + oo_sdk_ure_home + 939cdf0e10cSrcweir "\n\n" + 940cdf0e10cSrcweir "REM Directory of the make command.\n" + 941cdf0e10cSrcweir "REM Example: set OO_SDK_MAKE_HOME=D:\\NextGenerationMake\\make\n" + 942cdf0e10cSrcweir "set OO_SDK_MAKE_HOME=" + oo_sdk_make_home + 943cdf0e10cSrcweir "\n\n" + 944cdf0e10cSrcweir "REM Directory of the zip tool.\n" + 945cdf0e10cSrcweir "REM Example: set OO_SDK_ZIP_HOME=D:\\infozip\\bin\n" + 946cdf0e10cSrcweir "set OO_SDK_ZIP_HOME=" + oo_sdk_zip_home + 947cdf0e10cSrcweir "\n\n" + 948985d02c7SAriel Constenla-Haile "REM Directory of the cat tool.\n" + 949985d02c7SAriel Constenla-Haile "REM Example: set OO_SDK_CAT_HOME=C:\\UnxUtils\\usr\\local\\wbin\n" + 950985d02c7SAriel Constenla-Haile "set OO_SDK_CAT_HOME=" + oo_sdk_cat_home + 951985d02c7SAriel Constenla-Haile "\n\n" + 952985d02c7SAriel Constenla-Haile "REM Directory of the sed tool.\n" + 953985d02c7SAriel Constenla-Haile "REM Example: set OO_SDK_SED_HOME=C:\\UnxUtils\\usr\\local\\wbin\n" + 954985d02c7SAriel Constenla-Haile "set OO_SDK_SED_HOME=" + oo_sdk_sed_home + 955985d02c7SAriel Constenla-Haile "\n\n" + 956cdf0e10cSrcweir "REM Directory of the C++ compiler.\n" + 957cdf0e10cSrcweir "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" + 958cdf0e10cSrcweir "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home + 959cdf0e10cSrcweir "\nset CPP_MANIFEST=" + oo_sdk_manifest_used + 960cdf0e10cSrcweir "\nset CPP_WINDOWS_SDK=" + oo_sdk_windowssdk + 961cdf0e10cSrcweir "\n\n" + 962cdf0e10cSrcweir "REM Directory of the C# and VB.NET compilers.\n" + 963cdf0e10cSrcweir "REM Example:set OO_SDK_CLI_HOME=C:\\WINXP\\Microsoft.NET\\Framework\\v1.0.3705\n" + 964cdf0e10cSrcweir "set OO_SDK_CLI_HOME=" + oo_sdk_cli_home + 965cdf0e10cSrcweir "\n\n" + 966cdf0e10cSrcweir "REM Java SDK installation directory.\n" + 967cdf0e10cSrcweir "REM Example: set OO_SDK_JAVA_HOME=C:\\Program Files\\Java\\jdk1.6.0_05\n" + 968cdf0e10cSrcweir "set OO_SDK_JAVA_HOME=" + oo_sdk_java_home + 969cdf0e10cSrcweir "\n\n" + 970cdf0e10cSrcweir "REM Special output directory\n" + 971cdf0e10cSrcweir "REM Example: set OO_SDK_OUT=C:\\" + oo_sdk_name + "\n" + 972cdf0e10cSrcweir "set OO_SDK_OUT=" + oo_sdk_out + 973cdf0e10cSrcweir "\n\n" + 974cdf0e10cSrcweir "REM Automatic deployment\n" + 975cdf0e10cSrcweir "REM Example: set SDK_AUTO_DEPLOYMENT=YES\n" + 976cdf0e10cSrcweir "set SDK_AUTO_DEPLOYMENT=" + sdk_auto_deployment + 977cdf0e10cSrcweir "\n\n" + 978cdf0e10cSrcweir "set STLDEBUG=" + stldebug + "\n" + 979cdf0e10cSrcweir "REM check stlport lib in 4NT shell\n" + 980cdf0e10cSrcweir "REM if exist \"%OO_SDK_HOME%\\windows\\lib\\stlport_vc71_stldebug.lib\". (\n" + 981cdf0e10cSrcweir "REM set STLDEBUG=_stldebug\n" + 982cdf0e10cSrcweir "REM )\n\n" + 983cdf0e10cSrcweir "REM Check installation path for the Office Development Kit.\n" + 984cdf0e10cSrcweir "if not defined OO_SDK_HOME (\n" + 985cdf0e10cSrcweir " echo Error: the variable OO_SDK_HOME is missing!\n" + 986cdf0e10cSrcweir " goto :error\n" + 987cdf0e10cSrcweir " )\n" + 988cdf0e10cSrcweir "\n" + 989cdf0e10cSrcweir "REM Check installation path for the office.\n" + 990cdf0e10cSrcweir "REM if not defined OFFICE_HOME (\n" + 991cdf0e10cSrcweir "REM if not defined OO_SDK_URE_HOME (\n" + 992cdf0e10cSrcweir "REM echo Error: either of the variables OFFICE_HOME and\n" + 993cdf0e10cSrcweir "REM echo OO_SDK_URE_HOME is missing!\n" + 994cdf0e10cSrcweir "REM goto :error\n" + 995cdf0e10cSrcweir "REM )\n" + 996cdf0e10cSrcweir "REM )\n" + 997cdf0e10cSrcweir "\n" + 998cdf0e10cSrcweir "REM Check installation path for GNU make.\n" + 999cdf0e10cSrcweir "if not defined OO_SDK_MAKE_HOME (\n" + 1000cdf0e10cSrcweir " echo Error: the variable OO_SDK_MAKE_HOME is missing!\n" + 1001cdf0e10cSrcweir " goto :error\n" + 1002cdf0e10cSrcweir " )\n" + 1003cdf0e10cSrcweir "\n" + 1004cdf0e10cSrcweir "REM Check installation path for the zip tool.\n" + 1005cdf0e10cSrcweir "if not defined OO_SDK_ZIP_HOME (\n" + 1006cdf0e10cSrcweir " echo Error: the variable OO_SDK_ZIP_HOME is missing!\n" + 1007cdf0e10cSrcweir " goto :error\n" + 1008cdf0e10cSrcweir " )\n" + 1009cdf0e10cSrcweir "\n" + 1010985d02c7SAriel Constenla-Haile "REM Check installation path for the cat tool.\n" + 1011985d02c7SAriel Constenla-Haile "if not defined OO_SDK_CAT_HOME (\n" + 1012985d02c7SAriel Constenla-Haile " echo Error: the variable OO_SDK_CAT_HOME is missing!\n" + 1013985d02c7SAriel Constenla-Haile " goto :error\n" + 1014985d02c7SAriel Constenla-Haile " )\n" + 1015985d02c7SAriel Constenla-Haile "\n" + 1016985d02c7SAriel Constenla-Haile "REM Check installation path for the sed tool.\n" + 1017985d02c7SAriel Constenla-Haile "if not defined OO_SDK_SED_HOME (\n" + 1018985d02c7SAriel Constenla-Haile " echo Error: the variable OO_SDK_SED_HOME is missing!\n" + 1019985d02c7SAriel Constenla-Haile " goto :error\n" + 1020985d02c7SAriel Constenla-Haile " )\n" + 1021985d02c7SAriel Constenla-Haile "\n" + 1022cdf0e10cSrcweir "REM Set library path. \n" + 1023cdf0e10cSrcweir "set LIB=%OO_SDK_HOME%\\lib;%LIB%\n" + 1024cdf0e10cSrcweir "if defined CPP_WINDOWS_SDK (\n" + 1025cdf0e10cSrcweir " set LIB=%LIB%;%CPP_WINDOWS_SDK%\\lib\n" + 1026cdf0e10cSrcweir " )\n" + 1027cdf0e10cSrcweir "\n" + 1028cdf0e10cSrcweir "REM Set office program path.\n" + 1029cdf0e10cSrcweir "if defined OFFICE_HOME (\n" + 1030cdf0e10cSrcweir " set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\\program\n" + 1031cdf0e10cSrcweir " )\n" + 1032cdf0e10cSrcweir "\n" + 1033cdf0e10cSrcweir "REM Set office program path.\n" + 1034cdf0e10cSrcweir "if defined OFFICE_BASE_HOME (\n" + 1035cdf0e10cSrcweir " set OFFICE_BASE_PROGRAM_PATH=%OFFICE_BASE_HOME%\\program\n" + 1036cdf0e10cSrcweir " )\n" + 1037cdf0e10cSrcweir "\n" + 1038cdf0e10cSrcweir "REM Set UNO path, necessary to ensure that the cpp examples using the\n" + 1039cdf0e10cSrcweir "REM new UNO bootstrap mechanism use the configured office installation\n" + 1040cdf0e10cSrcweir "REM (only set when using an Office).\n" + 1041cdf0e10cSrcweir "if defined OFFICE_HOME (\n" + 1042cdf0e10cSrcweir " set UNO_PATH=%OFFICE_PROGRAM_PATH%\n" + 1043cdf0e10cSrcweir " )\n" + 1044cdf0e10cSrcweir "\n" + 1045cdf0e10cSrcweir "REM if defined OO_SDK_URE_HOME (\n" + 1046cdf0e10cSrcweir "set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\\bin\n" + 1047cdf0e10cSrcweir "set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\\bin\n" + 1048cdf0e10cSrcweir "set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\\java\n" + 1049cdf0e10cSrcweir "REM ) else (\n" + 1050cdf0e10cSrcweir "set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%\n" + 1051cdf0e10cSrcweir "set OO_SDK_OFFICE_LIB_DIR=%OFFICE_BASE_PROGRAM_PATH%\n" + 1052cdf0e10cSrcweir "set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_BASE_PROGRAM_PATH%\\classes\n" + 1053cdf0e10cSrcweir "REM )\n" + 1054cdf0e10cSrcweir "\n" + 1055cdf0e10cSrcweir "REM Set classpath\n" + 1056cdf0e10cSrcweir "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" + 1057cdf0e10cSrcweir "REM if defined OFFICE_HOME (\n" + 1058cdf0e10cSrcweir "REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\\unoil.jar\n" + 1059cdf0e10cSrcweir "REM )\n" + 1060cdf0e10cSrcweir "\n" + 1061cdf0e10cSrcweir "REM Add directory of the SDK tools to the path.\n" + 1062cdf0e10cSrcweir "set PATH=%OO_SDK_HOME%\\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" + 1063cdf0e10cSrcweir "\n" + 1064cdf0e10cSrcweir "REM Set PATH appropriate to the output directory\n" + 1065cdf0e10cSrcweir "if defined OO_SDK_OUT (\n" + 1066cdf0e10cSrcweir " set PATH=%OO_SDK_OUT%\\WINexample.out\\bin;%PATH%\n" + 1067cdf0e10cSrcweir " ) else (\n" + 1068cdf0e10cSrcweir " set PATH=%OO_SDK_HOME%\\WINexample.out\\bin;%PATH%\n" + 1069cdf0e10cSrcweir " )\n" + 1070cdf0e10cSrcweir "\n" + 1071cdf0e10cSrcweir "REM Add directory of the command make to the path, if necessary.\n" + 1072cdf0e10cSrcweir "if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%\n" + 1073985d02c7SAriel Constenla-Haile "\n" + 1074985d02c7SAriel Constenla-Haile "REM Add directory of the zip tool to the path, if necessary.\n" + 1075985d02c7SAriel Constenla-Haile "if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%\n" + 1076985d02c7SAriel Constenla-Haile "\n" + 1077985d02c7SAriel Constenla-Haile "REM Add directory of the cat tool to the path, if necessary.\n" + 1078985d02c7SAriel Constenla-Haile "if defined OO_SDK_CAT_HOME set PATH=%OO_SDK_CAT_HOME%;%PATH%\n" + 1079985d02c7SAriel Constenla-Haile "\n" + 1080985d02c7SAriel Constenla-Haile "REM Add directory of the sed tool to the path, if necessary.\n" + 1081985d02c7SAriel Constenla-Haile "if defined OO_SDK_SED_HOME set PATH=%OO_SDK_SED_HOME%;%PATH%\n" + 1082985d02c7SAriel Constenla-Haile "\n" + 1083cdf0e10cSrcweir "REM Add directory of the C++ compiler to the path, if necessary.\n" + 1084cdf0e10cSrcweir "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" + 1085cdf0e10cSrcweir "\n" + 1086cdf0e10cSrcweir "REM Add directory of the Win SDK to the path, if necessary.\n" + 1087cdf0e10cSrcweir "if defined CPP_WINDOWS_SDK (\n" + 1088cdf0e10cSrcweir " set PATH=%CPP_WINDOWS_SDK\\bin%;%PATH%\n" + 1089cdf0e10cSrcweir " set INCLUDE=%CPP_WINDOWS_SDK\\Include%;%INCLUDE%\n" + 1090cdf0e10cSrcweir ")\n" + 1091cdf0e10cSrcweir "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" + 1092cdf0e10cSrcweir "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" + 1093cdf0e10cSrcweir "\n" + 1094cdf0e10cSrcweir "REM Add directory of the Java tools to the path, if necessary.\n" + 1095cdf0e10cSrcweir "if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\\bin;%OO_SDK_JAVA_HOME%\\jre\\bin;%PATH%\n" + 1096cdf0e10cSrcweir "\n" + 1097cdf0e10cSrcweir "REM Set environment for C++ compiler tools, if necessary.\n" + 1098cdf0e10cSrcweir "if defined OO_SDK_CPP_HOME call \"%OO_SDK_CPP_HOME%\\VCVARS32.bat\"\n" + 1099cdf0e10cSrcweir "\n" + 1100cdf0e10cSrcweir "REM Set tilte to identify the prepared shell.\n" + 1101cdf0e10cSrcweir "title Shell prepared for SDK\n" + 1102cdf0e10cSrcweir "\nREM Prepare shell with all necessary environment variables.\n" + 1103cdf0e10cSrcweir "echo.\n" + 1104cdf0e10cSrcweir "echo ******************************************************************\n" + 1105cdf0e10cSrcweir "echo *\n" + 1106cdf0e10cSrcweir "echo * SDK environment is prepared for Windows\n" + 1107cdf0e10cSrcweir "echo *\n" + 1108cdf0e10cSrcweir "echo * SDK = %OO_SDK_HOME%\n" + 1109cdf0e10cSrcweir "echo * Office = %OFFICE_HOME%\n" + 1110cdf0e10cSrcweir "echo * Office Base = %OFFICE_BASE_HOME%\n" + 1111cdf0e10cSrcweir "echo * URE = %OO_SDK_URE_HOME%\n" + 1112cdf0e10cSrcweir "echo * Make = %OO_SDK_MAKE_HOME%\n" + 1113cdf0e10cSrcweir "echo * Zip = %OO_SDK_ZIP_HOME%\n" + 1114985d02c7SAriel Constenla-Haile "echo * cat = %OO_SDK_CAT_HOME%\n" + 1115985d02c7SAriel Constenla-Haile "echo * sed = %OO_SDK_SED_HOME%\n" + 1116cdf0e10cSrcweir "echo * C++ Compiler = %OO_SDK_CPP_HOME%\n" + 1117cdf0e10cSrcweir "echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%\n" + 1118cdf0e10cSrcweir "echo * Java = %OO_SDK_JAVA_HOME%\n" + 1119cdf0e10cSrcweir "echo * Special Output directory = %OO_SDK_OUT%\n" + 1120cdf0e10cSrcweir "echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%\n" + 1121cdf0e10cSrcweir "echo *\n" + 1122cdf0e10cSrcweir "echo ******************************************************************\n" + 1123cdf0e10cSrcweir "echo.\n" + 1124cdf0e10cSrcweir "goto end\n" + 1125cdf0e10cSrcweir "\n" + 1126cdf0e10cSrcweir " :error\n" + 1127cdf0e10cSrcweir "Error: Please insert the necessary environment variables into the batch file.\n" + 1128cdf0e10cSrcweir "\n" + 1129cdf0e10cSrcweir " :end\n" 1130cdf0e10cSrcweir ); 1131cdf0e10cSrcweir newFile.Close(); 1132cdf0e10cSrcweir} 1133