Browse Source

Improved Linux build further...

MeFisto94 9 years ago
parent
commit
7dfed06000
2 changed files with 18 additions and 4 deletions
  1. 3 1
      .travis.yml
  2. 15 3
      jdks/download-jdks.sh

+ 3 - 1
.travis.yml

@@ -1,6 +1,6 @@
 language: java
 # Because loopfs isn't allowed...
-os: osx
+# os: osx
 sudo: required
 env:
  - GRADLE_USER_HOME=gradle-cache
@@ -9,6 +9,7 @@ cache:
   directories:
    - gradle-cache
    - netbeans
+   - jdks
 
 # branches:
 #   only:
@@ -49,6 +50,7 @@ install:
 before_install:
   # - sudo apt-get update # Already done for us
   - sudo apt-get install -qq p7zip-full hfsplus
+  # - brew install p7zip
   - git fetch --unshallow
   - "[ $TRAVIS_PULL_REQUEST == 'false' ] && openssl aes-256-cbc -K $encrypted_a1949b55824a_key -iv $encrypted_a1949b55824a_iv -in private/www-updater.key.enc -out private/www-updater.key -d || :"
 

+ 15 - 3
jdks/download-jdks.sh

@@ -7,6 +7,16 @@ 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 install_xar {
+    # This is needed to open Mac OS .pkg files on Linux... NEED: apt-get install xml2-dev
+    wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/xar/xar-1.5.2.tar.gz
+    tar xvf xar-1.5.2.tar.gz
+    cd xar-1.5.2
+    ./configure
+    make
+    cd ../
+}
+
 function unpack_mac_jdk {
     echo "> Extracting the Mac JDK..."
     cd local/$jdk_version-$jdk_build_version/
@@ -26,10 +36,12 @@ function unpack_mac_jdk {
         hdiutil attach ../jdk-macosx-x64.dmg
         xar -xf /Volumes/JDK*/JDK*.pkg
         hdiutil detach /Volumes/JDK*
-    else # Linux (NOT TESTED!)
+    else # Linux (Requires LOOPFS)
         mkdir mnt
-        sudo mount -t hfsplus -o loop ../jdk-macosx-x64.dmg mnt
-        xar -xf mnt/JDK*.pkg
+        7z x ../jdk-macosx-x64.dmg
+        sudo mount -t hfsplus -o loop 4.hfs mnt
+        install_xar
+        ./xar-1.5.2/src/xar -xf mnt/JDK*.pkg
         sudo umount mnt
     fi