From: crouzet Date: Tue, 12 Feb 2019 16:17:46 +0000 (+0100) Subject: ajout doc commande init, maj sat doc X-Git-Tag: 5.3.0~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9a917eb02826b22266db46a11a0dc27f5ebdfce4;p=tools%2Fsat.git ajout doc commande init, maj sat doc --- diff --git a/commands/doc.py b/commands/doc.py index 6191e0a..0c9b448 100644 --- a/commands/doc.py +++ b/commands/doc.py @@ -59,22 +59,27 @@ def run(args, runner, logger): logger.write("docdir %s\n" % docDir, 6) logger.write("options %s\n" % options, 6) - somethingDone = False - if options.xml: - src.system.show_in_editor(runner.cfg.USER.browser, htmlFile, logger) - somethingDone = True if options.pdf: + if not os.path.isfile(pdfFile): + msg = "\npdf documentation not found. Please build it inside doc directory\n"\ + "(follow README instructions in doc directory)\n" + logger.error(msg) + return 1 src.system.show_in_editor(runner.cfg.USER.pdf_viewer, pdfFile, logger) - somethingDone = True - if options.edit: + + elif options.edit: src.system.show_in_editor(runner.cfg.USER.editor, rstFiles, logger) src.system.show_in_editor(runner.cfg.USER.editor, rstFilesCommands, logger) - somethingDone = True - if options.compile: + + elif options.compile: logger.write("How to compile documentation:\n%s" % open(readmeFile,"r").read(), 3) - somethingDone = True - if not somethingDone: + else: + if not os.path.isfile(htmlFile): + msg = "\nhtml documentation not found. Please build it inside doc directory\n"\ + "(follow README instructions in doc directory)\n" + logger.error(msg) + return 1 src.system.show_in_editor(runner.cfg.USER.browser, htmlFile, logger) return 0 diff --git a/doc/Makefile b/doc/Makefile index da3be1c..249ef66 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -105,8 +105,9 @@ latex: latexpdf: $(SPHINXBUILD) -q -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." - make -C $(BUILDDIR)/latex all-pdf $(SILENT) - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + make -C $(BUILDDIR)/latex all-pdf + @echo + @echo "pdflatex available in $(BUILDDIR)/latex/salomeTools.pdf" clean-pdf: diff --git a/doc/src/commands/init.rst b/doc/src/commands/init.rst new file mode 100644 index 0000000..0486d46 --- /dev/null +++ b/doc/src/commands/init.rst @@ -0,0 +1,54 @@ +.. include:: ../../rst_prolog.rst + +Command config +****************** + +Description +=========== +The **init** command manages the sat local configuration (which is stored in the data/local.pyconf file). +It allows to initialise the content of this file. + +Usage +===== +* A sat project provides all the pyconf files relatives to a project (salome for example). Use the *--add_project* command to add a sat project locally, in data/local.pyconf (by default sat comes without any project). It is possible to add as many projects as required. :: + + sat init --add_project + + +* If you need to remove a sat project from the local configuration, use the *--reset_projects* command to remove all projects and then add the nex ones with *--add_project*: :: + + sat init --reset_projects + sat init --add_project + +* By default the product archives are stored locally within the directory containing salomeTool, in a subdirectory called ARCHIVES. If you want to change the default, use the *--archive_dir* option: :: + + sat init --archive_dir + +* sat enable a **base** mode, which allow to mutualize product builds between several applications. By defaut, the mutualised builds are stored locally within the directory containing salomeTool, in a subdirectory called BASE. To change the default, use the *--base* option: :: + + sat init --base + +* In the same way, you can use the *--workdir* and *--log_dir* commands to change the default directories used to store the application builds, and sat logs: :: + + sat init --workdir + sat init --log_dir + + + +Some useful configuration pathes +================================= + +All the sat init commands update the local pyconf salomeTool file data/local.pyconf. The same result can be achieved by editing the file directly. +The content of data/local.pyconf is dumped into two sat configuration variables: + +* **LOCAL**: Contains notably all the default paths in the fields archive_dir, base, log_dir and workdir. + +* **PROJECTS**: The field project_file_paths contains all the project files that have been included with --add_project option. + +sat commands: :: + + sat config -v LOCAL + sat config -v PROJECTS + + + diff --git a/doc/src/index.rst b/doc/src/index.rst index 5b2a111..4052fdf 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -55,6 +55,7 @@ List of Commands clean package generate + init Developer documentation =======================