mirror of
https://hub.spigotmc.org/stash/scm/spigot/buildtools.git
synced 2025-09-18 21:45:56 +00:00
Don't use Jacobe for formatting, add support for Mac systems.
Requires -Dmac.supported=true.
This commit is contained in:
parent
d8e4840e46
commit
7954aca0ff
1 changed files with 3 additions and 33 deletions
|
@ -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() );
|
||||
|
|
Loading…
Add table
Reference in a new issue