mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Allowed to pass multiple "SomePlatform" to the install/uninstall commands
This commit is contained in:
@ -12,13 +12,9 @@ Wiring Framework (Arduino + Energia) Blink Example
|
||||
$ cd platformio-develop/examples/wiring-blink/
|
||||
|
||||
# Install Atmel AVR development platform with Arduino Framework
|
||||
$ platformio install atmelavr --with-package=framework-arduinoavr
|
||||
|
||||
# Install TI MSP430 development platform with Energia Framework
|
||||
$ platformio install timsp430 --with-package=framework-energiamsp430
|
||||
|
||||
# Install TI TIVA development platform with Energia Framework
|
||||
$ platformio install titiva --with-package=framework-energiativa
|
||||
$ platformio install atmelavr timsp430 titiva
|
||||
|
||||
# Process example project
|
||||
$ platformio run
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 4.0 MiB |
@ -7,13 +7,15 @@ from platformio.platforms._base import PlatformFactory
|
||||
|
||||
|
||||
@command("install", short_help="Install new platforms")
|
||||
@argument("platform")
|
||||
@argument("platforms", nargs=-1)
|
||||
@option('--with-package', multiple=True, metavar="<package>")
|
||||
@option('--without-package', multiple=True, metavar="<package>")
|
||||
def cli(platform, with_package, without_package):
|
||||
def cli(platforms, with_package, without_package):
|
||||
|
||||
p = PlatformFactory().newPlatform(platform)
|
||||
for platform in platforms:
|
||||
|
||||
if p.install(with_package, without_package):
|
||||
secho("The platform '%s' has been successfully installed!" % platform,
|
||||
fg="green")
|
||||
p = PlatformFactory().newPlatform(platform)
|
||||
|
||||
if p.install(with_package, without_package):
|
||||
secho("The platform '%s' has been successfully installed!" %
|
||||
platform, fg="green")
|
||||
|
@ -9,13 +9,15 @@ from platformio.platforms._base import PlatformFactory
|
||||
|
||||
|
||||
@command("uninstall", short_help="Uninstall the platforms")
|
||||
@argument("platform")
|
||||
def cli(platform):
|
||||
@argument("platforms", nargs=-1)
|
||||
def cli(platforms):
|
||||
|
||||
if platform not in PackageManager.get_installed():
|
||||
raise PlatformNotInstalledYet(platform)
|
||||
for platform in platforms:
|
||||
|
||||
p = PlatformFactory().newPlatform(platform)
|
||||
if p.uninstall():
|
||||
secho("The platform '%s' has been successfully "
|
||||
"uninstalled!" % platform, fg="green")
|
||||
if platform not in PackageManager.get_installed():
|
||||
raise PlatformNotInstalledYet(platform)
|
||||
|
||||
p = PlatformFactory().newPlatform(platform)
|
||||
if p.uninstall():
|
||||
secho("The platform '%s' has been successfully "
|
||||
"uninstalled!" % platform, fg="green")
|
||||
|
Reference in New Issue
Block a user