Skip to content

Commit

Permalink
add notes for Windows (#10)
Browse files Browse the repository at this point in the history
* add notes for Windows

* windows commands for downloading sources and skipping packages

* COLCON_IGORE -> COLCON_IGNORE

* Common download instructions

* avoid tmp in windows note

* remove tmp from venv

* wording skip vs. ignore

* use backslashes for Windows commands

* mention argcomplete

* add mention bat on windows

* remove usage of call when invoking script
  • Loading branch information
dirk-thomas committed May 7, 2018
1 parent 4761a96 commit 8aeb195
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions developer/bootstrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ While not strictly necessary it is recommended to use a virtual environment for

.. code-block:: bash
$ mkdir /tmp/colcon-venv
$ python3 -m venv /tmp/colcon-venv
$ . /tmp/colcon-venv/bin/activate
$ mkdir colcon-venv
$ python3 -m venv colcon-venv
$ . colcon-venv/bin/activate
.. note::

On Windows the Python 3 executable is likely named ``python`` and the activation script is invoked with ``colcon-venv\Scripts\activate``

You might want to make sure that the venv is using up-to-date versions of the some foundational packages.

Expand All @@ -34,16 +38,25 @@ Fetch the sources

.. code-block:: bash
$ mkdir /tmp/colcon-from-source && cd /tmp/colcon-from-source
$ wget https://raw.githubusercontent.com/colcon/colcon.readthedocs.org/master/colcon.repos
$ mkdir colcon-from-source && cd colcon-from-source
$ curl --output colcon.repos https://raw.githubusercontent.com/colcon/colcon.readthedocs.org/master/colcon.repos
$ mkdir src
$ vcs import src < colcon.repos
.. note::

Depending on your platform you might not want to use all cloned packages.
E.g. on Windows you might want to remove / skip the packages ``colcon-bash`` and ``colcon-argcomplete``.
If you don't use PowerShell you might want to remove / skip the package ``colcon-powershell``.
On Windows you must ignore or remove ``colcon-argcomplete``, and may want to do the same for ``colcon-bash``.
If you don't use PowerShell you might want to ignore / remove the package ``colcon-powershell``.
To ignore a package add an empty file named COLCON_IGNORE to the folder.

Ignore ``colcon-argcomplete`` and ``colcon-bash`` on Windows.

.. code-block:: dosbatch
> type nul > src\colcon-argcomplete\COLCON_IGNORE
> type nul > src\colcon-bash\COLCON_IGNORE
Build the sources - first time
------------------------------
Expand All @@ -67,6 +80,12 @@ Build the sources - second time
$ . install/local_setup.sh
$ colcon build
.. note::

On Windows the setup file ends with ``.bat`` and is just being called.
Also the ``colcon`` executable can't be invoked directly here since while it is being used it can't be overwritten by the build.
Instead invoke the following command: ``python install\colcon-core\Scripts\colcon-script.py build``.

.. note::

The second build will process packages in parallel as long as their dependencies are finished.
Expand All @@ -81,5 +100,5 @@ To use the full functionality you can source the generated script for your shell
.. note::

With bash you should now also have completion for all arguments.
With bash you should now also have completion for all arguments if you have the Python package `argcomplete <https://pypi.org/project/argcomplete/>`_ installed.
Try typing ``colcon <tab>`` to see the completion of global options and verbs.

0 comments on commit 8aeb195

Please sign in to comment.