Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Add in registry key that is expected for ROS 2 Chocolatey. #205

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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