Skip to content

Commit

Permalink
Windows: Add in registry key that is expected for ROS 2 Chocolatey. (#…
Browse files Browse the repository at this point in the history
…205)

The comment has more information about why.

Signed-off-by: Chris Lalancette <[email protected]>

Co-authored-by: Emerson Knapp <[email protected]>
  • Loading branch information
clalancette and emersonknapp authored Jun 26, 2020
1 parent 7144142 commit b1c8132
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4208,6 +4208,13 @@ exports.installChocoDependencies = installChocoDependencies;
function downloadAndInstallRos2NugetPackages() {
return __awaiter(this, void 0, void 0, function* () {
yield utils.exec("wget", ["--quiet"].concat(ros2ChocolateyPackagesUrl));
// The ROS 2 NUGET Chocolatey packages expect a registry entry of
// HKCU\SOFTWARE\Kitware\CMake to exist; if it doesn't, they don't
// properly register themselves with CMake and thus downstream software
// can't properly find them. The Windows image that is currently available
// to GitHub actions (https://github.com/actions/virtual-environments/blob/win19/20200608.1/images/win/Windows2019-Readme.md)
// doesn't seem to have this key, so add it by hand here.
yield utils.exec("reg", ["add", "HKCU\\SOFTWARE\\Kitware\\CMake", "/f"]);
return utils.exec("choco", chocoCommandLine.concat("--source", ".").concat(ros2ChocolateyPackages));
});
}
Expand Down Expand Up @@ -5923,4 +5930,4 @@ exports.runOsX = runOsX;

/***/ })

/******/ });
/******/ });
7 changes: 7 additions & 0 deletions src/package_manager/chocolatey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ export async function installChocoDependencies(): Promise<number> {
*/
export async function downloadAndInstallRos2NugetPackages(): Promise<number> {
await utils.exec("wget", ["--quiet"].concat(ros2ChocolateyPackagesUrl));
// The ROS 2 NUGET Chocolatey packages expect a registry entry of
// HKCU\SOFTWARE\Kitware\CMake to exist; if it doesn't, they don't
// properly register themselves with CMake and thus downstream software
// can't properly find them. The Windows image that is currently available
// to GitHub actions (https://github.com/actions/virtual-environments/blob/win19/20200608.1/images/win/Windows2019-Readme.md)
// doesn't seem to have this key, so add it by hand here.
await utils.exec("reg", ["add", "HKCU\\SOFTWARE\\Kitware\\CMake", "/f"]);
return utils.exec(
"choco",
chocoCommandLine.concat("--source", ".").concat(ros2ChocolateyPackages)
Expand Down

0 comments on commit b1c8132

Please sign in to comment.