? runideopenvms_patch Index: runideopenvms.com =================================================================== RCS file: /cvs/core/release/bin/runideopenvms.com,v retrieving revision 1.4 diff -c -r1.4 runideopenvms.com *** runideopenvms.com 2001/04/27 09:01:06 1.4 --- runideopenvms.com 2001/06/12 14:49:34 *************** *** 122,127 **** --- 122,128 ---- $ min_astlm = 300 $ min_biolm = 1024 $ min_bytlm = 2000000 + $ min_rec_bytlm = 1990000 $ min_diolm = 1024 $ min_enqlm = 2000 $ min_fillm = 300 *************** *** 132,152 **** $ min_wsextent = 524288 $ temp_dir = "sys$scratch" $ - $! Initialize variables - $ nb$cp1 == "" - $ nb$cp2 == "" - $ nb$cp3 == "" - $ nb$cp4 == "" - $ nb$cp5 == "" - $ nb$cp6 == "" - $ nb$cp7 == "" - $ nb$cp8 == "" - $ nb$cp9 == "" - $ nb$cp10 == "" - $ nb$cp11 == "" - $ nb$cp12 == "" - $ nb$cp13 == "" - $ $! Define the NetBeans IDE entry point $ ide = "org.netbeans.Main" $ --- 133,138 ---- *************** *** 165,170 **** --- 151,189 ---- $ jdk_home = "sys$common:[java$130]" $ endif $ + $! Check if the Java setup command procedure from a different version of the + $! JDK that we'll be using was previously executed. We do this by seeing if + $! the symbol JAVA is defined and, if it is, extracting the Java version from + $! the symbol's value. If defined and different from what we're going to use, + $! display a message to the user that a CANCEL_SETUP command procedure must + $! be executed before running NetBeans. + $ if f$type(java) .nes. "" + $ then + $ java_version = f$edit(f$parse(java,,, "DIRECTORY"), "UPCASE") + $ java_version = f$element(0, ".", java_version) - "[" + $ jdk_version = f$edit(((f$parse(jdk_home,,, "DIRECTORY") - "[") - "]"), "UPCASE") + $ if java_version .nes. jdk_version + $ then + $ cancel_procedure = (jdk_home - "]") + ".COM]" +java_version + "_CANCEL_SETUP.COM" + $ if f$search(cancel_procedure) .nes. "" + $ then + $ @'cancel_procedure' + $ else + $ write sys$output "" + $ write sys$output "Your process has symbol and logical name definitions that were created by a" + $ write sys$output "different version of Java than what will be used by the IDE. To run the IDE," + $ write sys$output "you must execute a command procedure which will reset your process so that the" + $ write sys$output "required version of Java will run properly. The command procedure name is:" + $ write sys$output java_version, "_CANCEL_SETUP.COM" + $ write sys$output "" + $ write sys$output "If you do not have this file on your system, please refer to the " + $ write sys$output "release notes for information on obtaining this file." + $ write sys$output "" + $ exit + $ endif + $ endif + $ endif + $ $! Create the path to the NetBeans kit. If the NETBEANS$HOME logical is $! defined, use its value as the NetBeans kit path. If not defined, assume $! this command file is executed from one level below the NetBeans root *************** *** 185,204 **** $! Check to make sure that some critical quotas for running NetBeans are $! sufficient and warn the user if any are not $ error_count == 0 ! $ call check_quota "ASTLM" min_astlm error_count ! $ call check_quota "BIOLM" min_biolm error_count ! $ call check_quota "BYTLM" min_bytlm error_count ! $ call check_quota "DIOLM" min_diolm error_count ! $ call check_quota "ENQLM" min_enqlm error_count ! $ call check_quota "FILLM" min_fillm error_count ! $ call check_quota "PGFLQUOTA" min_pgflquota error_count ! $ call check_quota "PRCLM" min_prclm error_count ! $ call check_quota "TQLM" min_tqelm error_count ! $ call check_quota "WSEXTENT" min_wsextent error_count $ if error_count .ne. 0 $ then $ write sys$output "" ! $ write sys$output "Warning: NetBeans may not start or work properly until all quotas are" $ write sys$output " set to at least their recommended minimum values. $ write sys$output "" $ endif --- 204,223 ---- $! Check to make sure that some critical quotas for running NetBeans are $! sufficient and warn the user if any are not $ error_count == 0 ! $ call check_quota "ASTLM" min_astlm min_astlm error_count ! $ call check_quota "BIOLM" min_biolm min_biolm error_count ! $ call check_quota "BYTLM" min_bytlm min_rec_bytlm error_count ! $ call check_quota "DIOLM" min_diolm min_diolm error_count ! $ call check_quota "ENQLM" min_enqlm min_enqlm error_count ! $ call check_quota "FILLM" min_fillm min_fillm error_count ! $ call check_quota "PGFLQUOTA" min_pgflquota min_pgflquota error_count ! $ call check_quota "PRCLM" min_prclm min_prclm error_count ! $ call check_quota "TQLM" min_tqelm min_tqelm error_count ! $ call check_quota "WSEXTENT" min_wsextent min_wsextent error_count $ if error_count .ne. 0 $ then $ write sys$output "" ! $ write sys$output "Warning: The IDE may not start or work properly until all quotas are" $ write sys$output " set to at least their recommended minimum values. $ write sys$output "" $ endif *************** *** 243,266 **** $ cmd_filename = "''temp_dir':nbcmd" + userpid + ".dat" $ open/write cmd_file 'cmd_filename' $ $! Create the classpath and write it to the command file ! $ call find_jars userdir "lib.patches.locale" "nb$cp1" ! $ call find_jars userdir "lib.patches" "nb$cp2" ! $ call find_jars userdir "lib.locale" "nb$cp3" ! $ call find_jars userdir "lib" "nb$cp4" ! $ call find_jars userdir "lib.ext.locale" "nb$cp5" ! $ call find_jars userdir "lib.ext" "nb$cp6" ! $ call find_jars nbhome "lib.patches.locale" "nb$cp7" ! $ call find_jars nbhome "lib.patches" "nb$cp8" ! $ call find_jars nbhome "lib.locale" "nb$cp9" ! $ call find_jars nbhome "lib" "nb$cp10" ! $ call find_jars nbhome "lib.ext.locale" "nb$cp11" ! $ call find_jars nbhome "lib.ext" "nb$cp12" ! $ call find_jars jdk_home "lib..." "nb$cp13" ! $ nb$cp13 = f$edit("''nb$cp13'", "LOWERCASE") ! $ write/symbol cmd_file "-cp ", nb$cp1, nb$cp2, nb$cp3, nb$cp4, nb$cp5, - ! nb$cp6, nb$cp7, nb$cp8, nb$cp9, nb$cp10, - ! nb$cp11, nb$cp12, nb$cp13 $ $! Add the memory switches for the VM to the command file $ write cmd_file "-Xms8m" --- 262,294 ---- $ cmd_filename = "''temp_dir':nbcmd" + userpid + ".dat" $ open/write cmd_file 'cmd_filename' $ + $! Initialize the class path symbol builder + $ call init_add_symbol + $ $! Create the classpath and write it to the command file ! $ call find_jars userdir "lib.patches.locale" ! $ call find_jars userdir "lib.patches" ! $ call find_jars userdir "lib.locale" ! $ call find_jars userdir "lib" ! $ call find_jars userdir "lib.ext.locale" ! $ call find_jars userdir "lib.ext" ! $ call find_jars nbhome "lib.patches.locale" ! $ call find_jars nbhome "lib.patches" ! $ call find_jars nbhome "lib.locale" ! $ call find_jars nbhome "lib" ! $ call find_jars nbhome "lib.ext.locale" ! $ call find_jars nbhome "lib.ext" ! $ call find_jars jdk_home "lib..." ! $ ! $! Create a symbol containing the list of symbols ! $ call create_concat_symbol "nb$symsym" ! $ ! $! Write the classpath to the command file ! $ write/symbol cmd_file "-cp ", 'nb$symsym' ! $ ! $! Cleanup the global symbols we created to make the really long ! $! classpath ! $ call cleanup_symbols $ $! Add the memory switches for the VM to the command file $ write cmd_file "-Xms8m" *************** *** 269,276 **** $ write cmd_file "-Xmx''max_heap'm" $ $! NetBeans user directory property ! $ write cmd_file "-Dnetbeans.user=", unix_userdir $ $! NetBeans home directory property $ write cmd_file "-Dnetbeans.home=", unix_nbhome $ --- 297,306 ---- $ write cmd_file "-Xmx''max_heap'm" $ $! NetBeans user directory property ! $ write cmd_file "-Dnetbeans.user=", f$edit("''unix_userdir'", "LOWERCASE") $ + $ unix_nbhome = f$edit("''unix_nbhome'", "LOWERCASE") + $! $! NetBeans home directory property $ write cmd_file "-Dnetbeans.home=", unix_nbhome $ *************** *** 290,303 **** $ write cmd_file "-Dorg.netbeans.core.ExLocalFileSystem.BACKUP_EXT=", backup_char $ $! NetBeans OS environment file property ! $ write cmd_file "-Dnetbeans.osenv=", unix_nbenv $ $! Set up the Java environment for NetBeans $ gosub setup_nb_env $ ! $! Start the NetBeans IDE $ write sys$output "" ! $ write sys$output "Starting NetBeans..." $ write sys$output "" $ close cmd_file $! The JVM will hang if verify is on, so shut it off but save the current state --- 320,333 ---- $ write cmd_file "-Dorg.netbeans.core.ExLocalFileSystem.BACKUP_EXT=", backup_char $ $! NetBeans OS environment file property ! $ write cmd_file "-Dnetbeans.osenv=", f$edit("''unix_nbenv'", "LOWERCASE") $ $! Set up the Java environment for NetBeans $ gosub setup_nb_env $ ! $! Start the NetBeans/FFJ IDE $ write sys$output "" ! $ write sys$output "Starting the IDE..." $ write sys$output "" $ close cmd_file $! The JVM will hang if verify is on, so shut it off but save the current state *************** *** 365,371 **** $ vfs = f$parse(x,,,"DEVICE") + f$parse(x,,,"DIRECTORY") +- f$parse(x,,,"NAME") + f$edit(f$parse(x,,,"TYPE"), "LOWERCASE") $ call convert_to_unix "''vfs'" "ufs" ! $ 'P3' == 'P3' + ufs + ":" $ goto top1 $ endif $top2: --- 395,402 ---- $ vfs = f$parse(x,,,"DEVICE") + f$parse(x,,,"DIRECTORY") +- f$parse(x,,,"NAME") + f$edit(f$parse(x,,,"TYPE"), "LOWERCASE") $ call convert_to_unix "''vfs'" "ufs" ! $ ufs == ufs + ":" ! $ call add_symbol ufs $ goto top1 $ endif $top2: *************** *** 375,384 **** $ vfs = f$parse(x,,,"DEVICE") + f$parse(x,,,"DIRECTORY") +- f$parse(x,,,"NAME") + f$edit(f$parse(x,,,"TYPE"), "LOWERCASE") $ call convert_to_unix "''vfs'" "ufs" ! $ 'P3' == 'P3' + ufs + ":" $ goto top2 $ endif ! $ return $ endsubroutine $ $! This is a very simple routine to convert from a VMS style filespec to --- 406,416 ---- $ vfs = f$parse(x,,,"DEVICE") + f$parse(x,,,"DIRECTORY") +- f$parse(x,,,"NAME") + f$edit(f$parse(x,,,"TYPE"), "LOWERCASE") $ call convert_to_unix "''vfs'" "ufs" ! $ ufs == ufs + ":" ! $ call add_symbol ufs $ goto top2 $ endif ! $ $ endsubroutine $ $! This is a very simple routine to convert from a VMS style filespec to *************** *** 403,429 **** $ du = du + "/" + f $ endif $ 'P2' == du ! $ return $ endsubroutine $ ! $! Test a particular process quota against a minimum value. If the quota is ! $! not at least the minimum value, display a warning message to the user. $! ! $! P1 is a string that is the name of the quota and P2 is the minimum value ! $! for that the quota. The symbol named in P3 is incremented if the specified ! $! quota is below the minimum value. $! $check_quota: subroutine $ quota_val = f$getjpi("","''P1'") $ if quota_val .lt. 'P2' $ then $ write sys$output "The ''P1' quota for your process is too low" ! $ write sys$output " Actual: ''quota_val'; recommended minimum: ", 'P2' ! $ 'P3' == 'P3' + 1 $ endif ! $ return $ endsubroutine $ $! Command procedure to set up the environment before running $! NetBeans $! --- 435,528 ---- $ du = du + "/" + f $ endif $ 'P2' == du ! $ $ endsubroutine $ ! $! Test a particular process quota against a minimum value. If the quota ! $! is not at least the minimum value, display a warning message to the ! $! user with the recommended minimum setting. $! ! $! P1 is a string that is the name of the quota, P2 is the minimum value for ! $! that the quota, and P3 is the recommended minimum value that is displayed ! $! to the user. The symbol named in P4 is incremented if the specified quota ! $! is below the minimum value. $! $check_quota: subroutine $ quota_val = f$getjpi("","''P1'") $ if quota_val .lt. 'P2' $ then $ write sys$output "The ''P1' quota for your process is too low" ! $ write sys$output " Actual: ''quota_val'; recommended minimum: ", 'P3' ! $ 'P4' == 'P4' + 1 $ endif ! $ ! $ endsubroutine ! $ ! $ init_add_symbol: subroutine ! $! ! $ scount == 0 ! $ nbcursym0 :== "" ! $ exit $ endsubroutine + $! + $! + $ add_symbol: subroutine $ + $ newstr = 'P1' + $ newstr = f$edit("''newstr'", "LOWERCASE") + $! + $! see if there is room in the current symbol for this string + $! + $ len = f$length(nbcursym'scount') + $ lenn = f$length(newstr) + $ totlen = len + lenn + $ if (totlen) .gt. 255 + $ then ! no room, need to create new symbol + $ scount == scount + 1 + $ nbcursym'scount' :== "" + $ endif + $! + $ nbcursym'scount' == nbcursym'scount' + newstr + $! + $ exit + $ endsubroutine + $! + $! + $ create_concat_symbol: subroutine + $! + $ nbsymsym := "" + $ i = 0 + $ iloop: + $ if (i .ge. scount) then goto endloop + $! + $ nbsymsym = nbsymsym + "nbcursym''i', " + $ i = i + 1 + $ goto iloop + $ endloop: + $ nbsymsym = nbsymsym + "nbcursym''i'" + $! + $ 'P1' == nbsymsym + $! + $ exit + $ endsubroutine + $! + $ cleanup_symbols: subroutine + $ i = 0 + $ iloop2: + $ if (i .gt. scount) then goto endloop2 + $! + $ dele/symbol/global nbcursym'i' + $ i = i + 1 + $ goto iloop2 + $ endloop2: + $ + $ delete/symbol/global scount + $ delete/symbol/global nb$symsym + $ exit + $ endsubroutine + $! + $ + $ $! Command procedure to set up the environment before running $! NetBeans $! *************** *** 502,507 **** --- 601,624 ---- $!***************************************************************************** $! * $! Change history: * + $! * + $! 06/06/2001 - (MWG) Rework the creation of the classpath to use an arbitrary* + $! number of symbols. * + $! Make sure that all file specs are in lower case. * + $! Change output messages to use the word IDE rather than * + $! NetBeans so that the script can be used with Forte for Java. * + $! * + $! 05/23/2001 - Modify the check_quota routine to accept a reported value * + $! argument. This is for the BYTLM quota for which f$getjpi() * + $! returns the authorized quota minus any long-term allocated * + $! memory. We can now check for a minimum value that is * + $! different from the minimum value that the user sees when a * + $! warning message is displayed. * + $! * + $! 05/17/2001 - Check to see if the JAVA$xxx_SETUP.COM of a different version * + $! of Java has been executed by the user. If so, try to run the * + $! associated JAVA$xxx_CANCEL procedure. If it can't be found, * + $! tell the user they must run it themselves. * $! * $! 04/25/2001 - Moved "set process/parse=extended" from the setup_nb_env * $! subroutine so it is executed earlier. *