Skip to content

Commit

Permalink
Merge pull request #2444 from pauby/cmake/clarify-path-text
Browse files Browse the repository at this point in the history
(cmake)(cmake.install) Clarify the text around the PATH
  • Loading branch information
gep13 authored Mar 21, 2024
2 parents 7f66ab2 + db1dc62 commit f3e307d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
6 changes: 6 additions & 0 deletions automatic/cmake.install/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CMake is an open-source, cross-platform family of tools designed to build, test
[Development](https://www.cmake.org/developer-resources/)

#### MSI Properties

`ADD_CMAKE_TO_PATH`
- `None` - Do not add CMake to PATH (default)
- `System` - Add CMake to system PATH for __all users__
Expand All @@ -19,3 +20,8 @@ CMake is an open-source, cross-platform family of tools designed to build, test
- `1` = Install for all users (default)

For example: `choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'`

## Notes

- This package [follows the installer default behavior](https://gitlab.kitware.com/cmake/cmake/-/issues/21465) of not adding the `cmake.exe` to the PATH. If you need `cmake.exe` on the path, please see the **MSI Properties** example, above, or install the [`cmake.portable` package](https://community.chocolatey.org/packages/cmake.portable).
- **If the package is out of date please check [Version History](#versionhistory) for the latest submitted version. If you have a question, please ask it in [Chocolatey Community Package Discussions](https://github.com/chocolatey-community/chocolatey-packages/discussions) or raise an issue on the [Chocolatey Community Packages Repository](https://github.com/chocolatey-community/chocolatey-packages/issues) if you have problems with the package. Disqus comments will generally not be responded to.**
4 changes: 4 additions & 0 deletions automatic/cmake.install/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ $packageArgs = @{
Install-ChocolateyInstallPackage @packageArgs

Get-ChildItem $toolsPath\*.msi | ForEach-Object { Remove-Item $_ -ea 0; if (Test-Path $_) { Set-Content "$_.ignore" '' } }

Write-Warning "Note that this package follows the default behaviour of the 'cmake' installer and does not add cmake.exe to the PATH."
Write-Warning "Please see https://gitlab.kitware.com/cmake/cmake/-/issues/21465 for more information."
Write-Warning "If you need cmake.exe on the PATH, please see the package description at https://community.chocolatey.org/packages/cmake.install/#description for options."
2 changes: 1 addition & 1 deletion automatic/cmake.portable/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. The suite of CMake tools were created by Kitware in response to the need for a powerful, cross-platform build environment for open-source projects such as ITK and VTK.

[Development](https://www.cmake.org/developer-resources/)
[Development](https://www.cmake.org/developer-resources/)
8 changes: 7 additions & 1 deletion automatic/cmake/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CMake is an open-source, cross-platform family of tools designed to build, test
[Development](https://www.cmake.org/developer-resources/)

#### MSI Properties

`ADD_CMAKE_TO_PATH`
- `None` - Do not add CMake to PATH (default)
- `System` - Add CMake to system PATH for __all users__
Expand All @@ -18,4 +19,9 @@ CMake is an open-source, cross-platform family of tools designed to build, test
- `0` = Install for the current user only
- `1` = Install for all users (default)

For example: `choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'`
For example: `choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' --apply-install-arguments-to-dependencies`

## Notes

- This package installs `cmake.install` which [follows the installer default behavior](https://gitlab.kitware.com/cmake/cmake/-/issues/21465) of not adding the `cmake.exe` to the PATH. If you need `cmake.exe` on the path, please see the **MSI Properties** example, above, or install the [`cmake.portable` package](https://community.chocolatey.org/packages/cmake.portable).
- **If the package is out of date please check [Version History](#versionhistory) for the latest submitted version. If you have a question, please ask it in [Chocolatey Community Package Discussions](https://github.com/chocolatey-community/chocolatey-packages/discussions) or raise an issue on the [Chocolatey Community Packages Repository](https://github.com/chocolatey-community/chocolatey-packages/issues) if you have problems with the package. Disqus comments will generally not be responded to.**

0 comments on commit f3e307d

Please sign in to comment.