Orangevolt ANT Tasks » Tasks » Unix related tasks » unix.kde.shortcut
Element propertyunix.kde.shortcutdirectory

2.11.3.2.  Example

build.xml
<project name="test project" basedir="." default="main">
  <taskdef resource="com/orangevolt/tools/ant/taskdefs.properties">
    <classpath>
      <pathelement path=".."/>
      <pathelement location="../lib/roxes-win32forjava-1.0.2.jar"/>
    </classpath>
  </taskdef>
    
  <target name="main">
    <unix.properties/>
    
      <!-- create a application shortcut -->
    <unix.kde.shortcut
      file="${unix.kde.personal.programs_menu}/roxes/xmlwrite.desktop"
      name="XmlWrite"
      execute="java -Djava.ext.dirs ~/bin/xmlwrite/lib com.roxes.xmlwrite.XmlWrite"
      IconFile="~/bin/xmlwrite/xmlwrite.gif"
      workingDirectory="${user.home}">
      <property name="Name[de]" value="XmlWrite starten"/>
      <property name="Name[us]">
        Execute XmlWrite
      </property>
    </unix.kde.shortcut>    
 
      <!-- create a link shortcut -->
    <unix.kde.shortcut
      file="${unix.kde.personal.programs_menu}/roxes/xmlwrite-docs.desktop"
      name="XmlWrite Documentation"
      IconFile="~/bin/xmlwrite/xmlwrite.gif"
      type="Link"
      url="http://www.roxes.com/produkte/xmlwrite">
      <property name="Name[de]" value="XmlWrite Dokumentation"/>
      <property name="Name[us]">
        XmlWrite
Documentation
      </property>
    </unix.kde.shortcut>    
 
    </target>
</project>

Regularly KDE shortcut files have file suffix .desktop (see the example). In some special cases (in the KDE desktop for example) the filename will be used as label instead the name property. In such cases you should NOT append file suffix .desktop to the shortcut filename.