Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
张传菲 committed Mar 15, 2024
1 parent 572052d commit 5e29368
Showing 1 changed file with 69 additions and 2 deletions.
71 changes: 69 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,76 @@ jobs:
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
git config --system core.longpaths true
$PSVersionTable.PSVersion
Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_community.exe' -OutFile 'vs_community.exe'
.\vs_community.exe --installPath 'C:\Program Files\Microsoft Visual Studio\' --passive --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended
# Invoke-WebRequest -Uri 'https://aka.ms/vs/17/release/vs_community.exe' -OutFile 'vs_community.exe'
# .\vs_community.exe --installPath 'C:\Program Files\Microsoft Visual Studio\' --passive --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended
# Get-ChildItem -Path 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\'
echo "--------------------Install Microsoft.UI.Xaml-------------------"
$SourceUrl = "https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.3"
$DestinationFile = ".\microsoft.ui.xaml.2.7.3.zip" # 保存到当前目录并保持.nupkg扩展名
$ExtractDirectory = ".\uixaml"
# 创建目标解压目录(如果不存在)
if (!(Test-Path -Path $ExtractDirectory)) {
New-Item -ItemType Directory -Path $ExtractDirectory | Out-Null
}
# 下载.nupkg文件
Invoke-WebRequest -Uri $SourceUrl -OutFile $DestinationFile
# 解压.nupkg文件到指定目录(PowerShell 5.0及以上版本支持)
Expand-Archive -Path $DestinationFile -DestinationPath $ExtractDirectory
Copy-Item -Path .\uixaml\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx -Destination .
Add-AppxPackage -Path .\Microsoft.UI.Xaml.2.7.appx
echo "------------------------Install vclibs--------------------------"
Invoke-WebRequest -Uri 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx' -OutFile '.\Microsoft.VCLibs.x64.14.00.Desktop.appx'
Add-AppxPackage -Path .\Microsoft.VCLibs.x64.14.00.Desktop.appx
echo "---------------------Install winget------------------------"
Invoke-WebRequest -Uri 'https://github.com/microsoft/winget-cli/releases/download/v1.6.3421/65f132d72c1d44518a19d1a9c3de8e1f_License1.xml' -OutFile '.\65f132d72c1d44518a19d1a9c3de8e1f_License1.xml'
Invoke-WebRequest -Uri 'https://github.com/microsoft/winget-cli/releases/download/v1.6.3421/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle' -OutFile '.\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle'
Add-AppxPackage .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Add-AppxProvisionedPackage -Online -Package .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\65f132d72c1d44518a19d1a9c3de8e1f_License1.xml
echo "---------------Install VisualStudio.2022---------------------- "
#winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--quiet --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CoreIde --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--installPath 'C:\Program Files\Microsoft Visual Studio\' --passive --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--installPath 'C:\Program Files\Microsoft Visual Studio\' --passive --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended"
winget install --source winget --id Microsoft.VisualStudio.2022.Community --override "--installPath 'C:\Program Files\Microsoft Visual Studio\' --passive --norestart --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.Windows11SDK.22621 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --includeRecommended"
echo "----------------------Install sdk 8-------------------------------"
Get-ChildItem -Path 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\'
# - name: Modifying the registry
# shell: powershell
# run: |-
Expand Down

0 comments on commit 5e29368

Please sign in to comment.