Chapter 3. Deployment

GUI specification files may be written using XMLmind XML Editor (a simple configuration for .xxe_gui files is included in the distribution of XXE) or using a text editor.

If you use a text editor, do not forget to validate your GUI specification against its schema. This schema is found in XXE_install_dir/addon/config/gui/xsd/gui.xsd. Unix example:

~/.xxe/addon$ /opt/xxe/bin/xsdvalid -s /opt/xxe/addon/config/gui/xsd/gui.xsd custom.xxe_gui

There are two ways to deploy a custom GUI specification for XXE:

  1. Set environment variable XXE_GUI as shown in the introduction of this document.

  2. OR rename your .xxe_gui file to custom.xxe_gui (this special name is mandatory).

    Then copy this file and all its resources (icons, translations, etc) to one of the addon/ directories scanned by XXE during its startup.

    You need to use this second method if you deploy XXE with Java™ Web Start (described in XMLmind XML Editor - Configuration and Deployment). Note that this is consistent with the way all the other configuration files are deployed.

First method applied to the GUI created during this tutorial:

Windows (assuming that XXE has been installed in C:\Program Files\XMLmind_XML_Editor\)
  1. Open a command prompt.

  2. Change working directory to C:\Program Files\XMLmind_XML_Editor\doc\gui\tutorial\.

  3. Set environment variable XXE_GUI as follows:

    C:\...\tutorial> set XXE_GUI=tutorial1.xxe_gui
  4. Start XXE as follows:

    C:\...\tutorial> C:\Program Files\XMLmind_XML_Editor\bin\xxe.exe
Linux, Mac (with bash; assuming that XXE has been installed in /op/xxe/)
  1. Open a terminal.

  2. Change working directory to /opt/xxe/doc/gui/tutorial.

  3. Start XXE as follows:

    /opt/xxe/doc/gui/tutorial$ XXE_GUI=tutorial1.xxe_gui /opt/xxe/bin/xxe &

Important

This method works fine with tutorial1.xxe_gui, but not with tutorial2.xxe_gui, tutorial3.xxe_gui, etc. Why? Because the files other than tutorial1.xxe_gui require XXE to load code found in XXE_install_dir/doc/gui/tutorial/custom_parts.jar.

In practice this means that if you want to use this method with a custom GUI making use of custom parts, you'll nevertheless have to deploy the custom code by copying its jar to one of the addon/ directories scanned by XXE during its startup.

Second method applied to the GUI created during this tutorial:

  1. Copy directory XXE_install_dir/doc/gui/tutorial/ and all its content (which includes custom.xxe_gui, a file having a content identical to tutorial7.xxe_gui) to directory XXE_user_preferences_dir/addon/.

    XXE user preferences directory is:

    • $HOME/.xxe/ on Unix,

    • %SystemDrive%\Documents and Settings\%USERNAME%\Application Data\XMLmind\XMLeditor\ on Windows 2000/XP,

    • %SystemDrive%\winnt\Profiles\%USERNAME%\Application Data\XMLmind\XMLeditor\ on Windows NT.

  2. Restart XXE as you usually do it.