Exemplo n.º 1
0
def init_base_project(project_dir):
    ProjectConfig(join(project_dir, "platformio.ini")).save()
    with fs.cd(project_dir):
        dir_to_readme = [
            (get_project_src_dir(), None),
            (get_project_include_dir(), init_include_readme),
            (get_project_lib_dir(), init_lib_readme),
            (get_project_test_dir(), init_test_readme),
        ]
        for (path, cb) in dir_to_readme:
            if isdir(path):
                continue
            makedirs(path)
            if cb:
                cb(path)
Exemplo n.º 2
0
    tools=[
        "ar", "gas", "gcc", "g++", "gnulink", "platformio", "pioplatform",
        "pioproject", "piowinhooks", "piolib", "pioupload", "piomisc", "pioide"
    ],
    toolpath=[join(util.get_source_dir(), "builder", "tools")],
    variables=clivars,

    # Propagating External Environment
    ENV=environ,
    UNIX_TIME=int(time()),
    PROJECT_DIR=project_helpers.get_project_dir(),
    PROJECTCORE_DIR=project_helpers.get_project_core_dir(),
    PROJECTPACKAGES_DIR=project_helpers.get_project_packages_dir(),
    PROJECTWORKSPACE_DIR=project_helpers.get_project_workspace_dir(),
    PROJECTLIBDEPS_DIR=project_helpers.get_project_libdeps_dir(),
    PROJECTINCLUDE_DIR=project_helpers.get_project_include_dir(),
    PROJECTSRC_DIR=project_helpers.get_project_src_dir(),
    PROJECTTEST_DIR=project_helpers.get_project_test_dir(),
    PROJECTDATA_DIR=project_helpers.get_project_data_dir(),
    PROJECTBUILD_DIR=project_helpers.get_project_build_dir(),
    BUILDCACHE_DIR=project_helpers.get_project_optional_dir("build_cache_dir"),
    BUILD_DIR=join("$PROJECTBUILD_DIR", "$PIOENV"),
    BUILDSRC_DIR=join("$BUILD_DIR", "src"),
    BUILDTEST_DIR=join("$BUILD_DIR", "test"),
    LIBPATH=["$BUILD_DIR"],
    LIBSOURCE_DIRS=[
        project_helpers.get_project_lib_dir(),
        join("$PROJECTLIBDEPS_DIR", "$PIOENV"),
        project_helpers.get_project_global_lib_dir()
    ],
    PROGNAME="program",