Browse Source

Improved the SDK Build process so it:
* Automatically downloads the JDK for all OS
* Uses Blender 2.76b
* Should be able to run nightly (at least on Mac Environment)

MeFisto94 9 years ago
parent
commit
845af7bfe0

+ 6 - 0
.gitignore

@@ -20,3 +20,9 @@ build
 .gradle
 .gradle
 netbeans
 netbeans
 */nbproject/private/*
 */nbproject/private/*
+ant-jme/dist
+jdks/local/*
+jdks/*.bin
+jdks/*.exe
+jdks/*.zip
+dist/

+ 17 - 0
jdks/README

@@ -0,0 +1,17 @@
+The JDKs Folder provides the JDKs which are bundled with the SDK when the Installers are made.
+You can change the JDK Version in download-jdks.sh, but don’t change anything apart from that if you don’t know what you are doing.
+
+download-jdks.sh also replaces the functionality of build-osx-zip.sh but requires build-package.sh to be in the same folder.
+
+## Experienced Users: ##
+We need to download the JDKs for 5 platforms (Windows, Linux and MacOSX).
+The Problem is that those JDKs often come in .exe or .dmg files.
+download-jdks.sh hence downloads them and extracts the plain jdk folder out of them so they can be used with build-package.sh to create an SFX archive out of them.
+Unfortunately this doesn’t work for Mac OSX, so we simply zip the contents there.
+
+I could make the build work under Mac OS 10.9.5, however under Linux you could run into troubles because of the mount command: missing permissions, no hfs-drivers, etc pp.
+
+Also you need p7zip to be installed and many other more usual build-tools.
+
+
+- MeFisto94

+ 138 - 0
jdks/download-jdks.sh

@@ -0,0 +1,138 @@
+#!/bin/sh
+#(c) jmonkeyengine.org
+#Author MeFisto94
+set -e # Quit on Error
+
+jdk_version="8u74"
+jdk_build_version="b02"
+platforms=("linux-x64.tar.gz" "linux-i586.tar.gz" "windows-i586.exe" "windows-x64.exe" "macosx-x64.dmg")
+
+function unpack_mac_jdk {
+    echo "> Extracting the Mac JDK..."
+    cd local/$jdk_version-$jdk_build_version/
+
+    if [ -f ../../jdk-macosx.zip ];
+    then
+        echo "< Already existing, SKIPPING."
+        cd ../../
+        return 0
+    fi
+
+    mkdir -p MacOS
+    cd MacOS
+
+    # MacOS
+    if [ "$(uname)" == "Darwin" ]; then
+        hdiutil attach ../jdk-macosx-x64.dmg
+        xar -xf /Volumes/JDK*/JDK*.pkg
+        hdiutil detach /Volumes/JDK*
+    else # Linux (NOT TESTED!)
+        mkdir mnt
+        mount -t hfsplus -o loop ../jdk-macosx-x64.dmg mnt
+        xar -xf mnt/JDK*.pkg
+        umount mnt
+    fi
+
+    cd jdk1*.pkg
+    cat Payload | gunzip -dc | cpio -i
+    mkdir -p Contents/jdk/
+    cd Contents/Home
+    # FROM HERE: build-osx-zip.sh by normen
+    cp -r . ../jdk
+    zip -9 -r -y ../../../../jdk-macosx.zip ../jdk
+    cd ../../../../
+    rm -rf MacOS/
+    cd ../../
+}
+
+function unpack_windows {
+    echo "> Extracting the JDK for $1"
+    cd local/$jdk_version-$jdk_build_version/
+
+    if [ -d $1 ];
+    then
+        echo "< Already existing, SKIPPING."
+        cd ../../
+    return 0
+    fi
+
+    mkdir -p $1
+    7z x -o$1 "jdk-$1.exe"
+    unzip $1/tools.zip -d $1/
+    rm $1/tools.zip
+
+    find $1 -type f \( -name "*.exe" -o -name "*.dll" \) -exec chmod u+rwx {} \; # Make them executable
+
+    find $1 -type f -name "*.pack" | while read eachFile; do
+        echo ">> Unpacking $eachFile ...";
+        unpack200 $eachFile ${eachFile%.pack}.jar;
+        rm $eachFile;
+    done
+
+    cd ../../
+}
+
+function unpack_linux {
+    echo "> Extracting the JDK for $1"
+    cd local/$jdk_version-$jdk_build_version/
+
+    if [ -d $1 ];
+    then
+        echo "< Already existing, SKIPPING."
+        cd ../../
+        return 0
+    fi
+
+    mkdir -p $1
+    cd $1
+    tar -xvf "../jdk-$1.tar.gz"
+    cd jdk1*
+    mv * ../
+    cd ../
+    rm -rf jdk1*
+    cd ../../../
+}
+
+function build_mac_jdk {
+    if [ -f local/$jdk_version-$jdk_build_version/jdk-macosx.zip ];
+    then
+        rm -f jdk-macosx.zip
+        mv -f local/$jdk_version-$jdk_build_version/jdk-macosx.zip .
+    fi # Already packed
+}
+
+function exec_build_package {
+    echo "> Building Package for $1"
+
+    if [ -f "jdk-$1.$3" ]; then
+        echo "< Already existing, SKIPPING."
+    else
+        sh build-package.sh $1 $2
+    fi
+}
+
+mkdir -p local/$jdk_version-$jdk_build_version
+
+for platform in ${platforms[@]}
+do
+    echo "> Downloading the JDK for $platform"
+
+    if [ -f local/$jdk_version-$jdk_build_version/jdk-$platform ];
+    then
+        # rm -f local/$jdk_version-$jdk_build_version/jdk-$platform
+        echo "< Already existing, SKIPPING."
+    else
+        curl -L --progress-bar -o local/$jdk_version-$jdk_build_version/jdk-$platform http://download.oracle.com/otn-pub/java/jdk/$jdk_version-$jdk_build_version/jdk-$jdk_version-$platform --cookie "gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie"
+    fi
+done
+
+unpack_mac_jdk
+build_mac_jdk
+unpack_windows windows-i586
+exec_build_package windows-x86 local/$jdk_version-$jdk_build_version/windows-i586/ exe
+unpack_windows windows-x64
+exec_build_package windows-x64 local/$jdk_version-$jdk_build_version/windows-x64/ exe
+unpack_linux linux-i586
+exec_build_package linux-x86 local/$jdk_version-$jdk_build_version/linux-i586/ bin
+unpack_linux linux-x64
+exec_build_package linux-x64 local/$jdk_version-$jdk_build_version/linux-x64/ bin

