added linux support to build

git-svn-id: https://svn2.assembla.com/svn/romraider/trunk@58 38686702-15cf-42e4-a595-3071df8bf5ea
This commit is contained in:
kascade 2008-04-27 11:45:29 +00:00
parent b3c77b441e
commit 891e4ad0fe
10 changed files with 228 additions and 190 deletions

View File

@ -1 +0,0 @@
java -Djava.library.path=lib -Xmx256M -jar Enginuity.jar

View File

@ -55,6 +55,21 @@
<format property="time.year" pattern="yyyy"/>
</tstamp>
<!-- set os specific properties -->
<property name="os.windows" value="windows"/>
<property name="os.linux" value="linux"/>
<condition property="os" value="${os.windows}" else="${os.linux}">
<os family="windows"/>
</condition>
<condition property="is.windows">
<equals arg1="${os}" arg2="${os.windows}"/>
</condition>
<property name="izpack.compile.${os.windows}" value="compile.bat"/>
<property name="izpack.compile.${os.linux}" value="compile"/>
<!-- java compiler properties -->
<property name="debug" value="off"/>
<property name="optimize" value="on"/>
@ -62,7 +77,7 @@
<!-- get the current svn revision (needed by version.properties) -->
<macro_svn_revision repository="https://svn2.assembla.com/svn/enginuity" property="svn.revision"/>
<!-- version properties are set in this file, both for the product itself and
for some of the external dependencies (jar files and such) -->
<property file="version.properties"/>
@ -82,7 +97,7 @@
<!-- package naming properties -->
<property name="jar.package" value="${name.package}.jar"/>
<property name="jar.installer-prefix" value="${name.package}${version.major}.${version.minor}.${version.patch}-${version.buildnumber}"/>
<!-- support tools -->
<!-- creates EXE wrappers around java apps -->
<property name="launch4j.dir" location="${3rdparty.dir}/launch4j"/>
@ -179,6 +194,7 @@
<filter token="jar.jama" value="${jar.jama}"/>
<filter token="jar.log4j" value="${jar.log4j}"/>
<filter token="jar.swing-layout" value="${jar.swing-layout}"/>
<filter token="jvm.args" value="${jvm.args}"/>
</filterset>
</target>
@ -195,7 +211,7 @@
<target name="prepare" depends="-init">
<mkdir dir="${build.dir}/classes"/>
<mkdir dir="${build.dir}/lib"/>
<!-- generate the Version class -->
<!-- generate the Version class -->
<copy overwrite="true" tofile="${src.dir}/enginuity/Version.java" file="${src.dir}/enginuity/Version.java.template">
<filterset refid="version.filterset"/>
</copy>
@ -252,13 +268,13 @@
<mkdir dir="${dist.dir}/windows"/>
<mkdir dir="${dist.dir}/linux"/>
<!-- generate installer scripts from templates -->
<copy overwrite="true" tofile="${dist.dir}/install-win.xml" file="${template.dir}/install-win.xml.template">
<copy overwrite="true" tofile="${dist.dir}/install-windows.xml" file="${template.dir}/install-windows.xml.template">
<filterset refid="version.filterset"/>
</copy>
<copy overwrite="true" tofile="${dist.dir}/install-linux.xml" file="${template.dir}/install-linux.xml.template">
<filterset refid="version.filterset"/>
</copy>
<copy overwrite="true" tofile="${dist.dir}/shortcutSpec-win.xml" file="${template.dir}/shortcutSpec-win.xml.template">
<copy overwrite="true" tofile="${dist.dir}/shortcutSpec-windows.xml" file="${template.dir}/shortcutSpec-windows.xml.template">
<filterset refid="version.filterset"/>
</copy>
<copy overwrite="true" tofile="${dist.dir}/shortcutSpec-linux.xml" file="${template.dir}/shortcutSpec-linux.xml.template">
@ -271,17 +287,8 @@
<copy overwrite="true" tofile="${dist.dir}/l4j-package.xml" file="${template.dir}/l4j-package.xml.template">
<filterset refid="version.filterset"/>
</copy>
<!-- create the exe launcher of the package for Windows -->
<launch4j configFile="${dist.dir}/l4j-package.xml"/>
<!-- generate the installers -->
<exec dir="${basedir}" executable="${izpack.dir}/bin/compile.bat">
<arg line="${dist.dir}/install-win.xml -b . -o ${dist.dir}/windows/${jar.installer-prefix}-win.jar -k standard"/>
</exec>
<exec dir="${basedir}" executable="${izpack.dir}/bin/compile.bat">
<arg line="${dist.dir}/install-linux.xml -b . -o ${dist.dir}/linux/${jar.installer-prefix}-linux.jar -k standard"/>
</exec>
<!-- create the exe launcher of the installer for Windows -->
<launch4j configFile="${dist.dir}/l4j-installer.xml"/>
<macro_generate_executables/>
</target>
<!-- =================================================================== -->
@ -315,4 +322,37 @@
</sequential>
</macrodef>
<macrodef name="macro_generate_executables">
<sequential>
<!-- create the exe launcher of the package for Windows -->
<antcall target="-launch4j">
<param name="type" value="package"/>
</antcall>
<!-- generate the installers -->
<macro_izpack_compile os="${os}" target.os="${os.windows}"/>
<macro_izpack_compile os="${os}" target.os="${os.linux}"/>
<!-- create the exe launcher of the installer for Windows -->
<antcall target="-launch4j">
<param name="type" value="installer"/>
</antcall>
</sequential>
</macrodef>
<target name="-launch4j" if="is.windows">
<launch4j configFile="${dist.dir}/l4j-${type}.xml"/>
</target>
<macrodef name="macro_izpack_compile">
<attribute name="os"/>
<attribute name="target.os"/>
<sequential>
<chmod file="${izpack.dir}/bin/${izpack.compile.@{os}}" perm="+x" osfamily="linux"/>
<exec executable="${izpack.dir}/bin/${izpack.compile.@{os}}">
<arg line="${dist.dir}/install-@{target.os}.xml -b . -o ${dist.dir}/@{target.os}/${jar.installer-prefix}-@{target.os}.jar -k standard"/>
</exec>
</sequential>
</macrodef>
</project>

