<?xml version="1.0" encoding="UTF-8"?>

<i2t:installer>
  <i2t:application>
    <i2t:name>xfce4</i2t:name>
    <i2t:title>Xfce Desktop Environment</i2t:title>
    <i2t:version>4.3.90.2</i2t:version>

    <i2t:image name="logo">logo.png</i2t:image>
    <i2t:image name="icon">icon.png</i2t:image>

    <i2t:files>
      <i2t:file>solaris-Xfce4logo.pm</i2t:file>
      <i2t:file>solaris-Xresources.xfce4</i2t:file>
      <i2t:file>solaris-Xsession.xfce4</i2t:file>
    </i2t:files>
  </i2t:application>

  <i2t:help type="url">http://os-cillation.com/documentation/installers/xfce-installer/</i2t:help>

  <i2t:dependencies>
    <i2t:dependency type="package">
      <i2t:name>gtk+-2.0</i2t:name>
      <i2t:version>2.6.4</i2t:version>
      <i2t:description>Gtk+ library</i2t:description>
    </i2t:dependency>

    <i2t:dependency type="package">
      <i2t:name>libxml-2.0</i2t:name>
      <i2t:version>2.4.0</i2t:version>
      <i2t:description>XML library</i2t:description>
    </i2t:dependency>

    <i2t:dependency type="package">
      <i2t:name>vte</i2t:name>
      <i2t:version>0.11.11</i2t:version>
      <i2t:description>Terminal emulator widget</i2t:description>
    </i2t:dependency>

    <i2t:dependency type="program">
      <i2t:name>iceauth</i2t:name>
      <i2t:description>Authorization helper</i2t:description>
    </i2t:dependency>

    <i2t:dependency type="library">
      <i2t:name>SM</i2t:name>
      <i2t:description>Session management library</i2t:description>
    </i2t:dependency>

  </i2t:dependencies>

  <i2t:options>
    <i2t:option default="enabled">
      <i2t:title>Compositing manager</i2t:title>
      <i2t:description>
        Enable this option if you want to build the integrated
        compositing manager, which allows you to have transparent
        windows with drop shadows. This feature requires X.Org 6.9
        or above.
      </i2t:description>
      <i2t:action case="enabled">
        CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-compositor";
        export CONFIGURE_FLAGS;
      </i2t:action>
      <i2t:action case="disabled">
        CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --disable-compositor";
        export CONFIGURE_FLAGS;
      </i2t:action>
    </i2t:option>

    <i2t:option default="disabled">
      <i2t:title>Extensive Optimizations</i2t:title>
      <i2t:description>
        This options controls whether Xfce is build with several
        compile time optimizations - both platform dependent and
        platform independent ones. This may speed up Xfce, but
        can also make debugging impossible on some systems. Even
        worse, this can also cause gcc to generate broken code
        on some platforms (like Alpha). You can safely enable
        this option for i386 based platforms.
      </i2t:description>
      <i2t:action case="enabled">
        CFLAGS="${CFLAGS} -O2 -pipe";
        CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-final";
        export CFLAGS CONFIGURE_FLAGS;
      </i2t:action>
    </i2t:option>

    <i2t:option default="disabled">
      <i2t:title>Include Debugging Support</i2t:title>
      <i2t:description>
        Enable this option if you plan to develop applications
        or plugins for Xfce. It controls whether additional
        debug statements and symbols will be compiled into
        the generated libraries and binaries. Normal users
        should not enable this option. Note that this option
        may not play well with the Extensive Optimizations
        option above on some systems.
      </i2t:description>
      <i2t:action case="enabled">
        CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-debug";
        export CONFIGURE_FLAGS;
      </i2t:action>
      <i2t:action case="disabled">
        CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --disable-debug";
        export CONFIGURE_FLAGS;
      </i2t:action>
    </i2t:option>

    <i2t:option default="enabled">
      <i2t:title>Setup Display Managers</i2t:title>
      <i2t:description>
        If you enable this option, the installer will try
        to automatically register Xfce 4.4 with all installed
        display managers (like GDM or KDM). Depending on your
        system, the installer might not be able to register
        properly unless you run this wizard as superuser.
      </i2t:description>
      <i2t:action case="enabled">
        I2T_AUTOSETUPDM="true";
        export I2T_AUTOSETUPDM;
      </i2t:action>
      <i2t:action case="disabled">
        I2T_AUTOSETUPDM="false";
        export I2T_AUTOSETUPDM;
      </i2t:action>
    </i2t:option>

    <i2t:option default="enabled">
      <i2t:title>Use ALSA for the Xfce Mixer</i2t:title>
      <i2t:description>
        This option is provided for Linux users that use the
        Advanced Linux Sound Architecture. By default, the
        Xfce Mixer - which allows you to control the volume
        of your soundcard - will use either OSS (Open Sound
        System) or the Sun audio driver, depending
        on your system. This option allows you to force it
        to use ALSA instead. Please take note, that you
        will have to install the ALSA development files if
        you enable this option or the installation will
        fail. The ALSA system can emulate OSS,
        but not vice versa; so don't enable this option
        unless you know what you are doing.
      </i2t:description>
      <i2t:action case="enabled">
        CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-sound=alsa";
        export CONFIGURE_FLAGS;
      </i2t:action>
    </i2t:option>
  </i2t:options>

  <i2t:packages>
    <i2t:default-basedir>release</i2t:default-basedir>

    <i2t:package>
      <i2t:name>gtk-xfce-engine</i2t:name>
      <i2t:title>Xfce GTK+ engine and themes</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfce4-icon-theme</i2t:name>
      <i2t:title>Xfce Icon Theme</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>libxfce4util</i2t:name>
      <i2t:title>Xfce Utility Library</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>libxfce4mcs</i2t:name>
      <i2t:title>Xfce MCS Library</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>libxfcegui4</i2t:name>
      <i2t:title>Xfce GUI Library</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfce-mcs-manager</i2t:name>
      <i2t:title>Xfce MCS Manager</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>exo</i2t:name>
      <i2t:title>EXO Application Library</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>mousepad</i2t:name>
      <i2t:title>Mousepad Text Editor</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>Terminal</i2t:name>
      <i2t:title>Terminal Emulator</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>Thunar</i2t:name>
      <i2t:title>Thunar File Manager</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfce-utils</i2t:name>
      <i2t:title>Xfce Utilities</i2t:title>
      
      <i2t:pre-action stage="configure">
        sed -e "/^if test x\"\$DISPLAY\".*$/{
          i\\
          PATH=\"${PREFIX}/bin:\${PATH}\"
          i\\
          export PATH
          i\\
          if test x\"\${LD_LIBRARY_PATH}\" != x\"\"; then
          i\\
          LD_LIBRARY_PATH=\"${PREFIX}/lib:\${LD_LIBRARY_PATH}\"
          i\\
          else
          i\\
          LD_LIBRARY_PATH=\"${PREFIX}/lib\"
          i\\
          fi
          i\\
          export LD_LIBRARY_PATH
          i\\
          if test x\"\${PKG_CONFIG_PATH}\" != x\"\"; then
          i\\
          PKG_CONFIG_PATH=\"${PREFIX}/lib/pkgconfig:\${PKG_CONFIG_PATH}\"
          i\\
          else
          i\\
          PKG_CONFIG_PATH=\"${PREFIX}/lib/pkgconfig\"
          i\\
          fi
          i\\
          export PKG_CONFIG_PATH
          i\\
          if test x\"\${XDG_CONFIG_DIRS}\" != x\"\"; then
          i\\
          XDG_CONFIG_DIRS=\"\${XDG_CONFIG_DIRS}:${SYSCONFDIR}/xdg\"
          i\\
          export XDG_CONFIG_DIRS
          i\\
          fi
          i\\
          if test x\"\${XDG_DATA_DIRS}\" != x\"\"; then
          i\\
          XDG_DATA_DIRS=\"\${XDG_DATA_DIRS}:${PREFIX}/share\"
          i\\
          export XDG_DATA_DIRS
          i\\
          fi
          }" \
          &lt; xfce-utils/scripts/startxfce4.in \
          &gt; tmp-startxfce4.in
        mv tmp-startxfce4.in xfce-utils/scripts/startxfce4.in
        if test $? -ne 0; then
          echo "!! Failed to patch xfce-utils/scripts/startxfce4.in,"
          echo "!! see the messages above for details."
          exit 1
        fi
      </i2t:pre-action>

      <i2t:post-action stage="install">
        ##
        ## figure out usable install binary
        ##
        if test -x /usr/ucb/install; then
          INSTALL_BIN=/usr/ucb/install
        else
          INSTALL_BIN=install
        fi

        ##
        ## Solaris dtlogin setup
        ##
        if test -w /usr/dt/config -a -w /usr/dt/config/C/Xresources.d -a -w /usr/dt/appconfig/icons/C -a -x /usr/ucb/install; then
          echo; echo "## Setting up dtlogin"

          if test ! -f /usr/dt/config/Xsession.xfce4; then
            ${INSTALL_BIN} -o bin -g bin -m 0555 solaris-Xsession.xfce4 /usr/dt/config/Xsession.xfce4
            echo "/usr/dt/config/Xsession.xfce4" >> .flist
          fi

          if test ! -f /usr/dt/config/Xsession.xfce44; then
            cat &gt; /usr/dt/config/Xsession.xfce44 &lt;&lt;EOF
