diff --git a/examples/extensions/deployers/dev/development_deploy.rst b/examples/extensions/deployers/dev/development_deploy.rst index 8d0c4a315d37..01d3a13db977 100644 --- a/examples/extensions/deployers/dev/development_deploy.rst +++ b/examples/extensions/deployers/dev/development_deploy.rst @@ -69,6 +69,8 @@ This will create the following folders: β”‚ β”œβ”€β”€lib +(Note that you could use the ``--deployer-folder`` argument to change the base folder output path for the deployer) + This folder is fully self-contained. It contains both the necessary tools (like ``cmake`` executable), the headers and compiled libraries of ``zlib`` and the necessary files like ``ZLibConfig.cmake`` in the ``build/generators`` folder, that point to the binaries inside ``full_deploy`` with a relative path. The Conan cache can be removed, and even Conan uninstalled, then the folder could be moved elsewhere in the computer or copied to another computer, assuming it has the same configuration of OS, compiler, etc. diff --git a/examples/extensions/deployers/sources/custom_deployer_sources.rst b/examples/extensions/deployers/sources/custom_deployer_sources.rst index c58f5a1798da..fc8648f0cb12 100644 --- a/examples/extensions/deployers/sources/custom_deployer_sources.rst +++ b/examples/extensions/deployers/sources/custom_deployer_sources.rst @@ -53,6 +53,8 @@ Inspecting the command output we can see that it copied the sources of our direc **plus** the sources of our transitive dependencies, ``zstd`` and ``lz4`` to a ``dependencies_sources`` folder. After this is done, extra preprocessing could be done to accomplish more specific needs. +Note that you can pass the ``--deployer-folder`` argument to change the base folder output path for the deployer. + Code tour --------- diff --git a/reference/commands/graph/info.rst b/reference/commands/graph/info.rst index 2d0da5b068c7..a1f943c7f73c 100644 --- a/reference/commands/graph/info.rst +++ b/reference/commands/graph/info.rst @@ -17,35 +17,37 @@ conan graph info [-c CONF_HOST] [-c:b CONF_BUILD] [-c:h CONF_HOST] [-l LOCKFILE] [--lockfile-partial] [--lockfile-out LOCKFILE_OUT] [--lockfile-packages] - [--lockfile-clean] [--check-updates] [--filter FILTER] + [--lockfile-clean] + [--lockfile-overrides LOCKFILE_OVERRIDES] + [--check-updates] [--filter FILTER] [--package-filter PACKAGE_FILTER] [-d DEPLOYER] - [--build-require] + [-df DEPLOYER_FOLDER] [--build-require] [path] Compute the dependency graph and show information about it. positional arguments: - path Path to a folder containing a recipe (conanfile.py or + path Path to a folder containing a recipe (conanfile.py or conanfile.txt) or to a recipe file. e.g., ./my_project/conanfile.txt. optional arguments: - -h, --help show this help message and exit - -f FORMAT, --format FORMAT + -h, --help show this help message and exit + -f FORMAT, --format FORMAT Select the output format: html, json, dot - -v [V] Level of detail of the output. Valid options from less + -v [V] Level of detail of the output. Valid options from less verbose to more verbose: -vquiet, -verror, -vwarning, -vnotice, -vstatus, -v or -vverbose, -vv or -vdebug, -vvv or -vtrace - --name NAME Provide a package name if not specified in conanfile - --version VERSION Provide a package version if not specified in + --name NAME Provide a package name if not specified in conanfile + --version VERSION Provide a package version if not specified in conanfile - --user USER Provide a user if not specified in conanfile - --channel CHANNEL Provide a channel if not specified in conanfile - --requires REQUIRES Directly provide requires instead of a conanfile - --tool-requires TOOL_REQUIRES + --user USER Provide a user if not specified in conanfile + --channel CHANNEL Provide a channel if not specified in conanfile + --requires REQUIRES Directly provide requires instead of a conanfile + --tool-requires TOOL_REQUIRES Directly provide tool-requires instead of a conanfile - -b BUILD, --build BUILD + -b BUILD, --build BUILD Optional, specify which packages to build from source. Combining multiple '--build' options on one command line is allowed. Possible values: --build="*" Force @@ -58,76 +60,82 @@ conan graph info have at least one dependency being built from source. --build=[pattern] Build packages from source whose package reference matches the pattern. The pattern - uses 'fnmatch' style wildcards. --build=![pattern] + uses 'fnmatch' style wildcards. --build=~[pattern] Excluded packages, which will not be built from the source, whose package reference matches the pattern. The pattern uses 'fnmatch' style wildcards. --build=missing:[pattern] Build from source if a compatible binary does not exist, only for packages matching pattern. - -r REMOTE, --remote REMOTE + -r REMOTE, --remote REMOTE Look in the specified remote or remotes server - -nr, --no-remote Do not use remote, resolve exclusively in the cache - -u, --update Will check the remote and in case a newer version + -nr, --no-remote Do not use remote, resolve exclusively in the cache + -u, --update Will check the remote and in case a newer version and/or revision of the dependencies exists there, it will install those in the local cache. When using version ranges, it will install the latest version that satisfies the range. Also, if using revisions, it will update to the latest revision for the resolved version range. - -o OPTIONS_HOST, --options OPTIONS_HOST + -o OPTIONS_HOST, --options OPTIONS_HOST Define options values (host machine), e.g.: -o Pkg:with_qt=true - -o:b OPTIONS_BUILD, --options:build OPTIONS_BUILD + -o:b OPTIONS_BUILD, --options:build OPTIONS_BUILD Define options values (build machine), e.g.: -o:b Pkg:with_qt=true - -o:h OPTIONS_HOST, --options:host OPTIONS_HOST + -o:h OPTIONS_HOST, --options:host OPTIONS_HOST Define options values (host machine), e.g.: -o:h Pkg:with_qt=true - -pr PROFILE_HOST, --profile PROFILE_HOST + -pr PROFILE_HOST, --profile PROFILE_HOST Apply the specified profile to the host machine - -pr:b PROFILE_BUILD, --profile:build PROFILE_BUILD + -pr:b PROFILE_BUILD, --profile:build PROFILE_BUILD Apply the specified profile to the build machine - -pr:h PROFILE_HOST, --profile:host PROFILE_HOST + -pr:h PROFILE_HOST, --profile:host PROFILE_HOST Apply the specified profile to the host machine - -s SETTINGS_HOST, --settings SETTINGS_HOST + -s SETTINGS_HOST, --settings SETTINGS_HOST Settings to build the package, overwriting the defaults (host machine). e.g.: -s compiler=gcc - -s:b SETTINGS_BUILD, --settings:build SETTINGS_BUILD + -s:b SETTINGS_BUILD, --settings:build SETTINGS_BUILD Settings to build the package, overwriting the defaults (build machine). e.g.: -s:b compiler=gcc - -s:h SETTINGS_HOST, --settings:host SETTINGS_HOST + -s:h SETTINGS_HOST, --settings:host SETTINGS_HOST Settings to build the package, overwriting the defaults (host machine). e.g.: -s:h compiler=gcc - -c CONF_HOST, --conf CONF_HOST + -c CONF_HOST, --conf CONF_HOST Configuration to build the package, overwriting the defaults (host machine). e.g.: -c tools.cmake.cmaketoolchain:generator=Xcode - -c:b CONF_BUILD, --conf:build CONF_BUILD + -c:b CONF_BUILD, --conf:build CONF_BUILD Configuration to build the package, overwriting the defaults (build machine). e.g.: -c:b tools.cmake.cmaketoolchain:generator=Xcode - -c:h CONF_HOST, --conf:host CONF_HOST + -c:h CONF_HOST, --conf:host CONF_HOST Configuration to build the package, overwriting the defaults (host machine). e.g.: -c:h tools.cmake.cmaketoolchain:generator=Xcode - -l LOCKFILE, --lockfile LOCKFILE + -l LOCKFILE, --lockfile LOCKFILE Path to a lockfile. Use --lockfile="" to avoid automatic use of existing 'conan.lock' file - --lockfile-partial Do not raise an error if some dependency is not found + --lockfile-partial Do not raise an error if some dependency is not found in lockfile - --lockfile-out LOCKFILE_OUT + --lockfile-out LOCKFILE_OUT Filename of the updated lockfile - --lockfile-packages Lock package-id and package-revision information - --lockfile-clean Remove unused entries from the lockfile - --check-updates Check if there are recipe updates - --filter FILTER Show only the specified fields - --package-filter PACKAGE_FILTER + --lockfile-packages Lock package-id and package-revision information + --lockfile-clean Remove unused entries from the lockfile + --lockfile-overrides LOCKFILE_OVERRIDES + Overwrite lockfile overrides + --check-updates Check if there are recipe updates + --filter FILTER Show only the specified fields + --package-filter PACKAGE_FILTER Print information only for packages that match the patterns - -d DEPLOYER, --deployer DEPLOYER - Deploy using the provided deployer to the output folder - --build-require Whether the provided reference is a build-require + -d DEPLOYER, --deployer DEPLOYER + Deploy using the provided deployer to the output + folder + -df DEPLOYER_FOLDER, --deployer-folder DEPLOYER_FOLDER + Deployer output folder, base build folder by default + if not set + --build-require Whether the provided reference is a build-require The ``conan graph info`` command shows information about the dependency graph for the recipe specified in ``path``. diff --git a/reference/commands/install.rst b/reference/commands/install.rst index 026ac7c0124f..fe3df02f61a7 100644 --- a/reference/commands/install.rst +++ b/reference/commands/install.rst @@ -6,19 +6,21 @@ conan install .. code-block:: text $ conan install -h - usage: conan install [-h] [-f FORMAT] [-v [V]] [--name NAME] - [--version VERSION] [--user USER] [--channel CHANNEL] - [--requires REQUIRES] [--tool-requires TOOL_REQUIRES] - [-b BUILD] [-r REMOTE | -nr] [-u] [-o OPTIONS_HOST] - [-o:b OPTIONS_BUILD] [-o:h OPTIONS_HOST] - [-pr PROFILE_HOST] [-pr:b PROFILE_BUILD] - [-pr:h PROFILE_HOST] [-s SETTINGS_HOST] - [-s:b SETTINGS_BUILD] [-s:h SETTINGS_HOST] [-c CONF_HOST] - [-c:b CONF_BUILD] [-c:h CONF_HOST] [-l LOCKFILE] - [--lockfile-partial] [--lockfile-out LOCKFILE_OUT] - [--lockfile-packages] [--lockfile-clean] [-g GENERATOR] - [-of OUTPUT_FOLDER] [-d DEPLOYER] [--build-require] - [path] + usage: conan install [-h] [-v [V]] [-f FORMAT] [--name NAME] + [--version VERSION] [--user USER] [--channel CHANNEL] + [--requires REQUIRES] [--tool-requires TOOL_REQUIRES] + [-b BUILD] [-r REMOTE | -nr] [-u] [-o OPTIONS_HOST] + [-o:b OPTIONS_BUILD] [-o:h OPTIONS_HOST] + [-pr PROFILE_HOST] [-pr:b PROFILE_BUILD] + [-pr:h PROFILE_HOST] [-s SETTINGS_HOST] + [-s:b SETTINGS_BUILD] [-s:h SETTINGS_HOST] [-c CONF_HOST] + [-c:b CONF_BUILD] [-c:h CONF_HOST] [-l LOCKFILE] + [--lockfile-partial] [--lockfile-out LOCKFILE_OUT] + [--lockfile-packages] [--lockfile-clean] + [--lockfile-overrides LOCKFILE_OVERRIDES] [-g GENERATOR] + [-of OUTPUT_FOLDER] [-d DEPLOYER] + [--deployer-folder DEPLOYER_FOLDER] [--build-require] + [path] Install the requirements specified in a recipe (conanfile.py or conanfile.txt). @@ -33,27 +35,27 @@ conan install generators. positional arguments: - path Path to a folder containing a recipe (conanfile.py or + path Path to a folder containing a recipe (conanfile.py or conanfile.txt) or to a recipe file. e.g., ./my_project/conanfile.txt. optional arguments: - -h, --help show this help message and exit - -f FORMAT, --format FORMAT - Select the output format: json - -v [V] Level of detail of the output. Valid options from less + -h, --help show this help message and exit + -v [V] Level of detail of the output. Valid options from less verbose to more verbose: -vquiet, -verror, -vwarning, -vnotice, -vstatus, -v or -vverbose, -vv or -vdebug, -vvv or -vtrace - --name NAME Provide a package name if not specified in conanfile - --version VERSION Provide a package version if not specified in + -f FORMAT, --format FORMAT + Select the output format: json + --name NAME Provide a package name if not specified in conanfile + --version VERSION Provide a package version if not specified in conanfile - --user USER Provide a user if not specified in conanfile - --channel CHANNEL Provide a channel if not specified in conanfile - --requires REQUIRES Directly provide requires instead of a conanfile - --tool-requires TOOL_REQUIRES + --user USER Provide a user if not specified in conanfile + --channel CHANNEL Provide a channel if not specified in conanfile + --requires REQUIRES Directly provide requires instead of a conanfile + --tool-requires TOOL_REQUIRES Directly provide tool-requires instead of a conanfile - -b BUILD, --build BUILD + -b BUILD, --build BUILD Optional, specify which packages to build from source. Combining multiple '--build' options on one command line is allowed. Possible values: --build="*" Force @@ -66,75 +68,81 @@ conan install have at least one dependency being built from source. --build=[pattern] Build packages from source whose package reference matches the pattern. The pattern - uses 'fnmatch' style wildcards. --build=![pattern] + uses 'fnmatch' style wildcards. --build=~[pattern] Excluded packages, which will not be built from the source, whose package reference matches the pattern. The pattern uses 'fnmatch' style wildcards. --build=missing:[pattern] Build from source if a compatible binary does not exist, only for packages matching pattern. - -r REMOTE, --remote REMOTE + -r REMOTE, --remote REMOTE Look in the specified remote or remotes server - -nr, --no-remote Do not use remote, resolve exclusively in the cache - -u, --update Will check the remote and in case a newer version + -nr, --no-remote Do not use remote, resolve exclusively in the cache + -u, --update Will check the remote and in case a newer version and/or revision of the dependencies exists there, it will install those in the local cache. When using version ranges, it will install the latest version that satisfies the range. Also, if using revisions, it will update to the latest revision for the resolved version range. - -o OPTIONS_HOST, --options OPTIONS_HOST + -o OPTIONS_HOST, --options OPTIONS_HOST Define options values (host machine), e.g.: -o Pkg:with_qt=true - -o:b OPTIONS_BUILD, --options:build OPTIONS_BUILD + -o:b OPTIONS_BUILD, --options:build OPTIONS_BUILD Define options values (build machine), e.g.: -o:b Pkg:with_qt=true - -o:h OPTIONS_HOST, --options:host OPTIONS_HOST + -o:h OPTIONS_HOST, --options:host OPTIONS_HOST Define options values (host machine), e.g.: -o:h Pkg:with_qt=true - -pr PROFILE_HOST, --profile PROFILE_HOST + -pr PROFILE_HOST, --profile PROFILE_HOST Apply the specified profile to the host machine - -pr:b PROFILE_BUILD, --profile:build PROFILE_BUILD + -pr:b PROFILE_BUILD, --profile:build PROFILE_BUILD Apply the specified profile to the build machine - -pr:h PROFILE_HOST, --profile:host PROFILE_HOST + -pr:h PROFILE_HOST, --profile:host PROFILE_HOST Apply the specified profile to the host machine - -s SETTINGS_HOST, --settings SETTINGS_HOST + -s SETTINGS_HOST, --settings SETTINGS_HOST Settings to build the package, overwriting the defaults (host machine). e.g.: -s compiler=gcc - -s:b SETTINGS_BUILD, --settings:build SETTINGS_BUILD + -s:b SETTINGS_BUILD, --settings:build SETTINGS_BUILD Settings to build the package, overwriting the defaults (build machine). e.g.: -s:b compiler=gcc - -s:h SETTINGS_HOST, --settings:host SETTINGS_HOST + -s:h SETTINGS_HOST, --settings:host SETTINGS_HOST Settings to build the package, overwriting the defaults (host machine). e.g.: -s:h compiler=gcc - -c CONF_HOST, --conf CONF_HOST + -c CONF_HOST, --conf CONF_HOST Configuration to build the package, overwriting the defaults (host machine). e.g.: -c tools.cmake.cmaketoolchain:generator=Xcode - -c:b CONF_BUILD, --conf:build CONF_BUILD + -c:b CONF_BUILD, --conf:build CONF_BUILD Configuration to build the package, overwriting the defaults (build machine). e.g.: -c:b tools.cmake.cmaketoolchain:generator=Xcode - -c:h CONF_HOST, --conf:host CONF_HOST + -c:h CONF_HOST, --conf:host CONF_HOST Configuration to build the package, overwriting the defaults (host machine). e.g.: -c:h tools.cmake.cmaketoolchain:generator=Xcode - -l LOCKFILE, --lockfile LOCKFILE + -l LOCKFILE, --lockfile LOCKFILE Path to a lockfile. Use --lockfile="" to avoid automatic use of existing 'conan.lock' file - --lockfile-partial Do not raise an error if some dependency is not found + --lockfile-partial Do not raise an error if some dependency is not found in lockfile - --lockfile-out LOCKFILE_OUT + --lockfile-out LOCKFILE_OUT Filename of the updated lockfile - --lockfile-packages Lock package-id and package-revision information - --lockfile-clean Remove unused entries from the lockfile - -g GENERATOR, --generator GENERATOR + --lockfile-packages Lock package-id and package-revision information + --lockfile-clean Remove unused entries from the lockfile + --lockfile-overrides LOCKFILE_OVERRIDES + Overwrite lockfile overrides + -g GENERATOR, --generator GENERATOR Generators to use - -of OUTPUT_FOLDER, --output-folder OUTPUT_FOLDER + -of OUTPUT_FOLDER, --output-folder OUTPUT_FOLDER The root output folder for generated and build files - -d DEPLOYER, --deployer DEPLOYER - Deploy using the provided deployer to the output folder - --build-require Whether the provided reference is a build-require + -d DEPLOYER, --deployer DEPLOYER + Deploy using the provided deployer to the output + folder + --deployer-folder DEPLOYER_FOLDER + Deployer output folder, base build folder by default + if not set + --build-require Whether the provided reference is a build-require The ``conan install`` command is one of the main Conan commands, and it is used to resolve and install dependencies. diff --git a/reference/extensions/deployers.rst b/reference/extensions/deployers.rst index 877312e0f3eb..314c3500e044 100644 --- a/reference/extensions/deployers.rst +++ b/reference/extensions/deployers.rst @@ -16,6 +16,7 @@ and they will be ran in order of appearance. Deployers can be multi-configuration. Running ``conan install . --deployer=full_deploy`` repeatedly for different profiles can achieve a fully self-contained project, including all the artifacts, binaries, and build files. This project will be completely independent of Conan and no longer require it at all to build. +Use the ``--deployer-folder`` argument to change the base folder output path for the deployer as desired. Built-in deployers