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

[MAIN] Updating the hash for a new version of the tools #270

Merged
merged 12 commits into from
Dec 18, 2024
Prev Previous commit
Next Next commit
Working!
Signed-off-by: John <[email protected]>
johnmccrae committed Dec 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit d543defc4eb0cdfb88d106d3470d4665f7e4dacc
48 changes: 48 additions & 0 deletions habitat-win-11-sdk-x64/plan.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
$pkg_name="windows-11-sdk-x64"
$pkg_origin="chef"
$pkg_version="10.0.26100"
$pkg_description="The Windows 11 SDK for Windows 11,(servicing release 10.0.26100.1742) provides the latest headers, libraries, metadata, and tools for building Windows 11 apps"
$pkg_upstream_url="https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk"
$pkg_license=@("Microsoft Software License")
$pkg_maintainer="The Habitat Maintainers <[email protected]>"
$pkg_source="https://download.microsoft.com/download/e/b/3/eb320eb1-b21e-4e6e-899e-d6aec552ecb0/KIT_BUNDLE_WINDOWSSDK_MEDIACREATION/winsdksetup.exe"
$pkg_shasum="A8E6B6CC2DCEC9FDD4C35553A4CBF288C9CE5E4761D7A2762F06A3A95F1E530D"
$pkg_build_deps=@("core/lessmsi")

$pkg_bin_dirs=@(
"Windows Kits\10\bin\x64",
"Windows Kits\10\bin\$pkg_version.0\x64"
)
$pkg_lib_dirs=@(
"Windows Kits\10\Lib\$pkg_version.0\um\x64",
"Windows Kits\10\Lib\$pkg_version.0\ucrt\x64"
)
$pkg_include_dirs=@(
"Windows Kits\10\Include\$pkg_version.0\shared",
"Windows Kits\10\Include\$pkg_version.0\ucrt",
"Windows Kits\10\Include\$pkg_version.0\um",
"Windows Kits\10\Include\$pkg_version.0\winrt"
)

function Invoke-SetupEnvironment {
Set-RuntimeEnv -IsPath "WindowsSdkDir_10" "$pkg_prefix\Windows Kits\10"
}

function Invoke-Unpack {
Start-Process "$HAB_CACHE_SRC_PATH/$pkg_filename" -Wait -ArgumentList "/features OptionId.DesktopCPPx64 /quiet /layout $HAB_CACHE_SRC_PATH/$pkg_dirname"
Push-Location "$HAB_CACHE_SRC_PATH/$pkg_dirname"
try {
Get-ChildItem "$HAB_CACHE_SRC_PATH/$pkg_dirname/installers" -Include *.msi -Recurse | ForEach-Object {
lessmsi x $_
}
} finally { Pop-Location }
Get-ChildItem "$HAB_CACHE_SRC_PATH/$pkg_dirname" -Include @("x86", "arm", "arm64") -Recurse | ForEach-Object {
Remove-Item $_ -Recurse -Force
}
}

function Invoke-Install {
Get-ChildItem "$HAB_CACHE_SRC_PATH/$pkg_dirname" -Include "Windows Kits" -Recurse | ForEach-Object {
Copy-Item $_ "$pkg_prefix" -Exclude "*.duplicate*" -Recurse -Force
}
}
21 changes: 1 addition & 20 deletions habitat/plan.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$env:HAB_BLDR_CHANNEL = "LTS-2024"
$env:MSBuildEnableWorkloadResolver = $false
$pkg_name="chef-powershell-shim"
$pkg_origin="chef"
$pkg_version="0.4.0"
@@ -18,26 +19,6 @@ function Invoke-SetupEnvironment {
Set-RuntimeEnv -IsPath "CHEF_POWERSHELL_BIN" "$pkg_prefix/bin"

Set-RuntimeEnv -IsPath "MSBuildSDKsPath" "$(Get-HabPackagePath dotnet-core-sdk)\bin\Sdk\8.0.303\Sdks"
Set-RuntimeEnv "MSBuildEnableWorkloadResolver" $false

# Begin testing here
# Write-Host "What is system path?"
# $env:Path
# $win11SdkPath = "$(Get-HabPackagePath windows-11-sdk)"
# $dotnetCoreSdkPath = "$(Get-HabPackagePath dotnet-core-sdk)"
# Write-Host "Here are my paths"
# Write-Host "win11SdkPath: $win11SdkPath"
# Write-Host "dotnetCoreSdkPath: $dotnetCoreSdkPath"
# Write-Host "Testing if the paths exist"
# Test-Path $win11SdkPath
# Test-Path $dotnetCoreSdkPath
# Write-Host "Testing if the paths are directories"
# Test-Path $win11SdkPath -PathType Container
# Test-Path $dotnetCoreSdkPath -PathType Container
# Write-Host "Finding the missing property file in Habitat"
# Get-ChildItem -Path $dotnetCoreSdkPath -Recurse -Filter "Microsoft.NET.Sdk.ImportWorkloads.props" -ErrorAction SilentlyContinue
# Write-Host "Finding the missing property file anywhere on C:"
# Get-ChildItem -Path C:\ -Recurse -Filter "Microsoft.NET.Sdk.ImportWorkloads.props" -ErrorAction SilentlyContinue
}

function Invoke-Build {