Moved graphics to standard resource directory structure. Updated classpath, ant build.xml, launch4j templates, and source code graphics references to reflect changes.

This commit is contained in:
Merp 2013-01-05 16:14:32 +01:00 committed by Fred Cooke
parent 903f300423
commit cda9f76071
43 changed files with 52 additions and 52 deletions

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources" excluding="**" output="target/classes"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/common/com4j.jar"/>
<classpathentry kind="lib" path="lib/windows/j3dcore.jar"/>

View File

@ -93,6 +93,8 @@
<!-- basic project properties -->
<property name="src.dir" value="${basedir}/src"/>
<property name="src.java.dir" value="${src.dir}/main/java"/>
<property name="src.res.dir" value="${src.dir}/main/resources"/>
<property name="graphics.dir" value="${src.res.dir}/graphics"/>
<property name="docs.dir" value="${basedir}/docs"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="template.dir" value="${basedir}/templates"/>
@ -320,7 +322,11 @@
<attribute name="Class-Path" value="${@{os}.jar.classpath}"/>
</manifest>
<jar basedir="${classes.dir}" destfile="${build.dir}/@{os}/lib/${jar.package}"
manifest="${build.dir}/@{os}/MANIFEST.MF"/>
manifest="${build.dir}/@{os}/MANIFEST.MF">
<fileset dir="${src.res.dir}">
<include name="**/*.*"/>
</fileset>
</jar>
</sequential>
</macrodef>
@ -328,7 +334,7 @@
<attribute name="os"/>
<sequential>
<mkdir dir="${classes.dir}"/>
<javac failonerror="true" srcdir="${src.java.dir}" destdir="${classes.dir}" target="1.6" includeantruntime="false">
<javac failonerror="true" srcdir="${src.java.dir}" destdir="${classes.dir}" target="1.6" source="1.6" includeantruntime="false">
<classpath refid="@{os}.classpath"/>
</javac>
</sequential>
@ -347,7 +353,6 @@
<zipfileset file="ecu_defs.dtd" prefix="${name.package}"/>
<zipfileset file="logger.dtd" prefix="${name.package}"/>
<zipfileset file="profile.dtd" prefix="${name.package}"/>
<zipfileset dir="graphics" prefix="${name.package}/graphics" excludes="*.bmp"/>
<zipfileset dir="plugins" prefix="${name.package}/plugins"/>
<zipfileset dir="lib/common" prefix="${name.package}/lib/common"/>
<zipfileset dir="lib/@{os}" prefix="${name.package}/lib/@{os}"/>

View File

@ -33,8 +33,8 @@ public final class Version {
public static final String LOGGER_DEFS_URL = "@loggerdefsurl@";
public static final String CARS_DEFS_URL = "@carsdefsurl@";
public static final String RELEASE_NOTES = "@release_notes@";
public static final ImageIcon ABOUT_ICON = new ImageIcon("graphics/romraider-ico-large.gif");
public static final ImageIcon ABOUT_ICON = new ImageIcon(Version.class.getClass().getResource("/graphics/romraider-ico-large.gif"));
private Version() {
}
}
}

View File

@ -112,7 +112,7 @@ public class ECUEditor extends AbstractFrame {
private CloseImageWorker closeImageWorker;
private SetUserLevelWorker setUserLevelWorker;
private LaunchLoggerWorker launchLoggerWorker;
private final ImageIcon editorIcon = new ImageIcon("./graphics/romraider-ico.gif", "RomRaider ECU Editor");
private final ImageIcon editorIcon = new ImageIcon(getClass().getResource("/graphics/romraider-ico.gif"), "RomRaider ECU Editor");
public ECUEditor() {
@ -690,4 +690,4 @@ class OpenImageWorker extends SwingWorker<Void, Void> {
editor.refreshTableMenus();
editor.setCursor(null);
}
}
}

View File