+ 4 - 4
nbi/stub/ext/infra/build/products/blender-linux-x64/build.properties

@@ -80,7 +80,7 @@ product.platforms=linux-x64
 # * ${product.visible} - whether the product's node is visible or not (note 
 # * ${product.visible} - whether the product's node is visible or not (note 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   if the product is filtered out); 'true'/'false'
 #   if the product is filtered out); 'true'/'false'
-# * ${product.features} - list of features that this porduct belongs to; the 
+# * ${product.features} - list of features that this product belongs to; the 
 #   list should be space-separated
 #   list should be space-separated
 product.status=not-installed
 product.status=not-installed
 product.offset=20000
 product.offset=20000
@@ -103,9 +103,9 @@ product.logic.1.path=${nbproject.dist.dir}/${nbproject.dist.file.name}
 # * indices should start with 1
 # * indices should start with 1
 product.data.length=1
 product.data.length=1
 product.data.1.zip=false
 product.data.1.zip=false
-product.data.1.uri=http://download.blender.org/release/Blender2.75/blender-2.75a-linux-glibc211-x86_64.tar.bz2
-product.data.tar=blender-2.75a-linux-glibc211-x86_64.tar.bz2
-product.data.sub.dir=blender-2.75a-linux-glibc211-x86_64
+product.data.1.uri=http://download.blender.org/release/Blender2.76/blender-2.76b-linux-glibc211-x86_64.tar.bz2
+product.data.tar=blender-2.76b-linux-glibc211-x86_64.tar.bz2
+product.data.sub.dir=blender-2.76b-linux-glibc211-x86_64
 
 
 # modificator for the required disk space parameter; the core value will be the
 # modificator for the required disk space parameter; the core value will be the
 # sum of unzipped unstallation data files
 # sum of unzipped unstallation data files

