diff options
author | md_5 <git@md-5.net> | 2014-12-24 08:41:16 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-12-24 08:41:48 +1100 |
commit | 7954aca0ff43647dbe0825fe4eb562bcfdef44db (patch) | |
tree | e08cda51bac72c2d30eb46ee6b360d99b4009e7d /src/main/java/org/spigotmc/builder | |
parent | d8e4840e465e74d5087c0244e767e4eb4e04b03b (diff) | |
download | buildtools-7954aca0ff43647dbe0825fe4eb562bcfdef44db.tar buildtools-7954aca0ff43647dbe0825fe4eb562bcfdef44db.tar.gz buildtools-7954aca0ff43647dbe0825fe4eb562bcfdef44db.tar.lz buildtools-7954aca0ff43647dbe0825fe4eb562bcfdef44db.tar.xz buildtools-7954aca0ff43647dbe0825fe4eb562bcfdef44db.zip |
Don't use Jacobe for formatting, add support for Mac systems.
Requires -Dmac.supported=true.
Diffstat (limited to 'src/main/java/org/spigotmc/builder')
-rw-r--r-- | src/main/java/org/spigotmc/builder/Builder.java | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java index b5ac1b6..2cbe573 100644 --- a/src/main/java/org/spigotmc/builder/Builder.java +++ b/src/main/java/org/spigotmc/builder/Builder.java @@ -58,7 +58,6 @@ public class Builder public static final boolean IS_MAC = System.getProperty( "os.name" ).startsWith( "Mac" ); public static final File CWD = new File( "." ); public static final String MC_VERSION = "1.8"; - private static final File jacobeDir = new File( "jacobe" ); private static boolean dontUpdate; private static boolean skipCompile; @@ -82,10 +81,11 @@ public class Builder logOutput(); - if ( IS_MAC ) + if ( IS_MAC && !Boolean.getBoolean( "mac.supported" ) ) { System.out.println( "Sorry, but Macintosh is not currently a supported platform for compilation at this time." ); - System.out.println( "Please run this script on a Windows or Linux PC and then copy the jars to this computer." ); + System.out.println( "If you feel like testing Macintosh support please run this script with the -Dmac.supported=true option." ); + System.out.println( "Else please run this script on a Windows or Linux PC and then copy the jars to this computer." ); System.exit( 1 ); } @@ -142,12 +142,6 @@ public class Builder clone( "https://hub.spigotmc.org/stash/scm/spigot/builddata.git", buildData ); } - if ( !jacobeDir.exists() ) - { - System.out.println( "Jacobe does not exist, downloading" ); - getJacobe(); - } - File maven = new File( "apache-maven-3.2.3" ); if ( !maven.exists() ) { @@ -232,13 +226,6 @@ public class Builder } ); runProcess( CWD, "java", "-jar", "BuildData/bin/fernflower.jar", "-dgs=1", "-hdc=0", "-rbr=0", "-asc=1", clazzDir.getPath(), decompileDir.getPath() ); - - String jacobePath = jacobeDir.getPath() + "/jacobe"; - if ( IS_WINDOWS ) - { - jacobePath += ".exe"; - } - runProcess( CWD, jacobePath, "-cfg=BuildData/bin/jacobe.cfg", "-nobackup", "-overwrite", "-outext=java", decompileDir + "/net/minecraft/server" ); } System.out.println( "Applying CraftBukkit Patches" ); @@ -347,23 +334,6 @@ public class Builder } } - public static void getJacobe() throws Exception - { - if ( IS_WINDOWS ) - { - File jacobeWindows = new File( "jacobe.win32.zip" ); - download( "http://www.tiobe.com/content/products/jacobe/jacobe.win32.zip", jacobeWindows ); - unzip( jacobeWindows, jacobeDir ); - } else - { - File jacobeLinux = new File( "jacobe.linux.tar.gz" ); - download( "http://www.tiobe.com/content/products/jacobe/jacobe.linux.tar.gz", jacobeLinux ); - - jacobeDir.mkdir(); - runProcess( CWD, "tar", "xzvf", jacobeLinux.getPath(), "-C", jacobeDir.getPath() ); - } - } - public static void pull(Git repo) throws Exception { System.out.println( "Pulling updates for " + repo.getRepository().getDirectory() ); |