:return: The text to display for the package command description.
:rtype: str
'''
- return _("The package command creates an archive.\nThere are 4 kinds of "
- "archive, which can be mixed:\n 1- The binary archive. It contains all the product "
- "installation directories and a launcher,\n 2- The sources archive."
- " It contains the products archives, a project corresponding to "
- "the application and salomeTools,\n 3- The project archive. It "
- "contains a project (give the project file path as argument),\n 4-"
- " The salomeTools archive. It contains salomeTools.\n\nexample:"
- "\nsat package SALOME-master --bineries --sources")
+ return _("""
+The package command creates an tar archive of a product.
+There are four kinds of archive, which can be mixed:
+
+ 1 - The binary archive.
+ It contains the product installation directories plus a launcher.
+ 2 - The sources archive.
+ It contains the product archives, a project (the application plus salomeTools).
+ 3 - The project archive.
+ It contains a project (give the project file path as argument).
+ 4 - The salomeTools archive.
+ It contains code utility salomeTools.
+
+example:
+ >> sat package SALOME-master --binaries --sources""")
def run(args, runner, logger):
'''method that is called when salomeTools is called with package parameter.
--- /dev/null
+
+
+.. _SALOME: http://www.salome-platform.org
+.. _SPHINX: http://sphinx-doc.org
+.. _CAST3M: http://www-cast3m.cea.fr
+.. _MATIX: ../../MATIX_PROFILE/doc/index.html
+.. _C++: http://www.cplusplus.com/
+.. _CMake: https://cmake.org/
+.. _Python: https://docs.python.org/2.7
+.. _ParaView: http://www.paraview.org
+.. _Anaconda: https://docs.continuum.io/anaconda/pkg-docs#
+.. _Miniconda: http://conda.pydata.org/miniconda.html
+.. _Git: https://git-scm.com
+.. _GitCheatSheet: https://services.github.com/kit/downloads/github-git-cheat-sheet.pdf
+.. _CLI: https://en.wikipedia.org/wiki/Command-line_interface
+.. _Tar: https://en.wikipedia.org/wiki/Tar_(computing)
+.. _OS: https://en.wikipedia.org/wiki/Operating_system
+
--- /dev/null
+
+.. include:: ../../rst_prolog.rst
+
+Command clean
+****************
+
+Description
+============
+The **clean** command
+TODO
+TODO
+.
+
+Depending on the selected options, the created archive includes sources and binaries
+of SALOME products and prerequisites.
+
+Utility *salomeTools* is also included in the archive.
+
+.. important::
+ By default the package only includes the sources of the prerequisites and the products.
+ To select a subset use the *--content* option.
+
+
+Usage
+=====
+* Create a package for a product (example as *SALOME_xx*): ::
+
+ sat package SALOME_xx
+
+ This command will create an archive named ``SALOME_xx.tgz`` in the working directory (``$USER.workDir``).
+ If the archive already exists an exception is thrown.
+
+* Create a package with a specific name: ::
+
+ sat package SALOME_xx --name YourSpecificName
+
+.. important::
+ By default, the archive is created in the working directory of the user (``$USER.workDir``).
+ If the option *name* is used with a path (relative or absolute) it will be used.
+ If the option *name* is not used and binaries (modules or prerequisites) are
+ included in the package, the architecture (ex: MD10_64) will be appened to the name.
+
+ Example: ::
+
+ sat package <product>
+ Creates <proudct>.tar.gz in $USER.workDir
+
+ sat package <product> -b
+ Creates <proudct>_<arch>.tar.gz in $USER.workDir
+
+ sat package <product> -n myname
+ Creates myname.tar.gz in $USER.workDir
+
+ sat package <product> -n ~/myname -b
+ Creates myname.tar.gz in the home directory
+
+* Force the creation of the archive (if it already exists): ::
+
+ sat package <product> --force
+
+* Include the binaries in the archive (modules and prerequisites): ::
+
+ sat package <product> --binaries
+
+ This command will create an archive named ``<product>_<arch>.tar.gz`` where <arch> is the architecture of the machine.
+
+* Set content of the archive: ::
+
+ # only the prerequisites
+ sat package <product> --content ps,pb
+ # only the modules sources
+ sat package <product> --content ms
+ # only the binaries
+ sat package <product> --content mb,pb
+
+
+ Possible values for content option are:
+ * ms: modules sources
+ * mb: modules binaries
+ * ps: prerequisites sources
+ * pb: prerequisites binaries
+
+ .. note:: this option is not compatible with the *--binaries* option.
+
+* Include the modules and prerequisites of the base product: ::
+
+ sat package <product> --with_base
+
+* Simulate the creation of the package (only check for required components): ::
+
+ sat package <product> --simulate
+
+* Do not include sample modules (like HELLO): ::
+
+ sat package <product> --no_sample
+
+ Sample modules are identified by the ``$TOOLS.common.module_info.<module_name>.module_type`` parameter.
+
+ By default salomeTools creates a copy of the installer with the same name than
+ the package. Use this option to not generate the installer.
+
+* Do not delete version control system informations from the configurations files of the embedded salomeTools: ::
+
+ sat package <product> --with_vcs
+
+ The version control systems (vcs) taken into account by this option are CVS, SVN and Git.
+
+Configuration
+=============
+No specific configuration.
Description
===========
The **environ** command generates the environment files used to run and compile SALOME.
-Please note that these files are not required! SalomeTool set the environment himself, when compiling.
+Please note that these files are not required any more,
+salomeTool set the environment himself, when compiling.
And so does the salome launcher.
-These files are useful when one want to check the environment.
-They are also used in debug mode to set the environment for gdb.
-The configuration part at the end of this page explains how to specify the environment which will be used by sat (at build or run time),
+These files are useful when someone wants to check the environment.
+They could be used in debug mode to set the environment for gdb.
+The configuration part at the end of this page explains how
+to specify the environment which will be used by sat (at build or run time),
and which is written in files by sat environ command.
Usage
--- /dev/null
+
+.. include:: ../../rst_prolog.rst
+
+Command package
+****************
+
+Description
+============
+The **package** command creates a SALOME_ archive (usually a compressed Tar_ file .tgz).
+This tar file is used later to intall SALOME on other remote computer.
+
+Depending on the selected options, the created archive includes sources and binaries
+of SALOME products and prerequisites.
+
+Utility *salomeTools* is also included in the archive.
+
+.. note::
+ By default the package only includes the sources of the prerequisites and the products.
+ To select a subset use the *--content* option.
+
+
+Usage
+=====
+* Create a package for a product (example as *SALOME_xx*): ::
+
+ sat package SALOME_xx
+
+ This command will create an archive named ``SALOME_xx.tgz`` in the working directory (``$USER.workDir``).
+ If the archive already exists, do nothing.
+
+* Create a package with a specific name: ::
+
+ sat package SALOME_xx --name YourSpecificName
+
+.. note::
+ By default, the archive is created in the working directory of the user (``$USER.workDir``).
+ If the option *name* is used with a path (relative or absolute) it will be used.
+ If the option *name* is not used and binaries (modules or prerequisites) are
+ included in the package, the OS_ architecture (ex: *MD10_64*)
+ will be appended to the name.
+
+ Examples: ::
+
+ # Creates SALOME_xx.tgz in $USER.workDir
+ sat package SALOME_xx
+
+ # Creates SALOME_xx_<arch>.tgz in $USER.workDir
+ sat package SALOME_xx --binaries
+
+ # Creates MySpecificName.tgz in $USER.workDir
+ sat package SALOME_xx --name MySpecificName
+
+
+* Force the creation of the archive (if it already exists): ::
+
+ sat package SALOME_xx --force
+
+* Include the binaries in the archive (products and prerequisites): ::
+
+ sat package SALOME_xx --binaries
+
+ This command will create an archive named ``SALOME_xx _<arch>.tgz``
+ where <arch> is the OS_ architecture of the machine.
+
+* Set content of the archive: ::
+
+ # only the prerequisites
+ sat package <product> --content ps,pb
+ # only the modules sources
+ sat package <product> --content ms
+ # only the binaries
+ sat package <product> --content mb,pb
+
+
+ Possible values for content option are:
+ * ms: modules sources
+ * mb: modules binaries
+ * ps: prerequisites sources
+ * pb: prerequisites binaries
+
+ .. note:: this option is not compatible with the *--binaries* option.
+
+
+* Simulate the creation of the package (only check for required components): ::
+
+ sat package <product> --simulate
+
+* Do not include *sample* modules (like HELLO): ::
+
+ sat package <product> --no_sample
+
+ Sample modules are identified by the ``$TOOLS.common.module_info.<module_name>.module_type`` parameter.
+
+ By default salomeTools creates a copy of the installer with the same name than
+ the package. Use this option to not generate the installer.
+
+* Do not delete version control system informations from the configurations files of the embedded salomeTools: ::
+
+ sat package <product> --with_vcs
+
+ The version control systems (vcs) taken into account by this option are CVS, SVN and Git.
+
+Configuration
+=============
+No specific configuration.
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc']
+# do not use rst_prolog please
+# https://github.com/sphinx-doc/sphinx/issues/2445
+
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# a list of builtin themes.
# default sphinxdoc scrolls agogo traditional nature haiku
html_theme = 'alabaster'
-html_theme_path = ["../_themes/alabaster", ]
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = ["../_themes/alabaster", ]
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-#html_logo = None
+html_logo = "images/sat_v5.0.png"
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-# html_favicon = "images/sat_v5_small.ico"
+# html_favicon = ""
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
+
+.. include:: ../rst_prolog.rst
+
************
-SAlome Tools
+Salome Tools
************
.. note:: This documentation is under construction.
-**SA**lome**T**ools (**sat**) is a suite of commands that can be used to perform operations
-on SALOME.
+The **Sa**\ lome\ **T**\ ools (sat) is a suite of commands
+that can be used to perform operations on SALOME_.
For example, sat allows you to compile SALOME's codes
(prerequisites, products)
create application, run tests, create package, etc.
+This utility code is a set of Python_ scripts files.
+
+
Quick start
===========
application <commands/application>
log <commands/log>
environ <commands/environ>
+ clean <commands/clean>
+ package <commands/package>
Code documentation
==================
+
+.. include:: ../rst_prolog.rst
+
********************
Usage of SAlomeTools
********************
Usage
=====
-sat usage is a Command Line Interface (CLI).
+sat usage is a Command Line Interface (CLI_).
.. code-block:: bash
-***************
-Write a command
-***************
+
+
+Add a user custom command
+***************************
Introduction
============
+
+.. note:: This documentation is for python developers.
+
+
The salomeTools product provides a simple way to develop commands.
The first thing to do is to add a file with ".py" extension in the **commands** directory of salomeTools.
Available options are:
-m, --myoption (boolean)
- My option changes the behavior of my command.
\ No newline at end of file
+ My option changes the behavior of my command.