PageRenderTime 46ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/INSTALL.rst

https://gitlab.com/collective/ArchGenXML
ReStructuredText | 254 lines | 164 code | 90 blank | 0 comment | 0 complexity | 6e062f8dc7bbf194421061cddc2e2cd9 MD5 | raw file
  1. ============
  2. Installation
  3. ============
  4. ArchGenXML has a dependency on some zope 3 eggs. To not mess up your global site-packages directory, using buildout or virtualenv is recommended.
  5. Note: In an older version of AGX, a Zope 3 installation could be configured in a *~/.agx_zope_path* file. This case is not supported anymore. You can delete this file if you have it.
  6. On Windows, I assume you installed Python 2.4.4 from the `msi installer`_ and installed it in the default location. If you have not already done, configure the Path environment variable to include your python path and scripts directory.
  7. For this, got to Control Panel, Advanced, Environment Variables, edit Path, append ``;C:\\Python24;C:\\Python24\Scripts`` to the existing string.
  8. .. _`msi installer`: http://www.python.org/download/releases/2.4.4/
  9. Installing stable version
  10. =========================
  11. Attention: adding archgenxml egg to a Plone buildout is not supported!
  12. Plone 3.x buildout is shipped with old Zope 3.3. ArchGenXML depends on latest version of zope 3 eggs. So please create a buildout only for archgenxml like described below.
  13. If you want to install archgenxml via buildout (recommended), read *Using buildout* and skip the *Using easy_install in a virtualenv* part.
  14. It can happen ArchGenXML version on plone.org is older than Pypi because the release manager forgot to upload it on plone.org or for another reason. easy_install and buildout will get by default the latest ArchGenXML version on Pypi, so it's fine.
  15. Using buildout
  16. --------------
  17. Create a fresh directory and go into it::
  18. $ mkdir archgenxml_buildout
  19. $ cd archgenxml_buildout
  20. Download the normal bootstrap.py_ and put it in this directory. You can copy an existing bootstrap.py file of one of your buildout, it's the same file.
  21. Then create a `buildout.cfg` file in this directory with the following snippet::
  22. [buildout]
  23. parts =
  24. archgenxml
  25. [archgenxml]
  26. recipe = zc.recipe.egg:scripts
  27. eggs = archgenxml
  28. .. _bootstrap.py: http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py
  29. Finally bootstrap the buildout and run it::
  30. $ python bootstrap.py
  31. $ ./bin/buildout
  32. On Windows, it's ``bin\buildout``, you have to replace '/' by '\\' in all following examples.
  33. archgenxml is now available in ``./bin/archgenxml``.
  34. To update archgenxml later, go in your directory and run buildout again::
  35. $ ./bin/buildout
  36. It will download latest version of archgenxml all all its dependencies.
  37. I call below *<path to archgenxml>* the archgenxml_buildout directory.
  38. Using easy_install in a virtualenv
  39. ----------------------------------
  40. If you don't want to use buildout, you can use virtualenv to create an isolated environment.
  41. You have to install setuptools egg to have the easy_install command available.
  42. On Ubuntu you can do it with ``apt-get install python-setuptools``.
  43. On Windows, go to the `setuptools pypi page`_, download the exe which match the Python version you are using and execute it to install it.
  44. .. _`setuptools pypi page`: http://pypi.python.org/pypi/setuptools
  45. Install virtualenv with easy_install::
  46. $ easy_install virtualenv
  47. On Windows easy_install.exe is in ``C:\Python24\Scripts``, so you have to invoke it with the full path if you don't have added this directory in your PATH.
  48. Create the virtualenv with --no-site-packages option to not see packages installed globally::
  49. $ virtualenv --no-site-packages agx
  50. $ cd agx/
  51. $ source bin/activate
  52. $ easy_install archgenxml
  53. Everytime you want use archgenxml, you have to go in the *agx* directory and type ``source bin/activate`` to activate the environment. To deactivate the environment, type ``deactivate``.
  54. To update archgenxml, you have to update each egg, the most important one are archgenxml and xmiparser::
  55. $ easy_install -U archgenxml
  56. $ easy_install -U xmiparser
  57. If you have a problem with archgenxml, please be sure to recreate the virtualenv completly so you have latest versions of all eggs before asking on the archetypes-users mailing-list.
  58. I call below *<path to archgenxml>* the path to the virtualenv agx directory.
  59. Installing development version
  60. ==============================
  61. ArchGenXML's svn trunk is for the 2.x development version.
  62. As usual, the goal is to keep trunk workable. Some of the developers
  63. work and develop on the edge: trunk.
  64. If you need stability, use the latest release.
  65. The only supported way to use ArchGenXML trunk is with buildout.
  66. You install it like this::
  67. $ svn co https://svn.plone.org/svn/archetypes/ArchGenXML/buildout archgenxml_buildout
  68. $ cd archgenxml_buildout
  69. $ python bootstrap.py
  70. $ bin/buildout
  71. To update your buildout::
  72. $ cd archgenxml_buildout
  73. $ svn up
  74. $ bin/buildout
  75. If you are intersted in AGX 3 development, see http://dev.plone.org/archetypes/browser/AGX
  76. I call below *<path to archgenxml>* the archgenxml_buildout directory.
  77. Get the ArchGenXML profile
  78. ==========================
  79. The archgenxml_profile.xmi file contains information about stereotypes, fields, and other stuff that AGX needs to generate valid Python code from your model.
  80. You can `get the profile`_ from subversion.
  81. .. _`get the profile`: http://svn.plone.org/svn/archetypes/ArchGenXML/trunk/umltools/argouml/archgenxml_profile.xmi
  82. Or you can regenerate it with `<path to archgenxml>/bin/agx_argouml_profile`.
  83. A archgenxml_profile.xmi file is generated in the current directory.
  84. Create a "<path to archgenxml>/profiles" directory and put the file here.
  85. Note: In an older version of AGX, this file was called 'argouml_profile.xmi'. You should not use it with ArgoUML > 0.24.
  86. Troubleshooting
  87. ===============
  88. On Windows, you may have to install and configure the `mingw32 compiler`_ to compile the zope.proxy egg, an indirect dependency of archgenxml. Now zope.proxy eggs are built for Windows, so you should not have this problem anymore.
  89. Support
  90. =======
  91. For any questions or problems, please ask on the `archetypes-users mailing-list`_.
  92. Please don't use comments on the manual pages. Not everybody is alerted when a comment is added.
  93. If you want to contribute to this documentation, please post on the `plone-docs mailing-list`_.
  94. .. _`mingw32 compiler`: http://plone.org/documentation/how-to/using-buildout-on-windows
  95. .. _`archetypes-users mailing-list`: http://plone.org/support/forums/archetypes
  96. .. _`plone-docs mailing-list`: http://plone.org/support/forums/docs
  97. ===============================================
  98. Configure ArgoUML to use the archgenxml profile
  99. ===============================================
  100. Background and Notes
  101. ====================
  102. The screenshot below shows ArgoUML with the custom tags from the definition
  103. file. Having many of the possible options available from a menu has the
  104. following benefits:
  105. * saves time - sometimes clicking is faster than typing
  106. * reduces errors - no more mispelled tags
  107. * presents a learning opportunity - seeing new tags and stereotypes provides a
  108. springboard for further investigation
  109. .. figure:: taggedvalues-argouml.png
  110. :align: center
  111. ArgoUML with ArchGenXML profile
  112. This walks you through how a setup of ArgoUML on an Ubuntu desktop system.
  113. The methodology should be easily adjusted to other platforms.
  114. Assumptions
  115. ===========
  116. These are my assumptions:
  117. * You already have latest sun java JRE installed.
  118. You can get it on Ubuntu with::
  119. apt-get install sun-java6-jdk
  120. If::
  121. update-alternatives --list java
  122. don't give you */usr/lib/jvm/java-6-sun/jre/bin/java*, you can set java sun as the default java implementation like this::
  123. update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java
  124. * You have copied archgenxml_profile.xmi in the *<path to archgenxml>/profiles* directory like described in the previous section.
  125. Install ArgoUML
  126. ===============
  127. Go to http://argouml.tigris.org and download the latest stable version of ArgoUML (0.28 when these lines are written).
  128. Download the exe for Windows, the tar.gz archive for Linux.
  129. On Windows, execute the downloaded exe to install it.
  130. On Linux, unpack the archive somewhere, a good location is '/opt'::
  131. $ sudo mkdir /opt
  132. $ cd /opt
  133. $ sudo tar xvf /tmp/ArgoUML-0.28.tar.gz
  134. It should create a argouml-0.28 directory.
  135. It is handy to symlink 'argouml.sh' to '/usr/local/bin/argouml'::
  136. $ sudo ln -s /opt/argouml-0.28/argouml.sh /usr/local/bin/argouml
  137. Configure ArgoUML to use the definition file
  138. ============================================
  139. Note: ArgoUML 0.24 used to use the argo.defaultModel option to specify a profile to use like this::
  140. java -Dargo.defaultModel=<path to archgenxml>/profiles/archgenxml_profile.xmi -jar /opt/ArgoUML/argouml.jar
  141. It's not the case anymore with latest ArgoUML version. Please read on.
  142. - Launch ArgoUML and go to Edit -> Settings... -> Profiles
  143. - Click on Add and specify your *<path to archgenxml>/profiles* directory.
  144. Note: archgenxml will use the list of profiles directories configured on ArgoUML.
  145. - Close ArgoUML and launch it again.
  146. - Go again in Edit -> Settings... -> Profiles
  147. AGXProfile should be visible now in "Available Profiles".
  148. - Click on ">>" to add it to "Default profiles".
  149. - You should remove the Java profile from the "Default profiles" list to be sure to not use stereotypes and tag definitions from this one.
  150. You should only have AGXProfile and UML 1.4 in this list. You can't remove the UML 1.4 here, but you remove it by project.
  151. The global configuration is now done.
  152. Now for every new project you create:
  153. - Click on the fourth icon in the toolbar to configure Profiles for this project.
  154. Delete UML 1.4. You should really only have AGXProfile is this list.
  155. Note: if you want to generate Plone 2.5 compatible code, set on the model root the plone_target_version tag definition with value *2.5*.
  156. Why ArgoUML?
  157. ============
  158. Just a few notes on why using ArgoUML.
  159. * Mature - it supports the important stuff (at least as far as ArchGenXML
  160. goes), state diagrams, tagged-values, stereotypes.
  161. * It is pretty lightweight, which is important when your laptop only has
  162. 256 MB of RAM and a PIII 700 Mhz processor. Poseidon Community Edition,
  163. though nice, is just too memory hungry.
  164. * Price is good (free and open source)