README 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* $XConsortium: README /main/3 1996/07/15 14:05:55 drk $ */
  2. The Template Application
  3. ------------------------
  4. This is a template Dt application. It illustrates how to write
  5. a simple application integrated with the Dt desktop.
  6. The application provides a simple airbrush drawing facility using
  7. Motif. It defines a new file type '*.template' which contains a list
  8. of x, y coordinates for the drawn points. The application and data
  9. format favor simplicity over performance, and could obviously
  10. be improved.
  11. Actions
  12. -------
  13. A set of actions are provided to allow integration into the Dt desktop:
  14. TemplateNew (labeled New) - to create a new Template data file.
  15. TemplateOpen (labeled Open) - to open an existing Template data file.
  16. TemplatePrint (labeled Print) - to Print a Template data file.
  17. Datatypes
  18. ---------
  19. The template data file is described by the datatype TemplateData, defined
  20. in C/template.dt
  21. Icons
  22. -----
  23. A minimal set of icons are provided to integrate with the Dt desktop. The
  24. application group icons, window manager icon, Action icons and data file
  25. icons are identical. In a more sophisticated application, these would
  26. most likely be similar, but visually differentiated in some way.
  27. Help
  28. ----
  29. A simple help file is provided. This can be displayed from within the
  30. application using the Help viewer widget (by selecting 'Overview' in the
  31. 'Help' menu. It can also be view using the dthelpview tool.
  32. Message Catalog
  33. ---------------
  34. All user-visible text in the application is loaded from the message catalog
  35. template.cat.
  36. Example file
  37. ------------
  38. As recommended in the Programmer's Guide, an example.template file is
  39. provided.
  40. App-defaults file
  41. -----------------
  42. The app-defaults file 'Template' contains resources to set the initial
  43. size of the application window.
  44. The Application Package
  45. -----------------------
  46. The Makefile provided will build the application binary ("templatebin") and
  47. associated files. It then copies these into the newly created application
  48. package directory hierarchy ("template"). The ./dt/ subdirectory hierarchy
  49. is a Dt standard and is described in the Programmer's Guide. The other
  50. directories (bin, app-defaults, msg) are not standard directories and may
  51. vary for your application and installation script.
  52. The binary templatebin will function on its own, however to fully install
  53. the application and integrate with the Dt desktop you will need to write a
  54. platform-specific installation script. The installation script will
  55. typically need to be run with root privileges.
  56. This script should be written to ensure that the binary, app-defaults and
  57. message catalog get installed correctly on your target system, and are
  58. available in the appropriate user or system search paths.
  59. This script should also install the ToolTalk ptype into the system by
  60. running the command 'tt_type_comp -d system template.ptype'.
  61. NOTE: There is a bug in the system that may prevent tt_type_comp from
  62. notifying an existing desktop session that new types have been added.
  63. The symptom of this bug will be that the application will fail with the
  64. following error message:
  65. templatebin: ttmedia_ptype_declare failed
  66. If this occurs, a workaround is to send SIGUSR2 to the running ttsession
  67. process, like so:
  68. $ /usr/bin/ps -e | grep ttsess
  69. 7850 console 0:08 ttsessio
  70. $ kill -USR2 7850
  71. This will cause ttsession to reread its types files. See ttsession(1)
  72. for further information. An alternative workaround is to logout from
  73. the desktop and restart.
  74. If you choose to test the templatebin binary before integrating it with
  75. the Dt desktop, you will need to set the following (this assumes you
  76. have built out of /usr/dt/examples/template):
  77. export XMICONBMSEARCHPATH=$XMICONBMSEARCHPATH:/usr/dt/examples/template/template/dt/appconfig/icons/C/%B:
  78. export XMICONSEARCHPATH=$XMICONSEARCHPATH:/usr/dt/examples/template/template/dt/appconfig/icons/C/%B:
  79. export DTHELPSEARCHPATH=$DTHELPSEARCHPATH:/usr/dt/examples/template/template/dt/appconfig/help/C/%H.sdl:
  80. The installation script should be written to ensure that the bin, app-defaults
  81. and message catalog get installed correctly on your target system, and
  82. The final step of the installation script should be to execute
  83. 'dtappintegrate -s template'. This will ensure that the desktop
  84. files under the ./dt/ subdirectory are installed correctly and
  85. inserted into the appropriate Dt system and user paths.
  86. Localization
  87. ------------
  88. The application is ready for localization. This directory contains
  89. the non-localizable portions of the application.
  90. The ./C/ directory contains the localizable portions of the application
  91. in US English. Some or all of these files should be translated and
  92. placed in a separate locale-specific directory.