Orangevolt ANT Tasks » Tasks » sfx | ||
Example | jstub |
|
<?xml version="1.0"?>
|
<project basedir= "." name= "foo" default= "main" > |
<taskdef classpath= "orangevolt-ant-tasks-1.3.2.jar" resource= "com/orangevolt/tools/ant/taskdefs.properties" /> |
|
<target name= "main" > |
<sfx |
"foo.jar" |
"win32" |
"images/foo.gif" |
"javaw -cp lib; -Djava.ext.dirs=${env:TOMCAT_HOME|c:\tomcat}\common\lib -Ddesktop=${reg:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop} foo.bar" |
"foo.exe" |
|
|
<sfx |
"foo.jar" |
"unix" |
"java -cp lib; -Djava.ext.dirs=${env:TOMCAT_HOME|c:\tomcat}\common\lib -Ddesktop=${env:HOME\Desktop} foo.bar" |
"foo.exe" |
|
</target> |
</project> |
The evaluation replaces ${env:TOMCAT_HOME|c:\tomcat} by the value of enviroment variable TOMCAT_HOME or (if it not exists) by c:\temp.
On windows: ${reg:HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop} will be replaced by the path of the windows desktop directory or an empty string (if it is not found).
On unix: ${env:HOME\Desktop} will be replaced by the pathof the kde desktop directory or an empty string (if it is not found).