@ -73,6 +73,7 @@ import java.awt.event.FocusListener;
import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -188,7 +189,7 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
private static final Logger LOGGER = Logger.getLogger(EcuLogger.class);
private static final String ECU_LOGGER_TITLE = PRODUCT_NAME + " v" + VERSION + " | ECU/TCU Logger";
private static final String LOGGER_FULLSCREEN_ARG = "-logger.fullscreen";
private static final String ICON_PATH = "./graphics/romraider-ico.gif";
private static final URL ICON_PATH = Settings.class.getClass().getResource("/graphics/romraider-ico.gif");
private static final String HEADING_PARAMETERS = "Parameters";
private static final String HEADING_SWITCHES = "Switches";
private static final String HEADING_EXTERNAL = "External";
@ -1111,7 +1112,7 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
}
private Component buildLogToFileButton() {
logToFileButton = new JToggleButton("Log to file", new ImageIcon("./graphics/logger_log_to_file.png"));
logToFileButton = new JToggleButton("Log to file", new ImageIcon( getClass().getResource("/graphics/logger_log_to_file.png")));
logToFileButton.setToolTipText("Start/stop file logging (F1)");
//logToFileButton.setPreferredSize(new Dimension(100, 25));
logToFileButton.setBackground(GREEN);
@ -1186,7 +1187,7 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
comboBoxPanel.add(ecuCheckBox);
comboBoxPanel.add(tcuCheckBox);
JButton reconnectButton = new JButton(new ImageIcon("./graphics/logger_restart.png"));
JButton reconnectButton = new JButton(new ImageIcon( getClass().getResource("/graphics/logger_restart.png")));
reconnectButton.setPreferredSize(new Dimension(25, 25));
reconnectButton.setToolTipText("Reconnect to " + target);
reconnectButton.addActionListener(new ActionListener() {
@ -1200,7 +1201,7 @@ public final class EcuLogger extends AbstractFrame implements MessageListener {
}
});
comboBoxPanel.add(reconnectButton);
JButton disconnectButton = new JButton(new ImageIcon("./graphics/logger_stop.png"));
JButton disconnectButton = new JButton(new ImageIcon( getClass().getResource("/graphics/logger_stop.png")));
disconnectButton.setPreferredSize(new Dimension(25, 25));
disconnectButton.setToolTipText("Disconnect from " + target);
disconnectButton.addActionListener(new ActionListener() {

View File

@ -34,10 +34,10 @@ public final class StatusIndicator extends JPanel implements StatusChangeListene
private static final String TEXT_READING = "Reading data ";
private static final String TEXT_LOGGING = "Logging to file ";
private static final String TEXT_STOPPED = "Stopped ";
private static final ImageIcon ICON_CONNECTING = new ImageIcon("./graphics/logger_blue.png");
private static final ImageIcon ICON_READING = new ImageIcon("./graphics/logger_green.png");
private static final ImageIcon ICON_LOGGING = new ImageIcon("./graphics/logger_recording.png");
private static final ImageIcon ICON_STOPPED = new ImageIcon("./graphics/logger_stop.png");
private static final ImageIcon ICON_CONNECTING = new ImageIcon(StatusIndicator.class.getClass().getResource("/graphics/logger_blue.png"));
private static final ImageIcon ICON_READING = new ImageIcon(StatusIndicator.class.getClass().getResource("/graphics/logger_green.png"));
private static final ImageIcon ICON_LOGGING = new ImageIcon(StatusIndicator.class.getClass().getResource("/graphics/logger_recording.png"));
private static final ImageIcon ICON_STOPPED = new ImageIcon(StatusIndicator.class.getClass().getResource("/graphics/logger_stop.png"));
public StatusIndicator() {
setLayout(new BorderLayout());

View File

@ -421,7 +421,7 @@ public final class RamTuneTestApp extends AbstractFrame {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
RamTuneTestApp ramTuneTestApp = new RamTuneTestApp("SSM Read/Write");
ramTuneTestApp.setIconImage(new ImageIcon("./graphics/romraider-ico.gif").getImage());
ramTuneTestApp.setIconImage(new ImageIcon( getClass().getResource("/graphics/romraider-ico.gif")).getImage());
ramTuneTestApp.setDefaultCloseOperation(defaultCloseOperation);
ramTuneTestApp.addWindowListener(ramTuneTestApp);
ramTuneTestApp.setLocation(100, 50);

View File

@ -27,6 +27,7 @@ import java.awt.FlowLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.net.URL;
import javax.swing.ImageIcon;
import javax.swing.JButton;
@ -45,11 +46,6 @@ public class ECUEditorToolBar extends JToolBar implements ActionListener {
private final JButton refreshImage = new JButton();
private final JButton closeImage = new JButton();
private final String openIconImage = "./graphics/icon-open.png";
private final String saveIconImage = "./graphics/icon-save.png";
private final String refreshIconImage = "./graphics/icon-refresh.png";
private final String closeIconImage = "./graphics/icon-close.png";
public ECUEditorToolBar(ECUEditor parent, String name) {
super(name);
this.parent = parent;
@ -84,10 +80,10 @@ public class ECUEditorToolBar extends JToolBar implements ActionListener {
}
public void updateIcons() {
openImage.setIcon(rescaleImageIcon(new ImageIcon(openIconImage), parent.getSettings().getEditorIconScale()));
saveImage.setIcon(rescaleImageIcon(new ImageIcon(saveIconImage), parent.getSettings().getEditorIconScale()));
refreshImage.setIcon(rescaleImageIcon(new ImageIcon(refreshIconImage), parent.getSettings().getEditorIconScale()));
closeImage.setIcon(rescaleImageIcon(new ImageIcon(closeIconImage), parent.getSettings().getEditorIconScale()));
openImage.setIcon(rescaleImageIcon(new ImageIcon(getClass().getResource("/graphics/icon-open.png")), parent.getSettings().getEditorIconScale()));
saveImage.setIcon(rescaleImageIcon(new ImageIcon(getClass().getResource("/graphics/icon-save.png")), parent.getSettings().getEditorIconScale()));
refreshImage.setIcon(rescaleImageIcon(new ImageIcon(getClass().getResource("/graphics/icon-refresh.png")), parent.getSettings().getEditorIconScale()));
closeImage.setIcon(rescaleImageIcon(new ImageIcon( getClass().getResource("/graphics/icon-close.png")), parent.getSettings().getEditorIconScale()));
}
private ImageIcon rescaleImageIcon(ImageIcon imageIcon, int percentOfOriginal) {
@ -152,4 +148,4 @@ public class ECUEditorToolBar extends JToolBar implements ActionListener {
Rom lastSelectedRom = parent.getLastSelectedRom();
return lastSelectedRom == null ? "" : lastSelectedRom.getFileName() + " ";
}
}
}

View File

@ -114,13 +114,13 @@ public class RomCellRenderer implements TreeCellRenderer {
// display icon
if (table.getType() == Table.TABLE_1D) {
tableName = new JLabel(table.getName() + " ", new ImageIcon("./graphics/1d.gif"), JLabel.LEFT);
tableName = new JLabel(table.getName() + " ", new ImageIcon(getClass().getResource("/graphics/1d.gif")), JLabel.LEFT);
} else if (table.getType() == Table.TABLE_2D) {
tableName = new JLabel(table.getName() + " ", new ImageIcon("./graphics/2d.gif"), JLabel.LEFT);
tableName = new JLabel(table.getName() + " ", new ImageIcon(getClass().getResource("/graphics/2d.gif")), JLabel.LEFT);
} else if (table.getType() == Table.TABLE_3D) {
tableName = new JLabel(table.getName() + " ", new ImageIcon("./graphics/3d.gif"), JLabel.LEFT);
tableName = new JLabel(table.getName() + " ", new ImageIcon(getClass().getResource("/graphics/3d.gif")), JLabel.LEFT);
} else if (table.getType() == Table.TABLE_SWITCH) {
tableName = new JLabel(table.getName() + " ", new ImageIcon("./graphics/switch.gif"), JLabel.LEFT);
tableName = new JLabel(table.getName() + " ", new ImageIcon(getClass().getResource("/graphics/switch.gif")), JLabel.LEFT);
}
// set color
@ -153,4 +153,4 @@ public class RomCellRenderer implements TreeCellRenderer {
return returnValue;
}
}
}

View File

@ -34,6 +34,7 @@ import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.math.BigDecimal;
import java.net.URL;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.Vector;
@ -88,11 +89,11 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
private final JButton clearOverlay = new JButton("Clear Overlay");
private final JLabel liveDataValue = new JLabel();
private final String incrementFineImage = "./graphics/icon-incfine.png";
private final String decrementFineImage = "./graphics/icon-decfine.png";
private final String incrementCoarseImage = "./graphics/icon-inccoarse.png";
private final String decrementCoarseImage = "./graphics/icon-deccoarse.png";
private final String enable3dImage = "./graphics/3d_render.png";
private final URL incrementFineImage = getClass().getResource("/graphics/icon-incfine.png");
private final URL decrementFineImage = getClass().getResource("/graphics/icon-decfine.png");
private final URL incrementCoarseImage = getClass().getResource("/graphics/icon-inccoarse.png");
private final URL decrementCoarseImage = getClass().getResource("/graphics/icon-deccoarse.png");
private final URL enable3dImage = getClass().getResource("/graphics/3d_render.png");
//private final String defaultToolBarName = "Table Tools";
@ -585,4 +586,4 @@ public class TableToolBar extends JToolBar implements MouseListener, ItemListene
table3d.deSelectCellAt(x, table3d.getSizeY() - z - 1);
}
}
}
}

View File

@ -49,7 +49,7 @@ public final class FileAssociator {
logassoc.addFileExtension(extension.toUpperCase());
logassoc.setDescription(description);
logassoc.addAction(new Action("open", command + " %1"));
logassoc.setIconFileName(new File("").getAbsolutePath() + "/graphics/romraider-ico.ico");
logassoc.setIconFileName(FileAssociator.class.getClass().getResource("/graphics/romraider-ico.ico").toString());
LOGGER.debug("Adding ...\n" + logassoc + "\n\n\n");
@ -76,4 +76,4 @@ public final class FileAssociator {
}
return true;
}
}
}

View File

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 304 B

View File

Before

Width:  |  Height:  |  Size: 604 B

After

Width:  |  Height:  |  Size: 604 B

View File

Before

Width:  |  Height:  |  Size: 641 B

After

Width:  |  Height:  |  Size: 641 B

View File

Before

Width:  |  Height:  |  Size: 1005 B

After

Width:  |  Height:  |  Size: 1005 B

View File

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 707 B

After

Width:  |  Height:  |  Size: 707 B

View File

Before

Width:  |  Height:  |  Size: 769 B

After

Width:  |  Height:  |  Size: 769 B

View File

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 542 B

View File

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 725 B

View File

Before

Width:  |  Height:  |  Size: 745 B

After

Width:  |  Height:  |  Size: 745 B

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 468 B

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1022 B

After

Width:  |  Height:  |  Size: 1022 B

View File

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 202 KiB

View File

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 193 B

View File

@ -44,8 +44,6 @@
<file src="license.txt" targetdir="$INSTALL_PATH"/>
<file src="release_notes.txt" targetdir="$INSTALL_PATH"/>
<fileset dir="graphics" targetdir="$INSTALL_PATH/graphics" excludes="*.bmp"/>
<file src="log4j.properties" targetdir="$INSTALL_PATH"/>
<file src="cars_def.dtd" targetdir="$INSTALL_PATH"/>

View File

@ -45,8 +45,6 @@
<file src="license.txt" targetdir="$INSTALL_PATH"/>
<file src="release_notes.txt" targetdir="$INSTALL_PATH"/>
<fileset dir="graphics" targetdir="$INSTALL_PATH/graphics" excludes="*.bmp"/>
<file src="log4j.properties" targetdir="$INSTALL_PATH"/>
<file src="cars_def.dtd" targetdir="$INSTALL_PATH"/>

View File

@ -13,7 +13,7 @@
<supportUrl></supportUrl>
<customProcName>false</customProcName>
<stayAlive>false</stayAlive>
<icon>../../graphics/romraider-ico.ico</icon>
<icon>../../src/main/resources/graphics/romraider-ico.ico</icon>
<jre>
<path></path>
<minVersion>1.6.0</minVersion>
@ -24,7 +24,7 @@
<opt>@jvm.args.win@</opt>
</jre>
<splash>
<file>../../graphics/splash.bmp</file>
<file>../../src/main/resources/graphics/splash.bmp</file>
<waitForWindow>true</waitForWindow>
<timeout>60</timeout>
<timeoutErr>true</timeoutErr>

View File

@ -13,7 +13,7 @@
<supportUrl></supportUrl>
<customProcName>false</customProcName>
<stayAlive>false</stayAlive>
<icon>../../graphics/romraider-ico.ico</icon>
<icon>../../src/main/resources/graphics/romraider-ico.ico</icon>
<jre>
<path>../../3rdparty/jre</path>
<minVersion>1.6.0</minVersion>
@ -24,7 +24,7 @@
<opt>@jvm.args.win@</opt>
</jre>
<splash>
<file>../../graphics/splash.bmp</file>
<file>../../src/main/resources/graphics/splash.bmp</file>
<waitForWindow>true</waitForWindow>
<timeout>60</timeout>
<timeoutErr>true</timeoutErr>