+ 4 - 4
nbi/stub/ext/infra/build/products/blender-linux-x86/build.properties

@@ -80,7 +80,7 @@ product.platforms=linux-x86
 # * ${product.visible} - whether the product's node is visible or not (note 
 # * ${product.visible} - whether the product's node is visible or not (note 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   if the product is filtered out); 'true'/'false'
 #   if the product is filtered out); 'true'/'false'
-# * ${product.features} - list of features that this porduct belongs to; the 
+# * ${product.features} - list of features that this product belongs to; the 
 #   list should be space-separated
 #   list should be space-separated
 product.status=not-installed
 product.status=not-installed
 product.offset=20000
 product.offset=20000
@@ -103,9 +103,9 @@ product.logic.1.path=${nbproject.dist.dir}/${nbproject.dist.file.name}
 # * indices should start with 1
 # * indices should start with 1
 product.data.length=1
 product.data.length=1
 product.data.1.zip=false
 product.data.1.zip=false
-product.data.1.uri=http://download.blender.org/release/Blender2.75/blender-2.75a-linux-glibc211-i686.tar.bz2
-product.data.tar=blender-2.75a-linux-glibc211-i686.tar.bz2
-product.data.sub.dir=blender-2.75a-linux-glibc211-i686
+product.data.1.uri=http://download.blender.org/release/Blender2.76/blender-2.76b-linux-glibc211-i686.tar.bz2
+product.data.tar=blender-2.76b-linux-glibc211-i686.tar.bz2
+product.data.sub.dir=blender-2.76b-linux-glibc211-i686
 
 
 # modificator for the required disk space parameter; the core value will be the
 # modificator for the required disk space parameter; the core value will be the
 # sum of unzipped unstallation data files
 # sum of unzipped unstallation data files

+ 3 - 3
nbi/stub/ext/infra/build/products/blender-macosx/build.properties

@@ -80,7 +80,7 @@ product.platforms=macosx
 # * ${product.visible} - whether the product's node is visible or not (note 
 # * ${product.visible} - whether the product's node is visible or not (note 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   if the product is filtered out); 'true'/'false'
 #   if the product is filtered out); 'true'/'false'
-# * ${product.features} - list of features that this porduct belongs to; the 
+# * ${product.features} - list of features that this product belongs to; the 
 #   list should be space-separated
 #   list should be space-separated
 product.status=not-installed
 product.status=not-installed
 product.offset=20000
 product.offset=20000
@@ -104,9 +104,9 @@ product.logic.1.path=${nbproject.dist.dir}/${nbproject.dist.file.name}
 product.data.length=1
 product.data.length=1
 product.data.1.zip=true
 product.data.1.zip=true
 #normen
 #normen
-product.data.1.uri=http://download.blender.org/release/Blender2.75/blender-2.75a-OSX_10.6-x86_64.zip
+product.data.1.uri=http://download.blender.org/release/Blender2.76/blender-2.76b-OSX_10.6-x86_64.zip
 product.data.root=Blender
 product.data.root=Blender
-product.data.sub.dir=Blender
+product.data.sub.dir=blender-2.76b-OSX_10.6-x86_64
 
 
 # modificator for the required disk space parameter; the core value will be the
 # modificator for the required disk space parameter; the core value will be the
 # sum of unzipped unstallation data files
 # sum of unzipped unstallation data files