View File

@ -48,13 +48,9 @@ public final class LookAndFeelManager {
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "RomRaider");
}
try {
setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (Exception e) {
// Linux has issues with the gtk look and feel themes.
if (isPlatform(LINUX)) setLookAndFeel(getCrossPlatformLookAndFeelClassName());
else setLookAndFeel(getSystemLookAndFeelClassName());
}
// Linux has issues with the gtk look and feel themes.
if (isPlatform(LINUX)) setLookAndFeel(getCrossPlatformLookAndFeelClassName());
else setLookAndFeel(getSystemLookAndFeelClassName());
// make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);

View File

@ -20,7 +20,7 @@
<resources>
<res id="LicencePanel.licence" src="license.txt"/>
<res id="InfoPanel.info" src="release_notes.txt"/>
<res id="shortcutSpec.xml" src="build/dist/shortcutSpec-win.xml"/>
<res id="shortcutSpec.xml" src="build/dist/shortcutSpec-windows.xml"/>
</resources>
<panels>

View File

@ -3,7 +3,7 @@
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>windows/@name.package@@version.major@.@version.minor@.@version.patch@-@version.buildnumber@-win.jar</jar>
<jar>windows/@name.package@@version.major@.@version.minor@.@version.patch@-@version.buildnumber@-windows.jar</jar>
<outfile>windows/@name.package@Setup@version.major@.@version.minor@.@version.patch@@version.extra@.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
@ -21,7 +21,7 @@
<dontUsePrivateJres>false</dontUsePrivateJres>
<initialHeapSize>0</initialHeapSize>
<maxHeapSize>0</maxHeapSize>
<opt>-Djava.library.path=lib -Xmx256M -Dswing.aatext=true</opt>
<opt>@jvm.args@</opt>
</jre>
<splash>
<file>../../graphics/splash.bmp</file>

View File

@ -21,7 +21,7 @@
<dontUsePrivateJres>false</dontUsePrivateJres>
<initialHeapSize>0</initialHeapSize>
<maxHeapSize>0</maxHeapSize>
<opt>-Djava.library.path=lib -Xmx256M -Dswing.aatext=true</opt>
<opt>@jvm.args@</opt>
</jre>
<splash>
<file>../../graphics/splash.bmp</file>

View File

@ -1,84 +1,84 @@
<!-- @warning.generated-file@ -->
<shortcuts>
<skipIfNotSupported />
<programGroup defaultName="RomRaider" location="programGroup"/>
<skipIfNotSupported/>
<programGroup defaultName="RomRaider" location="programGroup"/>
<shortcut
name="@name.package@"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target="$JAVA_HOME/bin/java"
commandLine="-Djava.library.path=lib -Xmx256M -jar &quot;$INSTALL_PATH/@name.package@.jar&quot;"
initialState="noShow"
iconFile="$INSTALL_PATH/graphics/enginuity-ico.ico"
workingDirectory="$INSTALL_PATH"
type="Application"
encoding="UTF-8"
description="@description.package@">
<createForPack name="Base" />
</shortcut>
<shortcut
name="@name.package@"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target="$JAVA_HOME/bin/java"
commandLine="@jvm.args@ -jar &quot;$INSTALL_PATH/@name.package@.jar&quot;"
initialState="noShow"
iconFile="$INSTALL_PATH/graphics/enginuity-ico.ico"
workingDirectory="$INSTALL_PATH"
type="Application"
encoding="UTF-8"
description="@description.package@">
<createForPack name="Base"/>
</shortcut>
<shortcut
name="@name.package@ License"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target=""
workingDirectory=""
commandLine=""
initialState="noShow"
iconFile="help"
iconIndex="0"
url="$INSTALL_PATH/license.txt"
type="Link"
encoding="UTF-8"
description="@name.package@ License agreement">
<createForPack name="Base"/>
</shortcut>
<shortcut
name="@name.package@ Release Notes"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target=""
workingDirectory=""
commandLine=""
initialState="noShow"
iconFile="help"
iconIndex="0"
url="$INSTALL_PATH/release_notes.txt"
type="Link"
encoding="UTF-8"
description="@name.package@ Release Notes">
<createForPack name="Base"/>
</shortcut>
<shortcut
name="@name.package@ Uninstaller"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target="$JAVA_HOME/bin/java"
commandLine="-jar &quot;$INSTALL_PATH/Uninstaller/uninstaller.jar&quot;"
initialState="noShow"
iconFile="trashcan_full"
iconIndex="0"
workingDirectory=""
type="Application"
encoding="UTF-8"
description="@name.package@ uninstaller">
<createForPack name="Base"/>
</shortcut>
<shortcut
name="@name.package@ License"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target=""
workingDirectory=""
commandLine=""
initialState="noShow"
iconFile="help"
iconIndex="0"
url="$INSTALL_PATH/license.txt"
type="Link"
encoding="UTF-8"
description="@name.package@ License agreement">
<createForPack name="Base" />
</shortcut>
<shortcut
name="@name.package@ Release Notes"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target=""
workingDirectory=""
commandLine=""
initialState="noShow"
iconFile="help"
iconIndex="0"
url="$INSTALL_PATH/release_notes.txt"
type="Link"
encoding="UTF-8"
description="@name.package@ Release Notes">
<createForPack name="Base" />
</shortcut>
<shortcut
name="@name.package@ Uninstaller"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target="$JAVA_HOME/bin/java"
commandLine="-jar &quot;$INSTALL_PATH/Uninstaller/uninstaller.jar&quot;"
initialState="noShow"
iconFile="trashcan_full"
iconIndex="0"
workingDirectory=""
type="Application"
encoding="UTF-8"
description="@name.package@ uninstaller">
<createForPack name="Base" />
</shortcut>
</shortcuts>

View File

@ -1,84 +0,0 @@
<!-- @warning.generated-file@ -->
<shortcuts>
<skipIfNotSupported />
<programGroup defaultName="RomRaider" location="programGroup"/>
<shortcut
name="@name.package@"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target="$INSTALL_PATH/@name.package@.exe"
commandLine=""
initialState="noShow"
iconFile="$INSTALL_PATH/graphics/enginuity-ico.ico"
workingDirectory="$INSTALL_PATH"
type="Application"
encoding="UTF-8"
description="@description.package@">
<createForPack name="Base" />
</shortcut>
<shortcut
name="@name.package@ License"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target=""
workingDirectory=""
commandLine=""
initialState="noShow"
iconFile="help"
iconIndex="0"
url="$INSTALL_PATH/license.txt"
type="Link"
encoding="UTF-8"
description="@name.package@ License agreement">
<createForPack name="Base" />
</shortcut>
<shortcut
name="@name.package@ Release Notes"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target=""
workingDirectory=""
commandLine=""
initialState="noShow"
iconFile="help"
iconIndex="0"
url="$INSTALL_PATH/release_notes.txt"
type="Link"
encoding="UTF-8"
description="@name.package@ Release Notes">
<createForPack name="Base" />
</shortcut>
<shortcut
name="@name.package@ Uninstaller"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target="$JAVA_HOME/bin/java"
commandLine="-jar &quot;$INSTALL_PATH/Uninstaller/uninstaller.jar&quot;"
initialState="noShow"
iconFile="trashcan_full"
iconIndex="0"
workingDirectory=""
type="Application"
encoding="UTF-8"
description="@name.package@ uninstaller">
<createForPack name="Base" />
</shortcut>
</shortcuts>

View File

@ -0,0 +1,84 @@
<!-- @warning.generated-file@ -->
<shortcuts>
<skipIfNotSupported/>
<programGroup defaultName="RomRaider" location="programGroup"/>
<shortcut
name="@name.package@"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target="$INSTALL_PATH/@name.package@.exe"
commandLine=""
initialState="noShow"
iconFile="$INSTALL_PATH/graphics/enginuity-ico.ico"
workingDirectory="$INSTALL_PATH"
type="Application"
encoding="UTF-8"
description="@description.package@">
<createForPack name="Base"/>
</shortcut>
<shortcut
name="@name.package@ License"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target=""
workingDirectory=""
commandLine=""
initialState="noShow"
iconFile="help"
iconIndex="0"
url="$INSTALL_PATH/license.txt"
type="Link"
encoding="UTF-8"
description="@name.package@ License agreement">
<createForPack name="Base"/>
</shortcut>
<shortcut
name="@name.package@ Release Notes"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target=""
workingDirectory=""
commandLine=""
initialState="noShow"
iconFile="help"
iconIndex="0"
url="$INSTALL_PATH/release_notes.txt"
type="Link"
encoding="UTF-8"
description="@name.package@ Release Notes">
<createForPack name="Base"/>
</shortcut>
<shortcut
name="@name.package@ Uninstaller"
programGroup="yes"
desktop="yes"
applications="no"
startMenu="no"
startup="no"
target="$JAVA_HOME/bin/java"
commandLine="-jar &quot;$INSTALL_PATH/Uninstaller/uninstaller.jar&quot;"
initialState="noShow"
iconFile="trashcan_full"
iconIndex="0"
workingDirectory=""
type="Application"
encoding="UTF-8"
description="@name.package@ uninstaller">
<createForPack name="Base"/>
</shortcut>
</shortcuts>

View File

@ -26,6 +26,9 @@ version.extra: Beta
# the starting class for the application
class.start: enginuity.ECUExec
# JVM args
jvm.args: -Djava.library.path=lib -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -Xms64M -Xmx512M -XX:-UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC
# copyright stuff
copyright: Copyright(c) 2001-${time.year} ${name.organization}. Released under GPL 2.0.
copyright-html: Copyright &#169; 2000-${time.year} ${name.organization}. Released under GPL 2.0.