Revision: 15019
http://gate.svn.sourceforge.net/gate/?rev=15019&view=rev
Author: ian_roberts
Date: 2012-01-12 17:11:25 +0000 (Thu, 12 Jan 2012)
Log Message:
-----------
- Windows and Mac native launchers
- Use Java's native splash screen mechanism instead of gate.gui.Splash, as this
allows the splash screen to appear sooner, before AWT is running, preventing
the rather long delay between clicking the launcher and it actually doing
something.
Modified Paths:
--------------
gate/trunk/bin/gate.sh
gate/trunk/build/Info.plist.template
gate/trunk/build/deploy/build.xml
gate/trunk/build/deploy/launch4j-gate.xml
gate/trunk/build.xml
gate/trunk/gate.exe
gate/trunk/src/gate/Main.java
Added Paths:
-----------
gate/trunk/bin/splash.png
gate/trunk/gate.l4j.ini
Modified: gate/trunk/bin/gate.sh
===================================================================
--- gate/trunk/bin/gate.sh 2012-01-12 16:24:24 UTC (rev 15018)
+++ gate/trunk/bin/gate.sh 2012-01-12 17:11:25 UTC (rev 15019)
@@ -27,7 +27,7 @@
## arguments are passed on to ant run
gateparams=()
-vmparams=()
+vmparams=(-splash:bin/splash.png)
while test "$1" != "";
do
case "$1" in
Copied: gate/trunk/bin/splash.png (from rev 15018,
gate/trunk/src/gate/resources/img/splash.png)
===================================================================
(Binary files differ)
Modified: gate/trunk/build/Info.plist.template
===================================================================
--- gate/trunk/build/Info.plist.template 2012-01-12 16:24:24 UTC (rev
15018)
+++ gate/trunk/build/Info.plist.template 2012-01-12 17:11:25 UTC (rev
15019)
@@ -9,7 +9,7 @@
<key>CFBundleGetInfoString</key>
<string>GATE @version@ - http://gate.ac.uk/</string>
<key>CFBundleIconFile</key>
- <string>gate-launcher.icns</string>
+ <string>gate-icon.icns</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>8.0</string>
<key>CFBundleName</key>
@@ -22,18 +22,14 @@
<string>8.0</string>
<key>Java</key>
<dict>
- <key>Arguments</key>
- <array>
- <string>run</string>
- </array>
<key>ClassPath</key>
<array>
- <string>lib/ant-launcher.jar</string>
+ <string>bin/gateLauncher.jar</string>
</array>
<key>JVMVersion</key>
<string>1.6+</string>
<key>MainClass</key>
- <string>org.apache.tools.ant.launch.Launcher</string>
+ <string>gate.Launcher</string>
<key>Properties</key>
<dict>
<key>apple.laf.useScreenMenuBar</key>
@@ -42,7 +38,18 @@
<string>true</string>
<key>apple.awt.antialiasing</key>
<string>true</string>
+ <key>com.apple.mrj.application.live-resize</key>
+ <string>true</string>
+ <key>sun.java2d.opengl</key>
+ <string>true</string>
</dict>
+ <key>VMOptions</key>
+ <array>
+ <string>-Xmx1800m</string>
+ <string>-Xms200m</string>
+ </array>
+ <key>SplashFile</key>
+ <string>$APP_PACKAGE/../bin/splash.png</string>
</dict>
</dict>
</plist>
Modified: gate/trunk/build/deploy/build.xml
===================================================================
--- gate/trunk/build/deploy/build.xml 2012-01-12 16:24:24 UTC (rev 15018)
+++ gate/trunk/build/deploy/build.xml 2012-01-12 17:11:25 UTC (rev 15019)
@@ -346,6 +346,7 @@
<file src="build.xml" targetdir="$INSTALL_PATH"/>
<file src="gate.xml" targetdir="$INSTALL_PATH"/>
<file src="gate.exe" targetdir="$INSTALL_PATH" os="windows"/>
+ <file src="gate.l4j.ini" targetdir="$INSTALL_PATH" os="windows"/>
<fileset dir="GATE.app" targetdir="$INSTALL_PATH/GATE.app"
os="mac"/>
<fileset dir="build" targetdir="$INSTALL_PATH/build">
<exclude name="deploy/**" />
Modified: gate/trunk/build/deploy/launch4j-gate.xml
===================================================================
--- gate/trunk/build/deploy/launch4j-gate.xml 2012-01-12 16:24:24 UTC (rev
15018)
+++ gate/trunk/build/deploy/launch4j-gate.xml 2012-01-12 17:11:25 UTC (rev
15019)
@@ -19,6 +19,11 @@
<initialHeapSize>0</initialHeapSize>
<maxHeapSize>0</maxHeapSize>
</jre>
+ <splash>
+ <file>splash.bmp</file>
+ <waitForWindow>true</waitForWindow>
+ <timeout>60</timeout>
+ </splash>
<messages>
<startupErr>An error occurred while starting the installer.</startupErr>
<bundledJreErr>This application was configured to use a bundled Java
Runtime Environment but the runtime is missing or corrupted.</bundledJreErr>
Modified: gate/trunk/build.xml
===================================================================
--- gate/trunk/build.xml 2012-01-12 16:24:24 UTC (rev 15018)
+++ gate/trunk/build.xml 2012-01-12 17:11:25 UTC (rev 15019)
@@ -595,11 +595,12 @@
dir="."
maxmemory="${runtime.max.memory}">
<jvmarg value="${server.or.client}"/>
+ <jvmarg value="-splash:bin/splash.png" />
<sysproperty key="java.ext.dirs" value="${ext.dirs}"/>
</java>
- </target>
+ </target>
- <target name="run-mac" if="running.on.mac">
+ <target name="run-mac" if="running.on.mac">
<property name="gate.icon.location"
location="GATE.app/Contents/Resources/gate-icon.icns" />
<!-- Don't pass a -d32 or -d64 on Tiger (10.4.x) -->
@@ -633,30 +634,9 @@
<jvmarg line="${runtime.arch}" />
<jvmarg value="-Xdock:name=GATE ${gate.version}"/>
<jvmarg value="-Xdock:icon=${gate.icon.location}"/>
+ <jvmarg value="-splash:bin/splash.png" />
</java>
-
- <java classname="gate.Main"
- classpathref="run.class.path"
- fork="true"
- spawn="${runtime.spawn}"
- dir="."
- maxmemory="${runtime.max.memory}">
-<!-- <jvmarg value="-Xms${runtime.start.memory}"/> -->
- <sysproperty key="gate.home" value="${basedir}"/>
- <sysproperty key="java.ext.dirs" value="${ext.dirs}"/>
- <sysproperty key="sun.java2d.opengl" value="true"/>
- <sysproperty key="apple.laf.useScreenMenuBar" value="true"/>
- <sysproperty key="apple.awt.antialiasing" value="true"/>
- <sysproperty key="com.apple.mrj.application.growbox.intrudes"
value="false"/>
- <sysproperty key="com.apple.mrj.application.live-resize" value="true"/>
- <!-- use "line" rather than "value" as runtime.arch may be empty -->
- <jvmarg line="${runtime.arch}" />
- <jvmarg value="-Xdock:name=GATE ${gate.version}"/>
- <jvmarg value="-Xdock:icon=${gate.icon.location}"/>
- <syspropertyset refid="run.properties" />
- <syspropertyset refid="os.properties" />
- </java>
- </target>
+ </target>
<!-- Run the beast using ANT as a launcher -->
<target name="runWithAnt" depends="runWAnt-pre,runWAnt-nonmac,runWAnt-mac" >
Modified: gate/trunk/gate.exe
===================================================================
(Binary files differ)
Added: gate/trunk/gate.l4j.ini
===================================================================
--- gate/trunk/gate.l4j.ini (rev 0)
+++ gate/trunk/gate.l4j.ini 2012-01-12 17:11:25 UTC (rev 15019)
@@ -0,0 +1,2 @@
+-Xmx1800m
+-Xms200m
Property changes on: gate/trunk/gate.l4j.ini
___________________________________________________________________
Added: svn:eol-style
+ CRLF
Modified: gate/trunk/src/gate/Main.java
===================================================================
--- gate/trunk/src/gate/Main.java 2012-01-12 16:24:24 UTC (rev 15018)
+++ gate/trunk/src/gate/Main.java 2012-01-12 17:11:25 UTC (rev 15019)
@@ -18,7 +18,6 @@
import gate.gui.MainFrame;
import gate.gui.OptionsDialog;
-import gate.gui.Splash;
import gate.util.BomStrippingInputStreamReader;
import gate.util.Err;
import gate.util.Files;
@@ -130,9 +129,6 @@
/** Main Frame of the GUI; null when no GUI running */
private static MainFrame frame;
- /** The splash shown when Gate starts*/
- private static Splash splash;
-
/**
* Get the main frame of the GUI. If the GUI isn't running, it
* is started.
@@ -159,37 +155,7 @@
}
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
- //show the splash
- SwingUtilities.invokeLater(new Runnable(){
- public void run(){
- //build the Splash
- JPanel splashBox = new JPanel();
- splashBox.setLayout(new GridBagLayout());
- splashBox.setBackground(Color.white);
- GridBagConstraints constraints = new GridBagConstraints();
- constraints.insets = new Insets(2, 2, 2, 2);
-
- String splashName =
- System.getProperty(GateConstants.APP_SPLASH_JAVA_PROPERTY_NAME);
- if(splashName == null)
- splashName = "splash";
-
- constraints.fill = GridBagConstraints.NONE;
- constraints.anchor = GridBagConstraints.CENTER;
- constraints.gridy = 1;
- constraints.gridwidth = 1;
- JLabel gifLbl = new JLabel(MainFrame.getIcon(splashName));
- splashBox.add(gifLbl, constraints);
- GraphicsConfiguration gc = GraphicsEnvironment.
- getLocalGraphicsEnvironment().getDefaultScreenDevice().
- getDefaultConfiguration();
-
- splash = new Splash(null, gc, splashBox);
- splash.showSplash();
- }
- });
-
// initialise the library and load user CREOLE directories
try{
Gate.init();
@@ -208,7 +174,7 @@
}
- //create the main frame, show it and hide the splash
+ //create the main frame, show it
SwingUtilities.invokeLater(new Runnable(){
public void run(){
GraphicsConfiguration gc = GraphicsEnvironment.
@@ -216,7 +182,6 @@
getDefaultConfiguration();
//this needs to run before any GUI component is constructed.
- //the initial gate splash is exempted from this rule.
applyUserPreferences();
//all the defaults tables have been updated; build the GUI
@@ -265,10 +230,6 @@
(screenSize.height - frameSize.height) / 2);
frame.setVisible(true);
- if(splash != null) {
- splash.setVisible(false);
- splash.dispose();
- }
//load session if required and available;
//do everything from a new thread.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs