Commits

md_5 authored c9ae24993c9
Add option to skip compilation
No tags

src/main/java/org/spigotmc/builder/Builder.java

Modified
53 53 public class Builder
54 54 {
55 55
56 56 public static final String LOG_FILE = "BuildTools.log.txt";
57 57 public static final boolean IS_WINDOWS = System.getProperty( "os.name" ).startsWith( "Windows" );
58 58 public static final boolean IS_MAC = System.getProperty( "os.name" ).startsWith( "Mac" );
59 59 public static final File CWD = new File( "." );
60 60 public static final String MC_VERSION = "1.8";
61 61 private static final File jacobeDir = new File( "jacobe" );
62 62 private static boolean dontUpdate;
63 + private static boolean skipCompile;
63 64
64 65 public static void main(String[] args) throws Exception
65 66 {
66 67 for ( String s : args )
67 68 {
68 69 if ( "--disable-certificate-check".equals( s ) )
69 70 {
70 71 disableHttpsCertificateCheck();
71 72 }
72 73 if ( "--dont-update".equals( s ) )
73 74 {
74 75 dontUpdate = true;
75 76 }
77 + if ( "--skip-compile".endsWith( s ) )
78 + {
79 + skipCompile = true;
80 + }
76 81 }
77 82
78 83 logOutput();
79 84
80 85 if ( IS_MAC )
81 86 {
82 87 System.out.println( "Sorry, but Macintosh is not currently a supported platform for compilation at this time." );
83 88 System.out.println( "Please run this script on a Windows or Linux PC and then copy the jars to this computer." );
84 89 System.exit( 1 );
85 90 }
282 287 clone( "file://" + bukkit.getAbsolutePath(), spigotApi );
283 288 }
284 289 File spigotServer = new File( spigot, "CraftBukkit" );
285 290 if ( !spigotServer.exists() )
286 291 {
287 292 clone( "file://" + craftBukkit.getAbsolutePath(), spigotServer );
288 293 }
289 294
290 295 // Git spigotApiGit = Git.open( spigotApi );
291 296 // Git spigotServerGit = Git.open( spigotServer );
292 - System.out.println( "Compiling Bukkit" );
293 - runProcess( bukkit, "sh", mvn, "clean", "install" );
297 + if ( !skipCompile )
298 + {
299 + System.out.println( "Compiling Bukkit" );
300 + runProcess( bukkit, "sh", mvn, "clean", "install" );
294 301
295 - System.out.println( "Compiling CraftBukkit" );
296 - runProcess( craftBukkit, "sh", mvn, "clean", "install" );
302 + System.out.println( "Compiling CraftBukkit" );
303 + runProcess( craftBukkit, "sh", mvn, "clean", "install" );
304 + }
297 305
298 306 try
299 307 {
300 308 runProcess( spigot, "bash", "applyPatches.sh" );
301 309 System.out.println( "*** Spigot patches applied!" );
302 310 System.out.println( "Compiling Spigot & Spigot-API" );
303 - runProcess( spigot, "sh", mvn, "clean", "install" );
311 +
312 + if ( !skipCompile )
313 + {
314 + runProcess( spigot, "sh", mvn, "clean", "install" );
315 + }
304 316 } catch ( Exception ex )
305 317 {
306 318 System.err.println( "Error compiling Spigot, are you running this jar via msysgit?" );
307 319 ex.printStackTrace();
308 320 System.exit( 1 );
309 321 }
310 322
311 323 for ( int i = 0; i < 35; i++ )
312 324 {
313 325 System.out.println( " " );

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut