forked from platformio/platformio-core
Fix double quotes in defines for Project Generator // Issue #294
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
# See LICENSE for details.
|
# See LICENSE for details.
|
||||||
|
|
||||||
VERSION = (2, 3, "3.dev1")
|
VERSION = (2, 3, "3.dev2")
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -147,7 +147,7 @@ def DumpIDEData(env):
|
|||||||
for item in env.get("CPPDEFINES", []):
|
for item in env.get("CPPDEFINES", []):
|
||||||
if isinstance(item, list):
|
if isinstance(item, list):
|
||||||
item = "=".join(item)
|
item = "=".join(item)
|
||||||
data['defines'].append(env.subst(item))
|
data['defines'].append(env.subst(item).replace('\\"', '"'))
|
||||||
|
|
||||||
# special symbol for Atmel AVR MCU
|
# special symbol for Atmel AVR MCU
|
||||||
board = env.get("BOARD_OPTIONS", {})
|
board = env.get("BOARD_OPTIONS", {})
|
||||||
|
@ -125,6 +125,7 @@ class ProjectGenerator(object):
|
|||||||
"env_pathsep": os.pathsep,
|
"env_pathsep": os.pathsep,
|
||||||
"env_path": self._fix_os_path(os.getenv("PATH"))
|
"env_path": self._fix_os_path(os.getenv("PATH"))
|
||||||
})
|
})
|
||||||
|
print self._tplvars
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _fix_os_path(path):
|
def _fix_os_path(path):
|
||||||
|
@ -13,7 +13,7 @@ include_directories("{{include}}")
|
|||||||
% end
|
% end
|
||||||
|
|
||||||
% for define in defines:
|
% for define in defines:
|
||||||
add_definitions(-D{{define}})
|
add_definitions(-D{{!define}})
|
||||||
% end
|
% end
|
||||||
|
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
|
@ -41,13 +41,13 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<NMakeBuildCommandLine>platformio -f -c visualstudio run</NMakeBuildCommandLine>
|
<NMakeBuildCommandLine>platformio -f -c visualstudio run</NMakeBuildCommandLine>
|
||||||
<NMakeCleanCommandLine>platformio -f -c visualstudio run --target clean</NMakeCleanCommandLine>
|
<NMakeCleanCommandLine>platformio -f -c visualstudio run --target clean</NMakeCleanCommandLine>
|
||||||
<NMakePreprocessorDefinitions>{{";".join(defines)}}</NMakePreprocessorDefinitions>
|
<NMakePreprocessorDefinitions>{{!";".join(defines)}}</NMakePreprocessorDefinitions>
|
||||||
<NMakeIncludeSearchPath>{{";".join(["$(HOMEDRIVE)$(HOMEPATH)%s" % i.replace(user_home_dir, "") if i.startswith(user_home_dir) else i for i in includes])}}</NMakeIncludeSearchPath>
|
<NMakeIncludeSearchPath>{{";".join(["$(HOMEDRIVE)$(HOMEPATH)%s" % i.replace(user_home_dir, "") if i.startswith(user_home_dir) else i for i in includes])}}</NMakeIncludeSearchPath>
|
||||||
</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 --target clean</NMakeCleanCommandLine>
|
<NMakeCleanCommandLine>platformio run --target clean</NMakeCleanCommandLine>
|
||||||
<NMakePreprocessorDefinitions>{";".join(defines)}}</NMakePreprocessorDefinitions>
|
<NMakePreprocessorDefinitions>{{!";".join(defines)}}</NMakePreprocessorDefinitions>
|
||||||
<NMakeIncludeSearchPath>{{";".join(["$(HOMEDRIVE)$(HOMEPATH)%s" % i.replace(user_home_dir, "") if i.startswith(user_home_dir) else i for i in includes])}}</NMakeIncludeSearchPath>
|
<NMakeIncludeSearchPath>{{";".join(["$(HOMEDRIVE)$(HOMEPATH)%s" % i.replace(user_home_dir, "") if i.startswith(user_home_dir) else i for i in includes])}}</NMakeIncludeSearchPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
|
Reference in New Issue
Block a user