SDK:
- cleanup applet ant target - unify logo with splash screen option git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8758 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
c578589053
commit
3c29d70eb9
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB |
@ -5,12 +5,7 @@
|
||||
<project name="com.jme3.gde.lwjgl.applet" default="netbeans" basedir=".">
|
||||
<description>Builds, tests, and runs the project com.jme3.gde.lwjgl.applet.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
<target name="init" depends="-zip-appletdata,-zip-appletloader,basic-init,files-init,build-init,-javac-init"/>
|
||||
<target name="-zip-appletdata" description="Zips applet data (icon)">
|
||||
<zip destfile="src/com/jme3/gde/lwjgl/applet/applet-data.zip">
|
||||
<zipfileset dir="applet-data" prefix=""/>
|
||||
</zip>
|
||||
</target>
|
||||
<target name="init" depends="-zip-appletloader,basic-init,files-init,build-init,-javac-init"/>
|
||||
<target name="-zip-appletloader" description="Zips applet loader">
|
||||
<zip destfile="release/libs/applet-loader.zip">
|
||||
<zipfileset dir="applet-loader" prefix=""/>
|
||||
|
@ -12,3 +12,4 @@ LwjglAppletCustomizerPanel.jTextField1.text=640
|
||||
LwjglAppletCustomizerPanel.jLabel2.text=An applet can be launched in any browser supporting Java.
|
||||
LwjglAppletCustomizerPanel.jTextField2.text=480
|
||||
LwjglAppletCustomizerPanel.jLabel3.text=X
|
||||
LwjglAppletCustomizerPanel.jLabel4.text=The applet uses the splash image set in the "Application" tab.
|
||||
|
@ -9,18 +9,10 @@ import com.jme3.gde.core.j2seproject.ProjectExtensionProperties;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import javax.swing.JComponent;
|
||||
|
||||
import org.netbeans.api.project.Project;
|
||||
import org.netbeans.spi.project.ui.support.ProjectCustomizer;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.Lookup;
|
||||
@ -62,7 +54,7 @@ public class LwjglAppletCompositeProvider implements ProjectCustomizer.Composite
|
||||
private class SavePropsListener implements ActionListener {
|
||||
|
||||
private String extensionName = "lwjglapplet";
|
||||
private String extensionVersion = "v0.98";
|
||||
private String extensionVersion = "v1.0";
|
||||
private String[] extensionDependencies = new String[]{"jar", "-lwjgl-applet"};
|
||||
private ProjectExtensionManager manager = new ProjectExtensionManager(extensionName, extensionVersion, extensionDependencies);
|
||||
private ProjectExtensionProperties properties;
|
||||
@ -72,7 +64,6 @@ public class LwjglAppletCompositeProvider implements ProjectCustomizer.Composite
|
||||
this.properties = props;
|
||||
this.project = project;
|
||||
manager.setAntTaskLibrary("lwjgl-applet");
|
||||
manager.setDataZip("nbres:/com/jme3/gde/lwjgl/applet/applet-data.zip");
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
|
@ -28,6 +28,7 @@
|
||||
<Component id="jTextField2" min="-2" pref="55" max="-2" attributes="1"/>
|
||||
<EmptySpace pref="169" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLabel4" alignment="0" pref="408" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
@ -43,7 +44,9 @@
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jTextField2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="212" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="188" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@ -91,5 +94,15 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Lucida Grande" size="13" style="2"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="com/jme3/gde/lwjgl/applet/Bundle.properties" key="LwjglAppletCustomizerPanel.jLabel4.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -73,6 +73,7 @@ public class LwjglAppletCustomizerPanel extends javax.swing.JPanel implements Ac
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
jTextField2 = new javax.swing.JTextField();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
|
||||
jCheckBox1.setText(org.openide.util.NbBundle.getMessage(LwjglAppletCustomizerPanel.class, "LwjglAppletCustomizerPanel.jCheckBox1.text")); // NOI18N
|
||||
|
||||
@ -86,6 +87,9 @@ public class LwjglAppletCustomizerPanel extends javax.swing.JPanel implements Ac
|
||||
|
||||
jLabel3.setText(org.openide.util.NbBundle.getMessage(LwjglAppletCustomizerPanel.class, "LwjglAppletCustomizerPanel.jLabel3.text")); // NOI18N
|
||||
|
||||
jLabel4.setFont(new java.awt.Font("Lucida Grande", 2, 13)); // NOI18N
|
||||
jLabel4.setText(org.openide.util.NbBundle.getMessage(LwjglAppletCustomizerPanel.class, "LwjglAppletCustomizerPanel.jLabel4.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
@ -101,6 +105,7 @@ public class LwjglAppletCustomizerPanel extends javax.swing.JPanel implements Ac
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(169, Short.MAX_VALUE))
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 408, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@ -114,7 +119,9 @@ public class LwjglAppletCustomizerPanel extends javax.swing.JPanel implements Ac
|
||||
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel3)
|
||||
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(212, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel4)
|
||||
.addContainerGap(188, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
@ -122,6 +129,7 @@ public class LwjglAppletCustomizerPanel extends javax.swing.JPanel implements Ac
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JTextField jTextField1;
|
||||
private javax.swing.JTextField jTextField2;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
Binary file not shown.
@ -1,11 +1,5 @@
|
||||
<target name="-lwjgl-applet-packlogo" if="splashscreen.available">
|
||||
<echo>Packing Splash</echo>
|
||||
<copy file="${application.splash}" todir="${applet.dir}"/>
|
||||
|
||||
<!-- <jar destfile="${applet.dir}/logo.jar">
|
||||
<fileset file="${application.splash}"/>
|
||||
</jar> -->
|
||||
|
||||
</target>
|
||||
<target name="-lwjgl-applet" depends="-test-lwjgl-applet-enabled" if="is.lwjgl.applet.enabled">
|
||||
<echo>Applet Creation</echo>
|
||||
@ -17,58 +11,20 @@
|
||||
<unzip src="${libs.appletloader}" dest="${applet.dir}"/>
|
||||
<move file="${applet.dir}/applet-template.html" tofile="${applet.dir}/run-applet.html"/>
|
||||
<move file="${assets.jar.resolved}" tofile="${applet.dir}/data.jar"/>
|
||||
<copy file="resources/lwjglapplet/appletlogo.png" todir="${applet.dir}"/>
|
||||
|
||||
<!-- if using many small jars -->
|
||||
<!--
|
||||
<dirset id="absolute.dist.dir" dir="${dist.dir}">
|
||||
<exclude name="lib"/>
|
||||
</dirset>
|
||||
<pathconvert dirsep="/" property="absolute.dist.dir" refid="absolute.dist.dir"/>
|
||||
|
||||
<fileset id="applet.classpath" dir="${dist.dir}/lib">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
|
||||
<pathconvert dirsep="/" pathsep=", " property="applet.classpath" refid="applet.classpath">
|
||||
<map from="${absolute.dist.dir}/" to=""/>
|
||||
</pathconvert>
|
||||
<echo>${applet.classpath}</echo>
|
||||
|
||||
<copy file="${dist.jar}" todir="${applet.dir}"/>
|
||||
-->
|
||||
|
||||
<!-- if using onejar -->
|
||||
<jar destfile="${applet.dir}/code.jar">
|
||||
<zipgroupfileset dir="${dist.dir}/lib" includes="*.jar"
|
||||
<jar destfile="${applet.dir}/code.jar">
|
||||
<zipgroupfileset dir="${dist.dir}/lib" includes="*.jar"
|
||||
excludes="*natives*, ${assets.jar.name}, lwjgl.jar"/>
|
||||
<zipgroupfileset file="${dist.jar}"/>
|
||||
</jar>
|
||||
<property name="applet.classpath" value="code.jar, data.jar, lwjgl.jar.pack.lzma"/>
|
||||
<!--property name="applet.logo" value="appletlogo.png"/-->
|
||||
<zipgroupfileset file="${dist.jar}"/>
|
||||
</jar>
|
||||
|
||||
<antcall target="-lwjgl-applet-packlogo"/>
|
||||
|
||||
<property name="applet.archive" value="lwjgl_util_applet.jar, lzma.jar"/>
|
||||
<!--
|
||||
<condition property="applet.archive" value="lwjgl_util_applet.jar, lzma.jar">
|
||||
<not>
|
||||
<isset property="splashscreen.available"/>
|
||||
</not>
|
||||
</condition>
|
||||
<condition property="applet.archive" value="lwjgl_util_applet.jar, lzma.jar, logo.jar">
|
||||
<isset property="splashscreen.available"/>
|
||||
</condition>-->
|
||||
|
||||
<condition property="application.splash" value="appletlogo.png">
|
||||
<not>
|
||||
<isset property="splashscreen.available"/>
|
||||
</not>
|
||||
</condition>
|
||||
<fileset id="applet.logo.name" file="${application.splash}"/>
|
||||
<pathconvert refid="applet.logo.name" property="applet.logo.name">
|
||||
<mapper type="flatten"/>
|
||||
</pathconvert>
|
||||
<property name="applet.classpath" value="code.jar, data.jar, lwjgl.jar.pack.lzma"/>
|
||||
<property name="applet.archive" value="lwjgl_util_applet.jar, lzma.jar"/>
|
||||
<fileset id="applet.logo.name" file="${application.splash}"/>
|
||||
<pathconvert refid="applet.logo.name" property="applet.logo.name">
|
||||
<mapper type="flatten"/>
|
||||
</pathconvert>
|
||||
<antcall target="-lwjgl-applet-packlogo"/>
|
||||
|
||||
<replace file="${applet.dir}/run-applet.html">
|
||||
<replacefilter>
|
||||
|
Loading…
x
Reference in New Issue
Block a user