+ 3 - 3
nbi/stub/ext/infra/build/products/blender-windows-x64/build.properties

@@ -80,7 +80,7 @@ product.platforms=windows-x64
 # * ${product.visible} - whether the product's node is visible or not (note 
 # * ${product.visible} - whether the product's node is visible or not (note 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   if the product is filtered out); 'true'/'false'
 #   if the product is filtered out); 'true'/'false'
-# * ${product.features} - list of features that this porduct belongs to; the 
+# * ${product.features} - list of features that this product belongs to; the 
 #   list should be space-separated
 #   list should be space-separated
 product.status=not-installed
 product.status=not-installed
 product.offset=20000
 product.offset=20000
@@ -103,8 +103,8 @@ product.logic.1.path=${nbproject.dist.dir}/${nbproject.dist.file.name}
 # * indices should start with 1
 # * indices should start with 1
 product.data.length=1
 product.data.length=1
 product.data.1.zip=true
 product.data.1.zip=true
-product.data.1.uri=http://download.blender.org/release/Blender2.75/blender-2.75a-windows64.zip
-product.data.sub.dir=blender-2.75a-windows64
+product.data.1.uri=http://download.blender.org/release/Blender2.76/blender-2.76b-windows64.zip
+product.data.sub.dir=blender-2.76b-windows64
 
 
 # modificator for the required disk space parameter; the core value will be the
 # modificator for the required disk space parameter; the core value will be the
 # sum of unzipped unstallation data files
 # sum of unzipped unstallation data files

+ 3 - 3
nbi/stub/ext/infra/build/products/blender-windows-x86/build.properties

@@ -80,7 +80,7 @@ product.platforms=windows-x86
 # * ${product.visible} - whether the product's node is visible or not (note 
 # * ${product.visible} - whether the product's node is visible or not (note 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   that this value will be modified at nbi runtime, 'true' may become 'false' 
 #   if the product is filtered out); 'true'/'false'
 #   if the product is filtered out); 'true'/'false'
-# * ${product.features} - list of features that this porduct belongs to; the 
+# * ${product.features} - list of features that this product belongs to; the 
 #   list should be space-separated
 #   list should be space-separated
 product.status=not-installed
 product.status=not-installed
 product.offset=20000
 product.offset=20000
@@ -104,8 +104,8 @@ product.logic.1.path=${nbproject.dist.dir}/${nbproject.dist.file.name}
 product.data.length=1
 product.data.length=1
 product.data.1.zip=true
 product.data.1.zip=true
 #normen
 #normen
-product.data.1.uri=http://download.blender.org/release/Blender2.75/blender-2.75a-windows32.zip
-product.data.sub.dir=blender-2.75a-windows32
+product.data.1.uri=http://download.blender.org/release/Blender2.76/blender-2.76b-windows32.zip
+product.data.sub.dir=blender-2.76b-windows32
 
 
 # modificator for the required disk space parameter; the core value will be the
 # modificator for the required disk space parameter; the core value will be the
 # sum of unzipped unstallation data files
 # sum of unzipped unstallation data files

+ 1 - 1
nbi/stub/ext/infra/build/products/jdk/build.properties

@@ -105,7 +105,7 @@ product.data.length=1
 product.data.1.zip=true
 product.data.1.zip=true
 #normen
 #normen
 product.data.1.path=../../../../../../../../jdks/jdk-macosx.zip
 product.data.1.path=../../../../../../../../jdks/jdk-macosx.zip
-product.data.sub.dir=jdk
+product.data.sub.dir=../jdk
 
 
 # modificator for the required disk space parameter; the core value will be the
 # modificator for the required disk space parameter; the core value will be the
 # sum of unzipped unstallation data files
 # sum of unzipped unstallation data files