Browse Source

Download the JDKs straight to the installer configuration folders

Toni Helenius 2 tuần trước cách đây
mục cha
commit
ced16ca3cf

+ 4 - 1
.gitignore

@@ -28,4 +28,7 @@ dist/
 /.nb-gradle/
 jdks/downloads/
 installers/downloads/
-installers/nbpackage/
+installers/nbpackage/
+installers/linux-x64/jdk-x64_linux.tar.gz
+installers/macos-x64/jdk-x64_macos.tar.gz
+installers/windows-x64/jdk-x64_windows.zip

+ 3 - 37
installers/download-jdks.sh

@@ -11,25 +11,19 @@ jdk_vendor="eclipse"
 function download_jdk {
     echo ">>> Downloading the JDK for $1_$2$3"
 
-    if [ -f downloads/jdk-$1_$2$3 ];
+    if [ -f $2-$1/jdk-$1_$2$3 ];
     then
         echo "<<< Already existing, SKIPPING."
     else
-        curl -# -o downloads/jdk-$1_$2$3 -L https://api.adoptium.net/v3/binary/latest/$jdk_major_version/ga/$2/$1/jdk/$jvm_impl/normal/$jdk_vendor?project=jdk
+        curl -# -o $2-$1/jdk-$1_$2$3 -L https://api.adoptium.net/v3/binary/latest/$jdk_major_version/ga/$2/$1/jdk/$jvm_impl/normal/$jdk_vendor?project=jdk
         echo "<<< OK!"
     fi
 }
 
 function build_mac_jdk {
     echo "> Getting the Mac JDK"
-    if [ -f "downloads/jdk-x64_mac.tar.gz" ];
-    then
-        echo "< Already existing, SKIPPING."
-        #cd ../../
-        return 0
-    fi
 
-    download_jdk x64 mac .tar.gz
+    download_jdk x64 macos .tar.gz
 
     echo "< OK!"
 }
@@ -37,14 +31,6 @@ function build_mac_jdk {
 # PARAMS arch
 function unpack_windows {
     echo ">> Getting the JDK for windows-$1"
-    #cd local/$jdk_version-$jdk_build_version/
-
-    if [ -f downloads/jdk-$1_windows.zip ];
-    then
-        echo "<< Already existing, SKIPPING."
-        # cd ../../
-        return 0
-    fi
 
     download_jdk "$1" windows .zip
     
@@ -53,14 +39,6 @@ function unpack_windows {
 
 function unpack_linux {
     echo ">> Getting the JDK for linux-$1"
-    #cd local/$jdk_version-$jdk_build_version/
-
-    if [ -f downloads/jdk-$1.tar.gz ];
-    then
-        echo "<< Already existing, SKIPPING."
-        #cd ../../
-        return 0
-    fi
 
     download_jdk "$1" linux .tar.gz
 
@@ -96,28 +74,16 @@ function build_other_jdk {
     echo "< OK!"
 }
 
-
-mkdir -p downloads
-
 if [ "x$TRAVIS" != "x" ]; then
     if [ "x$BUILD_X64" != "x" ]; then
         build_other_jdk windows x64 x64
         build_other_jdk linux x64 x64
-    else
-        # We have to save space at all cost, so force-delete x64 jdks, which might come from the build cache.
-        # that's bad because they won't be cached anymore, but we have to trade time for space.
-        rm -rf compiled/jdk-windows-x64.exe compiled/jdk-linux-x64.bin
     fi
     if [ "x$BUILD_X86" != "x" ]; then
         build_other_jdk windows x86-32 x86
-        #build_other_jdk linux x86 i586
-    else
-        rm -rf compiled/jdk-windows-x86.exe compiled/jdk-linux-x86.bin
     fi
     if [ "x$BUILD_OTHER" != "x" ]; then
         build_mac_jdk
-    else
-        rm -rf compiled/jdk-macosx.zip
     fi
 else
     if [ "x$PARALLEL" != "x" ];

+ 1 - 1
installers/macos-x64/jmonkeyengine-macos-x64.properties

@@ -3,7 +3,7 @@ package.name=jMonkeyEngine SDK
 # Packaging type.
 package.type=macos-pkg
 # Path to Java runtime to include in the package (default none).
-package.runtime=${CONFIG}/jdk-x64_mac.tar.gz
+package.runtime=${CONFIG}/jdk-x64_macos.tar.gz
 # A single-line description of the package. Not all packagers will display this.
 package.description=A complete 3D game development suite written purely in Java.
 # Application publisher. Not all packagers will display this.