Browse Source

Build: Separated Mac OSX and Platform Independant into a third build to reduce the build time of the x64 build.

MeFisto94 8 years ago
parent
commit
ede73f46b5
2 changed files with 22 additions and 7 deletions
  1. 3 2
      .travis.yml
  2. 19 5
      build.xml

+ 3 - 2
.travis.yml

@@ -25,6 +25,7 @@ addons:
 env:
 env:
   - BUILD_X64=true
   - BUILD_X64=true
   - BUILD_X86=true
   - BUILD_X86=true
+  - BUILD_OTHER=true
 
 
 notifications:
 notifications:
   slack:
   slack:
@@ -57,8 +58,8 @@ before_deploy:
   
   
   # Has to be done before deploy (due to the rm command)
   # Has to be done before deploy (due to the rm command)
   #- scp -rp -i nbproject/private/www-updater.key build/updates/* [email protected]:/var/www/updates/stable/3.1/plugins
   #- scp -rp -i nbproject/private/www-updater.key build/updates/* [email protected]:/var/www/updates/stable/3.1/plugins
-  - "[ $BUILD_X64 == 'true' ] && rm -rf dist/jmonkeyplatform.zip || :"
-  - "[ $BUILD_X86 == 'true' ] && ./gradlew fixPlatformIndependent || :"
+  - "[ $BUILD_OTHER != 'true' ] && rm -rf dist/jmonkeyplatform.zip || :"
+  - "[ $BUILD_OTHER == 'true' ] && ./gradlew fixPlatformIndependent || :"
   - rm -rf build/
   - rm -rf build/
 
 
 deploy:
 deploy:

+ 19 - 5
build.xml

@@ -211,10 +211,13 @@
         <if>
         <if>
             <and>
             <and>
                 <not>
                 <not>
-                    <isset property="env.BUILD_X64" />
+                    <isset property="env.BUILD_X64"/>
                 </not>
                 </not>
                 <not>
                 <not>
-                    <isset property="env.BUILD_X86" />
+                    <isset property="env.BUILD_X86"/>
+                </not>
+                <not>
+                    <isset property="env.BUILD_OTHER"/>
                 </not>
                 </not>
             </and>
             </and>
             <then>
             <then>
@@ -225,7 +228,7 @@
                 <if>
                 <if>
                     <equals arg1="${env.BUILD_X64}" arg2="true"/>
                     <equals arg1="${env.BUILD_X64}" arg2="true"/>
                     <then>
                     <then>
-                        <property name="temp.platform1" value="windows-x64 linux-x64 macosx "/>
+                        <property name="temp.platform1" value="windows-x64 linux-x64 "/>
                         <echo message="Building for the X64 architecture"/>
                         <echo message="Building for the X64 architecture"/>
                     </then>
                     </then>
                     <else>
                     <else>
@@ -235,14 +238,25 @@
                 <if>
                 <if>
                     <equals arg1="${env.BUILD_X86}" arg2="true"/>
                     <equals arg1="${env.BUILD_X86}" arg2="true"/>
                     <then>
                     <then>
-                        <property name="temp.platform2" value="windows-x86 linux-x86" />
+                        <property name="temp.platform2" value="windows-x86 linux-x86 " />
                         <echo message="Building for the X86 architecture "/>
                         <echo message="Building for the X86 architecture "/>
                     </then>
                     </then>
                     <else>
                     <else>
                         <property name="temp.platform2" value="" /> <!-- So it isn't undefined -->
                         <property name="temp.platform2" value="" /> <!-- So it isn't undefined -->
                     </else>
                     </else>
                 </if>
                 </if>
-                <property name="generate.installer.for.platforms" value="${temp.platform1}${temp.platform2}"/>
+                <if>
+                    <equals arg1="${env.BUILD_OTHER}" arg2="true"/>
+                    <then>
+                        <property name="temp.platform3" value="macosx"/>
+                        <echo message="Building for Mac OS X"/>
+                    </then>
+                    <else>
+                        <property name="temp.platform3" value="" /> <!-- So it isn't undefined -->
+                    </else>
+                </if>
+                <!-- Since properties are immutable we needed temporary values -->
+                <property name="generate.installer.for.platforms" value="${temp.platform1}${temp.platform2}${temp.platform3}"/>
             </else>
             </else>
         </if>
         </if>