Install development platform from local dir and VCS(git, hg, svn) // Issue #479

This commit is contained in:
Ivan Kravets
2016-05-31 00:22:25 +03:00
parent bfd66deb37
commit d6b6fa2baf
9 changed files with 374 additions and 158 deletions
+122 -16
View File
@@ -22,22 +22,90 @@ Usage
.. code-block:: bash
# install platform by name
platformio platform install [OPTIONS] [PLATFORMS]
platformio platform install [OPTIONS] PLATFORM
# install platform from local directory
platformio platform install [OPTIONS] [file:///local/path/to/platform/dir]
# install specific platform version using Semantic Versioning
platformio platform install [OPTIONS] PLATFORM@X.Y.Z
# install platform using URL
platformio platform install [OPTIONS] URL
Description
-----------
Install development :ref:`platforms` and dependent packages.
Install :ref:`platforms` and dependent packages.
There are several predefined aliases for packages, such as:
* ``framework``
* ``toolchain``
* ``uploader``
Local
~~~~~
PlatformIO supports installing development platform from local directory. Here
is supported form:
* file:///local/path/to/the/platform/dir
VCS
~~~
PlatformIO supports installing from Git, Mercurial and Subversion, and detects
the type of VCS using url prefixes: "git+", "hg+", or "svn+".
PlatformIO requires a working VCS command on your path: git, hg or svn.
Git
^^^
The supported schemes are: ``git``, ``git+https`` and ``git+ssh``. Here are
the supported forms:
* https://github.com/platformio/platform-NAME.git
* git+git://git.server.org/my-platform
* git+https://git.server.org/my-platform
* git+ssh://git.server.org/my-platform
Passing branch names, a commit hash or a tag name is possible like so:
* https://github.com/platformio/platform-name.git#master
* git+git://git.server.org/my-platform#master
* git+https://git.server.org/my-platform#v1.0
* git+ssh://git.server.org/my-platform#7846d8ad52f983f2f2887bdc0f073fe9755a806d
Mercurial
^^^^^^^^^
The supported schemes are: ``hg+http``, ``hg+https`` and ``hg+ssh``. Here are
the supported forms:
* hg+hg://hg.server.org/my-platform
* hg+https://hg.server.org/my-platform
* hg+ssh://hg.server.org/my-platform
Passing branch names, a commit hash or a tag name is possible like so:
* hg+hg://hg.server.org/my-platform#master
* hg+https://hg.server.org/my-platform#v1.0
* hg+ssh://hg.server.org/my-platform#4cfe2fa00668
Subversion
^^^^^^^^^^
The supported schemes are: ``svn``, ``svn+svn``, ``svn+http``, ``svn+https``
and ``svn+ssh``. Here are the supported forms:
* svn+svn://svn.server.org/my-platform
* svn+https://svn.server.org/my-platform
* svn+ssh://svn.server.org/my-platform
You can also give specific revisions to an SVN URL, like so:
* svn+svn://svn.server.org/my-platform#13
Options
-------
@@ -62,30 +130,68 @@ Skip default packages
Examples
--------
1. Install :ref:`platform_timsp430` with default packages
1. Install :ref:`platform_atmelavr` with default packages
.. code-block:: bash
$ platformio platform install timsp430
Installing toolchain-timsp430 package:
$ platformio platform install atmelavr
Installing platform atmelavr @ latest:
Downloading...
Unpacking [####################################] 100%
Installing package tool-scons @ >=2.3.0,<2.6.0:
Downloading [####################################] 100%
Unpacking [####################################] 100%
Installing tool-mspdebug package:
Installing package toolchain-atmelavr @ ~1.40801.0:
Downloading [####################################] 100%
Unpacking [####################################] 100%
Installing framework-energiamsp430 package:
Downloading [####################################] 100%
Unpacking [####################################] 100%
The platform 'timsp430' has been successfully installed!
The platform 'atmelavr' has been successfully installed!
The rest of packages will be installed automatically depending on your build environment.
2. Install :ref:`platform_timsp430` with ``uploader`` utility only and skip
2. Install :ref:`platform_atmelavr` with ``uploader`` utility only and skip
default packages
.. code-block:: bash
$ platformio platform install timsp430 --skip-default-package --with-package=uploader
Installing tool-mspdebug package:
$ platformio platform install atmelavr --skip-default-package --with-package=uploader
Installing platform atmelavr @ latest:
Downloading [####################################] 100%
Unpacking [####################################] 100%
The platform 'timsp430' has been successfully installed!
Installing package tool-micronucleus @ ~1.200.0:
Downloading [####################################] 100%
Unpacking [####################################] 100%
Installing package tool-avrdude @ >=1.60001.0,<1.60101.0:
Downloading [####################################] 100%
Unpacking [####################################] 100%
The platform 'atmelavr' has been successfully installed!
The rest of packages will be installed automatically depending on your build environment.
3. Install the latest development :ref:`platform_atmelavr` from Git repository
.. code-block:: bash
$ platformio platform install https://github.com/platformio/platform-atmelavr.git
Installing platform https://github.com/platformio/platform-atmelavr.git @ latest:
git version 2.7.4 (Apple Git-66)
Cloning into '/Users/ikravets/.platformio/platforms/installing-XMIsAE-package'...
remote: Counting objects: 172, done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 172 (delta 109), reused 168 (delta 109), pack-reused 0
Receiving objects: 100% (172/172), 38.18 KiB | 0 bytes/s, done.
Resolving deltas: 100% (109/109), done.
Checking connectivity... done.
Submodule 'examples/arduino-external-libs/lib/OneWire' (https://github.com/PaulStoffregen/OneWire.git) registered for path 'examples/arduino-external-libs/lib/OneWire'
Cloning into 'examples/arduino-external-libs/lib/OneWire'...
remote: Counting objects: 87, done.
remote: Total 87 (delta 0), reused 0 (delta 0), pack-reused 87
Unpacking objects: 100% (87/87), done.
Checking connectivity... done.
Submodule path 'examples/arduino-external-libs/lib/OneWire': checked out '57c18c6de80c13429275f70875c7c341f1719201'
Installing package tool-scons @ >=2.3.0,<2.6.0:
Downloading [####################################] 100%
Unpacking [####################################] 100%
Installing package toolchain-atmelavr @ ~1.40801.0:
Downloading [####################################] 100%
Unpacking [####################################] 100%
The platform 'https://github.com/platformio/platform-atmelavr.git' has been successfully installed!
The rest of packages will be installed automatically depending on your build environment.
+8 -5
View File
@@ -23,6 +23,9 @@ Usage
platformio platform uninstall PLATFORM
# uninstall specific platform version using Semantic Versioning
platformio platform uninstall PLATFORM@X.Y.Z
Description
-----------
@@ -35,8 +38,8 @@ Examples
.. code-block:: bash
$ platformio platform uninstall timsp430
Uninstalling toolchain-timsp430 package: [OK]
Uninstalling tool-mspdebug package: [OK]
Uninstalling framework-energiamsp430 package: [OK]
The platform 'timsp430' has been successfully uninstalled!
$ platformio platform uninstall atmelavr
Uninstalling platform atmelavr @ latest: [OK]
Uninstalling package tool-scons @ 2.5.0: [OK]
Uninstalling package toolchain-atmelavr @ 1.40801.0: [OK]
The platform 'atmelavr' has been successfully uninstalled!
+44 -66
View File
@@ -46,75 +46,53 @@ Examples
.. code-block:: bash
$ platformio platform update
Platform atmelavr
Platform atmelavr @ 0.0.0
--------
Updating toolchain-atmelavr package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-avrdude package:
Versions: Current=2, Latest=2 [Up-to-date]
Updating framework-arduinoavr package:
Versions: Current=12, Latest=12 [Up-to-date]
Updating tool-micronucleus package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating platform atmelavr @ latest:
Versions: Current=0.0.0, Latest=0.0.0 [Up-to-date]
Updating package framework-arduinoavr @ ~1.10608.0:
Versions: Current=1.10608.0, Latest=1.10608.0 [Up-to-date]
Updating package toolchain-atmelavr @ ~1.40801.0:
Versions: Current=1.40801.0, Latest=1.40801.0 [Up-to-date]
Updating package framework-simba @ ~1.500.0:
Versions: Current=1.500.0, Latest=1.500.0 [Up-to-date]
Updating package tool-scons @ >=2.3.0,<2.6.0:
Versions: Current=2.5.0, Latest=2.5.0 [Up-to-date]
Platform atmelsam
Platform atmelsam @ 0.0.0
--------
Updating framework-arduinosam package:
Versions: Current=3, Latest=3 [Up-to-date]
Updating ldscripts package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating toolchain-gccarmnoneeabi package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-bossac package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating platform atmelsam @ latest:
Versions: Current=0.0.0, Latest=0.0.0 [Up-to-date]
Updating package toolchain-gccarmnoneeabi @ >=1.40803.0,<1.40805.0:
Versions: Current=1.40804.0, Latest=1.40804.0 [Up-to-date]
Updating package framework-arduinosam @ ~1.10607.0:
Versions: Current=1.10607.0, Latest=1.10607.0 [Up-to-date]
Updating package framework-simba @ ~1.500.0:
Versions: Current=1.500.0, Latest=1.500.0 [Up-to-date]
Updating package framework-mbed @ ~1.117.0:
Versions: Current=1.117.0, Latest=1.117.0 [Up-to-date]
Updating package tool-scons @ >=2.3.0,<2.6.0:
Versions: Current=2.5.0, Latest=2.5.0 [Up-to-date]
Updating package tool-bossac @ ~1.10500.0:
Versions: Current=1.10500.0, Latest=1.10500.0 [Up-to-date]
Platform stm32
Platform espressif @ 0.0.0
--------
Updating toolchain-gccarmnoneeabi package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-stlink package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-spl package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-cmsis package:
Versions: Current=2, Latest=2 [Up-to-date]
Updating framework-opencm3 package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating ldscripts package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating platform espressif @ latest:
Versions: Current=0.0.0, Latest=0.0.0 [Up-to-date]
Updating package tool-scons @ >=2.3.0,<2.6.0:
Versions: Current=2.5.0, Latest=2.5.0 [Up-to-date]
Updating package toolchain-xtensa @ ~1.40802.0:
Versions: Current=1.40802.0, Latest=1.40802.0 [Up-to-date]
Updating package framework-simba @ ~1.500.0:
Versions: Current=1.500.0, Latest=1.500.0 [Up-to-date]
Updating package tool-esptool @ ~1.408.0:
Versions: Current=1.408.0, Latest=1.408.0 [Up-to-date]
Updating package tool-mkspiffs @ ~1.102.0:
Versions: Current=1.102.0, Latest=1.102.0 [Up-to-date]
Updating package framework-arduinoespressif @ ~1.20200.0:
Versions: Current=1.20200.0, Latest=1.20200.0 [Up-to-date]
Updating package sdk-esp8266 @ ~1.10502.0:
Versions: Current=1.10502.0, Latest=1.10502.0 [Up-to-date]
Platform teensy
--------
Updating toolchain-atmelavr package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating ldscripts package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-arduinoteensy package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating toolchain-gccarmnoneeabi package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-teensy package:
Versions: Current=1, Latest=1 [Up-to-date]
Platform timsp430
--------
Updating toolchain-timsp430 package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-mspdebug package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-energiamsp430 package:
Versions: Current=2, Latest=2 [Up-to-date]
Platform titiva
--------
Updating ldscripts package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating toolchain-gccarmnoneeabi package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating tool-lm4flash package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-opencm3 package:
Versions: Current=1, Latest=1 [Up-to-date]
Updating framework-energiativa package:
Versions: Current=4, Latest=4 [Up-to-date]
...