mirror of
https://github.com/msvc-win/get.msvc.win.git
synced 2025-12-16 13:17:26 +00:00
Fix the issue where emoji doesn't display in conhost
This commit is contained in:
parent
a7027ca5e8
commit
9d5727f1d6
4 changed files with 65 additions and 13 deletions
19
32
19
32
|
|
@ -1,4 +1,5 @@
|
||||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||||
|
Add-Type -AssemblyName "System.Console"
|
||||||
|
|
||||||
function Main {
|
function Main {
|
||||||
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
|
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
|
||||||
|
|
@ -119,10 +120,20 @@ function Main {
|
||||||
Write-Host "Verifying signature of $($item.Name)..."
|
Write-Host "Verifying signature of $($item.Name)..."
|
||||||
$signature = Get-AuthenticodeSignature $outFile
|
$signature = Get-AuthenticodeSignature $outFile
|
||||||
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
|
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
|
||||||
Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
|
if ($env:WT_SESSION) {
|
||||||
|
Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "[OKAY] Valid Microsoft signature found from $($item.Name)."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
if ($env:WT_SESSION) {
|
||||||
|
Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Warning "[WARN] $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
||||||
|
}
|
||||||
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
|
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
|
||||||
if ($response -eq 'Y' -or $response -eq 'y') {
|
if ($response -eq 'Y' -or $response -eq 'y') {
|
||||||
continue
|
continue
|
||||||
|
|
@ -155,4 +166,6 @@ function Main {
|
||||||
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
|
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
Main
|
Main
|
||||||
|
Write-Host "Press any key to exit."
|
||||||
|
[Console]::ReadKey($true) > $null
|
||||||
19
64
19
64
|
|
@ -1,4 +1,5 @@
|
||||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||||
|
Add-Type -AssemblyName "System.Console"
|
||||||
|
|
||||||
function Main {
|
function Main {
|
||||||
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
|
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
|
||||||
|
|
@ -140,10 +141,20 @@ function Main {
|
||||||
Write-Host "Verifying signature of $($item.Name)..."
|
Write-Host "Verifying signature of $($item.Name)..."
|
||||||
$signature = Get-AuthenticodeSignature $outFile
|
$signature = Get-AuthenticodeSignature $outFile
|
||||||
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
|
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
|
||||||
Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
|
if ($env:WT_SESSION) {
|
||||||
|
Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "[OKAY] Valid Microsoft signature found from $($item.Name)."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
if ($env:WT_SESSION) {
|
||||||
|
Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Warning "[WARN] $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
||||||
|
}
|
||||||
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
|
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
|
||||||
if ($response -eq 'Y' -or $response -eq 'y') {
|
if ($response -eq 'Y' -or $response -eq 'y') {
|
||||||
continue
|
continue
|
||||||
|
|
@ -176,4 +187,6 @@ function Main {
|
||||||
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
|
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
Main
|
Main
|
||||||
|
Write-Host "Press any key to exit."
|
||||||
|
[Console]::ReadKey($true) > $null
|
||||||
21
dx
21
dx
|
|
@ -1,4 +1,5 @@
|
||||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||||
|
Add-Type -AssemblyName "System.Console"
|
||||||
|
|
||||||
function Main {
|
function Main {
|
||||||
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
|
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
|
||||||
|
|
@ -11,7 +12,7 @@ function Main {
|
||||||
Write-Warning "This script does not support Windows RT. Exiting..."
|
Write-Warning "This script does not support Windows RT. Exiting..."
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$flagPath = "$env:TEMP\elevation_success.flag"
|
$flagPath = "$env:TEMP\elevation_success.flag"
|
||||||
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }
|
||||||
|
|
||||||
|
|
@ -116,10 +117,20 @@ function Main {
|
||||||
Write-Host "Verifying signature of $($item.Name)..."
|
Write-Host "Verifying signature of $($item.Name)..."
|
||||||
$signature = Get-AuthenticodeSignature $outFile
|
$signature = Get-AuthenticodeSignature $outFile
|
||||||
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
|
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
|
||||||
Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
|
if ($env:WT_SESSION) {
|
||||||
|
Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "[OKAY] Valid Microsoft signature found from $($item.Name)."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
if ($env:WT_SESSION) {
|
||||||
|
Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Warning "[WARN] $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
||||||
|
}
|
||||||
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
|
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
|
||||||
if ($response -eq 'Y' -or $response -eq 'y') {
|
if ($response -eq 'Y' -or $response -eq 'y') {
|
||||||
continue
|
continue
|
||||||
|
|
@ -145,4 +156,6 @@ function Main {
|
||||||
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
|
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
Main
|
Main
|
||||||
|
Write-Host "Press any key to exit."
|
||||||
|
[Console]::ReadKey($true) > $null
|
||||||
19
index.html
19
index.html
|
|
@ -2,6 +2,7 @@
|
||||||
# This script is hosted on <b>https://get.msvc.win/</b> for <b><a href="https://msvc.win/">MSVC Win Project</a></b><br />To get started, run <b>irm get.msvc.win | iex</b> inside of PowerShell<hr><pre>
|
# This script is hosted on <b>https://get.msvc.win/</b> for <b><a href="https://msvc.win/">MSVC Win Project</a></b><br />To get started, run <b>irm get.msvc.win | iex</b> inside of PowerShell<hr><pre>
|
||||||
|
|
||||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||||
|
Add-Type -AssemblyName "System.Console"
|
||||||
|
|
||||||
function Main {
|
function Main {
|
||||||
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
|
if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') {
|
||||||
|
|
@ -139,10 +140,20 @@ function Main {
|
||||||
Write-Host "Verifying signature of $($item.Name)..."
|
Write-Host "Verifying signature of $($item.Name)..."
|
||||||
$signature = Get-AuthenticodeSignature $outFile
|
$signature = Get-AuthenticodeSignature $outFile
|
||||||
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
|
if ($signature.SignerCertificate.Subject -like "*CN=Microsoft Corporation*" -and $signature.Status -eq "Valid") {
|
||||||
Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
|
if ($env:WT_SESSION) {
|
||||||
|
Write-Host "✅ Valid Microsoft signature found from $($item.Name)."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "[OKAY] Valid Microsoft signature found from $($item.Name)."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
if ($env:WT_SESSION) {
|
||||||
|
Write-Warning "⚠️ $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Warning "[WARN] $($item.Name) is not signed by Microsoft. The download may get corrupted or your PC is infected with virus."
|
||||||
|
}
|
||||||
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
|
$response = Read-Host -Prompt "Would you like to proceed anyway? (Y/N)"
|
||||||
if ($response -eq 'Y' -or $response -eq 'y') {
|
if ($response -eq 'Y' -or $response -eq 'y') {
|
||||||
continue
|
continue
|
||||||
|
|
@ -183,4 +194,6 @@ function Main {
|
||||||
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
|
Remove-Item -Path $flagPath -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
Main
|
Main
|
||||||
|
Write-Host "Press any key to exit."
|
||||||
|
[Console]::ReadKey($true) > $null
|
||||||
Loading…
Add table
Add a link
Reference in a new issue