#!/bin/ksh

echo "Executing Xfce 4.2 Starup"

unset SDT_ALT_SESSION
unset SDT_ALT_HELLO
unset SDT_NO_DSDM

# launch Xfce
exec ${PREFIX}/bin/startxfce4
EOF
            chmod 555 /usr/dt/config/Xsession.xfce44
            chown bin:bin /usr/dt/config/Xsession.xfce44
            echo "/usr/dt/config/Xsession.xfce44" &gt;&gt; .flist
          fi

          if test ! -f /usr/dt/config/C/Xresources.d/Xresources.xfce4; then
            ${INSTALL_BIN} -o bin -g bin -m 0444 solaris-Xresources.xfce4 \
              /usr/dt/config/C/Xresources.d/Xresources.xfce4
            echo "/usr/dt/config/C/Xresources.d/Xresources.xfce4" &gt;&gt; .flist
          fi

          if test ! -f /usr/dt/appconfig/icons/C/Xfce4logo.pm; then
            ${INSTALL_BIN} -o bin -g bin -m 0444 solaris-Xfce4logo.pm \
              /usr/dt/appconfig/icons/C/Xfce4logo.pm
            echo "/usr/dt/appconfig/icons/C/Xfce4logo.pm" &gt;&gt; .flist
          fi
        fi

        ##
        ## GDM/KDM setup
        ##
        echo "[Desktop Entry]" &gt;&gt; gdm-xfce44.desktop
        echo "Encoding=UTF-8" &gt;&gt; gdm-xfce44.desktop
        echo "Name=Xfce 4.2 Session" &gt;&gt; gdm-xfce44.desktop
        echo "Comment=Use this session to run Xfce 4.2 as your desktop environment" &gt;&gt; gdm-xfce44.desktop
        echo "Exec=${PREFIX}/bin/startxfce4" &gt;&gt; gdm-xfce44.desktop
        echo "Icon=${PREFIX}/share/pixmaps/xfce4_xicon1.png" &gt;&gt; gdm-xfce44.desktop
        echo "Type=Application" &gt;&gt; gdm-xfce44.desktop
        ${INSTALL_BIN} -d "${PREFIX}/share/examples" || exit 1
        ${INSTALL_BIN} -c -m 0644 gdm-xfce44.desktop "${PREFIX}/share/examples" || exit 1
        echo "${PREFIX}/share" &gt;&gt; .flist
        echo "${PREFIX}/share/examples" &gt;&gt; .flist
        echo "${PREFIX}/share/examples/xfce44.desktop" &gt;&gt; .flist

        if test x"${I2T_AUTOSETUPDM}" = x"true"; then
          if type kde-config &gt;/dev/null 2&gt;&amp;1; then
            echo; echo "## Setting up KDM"
            kde_appsdir=`kde-config --expandvars --install data`
            if test -d "${kde_appsdir}/kdm/sessions" -a -w "${kde_appsdir}/kdm/sessions" -a ! -f "${kde_appsdir}/kdm/sessions/xfce44.desktop"; then
              echo "[Desktop Entry]" &gt;&gt; kdm-xfce44.desktop
              echo "Encoding=UTF-8" &gt;&gt; kdm-xfce44.desktop
              echo "Type=XSession" &gt;&gt; kdm-xfce44.desktop
              echo "Exec=${PREFIX}/bin/startxfce4" &gt;&gt; kdm-xfce44.desktop
              echo "TryExec=${PREFIX}/bin/startxfce4" &gt;&gt; kdm-xfce44.desktop
              echo "Name=Xfce 4.2" &gt;&gt; kdm-xfce44.desktop
              echo "Comment=The Xfce 4.2 Desktop Environment" &gt;&gt; kdm-xfce44.desktop

              if ${INSTALL_BIN} -c -m 0644 kdm-xfce44.desktop "${kde_appsdir}/kdm/sessions/xfce44.desktop" &gt; /dev/null 2&gt;&amp;1; then
                echo "${kde_appsdir}/kdm/sessions/xfce44.desktop" &gt;&gt; .flist
              fi
            fi
          fi

          echo; echo "## Setting up GDM"
          for dir in /etc/dm/Sessions /etc/X11/gdm/Sessions /etc/gdm/Sessions; do
            if test -d "${dir}" -a -w "${dir}" -a ! -f "${dir}/xfce44.desktop"; then
              if ${INSTALL_BIN} -c -m 0644 gdm-xfce44.desktop "${dir}/xfce44.desktop" &gt; /dev/null 2&gt;&amp;1; then
                echo "${dir}/xfce44.desktop" &gt;&gt; .flist
              fi
            fi
          done

          for dir in `echo "${PATH}:" | sed -e 's,/bin:,/share:,g' -e 's,/sbin:,/share:,g' -e 's,:, ,g'`; do
            etcdir=`echo ${dir} | sed -e 's,/share$,/etc,'`
            for subdir in "dm/Sessions" "X11/gdm/Sessions" "gdm/Sessions"; do
              realdir="${etcdir}/${subdir}"
              if test -d "${realdir}" -a -w "${realdir}" -a ! -f "${realdir}/xfce44.desktop"; then
                if ${INSTALL_BIN} -c -m 0644 gdm-xfce44.desktop "${realdir}/xfce44.desktop" &gt; /dev/null 2&gt;&amp;1; then
                  echo "${realdir}/xfce44.desktop" &gt;&gt; .flist
                fi
              fi
            done

            if test -d "${dir}/xsessions" -a -w "${dir}/xsessions" -a ! -f "${dir}/xsessions/xfce44.desktop"; then
              if ${INSTALL_BIN} -c -m 0644 gdm-xfce44.desktop "${dir}/xsessions/xfce44.desktop" &gt; /dev/null 2&gt;&amp;1; then
                echo "${dir}/xsessions/xfce44.desktop" &gt;&gt; .flist
              fi
            elif test -d "${dir}/gnome/xsessions" -a -w "${dir}/gnome/xsessions" -a ! -f "${dir}/gnome/xsessions/xfce44.desktop"; then
              if ${INSTALL_BIN} -c -m 0644 gdm-xfce44.desktop "${dir}/gnome/xsessions/xfce44.desktop" &gt; /dev/null 2&gt;&amp;1; then
                echo "${dir}/gnome/xsessions/xfce44.desktop" &gt;&gt; .flist
              fi
            fi
          done
        fi
      </i2t:post-action>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfce-mcs-plugins</i2t:name>
      <i2t:title>Xfce MCS Plugins</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfce4-panel</i2t:name>
      <i2t:title>Xfce Panel</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>orage</i2t:name>
      <i2t:title>Xfce Calendar</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfce4-appfinder</i2t:name>
      <i2t:title>Xfce Appfinder</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfce4-mixer</i2t:name>
      <i2t:title>Xfce Volume Control</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfce4-session</i2t:name>
      <i2t:title>Xfce Session Manager</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfdesktop</i2t:name>
      <i2t:title>Xfce Desktop Manager</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfprint</i2t:name>
      <i2t:title>Xfce Printing Support</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfwm4</i2t:name>
      <i2t:title>Xfce Window Manager</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xfwm4-themes</i2t:name>
      <i2t:title>Xfce Window Themes</i2t:title>
    </i2t:package>

    <i2t:package>
      <i2t:name>xarchiver</i2t:name>
      <i2t:title>Xarchiver Archive Manager</i2t:title>
    </i2t:package>

  </i2t:packages>

</i2t:installer>

