Commits
md_5 authored 2bc3c93e18b
48 48 | import org.eclipse.jgit.api.Git; |
49 49 | import org.eclipse.jgit.api.ResetCommand; |
50 50 | import org.eclipse.jgit.api.errors.GitAPIException; |
51 51 | import org.eclipse.jgit.revwalk.RevCommit; |
52 52 | |
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 - | public static final boolean IS_MAC = System.getProperty( "os.name" ).startsWith( "Mac" ); |
59 58 | public static final File CWD = new File( "." ); |
60 59 | public static final String MC_VERSION = "1.8"; |
61 60 | private static boolean dontUpdate; |
62 61 | private static boolean skipCompile; |
63 62 | |
64 63 | public static void main(String[] args) throws Exception |
65 64 | { |
66 65 | for ( String s : args ) |
67 66 | { |
68 67 | if ( "--disable-certificate-check".equals( s ) ) |
74 73 | dontUpdate = true; |
75 74 | } |
76 75 | if ( "--skip-compile".endsWith( s ) ) |
77 76 | { |
78 77 | skipCompile = true; |
79 78 | } |
80 79 | } |
81 80 | |
82 81 | logOutput(); |
83 82 | |
84 - | if ( IS_MAC && !Boolean.getBoolean( "mac.supported" ) ) |
83 + | if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) < 51.0 ) |
85 84 | { |
86 - | System.out.println( "Sorry, but Macintosh is not currently a supported platform for compilation at this time." ); |
87 - | System.out.println( "If you feel like testing Macintosh support please run this script with the -Dmac.supported=true option." ); |
88 - | System.out.println( "Else please run this script on a Windows or Linux PC and then copy the jars to this computer." ); |
89 - | System.exit( 1 ); |
85 + | System.err.println( "*** ERROR *** BuildTools should be run with Java 7 or above." ); |
86 + | System.err.println( "*** ERROR *** Use java -version to check your Java version." ); |
87 + | return; |
90 88 | } |
91 89 | |
92 90 | try |
93 91 | { |
94 92 | runProcess( CWD, "bash", "-c", "exit" ); |
95 93 | } catch ( Exception ex ) |
96 94 | { |
97 95 | System.out.println( "You must run this jar through bash (msysgit)" ); |
98 96 | System.exit( 1 ); |
99 97 | } |