core-plans
core-plans copied to clipboard
[windows] Fix all plans that fail to build in windows studio
Outstanding Tasks
- [ ] Identify all potential windows plans that may fail to build in windows studio. See #2773 for reference as to how this problem was solved for core/cmake.
- [ ] Create a list of plans and add to this issue.
Context
The core/cmake windows plan failed to build in windows studio, even though it successfully builds on the windows host. See #2773 for reference. Need to find and fix all plans that fail for the same reason.
Completed Tasks
- [x] Raised PR #2773 to fix issue where cmake won't build from within windows studio but will build on windows host.
The core/cmake fails to build within the windows docker studio on Azure Windows 2016 hab studio enter -D
. If, however, the build is done from the windows host, then the build succeeds. See PR #2773 for the fix.
Updated core/cmake so that it builds both on windows host and within windows docker studio. See #2773. The pattern to follow for the other plans is something like:
diff --git a/cmake/plan.ps1 b/cmake/plan.ps1
index 759f7540..b522183a 100644
--- a/cmake/plan.ps1
+++ b/cmake/plan.ps1
@@ -12,11 +12,14 @@ $pkg_build_deps=@("core/lessmsi")
$pkg_bin_dirs=@("bin")
function Invoke-Unpack {
- lessmsi x (Resolve-Path "$HAB_CACHE_SRC_PATH/$pkg_filename").Path
mkdir "$HAB_CACHE_SRC_PATH/$pkg_dirname"
- Move-Item "cmake-$pkg_version-win64-x64/SourceDir/cmake" "$HAB_CACHE_SRC_PATH/$pkg_dirname"
+ Push-Location "$HAB_CACHE_SRC_PATH/$pkg_dirname"
+ try {
+ lessmsi x (Resolve-Path "$HAB_CACHE_SRC_PATH/$pkg_filename").Path
+ }
+ finally { Pop-Location }
}
function Invoke-Install {
- Copy-Item "$HAB_CACHE_SRC_PATH/$pkg_dirname/cmake/*" "$pkg_prefix" -Recurse -Force
+ Copy-Item "$HAB_CACHE_SRC_PATH/$pkg_dirname/cmake-$pkg_version-win64-x64/SourceDir/cmake/*" "$pkg_prefix" -Recurse -Force
}