synched w/ trunk mac_bundle_7u4_208753
authorJiri Rechtacek <jrechtacek@netbeans.org>
Sat, 24 Mar 2012 23:46:53 +0100
branchmac_bundle_7u4_208753
changeset 22353080b6d1396dd0
parent 223316 0c3b83bafcfd
parent 223529 f45ea4ebd857
child 223531 3deb06a51d2e
synched w/ trunk
installer/mac/newbuild/netBeans/baseide/build.xml
installer/mac/newbuild/netBeans/baseide/pkg/scripts/postflight
     1.1 --- a/.hgignore	Sat Mar 24 23:38:28 2012 +0100
     1.2 +++ b/.hgignore	Sat Mar 24 23:46:53 2012 +0100
     1.3 @@ -184,3 +184,4 @@
     1.4  ^nbbuild/jna\.keystore$
     1.5  ^nbi/engine/testData$
     1.6  ^o\.n\.bootstrap/launcher/windows/nbexec_exe\.res$
     1.7 +^installer/mac/newbuild/dist_dmg$
     2.1 --- a/installer/mac/newbuild/Bundle.properties	Sat Mar 24 23:38:28 2012 +0100
     2.2 +++ b/installer/mac/newbuild/Bundle.properties	Sat Mar 24 23:46:53 2012 +0100
     2.3 @@ -1,6 +1,8 @@
     2.4  netbeans-Title=NetBeans ${nb.display.version.long}
     2.5  netbeans-mysql-Title=NetBeans IDE with GlassFish and MySQL
     2.6  
     2.7 +jdk7-netbeans-Title=NetBeans ${nb.display.version.short}${mpkg.prefix_nb_jdk}${mpkg.version_jdk}
     2.8 +
     2.9  netbeans-title=NetBeans ${nb.display.version.short}
    2.10  netbeans-tooltip=NetBeans IDE
    2.11  netbeans-description=NetBeans IDE
     3.1 --- a/installer/mac/newbuild/build.pro	Sat Mar 24 23:38:28 2012 +0100
     3.2 +++ b/installer/mac/newbuild/build.pro	Sat Mar 24 23:46:53 2012 +0100
     3.3 @@ -75,7 +75,7 @@
     3.4      <property name="glassfish.v3.sun.id"           value="b${glassfish.v3.sun.build.number}"/>
     3.5      <property name="glassfish.v3.sun.install.dir"  value="${install.dir}/oges-3.1.2-b${glassfish.v3.sun.build.number}"/>
     3.6      <property name="glassfish_v3_sun_location"        value="${glassfish.v3.sun.location.prefix}/${glassfish.v3.sun.build.type}/${glassfish.v3.sun.version}/archive/bundles/oges-3.1.2-${glassfish.v3.sun.version}.zip"/>
     3.7 -    <property name="glassfish_v3_sun_location"        value="${glassfish.v3.sun.location.prefix}/${glassfish.v3.sun.build.type}/${glassfish.v3.sun.version}/archive/bundles/oges-3.1.2-${glassfish.v3.sun.version}-ml.zip"/>
     3.8 +    <property name="glassfish_v3_sun_location_ml"        value="${glassfish.v3.sun.location.prefix}/${glassfish.v3.sun.build.type}/${glassfish.v3.sun.version}/archive/bundles/oges-3.1.2-${glassfish.v3.sun.version}-ml.zip"/>
     3.9      <!--<property name="glassfish_v3_sun_location"    value="${binary_cache_host}/glassfish/sges-v3-${glassfish.v3.sun.version}.zip"/>-->
    3.10      <!--<property name="glassfish_v3_sun_location_ml" value="${binary_cache_host}/glassfish/sges-v3-${glassfish.v3.sun.version}-ml.zip"/>-->
    3.11      <property name="glassfish.v3.sun.subdir"       value="glassfish3"/>
    3.12 @@ -141,4 +141,14 @@
    3.13      <property name="mysql_license.name" value="NB_GF_MySQL.txt"/>   
    3.14      <property name="mysql_readme.name" value="NB_GF_MySQL_Bundle_Thirdparty_license_readme.txt"/>
    3.15  
    3.16 +    <!-- JDK Properties-->    
    3.17 +    <property name="mpkg.prefix_nb_jdk" value=" with JDK"/> 
    3.18 +    <property name="mpkg.version_jdk" value=" 7 Update 04"/> 
    3.19 +    <property name="jdk.bundle.files.prefix" value="jdk-7u4"/>
    3.20 +    <property name="jdk.bundle.files.suffix" value="nb-7_2"/>
    3.21 +    <property name="output.dir" value="jdk/"/>
    3.22 +    <property name="default.jdk7.home" value="/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home"/>
    3.23 +    <property name="jdk_bits_location" value="${gf_builds_host}/java/re/jdk/7u4/promoted/all/b17/bundles/macosx-x64/jdk-7u4-ea-bin-b17-macosx-x64-22_mar_2012.dmg"/>
    3.24 +    <property name="jdk.package.name" value="JDK\ 7\ Update\ 04"/>
    3.25 +
    3.26  </project>
     4.1 --- a/installer/mac/newbuild/build.sh	Sat Mar 24 23:38:28 2012 +0100
     4.2 +++ b/installer/mac/newbuild/build.sh	Sat Mar 24 23:46:53 2012 +0100
     4.3 @@ -20,25 +20,24 @@
     4.4  set -x -e 
     4.5  
     4.6  if [ -z "$1" ] || [ -z "$2" ]|| [ -z "$3" ] || [ -z "$4" ]; then
     4.7 -    echo "usage: $0 zipdir prefix buildnumber javafx_build ml_build [nb_locales]"
     4.8 +    echo "usage: $0 zipdir prefix buildnumber ml_build [nb_locales]"
     4.9      echo ""
    4.10      echo "zipdir is the dir which contains the zip/modulclusters and zip-ml/moduleclusters"
    4.11 -    echo "prefix-buildnumber is the distro filename prefix, e.g. netbeans-hudson-trunk-2464"
    4.12 -    echo "javafx_build is 1 if fx builds are required and 0 if not"
    4.13 -    echo "ml_build is 1 if ml builds are required and 0 if not"  
    4.14 -    echo "nb_locales is the string with the list of locales (for ml builds)"  
    4.15 +    echo "prefix is the distro filename prefix, e.g. netbeans-hudson-trunk in netbeans-hudson-trunk-2464"
    4.16 +    echo "buildnumber is the distro buildnumber, e.g. 2464 in netbeans-hudson-trunk-2464"
    4.17 +    echo "ml_build is 1 if ml builds are required and 0 if not"
    4.18 +    echo "nb_locales is the string with the list of locales (for ml builds)"
    4.19      exit 1
    4.20  fi
    4.21  
    4.22  work_dir=$1
    4.23  prefix=$2
    4.24  buildnumber=$3
    4.25 -fx_build=$4
    4.26 -ml_build=$5
    4.27 -if [ -n "$6" ] ; then
    4.28 -  nb_locales="$6"
    4.29 +ml_build=$4
    4.30 +if [ -n "$5" ] ; then
    4.31 +  nb_locales="$5"
    4.32  fi
    4.33 -  
    4.34 +
    4.35  basename=`dirname "$0"`
    4.36  . "$basename"/build-private.sh
    4.37  
    4.38 @@ -46,12 +45,18 @@
    4.39  chmod -R a+x *.sh
    4.40  
    4.41  commonname=$work_dir/zip/moduleclusters/$prefix-$buildnumber 
    4.42 -ant -f $basename/build.xml build-all-dmg -Dcommon.name=$commonname -Dprefix=$prefix -Dbuildnumber=$buildnumber -Dmlbuild='false' -Djavafx.build=$fx_build -Dgf_builds_host=$GLASSFISH_BUILDS_HOST -Dopenesb_builds_host=$OPENESB_BUILDS_HOST -Dbinary_cache_host=$BINARY_CACHE_HOST
    4.43 +if [ 0 -eq $BUILD_NBJDK7 ] ; then
    4.44 +    target="build-all-dmg"
    4.45 +else
    4.46 +    target="build-jdk-bundle-dmg"
    4.47 +fi
    4.48 +
    4.49 +ant -f $basename/build.xml $target -Dcommon.name=$commonname -Dprefix=$prefix -Dbuildnumber=$buildnumber -Dmlbuild='false' -Dbuild.jdk7=$BUILD_NBJDK7 -Dgf_builds_host=$GLASSFISH_BUILDS_HOST -Dopenesb_builds_host=$OPENESB_BUILDS_HOST -Dbinary_cache_host=$BINARY_CACHE_HOST
    4.50  
    4.51  rm -rf "$basename"/dist_en
    4.52  mv -f "$basename"/dist "$basename"/dist_en
    4.53  
    4.54  if [ 1 -eq $ml_build ] ; then
    4.55  commonname_ml=$work_dir/zip-ml/moduleclusters/$prefix-$buildnumber
    4.56 -ant -f $basename/build.xml build-all-dmg -Dnb.locales=$nb_locales -Dcommon.name=$commonname_ml -Dprefix=$prefix -Dbuildnumber=$buildnumber -Dmlbuild='true' -Djavafx.build=$fx_build -Dgf_builds_host=$GLASSFISH_BUILDS_HOST -Dopenesb_builds_host=$OPENESB_BUILDS_HOST -Dbinary_cache_host=$BINARY_CACHE_HOST
    4.57 +ant -f $basename/build.xml $target -Dnb.locales=$nb_locales -Dcommon.name=$commonname_ml -Dprefix=$prefix -Dbuildnumber=$buildnumber -Dmlbuild='true' -Dbuild.jdk7=$BUILD_NBJDK7 -Dgf_builds_host=$GLASSFISH_BUILDS_HOST -Dopenesb_builds_host=$OPENESB_BUILDS_HOST -Dbinary_cache_host=$BINARY_CACHE_HOST
    4.58  fi
     5.1 --- a/installer/mac/newbuild/build.xml	Sat Mar 24 23:38:28 2012 +0100
     5.2 +++ b/installer/mac/newbuild/build.xml	Sat Mar 24 23:46:53 2012 +0100
     5.3 @@ -53,6 +53,14 @@
     5.4          <ant dir="tomcat" target="build-pkg"/>              
     5.5      </target>
     5.6          
     5.7 +    <target name="build-jdk-pkg">
     5.8 +        <ant dir="jdk" target="build-pkg"/>              
     5.9 +        <copy todir="${basedir}/build/">
    5.10 +            <fileset description="Copy ${jdk.package.name}.pkg." dir="${basedir}/jdk/build/" includes="*.pkg"/>
    5.11 +        </copy>
    5.12 +        <echo message="Copy ${jdk.package.name}.pkg into ${basedir}/jdk/build/"/>
    5.13 +    </target>
    5.14 +        
    5.15      <target name="build-openesb-pkg">
    5.16          <echo message="Building ${openesb-title} into ${basedir}/openesb"/>
    5.17          <ant dir="openesb" target="build-pkg"/>                     
    5.18 @@ -100,10 +108,13 @@
    5.19          <property
    5.20             name="VerifyFile.classpath" 
    5.21             value="${basedir}/tools/classes"/>
    5.22 +        <condition property="do.build.jdk">
    5.23 +	     <equals arg1="${build.jdk7}" arg2="1"/>
    5.24 +        </condition>
    5.25      </target>        
    5.26  
    5.27  
    5.28 -    <target name="prepare-javame-sdk-zip">
    5.29 +    <target name="prepare-javame-sdk-zip" unless="do.build.jdk">
    5.30          <mkdir dir="build"/> 
    5.31          <get src="${javame_sdk30_bits_location}"         dest="${common.name}${ml.suffix}-mobility-sdk.zip"/>
    5.32          <get src="${javame_sdk30_bits_update_location}"  dest="${common.name}${ml.suffix}-mobility-sdk-update.zip"/>
    5.33 @@ -149,13 +160,21 @@
    5.34                                           ergonomics(ergonomics),
    5.35                                           ide(baseide), nb-etc(baseide), platform(baseide)
    5.36                                           "/>
    5.37 +        
    5.38 +        <property name="jdk-bundle.clusters" value="java(javase), 
    5.39 +                                                   ide(baseide), nb-etc(baseide), platform(baseide)
    5.40 +                                         "/>
    5.41  
    5.42          <property name="fx.clusters" value="javafx(javafx), javafx-mac(javafx)"/>
    5.43  
    5.44 -        <condition property="clusters" value="${main.clusters}" else="${main.clusters},${fx.clusters}"> 
    5.45 +        <condition property="all.clusters" value="${main.clusters}" else="${main.clusters},${fx.clusters}"> 
    5.46              <equals arg1="${javafx.build}" arg2="0"/>
    5.47          </condition>
    5.48 -
    5.49 +        
    5.50 +        <condition property="clusters" value="${all.clusters}" else="${jdk-bundle.clusters}"> 
    5.51 +            <equals arg1="${build.jdk7}" arg2="0"/>
    5.52 +        </condition>
    5.53 +        
    5.54      </target>
    5.55  
    5.56      <target name="unzip-nb" description="Unzip clusters to modules" depends="init-clusters,prepare-javame-sdk-zip">
    5.57 @@ -229,11 +248,17 @@
    5.58                                          ergonomics(${ergonomics-title}),
    5.59                                          php(${php-title})
    5.60                                          "/>
    5.61 +        <property name="jdk-bundle.modules" value="
    5.62 +                                        javase(${javase-title})
    5.63 +                                        "/>
    5.64          <property name="fx.module" value="javafx(${javafx-title})"/>
    5.65  
    5.66 -        <condition property="modules" value="${main.modules}" else="${main.modules},${fx.module}"> 
    5.67 +        <condition property="all.modules" value="${main.modules}" else="${main.modules},${fx.module}"> 
    5.68              <equals arg1="${javafx.build}" arg2="0"/>
    5.69          </condition>
    5.70 +        <condition property="modules" value="${all.modules}" else="${jdk-bundle.modules}"> 
    5.71 +            <equals arg1="${build.jdk7}" arg2="0"/>
    5.72 +        </condition>
    5.73      </target>    
    5.74  
    5.75      <target name="build-modules" depends="init-modules">        
    5.76 @@ -292,21 +317,26 @@
    5.77  
    5.78  
    5.79      <target name="init-bundles">
    5.80 -        <property name="main.bundles" value="(./build/baseide-${nb.id}.pkg ./build/javase-${nb.id}.pkg ./build/webcommon-${nb.id}.pkg ./build/javaee-${nb.id}.pkg ./build/javame-${nb.id}.pkg ./build/cpp-${nb.id}.pkg ./build/php-${nb.id}.pkg ./build/groovy-${nb.id}.pkg ./build/ergonomics-${nb.id}.pkg ./build/glassfish-v3-${glassfish.v3.id}.pkg ./build/tomcat-${tomcat.id}.pkg),
    5.81 -                                             -javase(./build/baseide-${nb.id}.pkg ./build/javase-${nb.id}.pkg),
    5.82 -                                             -javaee(./build/baseide-${nb.id}.pkg ./build/javase-${nb.id}.pkg ./build/webcommon-${nb.id}.pkg ./build/javaee-${nb.id}.pkg ./build/glassfish-v3-${glassfish.v3.id}.pkg ./build/tomcat-${tomcat.id}.pkg),
    5.83 -                                             -cpp(./build/baseide-${nb.id}.pkg ./build/cpp-${nb.id}.pkg),                                             
    5.84 -                                             -php(./build/baseide-${nb.id}.pkg ./build/webcommon-${nb.id}.pkg ./build/php-${nb.id}.pkg)
    5.85 -                                             "/>
    5.86 -
    5.87 +        <property name="main.bundles" value="(./build/baseide-${nb.id}.pkg ./build/javase-${nb.id}.pkg ./build/javaee-${nb.id}.pkg ./build/javame-${nb.id}.pkg ./build/cpp-${nb.id}.pkg ./build/php-${nb.id}.pkg ./build/groovy-${nb.id}.pkg ./build/ergonomics-${nb.id}.pkg ./build/glassfish-v3-${glassfish.v3.id}.pkg ./build/tomcat-${tomcat.id}.pkg),
    5.88 +                                              -javase(./build/baseide-${nb.id}.pkg ./build/javase-${nb.id}.pkg),
    5.89 +                                              -javaee(./build/baseide-${nb.id}.pkg ./build/javase-${nb.id}.pkg ./build/javaee-${nb.id}.pkg ./build/glassfish-v3-${glassfish.v3.id}.pkg ./build/tomcat-${tomcat.id}.pkg),
    5.90 +                                              -cpp(./build/baseide-${nb.id}.pkg ./build/cpp-${nb.id}.pkg),                                             
    5.91 +                                              -php(./build/baseide-${nb.id}.pkg ./build/php-${nb.id}.pkg)
    5.92 +                                          "/>
    5.93          <property name="fx.bundles" value="    
    5.94                                                 -javafx-full(./build/*pkg),
    5.95                                                 -javafx(./build/baseide-${nb.id}.pkg ./build/javase-${nb.id}.pkg ./build/javafx-${nb.id}.pkg)
    5.96                                            "/>
    5.97  
    5.98 -        <condition property="bundles" value="${main.bundles}" else="${main.bundles},${fx.bundles}"> 
    5.99 +        <property name="jdk-bundle.bundles" value="-jdk(./build/baseide-${nb.id}.pkg ./build/javase-${nb.id}.pkg ./build/${jdk.package.name}.pkg)"/>
   5.100 +
   5.101 +        <condition property="all.bundles" value="${main.bundles}" else="${main.bundles},${fx.bundles}"> 
   5.102              <equals arg1="${javafx.build}" arg2="0"/>
   5.103          </condition>
   5.104 +        <condition property="bundles" value="${all.bundles}" else="${jdk-bundle.bundles}"> 
   5.105 +            <equals arg1="${build.jdk7}" arg2="0"/>
   5.106 +        </condition>
   5.107 +        
   5.108      </target>
   5.109      <target name="build-all-dmg" depends="clean,init,build-pkg,build-glassfish-v3-pkg,build-tomcat-pkg,init-bundles">
   5.110          <for-each list="${bundles}" separator="," property="bundle.type"  propertyArg="packages">
   5.111 @@ -320,6 +350,18 @@
   5.112          <delete file="${basedir}/build/sizes.pro"/>
   5.113      </target>     
   5.114              
   5.115 +    <target name="build-jdk-bundle-dmg" depends="clean,init,build-pkg,build-jdk-pkg,init-bundles">
   5.116 +        <for-each list="${bundles}" separator="," property="bundle.type"  propertyArg="packages">
   5.117 +            <delete dir="${basedir}/dist_dmg"/>                          
   5.118 +            <ant target="build-dmg">
   5.119 +                 <property name="dmg.name" value="${jdk.bundle.files.prefix}-${jdk.bundle.files.suffix}-macosx"/>
   5.120 +                 <property name="mpkg.name" value="${mpkg.name_nb}${mpkg.prefix_nb_jdk}${mpkg.version_jdk}"/>
   5.121 +                 <property name="license.file" value="${basedir}/dmg/Resources/license.txt"/>                                  
   5.122 +            </ant>     
   5.123 +        </for-each>
   5.124 +        <delete file="${basedir}/build/sizes.pro"/>
   5.125 +    </target>     
   5.126 +            
   5.127      <target name="prepare-lproj-dirs">  
   5.128          <mkdir dir="${basedir}/dmg/Resources_full"/>
   5.129          <property name="resources.full.dir" value="${basedir}/dmg/Resources_full"/> 
   5.130 @@ -523,7 +565,7 @@
   5.131          <copy file="${license.file}" 
   5.132                tofile="${mpkg.file}/Contents/Resources/License.txt" />                         
   5.133                           
   5.134 -        <ant target="prepare-lproj-dirs"/>                                             
   5.135 +        <ant target="prepare-lproj-dirs"/>
   5.136          
   5.137          <copy file="dmg/distribution${bundle.type}.dist" tofile="${mpkg.file}/Contents/distribution.dist">                                    
   5.138              <filterset>
   5.139 @@ -556,6 +598,7 @@
   5.140          </copy> 
   5.141          
   5.142          <mkdir dir="${mpkg.file}/Contents/Packages"/>         
   5.143 +        <echo message="Copying ${packages} to '${mpkg.file}'/Contents/Packages..."/>
   5.144          <exec executable="sh" failonerror="yes">
   5.145              <arg value="-c"/>
   5.146              <arg value="cp -RPf ${packages} '${mpkg.file}'/Contents/Packages"/>
   5.147 @@ -563,8 +606,8 @@
   5.148          
   5.149          <exec executable="sh" failonerror="yes">
   5.150            <arg value="-c"/>
   5.151 -          <arg value="sh dmg/createdmg.sh '${dmg.name}'.dmg '${mpkg.name}'"/>
   5.152 +          <arg value="sh dmg/createdmg.sh '${dmg.name}'.dmg '${mpkg.name}' '${output.dir}'"/>
   5.153          </exec>  
   5.154 -        <delete dir="dist_dmg"/>
   5.155 +        <!-- XXX <delete dir="dist_dmg"/>-->
   5.156      </target>             
   5.157  </project>          
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/installer/mac/newbuild/dmg/Resources/Welcome-jdk.html	Sat Mar 24 23:46:53 2012 +0100
     6.3 @@ -0,0 +1,12 @@
     6.4 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
     6.5 +<html>
     6.6 +  <head>
     6.7 +    <title>Welcome</title>
     6.8 +    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     6.9 +  </head>
    6.10 +  <body>
    6.11 +
    6.12 +<h3>You will be guided through the steps necessary to install JDK with NetBeans IDE with the Java SE pack.</h3>
    6.13 +
    6.14 +  </body>
    6.15 +</html>
     7.1 --- a/installer/mac/newbuild/dmg/createdmg.sh	Sat Mar 24 23:38:28 2012 +0100
     7.2 +++ b/installer/mac/newbuild/dmg/createdmg.sh	Sat Mar 24 23:46:53 2012 +0100
     7.3 @@ -21,6 +21,7 @@
     7.4  
     7.5  dmgname=$1
     7.6  volname=$2
     7.7 +outputdir=$3
     7.8  
     7.9  bunzip2 -d -c `dirname $0`/template.sparseimage.bz2 > ./dist/template.sparseimage
    7.10  
    7.11 @@ -35,7 +36,11 @@
    7.12  echo "Running hdiutil detach..."
    7.13  hdiutil detach -verbose ./dist/mountpoint
    7.14  
    7.15 +if [ ! -z $outputdir ]; then
    7.16 +    mkdir -p ./dist/$outputdir
    7.17 +fi
    7.18 +
    7.19  echo "Running hdiutil create..."
    7.20 -hdiutil create -verbose -srcdevice `pwd`/dist/template.sparseimage ./dist/"$dmgname"
    7.21 +hdiutil create -verbose -srcdevice `pwd`/dist/template.sparseimage ./dist/"$outputdir$dmgname"
    7.22  rm -f ./dist/template.sparseimage
    7.23  rmdir ./dist/mountpoint
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/installer/mac/newbuild/dmg/distribution-jdk.dist	Sat Mar 24 23:46:53 2012 +0100
     8.3 @@ -0,0 +1,148 @@
     8.4 +<?xml version="1.0" encoding="UTF-8"?>
     8.5 +<installer-gui-script minSpecVersion="1.0">
     8.6 +    <title>jdk7-netbeans-Title</title>
     8.7 +    <welcome file="Welcome.html"></welcome>
     8.8 +    <!--<license file="License.txt"></license>-->
     8.9 +    <background file="background.tif" scaling="none" alignment="topleft"></background>
    8.10 +    <options allow-external-scripts="no" customize="never" rootVolumeOnly="false" hostArchitectures="i386"></options>
    8.11 +    <installation-check script="checkMemsize()"></installation-check>
    8.12 +    <volume-check script="checkSystemversion()"></volume-check>
    8.13 +    <script>
    8.14 +/* js:pkmk:start */
    8.15 +function installationCheckRAM() {
    8.16 +	return  checkMemsize() ;
    8.17 +}
    8.18 +/* js:pkmk:end */
    8.19 +
    8.20 +
    8.21 +/* js:pkmk:start */
    8.22 +function checkMemsize() {
    8.23 +	var result = false;
    8.24 +	try {
    8.25 +		result = system.sysctl('hw.memsize') >= '536870912';
    8.26 +	} catch (e) {}
    8.27 +	
    8.28 +	if(!result) {
    8.29 +		my.result.type = 'Warn';
    8.30 +		my.result.title = system.localizedStringWithFormat('MEMORY_WARNING_TITLE');
    8.31 +		my.result.message = system.localizedStringWithFormat('MEMORY_WARNING_MSG');
    8.32 +	}
    8.33 +	return result;
    8.34 +}
    8.35 +/* js:pkmk:end */
    8.36 +</script>
    8.37 +
    8.38 +<script>
    8.39 +/* js:pkmk:start */
    8.40 +function volumeCheckTiger() {
    8.41 +	return  checkSystemversion() ;
    8.42 +}
    8.43 +/* js:pkmk:end */
    8.44 +
    8.45 +
    8.46 +/* js:pkmk:start */
    8.47 +function checkSystemversion() {
    8.48 +	var result = false;
    8.49 +	var version;	
    8.50 +        if(!(/* >= */ system.compareVersions(system.version.ProductVersion, '10.7.0') >= 0)) {
    8.51 +            my.result.title = 'OS X Lion required';
    8.52 +            my.result.message = 'This Installer is supported only on OS X Lion (10.7.0)';
    8.53 +            my.result.type = 'Fatal';
    8.54 +            return false;
    8.55 +        }
    8.56 +	return true;
    8.57 +}
    8.58 +/* js:pkmk:end */
    8.59 +</script>
    8.60 +
    8.61 +<script>
    8.62 +/* js:pkmk:start */
    8.63 +function choiceIsADowngrade() {
    8.64 +	return  checkChoiceUpgradeAction() ;
    8.65 +}
    8.66 +/* js:pkmk:end */
    8.67 +
    8.68 +
    8.69 +/* js:pkmk:start */
    8.70 +function checkChoiceUpgradeAction() {
    8.71 +	var result = false;
    8.72 +	try {
    8.73 +		result = my.choice.packageUpgradeAction == 'downgrade' || my.choice.packageUpgradeAction == 'mixed';
    8.74 +	} catch (e) {}
    8.75 +	
    8.76 +	return result;
    8.77 +}
    8.78 +/* js:pkmk:end */
    8.79 +</script>
    8.80 +
    8.81 +    <choices-outline>
    8.82 +        <line choice="netbeans">
    8.83 +            <line choice="choice0"/>
    8.84 +            <line choice="baseide"/>
    8.85 +            <line choice="javase"/>
    8.86 +        </line>       
    8.87 +      
    8.88 +    </choices-outline>
    8.89 +    <choice id="netbeans" title="netbeans-title" description="netbeans-description" start_selected="true" start_enabled="true" start_visible="true"></choice>
    8.90 +    <choice id="choice0" title="1.7.0">
    8.91 +        <pkg-ref id="com.oracle.jdk"/>
    8.92 +    </choice>
    8.93 +    <choice id="baseide" title="baseide-title" description="baseide-description" start_selected="true" start_enabled="true" start_visible="true">
    8.94 +        <pkg-ref id="ident.pkg.baseide"></pkg-ref>
    8.95 +    </choice>
    8.96 +    <choice id="javase" title="javase-title" description="javase-description" start_selected="true" start_enabled="true" start_visible="true" selected="choices.javase.selected &amp;&amp; choices.baseide.selected" enabled="choices.baseide.selected">
    8.97 +        <pkg-ref id="ident.pkg.javase"></pkg-ref>
    8.98 +    </choice> 
    8.99 +    <pkg-ref id="com.oracle.jdk" installKBytes="226292" version="1.0" auth="Root">file:./Contents/Packages/JDK%207%20Update%2004.pkg#170.pkg</pkg-ref>
   8.100 +    <pkg-ref id="ident.pkg.baseide" version="0.0.0.0.1" installKBytes="@SIZE_BASEIDE@" auth="Root" onConclusion="None">file:./Contents/Packages/baseide-@NB_ID@.pkg</pkg-ref>
   8.101 +    <pkg-ref id="ident.pkg.javase" version="0.0.0.0.1" installKBytes="@SIZE_JAVASE@" auth="Root" onConclusion="None">file:./Contents/Packages/javase-@NB_ID@.pkg</pkg-ref>
   8.102 +</installer-gui-script>
   8.103 +
   8.104 +<!--
   8.105 +<?xml version="1.0" encoding="utf-8" standalone="no"?>
   8.106 +<installer-script minSpecVersion="1.000000" authoringTool="" authoringToolVersion="" authoringToolBuild="">
   8.107 +    <title>Java Development Kit 7 Update 4</title>
   8.108 +    <options customize="never" allow-external-scripts="no"/>
   8.109 +    <domains enable_localSystem="true"/>
   8.110 +    <installation-check script="pm_install_check();"/>
   8.111 +    <script>function pm_install_check() {
   8.112 +  if(!(/* >= */ system.compareVersions(system.version.ProductVersion, '10.7.0') >= 0)) {
   8.113 +    my.result.title = 'OS X Lion required';
   8.114 +    my.result.message = 'This Installer is supported only on OS X Lion (10.7.0)';
   8.115 +    my.result.type = 'Fatal';
   8.116 +    return false;
   8.117 +  }
   8.118 +  return true;
   8.119 +}
   8.120 +</script>
   8.121 +    <background file="background" alignment="bottomleft" scaling="none"/>
   8.122 +    <welcome language="en" mime-type="text/rtf"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
   8.123 +{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
   8.124 +{\colortbl;\red255\green255\blue255;}
   8.125 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
   8.126 +
   8.127 +\f0\fs26 \cf0 \
   8.128 +The Java Development Kit is a development\
   8.129 +environment for building applications,applets,\
   8.130 +and components using the Java programming\
   8.131 +language.}]]></welcome>
   8.132 +    <conclusion file="Conclusion.rtfd"/>
   8.133 +    <choices-outline>
   8.134 +        <line choice="choice0"/>
   8.135 +        <line choice="baseide"></line>
   8.136 +        <line choice="javase"></line>          
   8.137 +    </choices-outline>
   8.138 +    <choice id="choice0" title="1.7.0">
   8.139 +        <pkg-ref id="com.oracle.jdk"/>
   8.140 +    </choice>
   8.141 +    <choice id="baseide" title="baseide-title" description="baseide-description" start_selected="true" start_enabled="true" start_visible="true">
   8.142 +        <pkg-ref id="ident.pkg.baseide"></pkg-ref>
   8.143 +    </choice>
   8.144 +    <choice id="javase" title="javase-title" description="javase-description" start_selected="true" start_enabled="true" start_visible="true" selected="choices.javase.selected &amp;&amp; choices.baseide.selected" enabled="choices.baseide.selected">
   8.145 +        <pkg-ref id="ident.pkg.javase"></pkg-ref>
   8.146 +    </choice> 
   8.147 +    <pkg-ref id="ident.pkg.baseide" version="0.0.0.0.1" installKBytes="141992	" auth="Root" onConclusion="None">file:./Contents/Packages/baseide-201203020400.pkg</pkg-ref>
   8.148 +    <pkg-ref id="ident.pkg.javase" version="0.0.0.0.1" installKBytes="95824	" auth="Root" onConclusion="None">file:./Contents/Packages/javase-201203020400.pkg</pkg-ref>
   8.149 +    <pkg-ref id="com.oracle.jdk" installKBytes="226292" version="1.0" auth="Root">file:./Contents/JDK%207%20Update%2004.pkg#170.pkg</pkg-ref>
   8.150 +</installer-script>
   8.151 +-->
   8.152 \ No newline at end of file
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/installer/mac/newbuild/jdk/build.xml	Sat Mar 24 23:46:53 2012 +0100
     9.3 @@ -0,0 +1,60 @@
     9.4 +<?xml version="1.0" encoding="UTF-8"?>
     9.5 +
     9.6 +<!--
     9.7 +The contents of this file are subject to the terms of the Common Development
     9.8 +and Distribution License (the License). You may not use this file except in
     9.9 +compliance with the License.
    9.10 +
    9.11 +You can obtain a copy of the License at http://www.netbeans.org/cddl.html
    9.12 +or http://www.netbeans.org/cddl.txt.
    9.13 +
    9.14 +When distributing Covered Code, include this CDDL Header Notice in each file
    9.15 +and include the License file at http://www.netbeans.org/cddl.txt.
    9.16 +If applicable, add the following below the CDDL Header, with the fields
    9.17 +enclosed by brackets [] replaced by your own identifying information:
    9.18 +"Portions Copyrighted [year] [name of copyright owner]"
    9.19 +
    9.20 +The Original Software is NetBeans. The Initial Developer of the Original
    9.21 +Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
    9.22 +Microsystems, Inc. All Rights Reserved.
    9.23 +-->
    9.24 +
    9.25 +<project name="jdk" basedir="." default="build-pkg">
    9.26 +    <property name="builddir" value="${basedir}/build"/>
    9.27 +    <property name="appdir" value="${builddir}/app"/>
    9.28 +    <property name="scriptsdir" value="${builddir}/scripts"/>
    9.29 +    
    9.30 +    <target name="clean">
    9.31 +        <delete dir="${builddir}"/>
    9.32 +    </target>
    9.33 +
    9.34 +    <target name="init">
    9.35 +         <mkdir dir="${appdir}"/>
    9.36 +         <mkdir dir="${scriptsdir}"/>
    9.37 +    </target>
    9.38 +    
    9.39 +    <target name="get-bits">       
    9.40 +        <echo message="Downloading JDK from ${jdk_bits_location}" />
    9.41 +        <get src="${jdk_bits_location}" dest="./build/jdk.dmg" usetimestamp="true"/>
    9.42 +    </target>
    9.43 +    
    9.44 +    <target name="copy-pkg" depends="get-bits">       
    9.45 +        <exec executable="sh" failonerror="yes">
    9.46 +            <arg value="-c"/>
    9.47 +            <arg value="cd ${builddir} ; hdiutil attach jdk.dmg -mountpoint jdk-disk; cp jdk-disk/JDK* .; hdiutil detach jdk-disk; rm ${builddir}/jdk.dmg"/>
    9.48 +        </exec>
    9.49 +    </target>
    9.50 +
    9.51 +    <target name="build-pkg" depends="clean, init, copy-pkg">
    9.52 +        <exec executable="sh" failonerror="yes" outputproperty="size">
    9.53 +            <arg value="-c"/>
    9.54 +            <arg value="du -sk build | sed 's/[\t]*build//' | xargs -I {}  expr {} + 5000"/>
    9.55 +        </exec>        
    9.56 +        <echo message="sizeof.jdk=${size}${line.separator}" file="${basedir}/../build/sizes.pro" append="true"/>
    9.57 +        <echo message="Getting size of JDK - ${size}"/>
    9.58 +        
    9.59 +        <copy file="${basedir}/../netBeans/baseide/build/scripts/set_jdk_home.sh" tofile="${scriptsdir}/set_jdk_home.sh"/>
    9.60 +        <chmod dir="${scriptsdir}" perm="ugo+x" includes="**/*"/>
    9.61 +    </target>
    9.62 +    
    9.63 +</project>
    10.1 --- a/installer/mac/newbuild/netBeans/baseide/build.xml	Sat Mar 24 23:38:28 2012 +0100
    10.2 +++ b/installer/mac/newbuild/netBeans/baseide/build.xml	Sat Mar 24 23:46:53 2012 +0100
    10.3 @@ -82,6 +82,7 @@
    10.4  NB_CLUSTER_DIR="${nbClusterDir}"
    10.5  GLASSFISH_V3_INSTALL_DIR="${glassfish.v3.install.dir}"
    10.6  MYSQL_INSTALL_DIR="${mysql.install.dir}"
    10.7 +DEFAULT_JDK7_HOME="${default.jdk7.home}"
    10.8  NB_ID="${nb.id}"
    10.9  GLASSFISHV3_ID="${glassfish.v3.id}"
   10.10  TOMCAT_ID="${tomcat.id}"
    11.1 --- a/installer/mac/newbuild/netBeans/baseide/pkg/scripts/postflight	Sat Mar 24 23:38:28 2012 +0100
    11.2 +++ b/installer/mac/newbuild/netBeans/baseide/pkg/scripts/postflight	Sat Mar 24 23:46:53 2012 +0100
    11.3 @@ -37,6 +37,10 @@
    11.4  
    11.5  "$dirname"/add_mysql.sh "$NETBEANS_INSTALL_DIR" "$MYSQL_INSTALL_DIR"
    11.6  
    11.7 +if [ -f "$dirname"/set_jdk_home.sh ]; then
    11.8 +    "$dirname"/set_jdk_home.sh "$NETBEANS_INSTALL_DIR" "$DEFAULT_JDK7_HOME"
    11.9 +fi
   11.10 +
   11.11  "$dirname"/populate_caches.sh "$NETBEANS_INSTALL_DIR"
   11.12  
   11.13  cd "$NETBEANS_INSTALL_DIR"
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/installer/mac/newbuild/netBeans/baseide/pkg/scripts/set_jdk_home.sh	Sat Mar 24 23:46:53 2012 +0100
    12.3 @@ -0,0 +1,35 @@
    12.4 +#!/bin/sh -x
    12.5 +nb_dir=$1
    12.6 +jdk_home=$2
    12.7 +
    12.8 +if [ -z "$1" ] || [ -z "$2" ]; then
    12.9 +    echo "usage: $0 nb_dir jdk_home"
   12.10 +    exit
   12.11 +fi
   12.12 +
   12.13 +echo Changing 'netbeans_jdkhome' netbeans.conf in $nb_dir
   12.14 +echo 'jdk_home' is $jdk_home
   12.15 +
   12.16 +if [ -d "$nb_dir" ] && [ -d "$jdk_home" ]
   12.17 +then
   12.18 +  cd "$nb_dir" 
   12.19 +  cd Contents/Resources/NetBeans*/etc
   12.20 +  if [ -f netbeans.conf ]
   12.21 +  then
   12.22 +    echo netbeans.conf found: `pwd`/netbeans.conf
   12.23 +    if  grep -q "^netbeans_jdkhome" netbeans.conf
   12.24 +    then
   12.25 +       echo 'netbeans_jdkhome' has been already set to $jdk_home
   12.26 +    else
   12.27 +        if  grep -q "^#netbeans_jdkhome=\"/path/to/jdk\"" netbeans.conf
   12.28 +        then
   12.29 +            echo Setting 'netbeans_jdkhome' to "$jdk_home"...
   12.30 +            cp netbeans.conf netbeans.conf_orig_jdk
   12.31 +            cat netbeans.conf_orig_jdk  | sed -e 's|#netbeans_jdkhome=\"/path/to/jdk\"|netbeans_jdkhome=\"'$jdk_home'\"|' > netbeans.conf
   12.32 +        fi
   12.33 +    fi
   12.34 +  else
   12.35 +    echo No netbeans.conf in: `pwd`
   12.36 +  fi
   12.37 +fi
   12.38 +
    13.1 --- a/nbbuild/newbuild/build-nbi.sh	Sat Mar 24 23:38:28 2012 +0100
    13.2 +++ b/nbbuild/newbuild/build-nbi.sh	Sat Mar 24 23:46:53 2012 +0100
    13.3 @@ -14,15 +14,15 @@
    13.4  #MAC_PATH=
    13.5  
    13.6  if [ ! -z $NATIVE_MAC_MACHINE ] && [ ! -z $MAC_PATH ]; then
    13.7 -   ssh $NATIVE_MAC_MACHINE rm -rf $MAC_PATH/installer $MAC_PATH/reglib/src
    13.8 +   ssh $NATIVE_MAC_MACHINE rm -rf $MAC_PATH/installer
    13.9     ERROR_CODE=$?
   13.10     if [ $ERROR_CODE != 0 ]; then
   13.11         echo "ERROR: $ERROR_CODE - Connection to MAC machine $NATIVE_MAC_MACHINE failed, can't remove old scripts"
   13.12         exit $ERROR_CODE;
   13.13     fi
   13.14 -   ssh $NATIVE_MAC_MACHINE mkdir -p $MAC_PATH/installer $MAC_PATH/reglib/src
   13.15 +   ssh $NATIVE_MAC_MACHINE mkdir -p $MAC_PATH/installer
   13.16     cd $NB_ALL
   13.17 -   gtar c installer/mac reglib/src | ssh $NATIVE_MAC_MACHINE "( cd $MAC_PATH; tar x )"
   13.18 +   gtar c installer/mac | ssh $NATIVE_MAC_MACHINE "( cd $MAC_PATH; tar x )"
   13.19  
   13.20     if [ 1 -eq $ML_BUILD ] ; then
   13.21         cd $NB_ALL/l10n
   13.22 @@ -54,11 +54,8 @@
   13.23  # Run new builds
   13.24     sh $NB_ALL/installer/mac/newbuild/init.sh | ssh $NATIVE_MAC_MACHINE "cat > $MAC_PATH/installer/mac/newbuild/build-private.sh"
   13.25     ssh $NATIVE_MAC_MACHINE chmod a+x $MAC_PATH/installer/mac/newbuild/build.sh
   13.26 -#   if [ 1 -eq $ML_BUILD ] ; then
   13.27 -#       ssh $NATIVE_MAC_MACHINE $MAC_PATH/installer/mac/newbuild/build.sh $MAC_PATH/zip-ml/moduleclusters $BASENAME_PREFIX $BUILDNUMBER $ML_BUILD > $MAC_LOG_NEW 2>&1 &  
   13.28 -#       mv $MAC_PATH/installer/mac/newbuild/dist/* $MAC_PATH/dist_ml 
   13.29 -#   fi
   13.30 -   ssh $NATIVE_MAC_MACHINE $MAC_PATH/installer/mac/newbuild/build.sh $MAC_PATH $BASENAME_PREFIX $BUILDNUMBER $RUNJAVAFX $ML_BUILD $LOCALES > $MAC_LOG_NEW 2>&1 &
   13.31 +
   13.32 +   ssh $NATIVE_MAC_MACHINE $MAC_PATH/installer/mac/newbuild/build.sh $MAC_PATH $BASENAME_PREFIX $BUILDNUMBER $ML_BUILD $LOCALES > $MAC_LOG_NEW 2>&1 &
   13.33  
   13.34  fi
   13.35  
   13.36 @@ -99,8 +96,6 @@
   13.37  
   13.38  #Check if Mac installer was OK, 10 "BUILD SUCCESSFUL" messages should be in Mac log
   13.39  if [ ! -z $NATIVE_MAC_MACHINE ] && [ ! -z $MAC_PATH ]; then
   13.40 -#    IS_MAC_FAILED=`cat $MAC_LOG | grep "BUILD FAILED" | wc -l | tr " " "\n" | grep -v '^$'`
   13.41 -#    IS_MAC_CONNECT=`cat $MAC_LOG | grep "Connection timed out" | wc -l | tr " " "\n" | grep -v '^$'`
   13.42  
   13.43      IS_NEW_MAC_FAILED=`cat $MAC_LOG_NEW | grep "BUILD FAILED" | wc -l | tr " " "\n" | grep -v '^$'`
   13.44      IS_NEW_MAC_CONNECT=`cat $MAC_LOG_NEW | grep "Connection timed out" | wc -l | tr " " "\n" | grep -v '^$'`
   13.45 @@ -108,21 +103,14 @@
   13.46      if [ $IS_NEW_MAC_FAILED -eq 0 ] && [ $IS_NEW_MAC_CONNECT -eq 0 ]; then
   13.47          #copy the bits back
   13.48          mkdir -p $DIST/bundles
   13.49 -        #scp $NATIVE_MAC_MACHINE:$MAC_PATH/installer/mac/dist/* $DIST/bundles        
   13.50 -        #ERROR_CODE=$?
   13.51 -        #if [ $ERROR_CODE != 0 ]; then
   13.52 -        #    echo "ERROR: $ERROR_CODE - Connection to MAC machine $NATIVE_MAC_MACHINE failed, can't get installers"
   13.53 -        #    exit $ERROR_CODE;
   13.54 -        #fi    
   13.55 -        scp $NATIVE_MAC_MACHINE:$MAC_PATH/installer/mac/newbuild/dist_en/* $DIST/bundles
   13.56 +        scp -r $NATIVE_MAC_MACHINE:$MAC_PATH/installer/mac/newbuild/dist_en/* $DIST/bundles
   13.57          ERROR_CODE=$?
   13.58          if [ $ERROR_CODE != 0 ]; then
   13.59              echo "ERROR: $ERROR_CODE - Connection to MAC machine $NATIVE_MAC_MACHINE failed, can't get installers"
   13.60              exit $ERROR_CODE;
   13.61          fi
   13.62  	if [ 1 -eq $ML_BUILD ] ; then
   13.63 -		#scp $NATIVE_MAC_MACHINE:$MAC_PATH/dist/* $DIST/ml/bundles
   13.64 -		scp $NATIVE_MAC_MACHINE:$MAC_PATH/installer/mac/newbuild/dist/* $DIST/ml/bundles
   13.65 +		scp -r $NATIVE_MAC_MACHINE:$MAC_PATH/installer/mac/newbuild/dist/* $DIST/ml/bundles
   13.66                  ERROR_CODE=$?
   13.67                  if [ $ERROR_CODE != 0 ]; then
   13.68                      echo "ERROR: $ERROR_CODE - Connection to MAC machine $NATIVE_MAC_MACHINE failed, can't get ml installers"
   13.69 @@ -170,7 +158,7 @@
   13.70  fi
   13.71  
   13.72  cd $DIST
   13.73 -bash ${SCRIPTS_DIR}/files-info.sh bundles zip zip/moduleclusters
   13.74 +bash ${SCRIPTS_DIR}/files-info.sh bundles bundles/jdk zip zip/moduleclusters
   13.75  ERROR_CODE=$?
   13.76  if [ $ERROR_CODE != 0 ]; then
   13.77      echo "ERROR: $ERROR_CODE - Counting of MD5 sums and size failed"