Fix failing with `platformio init --ide eclipse` without boards // Resolve #217

This commit is contained in:
Ivan Kravets
2015-05-26 22:55:59 +03:00
parent ac7479415b
commit 65ad07af6b
8 changed files with 22 additions and 17 deletions

View File

@ -29,12 +29,13 @@ Integration
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Since PlatformIO 2.0 you can generate Eclipse compatible project using SSince PlatformIO 2.0 you can generate Eclipse compatible project using
:option:`platformio init --ide` command: :option:`platformio init --ide` command. Please choose board type using
:ref:`cmd_boards` command and run:
.. code-block:: shell .. code-block:: shell
platformio init --ide eclipse platformio init --ide eclipse --board %TYPE%
Then import this project via ``File > Import... > General > Existing Projects Then import this project via ``File > Import... > General > Existing Projects
into Workspace > Next`` and specify root directory where is located into Workspace > Next`` and specify root directory where is located

View File

@ -21,12 +21,13 @@ Integration
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Since PlatformIO 2.0 you can generate Eclipse compatible project using Since PlatformIO 2.0 you can generate Qt Creator compatible project using
:option:`platformio init --ide` command: :option:`platformio init --ide` command. Please choose board type using
:ref:`cmd_boards` command and run:
.. code-block:: shell .. code-block:: shell
platformio init --ide qtcreator platformio init --ide qtcreator --board %TYPE%
Then import this project via ``File > New File or Project > Import Project`` Then import this project via ``File > New File or Project > Import Project``
and specify root directory where is located :ref:`projectconf`. and specify root directory where is located :ref:`projectconf`.

View File

@ -21,12 +21,13 @@ Integration
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Since PlatformIO 2.0 you can generate Eclipse compatible project using Since PlatformIO 2.0 you can generate Sublime Text compatible project using
:option:`platformio init --ide` command: :option:`platformio init --ide` command. Please choose board type using
:ref:`cmd_boards` command and run:
.. code-block:: shell .. code-block:: shell
platformio init --ide sublimetext platformio init --ide sublimetext --board %TYPE%
Then import this project via ``Project > Open Project...`` and specify root Then import this project via ``Project > Open Project...`` and specify root
directory where is located :ref:`projectconf`. directory where is located :ref:`projectconf`.
@ -44,7 +45,7 @@ described below:
.. code-block:: bash .. code-block:: bash
{ {
"cmd": ["platformio", "run"], "cmd": ["platformio", "--force", "run"],
"working_dir": "${project_path:${folder}}", "working_dir": "${project_path:${folder}}",
"variants": "variants":
[ [

View File

@ -21,12 +21,13 @@ Integration
Project Generator Project Generator
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^
Since PlatformIO 2.0 you can generate Eclipse compatible project using Since PlatformIO 2.0 you can generate Visual Studio compatible project using
:option:`platformio init --ide` command: :option:`platformio init --ide` command. Please choose board type using
:ref:`cmd_boards` command and run:
.. code-block:: shell .. code-block:: shell
platformio init --ide visualstudio platformio init --ide visualstudio --board %TYPE%
Then import this project via ``File->Open->Project/Solution`` and specify root Then import this project via ``File->Open->Project/Solution`` and specify root
directory where is located :ref:`projectconf`. directory where is located :ref:`projectconf`.

View File

@ -27,7 +27,7 @@ class ProjectGenerator(object):
if isdir(join(tpls_dir, d))] if isdir(join(tpls_dir, d))]
def get_project_env(self): def get_project_env(self):
data = {} data = {"env_name": "PlatformIO"}
with util.cd(self.project_dir): with util.cd(self.project_dir):
config = util.get_project_config() config = util.get_project_config()
for section in config.sections(): for section in config.sections():

View File

@ -84,7 +84,7 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProcessStep.Arguments">--force run -t clean</value> <value type="QString" key="ProjectExplorer.ProcessStep.Arguments">--force run --target clean</value>
<value type="QString" key="ProjectExplorer.ProcessStep.Command">platformio</value> <value type="QString" key="ProjectExplorer.ProcessStep.Command">platformio</value>
<value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">%{buildDir}</value> <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">%{buildDir}</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
@ -125,7 +125,7 @@
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProcessStep.Arguments">--force run -t clean</value> <value type="QString" key="ProjectExplorer.ProcessStep.Arguments">--force run --target clean</value>
<value type="QString" key="ProjectExplorer.ProcessStep.Command">platformio</value> <value type="QString" key="ProjectExplorer.ProcessStep.Command">platformio</value>
<value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">%{buildDir}</value> <value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">%{buildDir}</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>

View File

@ -5,6 +5,7 @@
"cmd": "cmd":
[ [
"platformio", "platformio",
"--force",
"run" "run"
], ],
"name": "PlatformIO", "name": "PlatformIO",

View File

@ -43,7 +43,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>platformio run</NMakeBuildCommandLine> <NMakeBuildCommandLine>platformio run</NMakeBuildCommandLine>
<NMakeCleanCommandLine>platformio run -t clean</NMakeCleanCommandLine> <NMakeCleanCommandLine>platformio run --target clean</NMakeCleanCommandLine>
<NMakePreprocessorDefinitions>{";".join(defines)}}</NMakePreprocessorDefinitions> <NMakePreprocessorDefinitions>{";".join(defines)}}</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>{{";".join(includes)}}</NMakeIncludeSearchPath> <NMakeIncludeSearchPath>{{";".join(includes)}}</NMakeIncludeSearchPath>
</PropertyGroup> </PropertyGroup>