View File

@ -14,7 +14,7 @@
target="$JAVA_HOME/bin/java"
commandLine="@jvm.args.linux@ -jar &quot;$INSTALL_PATH/@name.package@.jar&quot;"
initialState="normal"
iconFile="$INSTALL_PATH/graphics/romraider-ico.ico"
iconFile="$INSTALL_PATH/src/main/resources/graphics/romraider-ico.ico"
workingDirectory="$INSTALL_PATH"
type="Application"
encoding="UTF-8"
@ -32,7 +32,7 @@
target="$JAVA_HOME/bin/java"
commandLine="@jvm.args.linux@ -jar &quot;$INSTALL_PATH/@name.package@.jar&quot; -logger"
initialState="normal"
iconFile="$INSTALL_PATH/graphics/romraider-ico.ico"
iconFile="$INSTALL_PATH/src/main/resources/graphics/romraider-ico.ico"
workingDirectory="$INSTALL_PATH"
type="Application"
encoding="UTF-8"
@ -90,7 +90,7 @@
target="nohup"
commandLine="java -jar &quot;$INSTALL_PATH/Uninstaller/uninstaller.jar&quot; &gt; /dev/null 2&gt;&amp;1"
initialState="normal"
iconFile="$INSTALL_PATH/graphics/icon-close.png"
iconFile="$INSTALL_PATH/src/main/resources/graphics/icon-close.png"
iconIndex="0"
workingDirectory=""
type="Application"

View File

@ -14,7 +14,7 @@
target="$INSTALL_PATH/@name.package@.exe"
commandLine=""
initialState="normal"
iconFile="$INSTALL_PATH/graphics/romraider-ico.ico"
iconFile="$INSTALL_PATH/src/main/resources/graphics/romraider-ico.ico"
workingDirectory="$INSTALL_PATH"
type="Application"
encoding="UTF-8"
@ -32,7 +32,7 @@
target="$INSTALL_PATH/@name.package@.exe"
commandLine="-logger"
initialState="normal"
iconFile="$INSTALL_PATH/graphics/romraider-ico.ico"
iconFile="$INSTALL_PATH/src/main/resources/graphics/romraider-ico.ico"
workingDirectory="$INSTALL_PATH"
type="Application"
encoding="UTF-8"