Revision: 4080 http://vexi.svn.sourceforge.net/vexi/?rev=4080&view=rev Author: mkpg2 Date: 2011-03-26 04:05:30 +0000 (Sat, 26 Mar 2011)
Log Message: ----------- Development. - Splash screen, using jdk 6 splash screen api, falling back to an awt window - Convert to EBuild build. Modified Paths: -------------- trunk/org.vexi-launcher/build.xml trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Launcher.java Added Paths: ----------- trunk/org.vexi-launcher/meta/ trunk/org.vexi-launcher/meta/module-build.xml trunk/org.vexi-launcher/meta/module.xml trunk/org.vexi-launcher/src/main/ trunk/org.vexi-launcher/src/main/java/ trunk/org.vexi-launcher/src/main/java/org/ trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Splash.java trunk/org.vexi-launcher/src/test/ trunk/org.vexi-launcher/src/test/java/ trunk/org.vexi-launcher/src/test/java/org/ trunk/org.vexi-launcher.vexi_org/build.xml trunk/org.vexi-launcher.vexi_org/meta/ trunk/org.vexi-launcher.vexi_org/meta/module-build.xml trunk/org.vexi-launcher.vexi_org/meta/module.xml trunk/org.vexi-launcher.vexi_org/meta/product-assembly.xml trunk/org.vexi-launcher.vexi_org/meta/product.xml trunk/org.vexi-launcher.vexi_org/src/ trunk/org.vexi-launcher.vexi_org/src/main/ trunk/org.vexi-launcher.vexi_org/src/main/java/ trunk/org.vexi-launcher.vexi_org/src/main/java/meta-inf/ trunk/org.vexi-launcher.vexi_org/src/main/java/meta-inf/manifest.mf trunk/org.vexi-launcher.vexi_org/src/main/java/org/ trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/ trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/ trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/VexiLauncher.java trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/sigcerts.dat trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/vexi_splash.png trunk/org.vexi-launcher.vexi_org/src/poke/ trunk/org.vexi-launcher.vexi_org/src/poke/java/ trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/ trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/ trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeFetch.java trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeSplash.java Removed Paths: ------------- trunk/org.vexi-launcher/prep.xml trunk/org.vexi-launcher/src/org/ Property Changed: ---------------- trunk/org.vexi-launcher/ trunk/org.vexi-launcher.vexi_org/ Property changes on: trunk/org.vexi-launcher ___________________________________________________________________ Modified: svn:ignore - build build.conf src_gen build_* + build build.conf src_gen build_* .configuration gen .classpath .project .settings release Modified: trunk/org.vexi-launcher/build.xml =================================================================== --- trunk/org.vexi-launcher/build.xml 2011-03-26 03:55:58 UTC (rev 4079) +++ trunk/org.vexi-launcher/build.xml 2011-03-26 04:05:30 UTC (rev 4080) @@ -1,15 +1,6 @@ -<project default="sign" > - - - <property name="param.package" value="org.vexi.launcher"/> - <property name="param.packagedir" value="org/vexi/launcher"/> - <property name="param.appletclass" value="org.vexi.launcher.VexiLauncher"/> - - <property name="param.jarname" value="vexilauncher"/> - <property name="param.src_conf" location="src_vexi"/> - - <property file="build.conf"/> - - <import file="build_launcher.ent"/> - -</project> +<project default="eclipse_setup"> + + <property name="ebuild.home" location="../_ebuild"/> + <import file="${ebuild.home}/interface/workspace.ent"/> + +</project> \ No newline at end of file Added: trunk/org.vexi-launcher/meta/module-build.xml =================================================================== --- trunk/org.vexi-launcher/meta/module-build.xml (rev 0) +++ trunk/org.vexi-launcher/meta/module-build.xml 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,6 @@ +<ebuild-module-build ebuild-version="0.8"> + <using source="local" name="library.util" context="build"/> + <builders> + <builder refid="javac" /> + </builders> +</ebuild-module-build> \ No newline at end of file Property changes on: trunk/org.vexi-launcher/meta/module-build.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/org.vexi-launcher/meta/module.xml =================================================================== --- trunk/org.vexi-launcher/meta/module.xml (rev 0) +++ trunk/org.vexi-launcher/meta/module.xml 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,6 @@ +<ebuild-module ebuild-version="0.8"> + <artifact name="java_classes.jar" /> + <dependencies> + <dependency source="local" name="library.crypto" /> + </dependencies> +</ebuild-module> Property changes on: trunk/org.vexi-launcher/meta/module.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Deleted: trunk/org.vexi-launcher/prep.xml =================================================================== --- trunk/org.vexi-launcher/prep.xml 2011-03-26 03:55:58 UTC (rev 4079) +++ trunk/org.vexi-launcher/prep.xml 2011-03-26 04:05:30 UTC (rev 4080) @@ -1,14 +0,0 @@ -<project default="src_gen"> - - <property name="param.src_gen" location="src_gen"/> - - <import file="build.xml"/> - - <target name="src_gen_init"> - <property name="gen" location="src_gen"/> - </target> - - <target name="src_gen" depends="src_gen_init,generate"/> - - -</project> Modified: trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Launcher.java =================================================================== --- trunk/org.vexi-launcher/src/org/vexi/launcher/Launcher.java 2011-03-25 15:55:14 UTC (rev 4078) +++ trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Launcher.java 2011-03-26 04:05:30 UTC (rev 4080) @@ -1,11 +1,25 @@ package org.vexi.launcher; import java.applet.Applet; -import java.awt.*; -import java.awt.font.*; -import java.io.*; -import java.net.*; -import java.util.*; +import java.awt.Color; +import java.awt.Font; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.File; +import java.io.FilterInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.Map; +import java.util.StringTokenizer; +import java.util.Vector; + import org.vexi.DotVexi; /** @@ -33,6 +47,8 @@ // INIT DotVexi dotvexi; + String fetchCount = "?"; + int fetchIndex = 1; static protected void logflush() { System.err.flush(); @@ -141,7 +157,7 @@ - void initDotVexi() { + public void initDotVexi() { dotvexi = new DotVexi(getCerts()) { long lastDate = -1; @@ -182,6 +198,9 @@ } private InputStream progressInputStream(InputStream is, final String displayname, final int contentLength ){ + final String left = "Downloading: "+displayname; + final String right = fetchIndex+"/"+fetchCount; + return new FilterInputStream(new BufferedInputStream(is)) { int total = 0; int percent = 0; @@ -190,8 +209,9 @@ int newpercent = ((int)Math.ceil(loaded * 100)); if (newpercent!=percent) { percent = newpercent; + //log(percent + "%"); - update((double)percent, "Downloading "+ displayname + " " + percent + "%"); + Splash.update(left, right, (double)percent); } } @@ -257,6 +277,7 @@ public File fetch(String url) throws IOException { File localfile = dotvexi.getLocalFile(url); dotvexi.fetch(url, null, url, localfile); + fetchIndex++; return localfile; } @@ -285,7 +306,7 @@ // Check codebase is permitted String codebase = getCodeBase()+""; - update(0.0, ""+codebase); + updateStatus(""+codebase); //log("Codebase is "+url); if (!checkUrl(codebase)) { @@ -297,6 +318,17 @@ throw new Problem("Core property not set"); } + ArrayList fetchVexis = new ArrayList(10); + for (int i = 0; i<10000;i++) { + String fetch = getParameter("vexi" + i); + if (fetch == null) { + break; + } + fetchVexis.add(fetch); + } + fetchCount = ""+(fetchVexis.size()+1); + + String coreurl = core; if (!coreurl.endsWith(".signed")) { permitUnsignedCore(coreurl); @@ -318,22 +350,18 @@ command.add("logs/"+logfile); } - for (int i = 0; i<100;i++) { + for (int i = 0; i<10000;i++) { if (getParameter("option" + i) == null) { break; } command.add(getParameter("option" + i)); } - - for (int i = 0; i<100;i++) { - String fetch = getParameter("vexi" + i); - if (fetch == null) { - break; - } - File f = fetch(fetch); + for (int i = 0; i<fetchVexis.size();i++) { + File f = fetch((String)fetchVexis.get(i)); command.add(f.getPath()); } + // REMARK - discovering os/architecture not relevant until // native builds are working again /* @@ -349,10 +377,10 @@ spawn(command); } catch (Problem e) { - update(-1.0, e.getMessage()); + updateError(e.getMessage()); log(e.getMessage()); } catch (Throwable e) { - update(-1.0, "Error; please check the Java console"); + updateError("Error; please check the Java console"); e.printStackTrace(); } } @@ -384,12 +412,12 @@ errorstream.start(); outputstream.start(); try { - update(1.0, "Vexi loaded"); + updateStatus("Vexi loaded"); int exitValue = p.waitFor(); if (exitValue != 0) { - update(-1,"Vexi exited abnormally with error code '"+exitValue+"', see log output"); + updateError("Vexi exited abnormally with error code '"+exitValue+"', see log output"); } else { - update(100,"Vexi has finished running"); + updateStatus("Vexi has finished running"); } } catch (Throwable t) { log("Error exiting... " + p.exitValue()); @@ -430,16 +458,34 @@ } } - //////// - // visual handling + /////////////////////// + // Display/Status + /////////////////////// - static class Display { - double percent = 0.0; - String text = ""; + final Font font = new Font("Sans-serif", Font.BOLD, 12); + final private Object statusLock = new Object(); + private String statusText; + private Color statusColor; + private Image backbuffer = null; + + /** controls the visual display of the applet + * + * @param percent + * -1 causes the applet to be displayed in red + * 0-100 causes the applet to be a blue progress bar + * @param text + * message or error to display in the applet + */ + protected void updateStatus(String statusText) { updateStatus(statusText, Color.black); } + protected void updateError(String statusText) { updateStatus(statusText, Color.red); } + private void updateStatus(String statusText, Color statusColor) { + synchronized (statusLock) { + this.statusText = statusText; + this.statusColor = statusColor; + } + repaint(); } - private Image backbuffer = null; - Display display = new Display(); public final void paint(Graphics g) { update(g); } public final void update(Graphics g2) { @@ -449,54 +495,30 @@ if (backbuffer == null) { return; } - Graphics g = backbuffer.getGraphics(); + Graphics2D g = (Graphics2D)backbuffer.getGraphics(); - - double percent; + Color color; String text; - synchronized(display) { - percent = display.percent; - text = display.text; + synchronized(statusLock) { + text = statusText; + color = statusColor; } - g.setColor(percent < 0 ? Color.red : Color.blue); - percent = Math.abs(percent); - - int w = (int)((double)getSize().width * percent); - g.fillRect(0, 0, w, getSize().height); - g.setColor(Color.darkGray); - g.fillRect(w, 0, getSize().width - w, getSize().height); - - Font f = new Font("Sans-serif", Font.BOLD, 12); - FontRenderContext frc = new FontRenderContext(null, true, true); - LineMetrics lm = f.getLineMetrics(text, frc); - g.setFont(f); - - int x = (int)((getSize().width - f.getStringBounds(text, frc).getWidth()) / 2); - int y = (int)(((getSize().height - lm.getAscent() - lm.getDescent()) / 2) + lm.getAscent()); + g.setColor(Color.white); - g.drawString(text, x, y); + g.fillRect(0, 0, getSize().width, getSize().height); + g.setColor(color); + g.drawString(text, 0, 0); g2.setClip(0, 0, getSize().width, getSize().height); g2.drawImage(backbuffer, 0, 0, null); } - /** controls the visual display of the applet - * - * @param percent - * -1 causes the applet to be displayed in red - * 0-100 causes the applet to be a blue progress bar - * @param text - * message or error to display in the applet - */ - protected void update(double percent, String text) { - synchronized (display) { - display.percent = percent; - display.text = text; - } - repaint(); - } + + + //////////////////// + //// Utility static private URLConnection connect(String url) throws IOException { try { URL u = new URL(url); @@ -519,5 +541,4 @@ void permitUnsignedCore(String file) throws Problem { throw new Problem("Applet will not run unsigned core file: "+ file); } - } Added: trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Splash.java =================================================================== --- trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Splash.java (rev 0) +++ trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Splash.java 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,160 @@ +package org.vexi.launcher; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import java.awt.MediaTracker; +import java.awt.SplashScreen; +import java.awt.Toolkit; +import java.awt.Window; +import java.awt.image.BufferedImage; + +public class Splash { + static SplashWindow instance; + static String splashImagePath; + static private SplashWindow initFallback(){ + return new Fallback(); + } + static private SplashWindow initFast(){ + SplashScreen splash = SplashScreen.getSplashScreen(); + if(splash==null){ + System.err.println("[warning] could not find fast splash screen, using old style"); + return initFallback(); + }else{ + return new Fast(splash); + } + } + + static public SplashWindow init(String splashImagePath){ + Splash.splashImagePath = splashImagePath; + try{ + Splash.class.getClassLoader().loadClass("java.awt.SplashScreen"); + instance = initFast(); + }catch(ClassNotFoundException e){ + instance = initFallback(); + } + return instance; + } + + static final Font font = new Font("Sans-serif", Font.BOLD, 9); + static public void update(String statusLeft, String statusRight, double percent){ + instance.update(statusLeft, statusRight, percent); + } + +// static void drawShadedRect(Graphics g, Color c, int x, int y, int width){ +// for(int i=0; i<3; i++){ +// g.setColor(c); +// g.drawLine(x, y+i, x+width, y+i); +// c = c.darker(); +// } +// } + + static void draw(Graphics2D g, String statusLeft, String statusRight, double percent){ + // active area + g.setColor(Color.WHITE); + g.fillRect(45, 170, 510, 100); + + // progress bar + int w = (int)((double)5 * percent); + g.setColor(Color.green); + g.fillRect(50, 188, w, 14); + g.setColor(Color.darkGray); + g.drawRect(49, 187, 501, 15); + + // right justify + int rightOffset = (int)font.getStringBounds(statusRight, g.getFontRenderContext()).getWidth(); + + // status text + g.setFont(font); + g.setColor(Color.DARK_GRAY); + g.drawString(statusLeft, 50, 175); + g.drawString(statusRight, 550-rightOffset, 175); + } + + static public void close(){ instance.close(); } + + static interface SplashWindow { + public void update(String statusLeft, String statusRight, double percent); + public void close(); + } + + static class Fast implements SplashWindow{ + final Graphics2D graphics; + final SplashScreen splash; + public Fast(SplashScreen splash){ + this.splash = splash; + this.graphics = splash.createGraphics(); + } + + public void update(String statusLeft, String statusRight, double percent){ + draw(graphics, statusLeft, statusRight, percent); + splash.update(); + } + public void close(){ SplashScreen.getSplashScreen().close(); } + } + + static class Fallback extends Window implements SplashWindow{ + private Image buffer; + private int imgWidth, imgHeight; + private static final int BORDERSIZE = 0; + + public Fallback() { + super(new Frame()); + buffer = loadSplashImage(); + showSplashScreen(); + } + private Image loadSplashImage() { + MediaTracker tracker = new MediaTracker(this); + Image background = Toolkit.getDefaultToolkit().getImage(getClass().getResource(splashImagePath)); + try { + tracker.addImage(background, 0); + tracker.waitForAll(); + + imgWidth = background.getWidth(this); + imgHeight = background.getHeight(this); + + +// Image buffer = createImage(imgWidth, imgHeight); + Image buffer = new BufferedImage(imgWidth, imgHeight, BufferedImage.TYPE_INT_RGB); + buffer.getGraphics().drawImage(background, 0, 0, Color.white, null); + + + return buffer; + }catch (Exception e) { + throw new Error(e); + } + } + + private void showSplashScreen() { + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); +// setBackground(BORDERCOLOR); + int w = imgWidth + (BORDERSIZE * 2); + int h = imgHeight + (BORDERSIZE * 2); + int x = (screenSize.width - w) /2; + int y = (screenSize.height - h) /2; + setBounds(x, y, w, h); + setVisible(true); + } + + public void paint(Graphics g) { + synchronized(buffer){ + g.drawImage(buffer, BORDERSIZE, BORDERSIZE, + imgWidth, imgHeight, this); + } + } + + public void update(String statusLeft, String statusRight, double percent) { + synchronized(buffer){ + Graphics2D g = (Graphics2D)buffer.getGraphics(); + draw(g, statusLeft, statusRight, percent); + } + repaint(); + } + public void close() { setVisible(false); } + } + +} Property changes on: trunk/org.vexi-launcher/src/main/java/org/vexi/launcher/Splash.java ___________________________________________________________________ Added: svn:mime-type + text/plain Property changes on: trunk/org.vexi-launcher.vexi_org ___________________________________________________________________ Added: svn:ignore + .configuration gen .classpath .project .settings build release Added: trunk/org.vexi-launcher.vexi_org/build.xml =================================================================== --- trunk/org.vexi-launcher.vexi_org/build.xml (rev 0) +++ trunk/org.vexi-launcher.vexi_org/build.xml 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,6 @@ +<project default="eclipse_setup"> + + <property name="ebuild.home" location="../_ebuild"/> + <import file="${ebuild.home}/interface/workspace.ent"/> + +</project> \ No newline at end of file Property changes on: trunk/org.vexi-launcher.vexi_org/build.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/org.vexi-launcher.vexi_org/meta/module-build.xml =================================================================== --- trunk/org.vexi-launcher.vexi_org/meta/module-build.xml (rev 0) +++ trunk/org.vexi-launcher.vexi_org/meta/module-build.xml 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,7 @@ +<ebuild-module-build ebuild-version="0.8"> + <using source="local" name="library.util" context="build"/> + <builders> + <builder source="ebuild.org" name="build.java.versionclass" /> + <builder refid="javac" /> + </builders> +</ebuild-module-build> \ No newline at end of file Property changes on: trunk/org.vexi-launcher.vexi_org/meta/module-build.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/org.vexi-launcher.vexi_org/meta/module.xml =================================================================== --- trunk/org.vexi-launcher.vexi_org/meta/module.xml (rev 0) +++ trunk/org.vexi-launcher.vexi_org/meta/module.xml 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,7 @@ +<ebuild-module ebuild-version="0.8"> + <artifact name="java_classes.jar" /> + <dependencies> + <system name="java.jre" tag="1.4"/> + <dependency source="local" name="launcher" /> + </dependencies> +</ebuild-module> Property changes on: trunk/org.vexi-launcher.vexi_org/meta/module.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/org.vexi-launcher.vexi_org/meta/product-assembly.xml =================================================================== --- trunk/org.vexi-launcher.vexi_org/meta/product-assembly.xml (rev 0) +++ trunk/org.vexi-launcher.vexi_org/meta/product-assembly.xml 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,31 @@ +<ebuild-product-assembly ebuild-version="0.8"> + <using source="local" name="build.shared"/> + + <target name="constituents"> + <!-- Turn off debugging information, breaks shrinker --> + <module-selection conf-mapping="!noshrink->nodebug" artifact="java_classes.jar"> + <our-module /> + </module-selection> + </target> + <target name="applet"> + <if cond="noshrink"> + <then> + <assembler source="ebuild" name="build.java.jarmerge" tag="0.7" > + <input ref="constituents"/> + </assembler> + </then> + <else> + <assembler source="ebuild.org" name="build.java.jarshrink"> + <input name="shrink" ref="constituents"/> + <property key="proguard_options"> + -dontobfuscate + -allowaccessmodification + + <!-- The entry point --> + -keep public class org.vexi.launcher.VexiLauncher + </property> + </assembler> + </else> + </if> + </target> +</ebuild-product-assembly> Property changes on: trunk/org.vexi-launcher.vexi_org/meta/product-assembly.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/org.vexi-launcher.vexi_org/meta/product.xml =================================================================== --- trunk/org.vexi-launcher.vexi_org/meta/product.xml (rev 0) +++ trunk/org.vexi-launcher.vexi_org/meta/product.xml 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,7 @@ +<ebuild-product ebuild-version="0.8"> + <artifact name="applet" prefix="vexilauncher" suffix=".jar"/> + + <configurations> + <configuration name="noshrink" /> + </configurations> +</ebuild-product> Property changes on: trunk/org.vexi-launcher.vexi_org/meta/product.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/org.vexi-launcher.vexi_org/src/main/java/meta-inf/manifest.mf =================================================================== --- trunk/org.vexi-launcher.vexi_org/src/main/java/meta-inf/manifest.mf (rev 0) +++ trunk/org.vexi-launcher.vexi_org/src/main/java/meta-inf/manifest.mf 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,3 @@ + Manifest-Version: 1.0 + Main-Class: org.vexi.launcher.VexiLauncher + SplashScreen-Image: org/vexi/launcher/vexi_splash.png Added: trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/VexiLauncher.java =================================================================== --- trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/VexiLauncher.java (rev 0) +++ trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/VexiLauncher.java 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,36 @@ +package org.vexi.launcher; + +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +import org.vexi.launcher.vexi_org.ModuleVersion; +import org.vexi.security.CryptoUtil; + +public class VexiLauncher extends Launcher { + public String getVersion() { + if(ModuleVersion.TAG==null){ + return ModuleVersion.BRANCH+" "+ModuleVersion.REVISION; + } + return ModuleVersion.TAG; + } + + public String[] getPermittedDomains() { + return new String[]{"localhost", "127.0.0.1", "vexi.org", "vexi.sourceforge.net"}; + } + + public Map getCerts() { + try { + Map organisationToPK = new HashMap(); + CryptoUtil.readCompactCADat(organisationToPK, getSignerCertsDat()); + return organisationToPK; + } catch (Throwable e) { + updateError("Error: applet unable to find signatory certificates"); + throw new Error(e); + } + } + + public InputStream getSignerCertsDat() { + return getClass().getResourceAsStream("sigcerts.dat"); + } +} Property changes on: trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/VexiLauncher.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/sigcerts.dat =================================================================== (Binary files differ) Property changes on: trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/sigcerts.dat ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/vexi_splash.png =================================================================== (Binary files differ) Property changes on: trunk/org.vexi-launcher.vexi_org/src/main/java/org/vexi/launcher/vexi_splash.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeFetch.java =================================================================== --- trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeFetch.java (rev 0) +++ trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeFetch.java 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,27 @@ +package poke.launcher; + +import java.io.File; +import java.io.IOException; + +import org.vexi.launcher.Launcher; +import org.vexi.launcher.VexiLauncher; + +public class PokeFetch { + + public static void main(String[] args) throws IOException { + + // REMARK - start server from 'testdeploy' project first + // iff feeling keen perhaps make it into a unit test with + // embedded http server. + Launcher l = new VexiLauncher(); + l.initDotVexi(); + fetch(l, "vexi3_b3642.jar.signed"); + fetch(l, "vexi_widgets.vexi.signed"); + fetch(l, "vexi_demo.vexi"); + } + + static private void fetch(Launcher l, String file) throws IOException{ + File f = l.fetch("http://localhost:7070/"+file); + System.out.println(f.getName()); + } +} Property changes on: trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeFetch.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeSplash.java =================================================================== --- trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeSplash.java (rev 0) +++ trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeSplash.java 2011-03-26 04:05:30 UTC (rev 4080) @@ -0,0 +1,25 @@ +package poke.launcher; + +import org.vexi.launcher.Splash; + +public class PokeSplash { + + static public void main(String[] args) throws InterruptedException { + Splash.init("/org/vexi/launcher/vexi_splash.png"); + + for(int i=0; i<=5; i++){ + Thread.sleep(1000); + Splash.update("Downloading: First", "1/2", i*20); + System.err.println(""+i); + } + for(int i=0; i<=10; i++){ + Thread.sleep(1000); + Splash.update("Downloading: Second", "2/2", i*10); + System.err.println(""+i); + } + + + Splash.close(); + } + +} Property changes on: trunk/org.vexi-launcher.vexi_org/src/poke/java/poke/launcher/PokeSplash.java ___________________________________________________________________ Added: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn