X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fcore%2FMain.java;h=d925bc0e3619af1728a5daff82add51716429f4b;hp=3a0ec174b4cf14f86a789f8f94431e1d7629d389;hb=76b21655a0710caf4f972c107a3ab991032d7e10;hpb=b0ec2e1d6c3bd35205dfffc6893f01157aef2ced diff --git a/src/org/ibex/core/Main.java b/src/org/ibex/core/Main.java index 3a0ec17..d925bc0 100644 --- a/src/org/ibex/core/Main.java +++ b/src/org/ibex/core/Main.java @@ -1,4 +1,7 @@ -// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL] +// Copyright 2000-2005 the Contributors, as shown in the revision logs. +// Licensed under the GNU General Public License version 2 ("the License"). +// You may not use this file except in compliance with the License. + package org.ibex.core; import java.net.*; @@ -8,6 +11,7 @@ import org.ibex.js.*; import org.ibex.util.*; import org.ibex.plat.*; import org.ibex.graphics.*; +import org.ibex.core.builtin.*; /** Entry point for the Ibex Engine; handles splash screen, initial xwar loading, and argument processing */ public class Main { @@ -35,7 +39,7 @@ public class Main { System.err.println(" -l user@host email log to user@host"); System.err.println(" -l host:port emit log to TCP socket"); System.err.println(" -l write log to a file on disk"); - System.err.println(" -a check assertions"); + //System.err.println(" -a check assertions"); System.err.println(" -w reserved for libibex"); System.err.println(" -p dump profiling information [not yet supported]"); Runtime.getRuntime().exit(-1); @@ -45,7 +49,8 @@ public class Main { int startargs = 0; while (true) { if (startargs > args.length - 1) printUsage(); - else if (args[startargs].equals("-a")) JS.checkAssertions = true; + // FEATURE: This should be enabled at the parser level - there shouldn't even be an assert bytecode + /*else if (args[startargs].equals("-a")) JS.checkAssertions = true;*/ else if (args[startargs].equals("-l")) { startargs++; StringTokenizer opts = new StringTokenizer(args[startargs], ","); @@ -81,8 +86,10 @@ public class Main { originHost = originHost.substring(0, originHost.indexOf('/') == -1 ? originHost.length() : originHost.indexOf('/')); if (originHost.indexOf('@') != -1) originHost = originHost.substring(originHost.indexOf('@') + 1); originAddr = InetAddress.getByName(originHost); - rr = builtin; - startupTemplate = "org.ibex.builtin.splash"; + //rr = builtin; + //startupTemplate = "org.ibex.builtin.splash"; + rr = new Stream.HTTP(origin); + startupTemplate = initialTemplate; } else { rr = new Stream.File(origin); if (!new File(origin).isDirectory()) rr = new Stream.Zip(rr); @@ -93,7 +100,7 @@ public class Main { final Ibex ibex = new Ibex(rr); org.ibex.graphics.Surface.scarImage = - Picture.load(Main.builtin.get(JS.S("org/ibex/core/builtin/scar.png")), + Picture.load(new Stream.FromInputStream(Encode.JavaSourceCode.decode(Scar.data)), new Task() { public void perform() throws JSExn, UnknownHostException { if (Log.on) Log.info(Main.class, "invoking initial template"); ibex.resolveString(startupTemplate, false).call(new Box(), null, null, null, 1);