From c416d5b980be81fad330cdc714dbc1fa49a671ff Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Thu, 7 Jul 2022 01:46:38 +0300 Subject: [PATCH 01/39] Create windows.ps1 --- windows.ps1 | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 windows.ps1 diff --git a/windows.ps1 b/windows.ps1 new file mode 100644 index 0000000..e8e8d73 --- /dev/null +++ b/windows.ps1 @@ -0,0 +1,94 @@ +# if this file cannot run by execution policy, copy this line below and paste into powershell window then drag-drop this script into window and it will run +Set-ExecutionPolicy Bypass -scope Process -Force + +# for admin privileges if isn't running as an admin +if (!(New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) +{ + #elevate script and exit current non-elevated runtime + Start-Process -FilePath 'powershell' -ArgumentList ('-File', $MyInvocation.MyCommand.Source, $args | %{ $_ }) -Verb RunAs + exit +} + +$choice = Read-Host "Press enter to install C++ related tools, ctrl-c to cancel" + +if($choice -ne "") +{ + exit +} + +$buildNum = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ReleaseId + +if($buildNum -lt 1809) +{ + Write-Error "Your Win10 build number is older than 1809, please upgrade it and try again." + exit +} +else +{ + Write-Host "Build $buildNum is OK" +} + +$cmdName = "winget" +$vclibPath = "$pwd/Microsoft.VCLibs.x64.14.00.Desktop.appx" +$wingetPath = "$pwd/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" + +if (!(Get-Command $cmdName -errorAction SilentlyContinue)) +{ + Write-Error "$cmdName not exists" + Write-Host "Downloading $cmdName" + Out-File -FilePath "$pwd/.winget" + Import-Module BitsTransfer + Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Destination $wingetPath + Start-BitsTransfer -Source "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" -Destination $vclibPath + Write-Host "Installing $cmdName" + Add-AppxPackage -Path $wingetPath -DependencyPath $vclibPath + + # cleanup winget setup files + Remove-Item $vclibPath + Remove-Item $wingetPath +} + + +winget install code --silent --accept-package-agreements --accept-source-agreements +winget install Git.git --silent --accept-package-agreements --accept-source-agreements +winget install python3 --silent --accept-package-agreements --accept-source-agreements +winget install cppcheck --silent --accept-package-agreements --accept-source-agreements + +$vsconfig = "{ + `"version`": `"1.0`",` + `"components`": [ + `"Microsoft.VisualStudio.Component.Roslyn.Compiler`",` + `"Microsoft.Component.MSBuild`",` + `"Microsoft.VisualStudio.Component.CoreBuildTools`",` + `"Microsoft.VisualStudio.Workload.MSBuildTools`",` + `"Microsoft.VisualStudio.Component.Windows10SDK`",` + `"Microsoft.VisualStudio.Component.VC.CoreBuildTools`",` + `"Microsoft.VisualStudio.Component.VC.Tools.x86.x64`",` + `"Microsoft.VisualStudio.Component.VC.Redist.14.Latest`",` + `"Microsoft.VisualStudio.Component.Windows10SDK.19041`",` + `"Microsoft.VisualStudio.Component.VC.CMake.Project`",` + `"Microsoft.VisualStudio.Component.TestTools.BuildTools`",` + `"Microsoft.VisualStudio.Component.VC.ATL`",` + `"Microsoft.VisualStudio.Component.VC.ASAN`",` + `"Microsoft.VisualStudio.Component.VC.Modules.x86.x64`",` + `"Microsoft.VisualStudio.Component.TextTemplating`",` + `"Microsoft.VisualStudio.Component.VC.CoreIde`",` + `"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core`",` + `"Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset`",` + `"Microsoft.VisualStudio.Workload.VCTools`"` + ] +}" + +Out-File -FilePath $pwd/.vsconfig -InputObject $vsconfig + +winget install "Visual Studio Build Tools 2022" --silent --accept-package-agreements --override "--config $pwd/.vsconfig --installPath C:/VS2022-BuildTools --quiet --wait" + +Remove-Item "$pwd/.vsconfig" + +$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") + +code --install-extension ms-vscode.cpptools-extension-pack --install-extension jeff-hykin.better-cpp-syntax --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format + +pip install --user conan ninja cmake + +exit From b2f72722545803f5e07c2735c43ead9be59a8e3c Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Thu, 7 Jul 2022 01:50:08 +0300 Subject: [PATCH 02/39] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 26809d3..7793359 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,11 @@ bash <(wget -qO- https://raw.githubusercontent.com/cpp-best-practices/setup-cpp/ bash <(wget -qO- https://raw.githubusercontent.com/cpp-best-practices/setup-cpp/main/arch-manjaro.sh) ``` +## Windows (10/11) + +```powershell +Set-ExecutionPolicy Bypass -scope Process -Force +Import-Module BitsTransfer +Start-BitsTransfer -Source "https://raw.githubusercontent.com/mguludag/setup-cpp/main/windows.ps1" -Destination $pwd/windows.ps1 +$pwd/windows.ps1 +``` From 6e3ada4b909b43f93fa77196cd1531bbecc2b922 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Thu, 7 Jul 2022 01:51:37 +0300 Subject: [PATCH 03/39] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7793359..e2a31ee 100644 --- a/README.md +++ b/README.md @@ -19,5 +19,5 @@ bash <(wget -qO- https://raw.githubusercontent.com/cpp-best-practices/setup-cpp/ Set-ExecutionPolicy Bypass -scope Process -Force Import-Module BitsTransfer Start-BitsTransfer -Source "https://raw.githubusercontent.com/mguludag/setup-cpp/main/windows.ps1" -Destination $pwd/windows.ps1 -$pwd/windows.ps1 +./windows.ps1 ``` From f58154ed01aa78035245ecc8e2a626732c28f271 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Thu, 7 Jul 2022 01:51:55 +0300 Subject: [PATCH 04/39] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e2a31ee..13e409b 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,5 @@ Set-ExecutionPolicy Bypass -scope Process -Force Import-Module BitsTransfer Start-BitsTransfer -Source "https://raw.githubusercontent.com/mguludag/setup-cpp/main/windows.ps1" -Destination $pwd/windows.ps1 ./windows.ps1 + ``` From 3bee1c617a0d5b3b327cb7b4650d610aaf145199 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Thu, 7 Jul 2022 01:54:13 +0300 Subject: [PATCH 05/39] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 13e409b..4326eee 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ bash <(wget -qO- https://raw.githubusercontent.com/cpp-best-practices/setup-cpp/ ```powershell Set-ExecutionPolicy Bypass -scope Process -Force Import-Module BitsTransfer -Start-BitsTransfer -Source "https://raw.githubusercontent.com/mguludag/setup-cpp/main/windows.ps1" -Destination $pwd/windows.ps1 -./windows.ps1 - +Start-BitsTransfer -Source "https://raw.githubusercontent.com/mguludag/setup-cpp/main/windows.ps1" -Destination $pwd/windows.ps1 | ./windows.ps1 +exit ``` From 2367226d9add636c9da8a123dfd3864662d6264e Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Thu, 7 Jul 2022 01:57:00 +0300 Subject: [PATCH 06/39] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4326eee..0609ded 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ bash <(wget -qO- https://raw.githubusercontent.com/cpp-best-practices/setup-cpp/ ```powershell Set-ExecutionPolicy Bypass -scope Process -Force Import-Module BitsTransfer -Start-BitsTransfer -Source "https://raw.githubusercontent.com/mguludag/setup-cpp/main/windows.ps1" -Destination $pwd/windows.ps1 | ./windows.ps1 +Start-BitsTransfer -Source "https://raw.githubusercontent.com/mguludag/setup-cpp/main/windows.ps1" -Destination $pwd/windows.ps1 +./windows.ps1 exit ``` From cf1989440c5542097cef045ae2053682f81cf256 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Thu, 7 Jul 2022 02:01:21 +0300 Subject: [PATCH 07/39] Update windows.ps1 --- windows.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index e8e8d73..47276d0 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -36,7 +36,6 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) { Write-Error "$cmdName not exists" Write-Host "Downloading $cmdName" - Out-File -FilePath "$pwd/.winget" Import-Module BitsTransfer Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Destination $wingetPath Start-BitsTransfer -Source "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" -Destination $vclibPath From 9790bbce8fcdf60ab48a5ab967bc5589aa62422e Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Fri, 8 Jul 2022 14:34:43 +0300 Subject: [PATCH 08/39] signed script --- windows.ps1 | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 170 insertions(+), 5 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 47276d0..e15a82b 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -1,5 +1,5 @@ # if this file cannot run by execution policy, copy this line below and paste into powershell window then drag-drop this script into window and it will run -Set-ExecutionPolicy Bypass -scope Process -Force +Set-ExecutionPolicy RemoteSigned -scope Process -Force # for admin privileges if isn't running as an admin if (!(New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) @@ -29,7 +29,16 @@ else } $cmdName = "winget" -$vclibPath = "$pwd/Microsoft.VCLibs.x64.14.00.Desktop.appx" +$arch = ({x64}, {x86})[![Environment]::Is64BitOperatingSystem] +$wingetUrl = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" +$vclibUrl = "https://aka.ms/Microsoft.VCLibs.$arch.14.00.Desktop.appx" +$uixamlUrl = "https://globalcdn.nuget.org/packages/microsoft.ui.xaml.2.7.1.nupkg" + +$uixamlFolder = "Microsoft.UI.Xaml.2.7.1.nupkg" +$uixamlZip = "Microsoft.UI.Xaml.2.7.1.nupkg.zip" + +$vclibPath = "$pwd/Microsoft.VCLibs.14.00.Desktop.appx" +$uixamlPath = "$pwd/Microsoft.UI.Xaml.2.7.1.nupkg\tools\AppX\$arch\Release\Microsoft.UI.Xaml.2.7.appx" $wingetPath = "$pwd/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" if (!(Get-Command $cmdName -errorAction SilentlyContinue)) @@ -37,14 +46,18 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Write-Error "$cmdName not exists" Write-Host "Downloading $cmdName" Import-Module BitsTransfer - Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Destination $wingetPath - Start-BitsTransfer -Source "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" -Destination $vclibPath + Start-BitsTransfer -Source $wingetUrl -Destination $wingetPath + Start-BitsTransfer -Source $vclibUrl -Destination $vclibPath + Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip + Expand-Archive $uixamlZip Write-Host "Installing $cmdName" - Add-AppxPackage -Path $wingetPath -DependencyPath $vclibPath + Add-AppxPackage -Path $wingetPath -DependencyPath ($uixamlPath, $vclibPath) # cleanup winget setup files Remove-Item $vclibPath Remove-Item $wingetPath + Remove-Item $uixamlZip + Remove-Item $uixamlFolder -Recurse } @@ -91,3 +104,155 @@ code --install-extension ms-vscode.cpptools-extension-pack --install-extension j pip install --user conan ninja cmake exit + +# SIG # Begin signature block +# MIIbzgYJKoZIhvcNAQcCoIIbvzCCG7sCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB +# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR +# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUtd8BOSl2kh5k/6NjTgAXxXTT +# pMagghZBMIIDDDCCAfSgAwIBAgIQGHZfo+K2bKZBW2L4o9kWszANBgkqhkiG9w0B +# AQsFADAeMRwwGgYDVQQDDBNnaXRodWIuY29tL21ndWx1ZGFnMB4XDTIyMDcwODEx +# MTcwNloXDTIzMDcwODExMzcwNlowHjEcMBoGA1UEAwwTZ2l0aHViLmNvbS9tZ3Vs +# dWRhZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANTD6/cilzVVfCB2 +# ZiFWI6T+TKzm6t0pdkDkXTxeI9chBRX1DdwPyoXr8RBo/v3g1NhhOld+qlkRQKRj +# p7XUHdZzdrAADD3p4b1uvUPXvAg1XTnS5/ulTkexQcEmZxUS6sJ4V1SAASxP2iSW +# zQ7t5ks/9e8sy2thYRnqThDp9ALqvNNDb0YS8lNYLL+EueXdICwENA5YH45YoHPc +# ROVs+qOrAjP5AhBnwrfjKl4A/IQz6egxWuHW1CElMhUWWri4s5mBzyGWsBxP6oOw +# cZKjbcTDV0GTIwG4OoFVQKyzbHGDjdL59Cc+crYqqFPVmtHM+wtYWTKw2ENIv9lh +# vT9bHJ0CAwEAAaNGMEQwDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUF +# BwMDMB0GA1UdDgQWBBR5rn6WFkIK/ypnIA6P7E/WNqVfhDANBgkqhkiG9w0BAQsF +# AAOCAQEAxzXJZscJNKNnWsgs2waMyZ2YBcmSBJrIu2UaZv5Jb5ly0M4CQadeYK/w +# Ec1Ne9xfA1gelC6TlY4JXTP5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I7jWQUTxEkGr63FW14WjAS3jfsP5DL0c10neoZRZ2JB+tokif2YbT6ixftAStLn +# XTZm38Uf1XBHVG2c/rzAUqBU7bbrpaxMoM+NMRFKgqrpLxYfeccPNRtGpmJKKlbM +# /oUb06zLLfbe8LWlNcja/uVhbGqnaoCIQ9Mq2C5reLkBE163AALVYSilmxG9ukVw +# 22LJajUSNGJex0cG6qNbbP/NJZs/Mp1LCCxPCHmTJlN1uzouYFLnk/A1l5Z/uNNo +# 3GNj6G3vFT9grYz1IE6Ja9zl +# SIG # End signature block From 7b6895a401a54c1964125d43670eb7ecd9a946c7 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Fri, 8 Jul 2022 14:36:12 +0300 Subject: [PATCH 09/39] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0609ded..9a83b5c 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,8 @@ bash <(wget -qO- https://raw.githubusercontent.com/cpp-best-practices/setup-cpp/ ## Windows (10/11) ```powershell -Set-ExecutionPolicy Bypass -scope Process -Force -Import-Module BitsTransfer -Start-BitsTransfer -Source "https://raw.githubusercontent.com/mguludag/setup-cpp/main/windows.ps1" -Destination $pwd/windows.ps1 +Set-ExecutionPolicy RemoteSigned -scope Process -Force +Invoke-WebRequest -Uri "https://raw.githubusercontent.com/mguludag/setup-cpp/main/windows.ps1" -OutFile $pwd/windows.ps1 ./windows.ps1 exit ``` From 39f9ab80092ae57f7c9ca2c785589113bf4b4543 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Fri, 8 Jul 2022 15:31:23 +0300 Subject: [PATCH 10/39] added llvm tools dir into path --- windows.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index e15a82b..14d7636 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -96,7 +96,8 @@ Out-File -FilePath $pwd/.vsconfig -InputObject $vsconfig winget install "Visual Studio Build Tools 2022" --silent --accept-package-agreements --override "--config $pwd/.vsconfig --installPath C:/VS2022-BuildTools --quiet --wait" Remove-Item "$pwd/.vsconfig" - + +[System.Environment]::SetEnvironmentVariable('Path', "$env:Path;C:\VS2022-BuildTools\VC\Tools\Llvm\bin",[System.EnvironmentVariableTarget]::User) $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") code --install-extension ms-vscode.cpptools-extension-pack --install-extension jeff-hykin.better-cpp-syntax --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format From ec06bb990f8eec6a85d47074640efe8cfa27574c Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sat, 16 Jul 2022 22:01:38 +0300 Subject: [PATCH 11/39] added winget license and fixed the version 1.1 --- windows.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 14d7636..62034f0 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -30,7 +30,8 @@ else $cmdName = "winget" $arch = ({x64}, {x86})[![Environment]::Is64BitOperatingSystem] -$wingetUrl = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" +$wingetUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.1.12653/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" +$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.1.12653/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml" $vclibUrl = "https://aka.ms/Microsoft.VCLibs.$arch.14.00.Desktop.appx" $uixamlUrl = "https://globalcdn.nuget.org/packages/microsoft.ui.xaml.2.7.1.nupkg" @@ -40,6 +41,7 @@ $uixamlZip = "Microsoft.UI.Xaml.2.7.1.nupkg.zip" $vclibPath = "$pwd/Microsoft.VCLibs.14.00.Desktop.appx" $uixamlPath = "$pwd/Microsoft.UI.Xaml.2.7.1.nupkg\tools\AppX\$arch\Release\Microsoft.UI.Xaml.2.7.appx" $wingetPath = "$pwd/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" +$wingetLicPath = "$pwd/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml" if (!(Get-Command $cmdName -errorAction SilentlyContinue)) { @@ -47,15 +49,17 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Write-Host "Downloading $cmdName" Import-Module BitsTransfer Start-BitsTransfer -Source $wingetUrl -Destination $wingetPath + Start-BitsTransfer -Source $wingetLicUrl -Destination $wingetPath Start-BitsTransfer -Source $vclibUrl -Destination $vclibPath Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" - Add-AppxPackage -Path $wingetPath -DependencyPath ($uixamlPath, $vclibPath) + Add-AppxPackage -Path $wingetPath -DependencyPath ($uixamlPath, $vclibPath) -LicensePath $wingetLicPath # cleanup winget setup files Remove-Item $vclibPath Remove-Item $wingetPath + Remove-Item $wingetLicPath Remove-Item $uixamlZip Remove-Item $uixamlFolder -Recurse } From f090fc5d8158d630331649ebeaa603f2ae3f1e90 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sat, 16 Jul 2022 22:06:49 +0300 Subject: [PATCH 12/39] Update windows.ps1 --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index 62034f0..f780438 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -54,7 +54,7 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" - Add-AppxPackage -Path $wingetPath -DependencyPath ($uixamlPath, $vclibPath) -LicensePath $wingetLicPath + Add-AppxProvisionedPackage -PackagePath $wingetPath -DependencyPackagePath ($uixamlPath, $vclibPath) -LicensePath $wingetLicPath # cleanup winget setup files Remove-Item $vclibPath From 029b0ea43299b54574d525ed673523c370b1834b Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sat, 16 Jul 2022 22:10:53 +0300 Subject: [PATCH 13/39] Update windows.ps1 --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index f780438..2f6f75f 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -54,7 +54,7 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" - Add-AppxProvisionedPackage -PackagePath $wingetPath -DependencyPackagePath ($uixamlPath, $vclibPath) -LicensePath $wingetLicPath + Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -DependencyPackagePath ($uixamlPath, $vclibPath) -LicensePath $wingetLicPath # cleanup winget setup files Remove-Item $vclibPath From 17c1386c0c3b2e403ab0d4e7397bcab9056d509a Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sat, 16 Jul 2022 22:15:43 +0300 Subject: [PATCH 14/39] Update windows.ps1 --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index 2f6f75f..c3f3a6a 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -54,7 +54,7 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" - Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -DependencyPackagePath ($uixamlPath, $vclibPath) -LicensePath $wingetLicPath + Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -DependencyPackagePath $uixamlPath $vclibPath -LicensePath $wingetLicPath # cleanup winget setup files Remove-Item $vclibPath From b2697ca1ff53b3a1af139ac357c34a7fc0a5ad22 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sat, 16 Jul 2022 22:16:55 +0300 Subject: [PATCH 15/39] Update windows.ps1 --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index c3f3a6a..1f529e0 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -54,7 +54,7 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" - Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -DependencyPackagePath $uixamlPath $vclibPath -LicensePath $wingetLicPath + Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath -LicensePath $wingetLicPath # cleanup winget setup files Remove-Item $vclibPath From 2a50f646313c367f46fa22d9696ec8972aba439c Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sat, 16 Jul 2022 22:20:03 +0300 Subject: [PATCH 16/39] Update windows.ps1 --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index 1f529e0..7103bf0 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -54,7 +54,7 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" - Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath -LicensePath $wingetLicPath + Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -LicensePath $wingetLicPath # -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath # cleanup winget setup files Remove-Item $vclibPath From 738d6c3d6478ffa22983543651a64467a62fbf7d Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sat, 16 Jul 2022 22:39:26 +0300 Subject: [PATCH 17/39] Update windows.ps1 --- windows.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index 7103bf0..a73a52c 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -49,11 +49,13 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Write-Host "Downloading $cmdName" Import-Module BitsTransfer Start-BitsTransfer -Source $wingetUrl -Destination $wingetPath - Start-BitsTransfer -Source $wingetLicUrl -Destination $wingetPath + Start-BitsTransfer -Source $wingetLicUrl -Destination $wingetLicPath Start-BitsTransfer -Source $vclibUrl -Destination $vclibPath Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" + Add-AppxProvisionedPackage -Online -PackagePath $vclibPath -SkipLicense + Add-AppxProvisionedPackage -Online -PackagePath $uixamlPath -SkipLicense Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -LicensePath $wingetLicPath # -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath # cleanup winget setup files From 60d2cb8ce91372c5a616137cacc04b8a50059429 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sat, 16 Jul 2022 22:56:58 +0300 Subject: [PATCH 18/39] Update windows.ps1 --- windows.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/windows.ps1 b/windows.ps1 index a73a52c..eae3fc1 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -66,6 +66,7 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Remove-Item $uixamlFolder -Recurse } +$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") winget install code --silent --accept-package-agreements --accept-source-agreements winget install Git.git --silent --accept-package-agreements --accept-source-agreements From 13882d71c5c9d5483a126c34786620a98cf6b472 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sun, 18 Sep 2022 17:24:04 +0300 Subject: [PATCH 19/39] Update windows.ps1 --- windows.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index eae3fc1..34b06e4 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -66,11 +66,11 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Remove-Item $uixamlFolder -Recurse } -$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") +$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + "$env:localappdata/Microsoft/WindowsApps;" + [System.Environment]::GetEnvironmentVariable("Path","User") winget install code --silent --accept-package-agreements --accept-source-agreements winget install Git.git --silent --accept-package-agreements --accept-source-agreements -winget install python3 --silent --accept-package-agreements --accept-source-agreements +winget install Python.Python.3.9 --silent --accept-package-agreements --accept-source-agreements winget install cppcheck --silent --accept-package-agreements --accept-source-agreements $vsconfig = "{ @@ -105,7 +105,9 @@ winget install "Visual Studio Build Tools 2022" --silent --accept-package-agreem Remove-Item "$pwd/.vsconfig" [System.Environment]::SetEnvironmentVariable('Path', "$env:Path;C:\VS2022-BuildTools\VC\Tools\Llvm\bin",[System.EnvironmentVariableTarget]::User) -$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") +$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + +"$env:localappdata/Microsoft/WindowsApps;$env:localappdata/Programs/Python/Python39/Scripts/;$env:localappdata/Programs/Python/Python39/;" + +[System.Environment]::GetEnvironmentVariable("Path","User") code --install-extension ms-vscode.cpptools-extension-pack --install-extension jeff-hykin.better-cpp-syntax --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format From 0418e0ce0584db4fb64ce32bd7761a7d321ac54d Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sun, 18 Sep 2022 17:30:07 +0300 Subject: [PATCH 20/39] Update windows.ps1 --- windows.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/windows.ps1 b/windows.ps1 index 34b06e4..a149f6d 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -66,6 +66,8 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Remove-Item $uixamlFolder -Recurse } +Start-Sleep -s 10 + $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + "$env:localappdata/Microsoft/WindowsApps;" + [System.Environment]::GetEnvironmentVariable("Path","User") winget install code --silent --accept-package-agreements --accept-source-agreements From 4bdabb6e8c005d5a130f5e552f46dc4d60b1d27c Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sun, 18 Sep 2022 18:07:54 +0300 Subject: [PATCH 21/39] Update windows.ps1 --- windows.ps1 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index a149f6d..381abc7 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -68,13 +68,16 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Start-Sleep -s 10 -$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + "$env:localappdata/Microsoft/WindowsApps;" + [System.Environment]::GetEnvironmentVariable("Path","User") +[System.Environment]::SetEnvironmentVariable('Path', "$env:localappdata/Microsoft/WindowsApps;",[System.EnvironmentVariableTarget]::User) +$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") winget install code --silent --accept-package-agreements --accept-source-agreements winget install Git.git --silent --accept-package-agreements --accept-source-agreements winget install Python.Python.3.9 --silent --accept-package-agreements --accept-source-agreements +winget install Kitware.CMake --silent --accept-package-agreements --accept-source-agreements winget install cppcheck --silent --accept-package-agreements --accept-source-agreements + $vsconfig = "{ `"version`": `"1.0`",` `"components`": [ @@ -96,6 +99,7 @@ $vsconfig = "{ `"Microsoft.VisualStudio.Component.VC.CoreIde`",` `"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core`",` `"Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset`",` + `"Microsoft.VisualStudio.Component.VC.Llvm.Clang`",` `"Microsoft.VisualStudio.Workload.VCTools`"` ] }" @@ -106,12 +110,10 @@ winget install "Visual Studio Build Tools 2022" --silent --accept-package-agreem Remove-Item "$pwd/.vsconfig" -[System.Environment]::SetEnvironmentVariable('Path', "$env:Path;C:\VS2022-BuildTools\VC\Tools\Llvm\bin",[System.EnvironmentVariableTarget]::User) -$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + -"$env:localappdata/Microsoft/WindowsApps;$env:localappdata/Programs/Python/Python39/Scripts/;$env:localappdata/Programs/Python/Python39/;" + -[System.Environment]::GetEnvironmentVariable("Path","User") +[System.Environment]::SetEnvironmentVariable('Path', "$env:Path;C:\VS2022-BuildTools\VC\Tools\Llvm\bin;$env:programfiles/CMake/bin;$env:localappdata/Programs/Microsoft VS Code;$env:localappdata/Microsoft/WindowsApps;$env:localappdata/Programs/Python/Python39/Scripts/;$env:localappdata/Programs/Python/Python39/;",[System.EnvironmentVariableTarget]::User) +$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") -code --install-extension ms-vscode.cpptools-extension-pack --install-extension jeff-hykin.better-cpp-syntax --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format +code --install-extension ms-vscode.cpptools-extension-pack --install-extension ms-vscode.cmake-tools --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format pip install --user conan ninja cmake From fa179b60b731162e9adc1a17bea5f56c67ce78b2 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sun, 18 Sep 2022 18:14:37 +0300 Subject: [PATCH 22/39] Update windows.ps1 --- windows.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/windows.ps1 b/windows.ps1 index 381abc7..ee4a43f 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -113,6 +113,8 @@ Remove-Item "$pwd/.vsconfig" [System.Environment]::SetEnvironmentVariable('Path', "$env:Path;C:\VS2022-BuildTools\VC\Tools\Llvm\bin;$env:programfiles/CMake/bin;$env:localappdata/Programs/Microsoft VS Code;$env:localappdata/Microsoft/WindowsApps;$env:localappdata/Programs/Python/Python39/Scripts/;$env:localappdata/Programs/Python/Python39/;",[System.EnvironmentVariableTarget]::User) $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") +Start-Sleep -s 10 + code --install-extension ms-vscode.cpptools-extension-pack --install-extension ms-vscode.cmake-tools --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format pip install --user conan ninja cmake From 6eaa64b36affb8bce9db91b80aa01d26b3795e44 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sun, 18 Sep 2022 18:50:12 +0300 Subject: [PATCH 23/39] Update windows.ps1 --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index ee4a43f..b953903 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -71,7 +71,7 @@ Start-Sleep -s 10 [System.Environment]::SetEnvironmentVariable('Path', "$env:localappdata/Microsoft/WindowsApps;",[System.EnvironmentVariableTarget]::User) $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") -winget install code --silent --accept-package-agreements --accept-source-agreements +winget install Microsoft.VisualStudioCode --silent --accept-package-agreements --accept-source-agreements winget install Git.git --silent --accept-package-agreements --accept-source-agreements winget install Python.Python.3.9 --silent --accept-package-agreements --accept-source-agreements winget install Kitware.CMake --silent --accept-package-agreements --accept-source-agreements From c2aa5c931adaba230ff5e97b64c6c940ec654521 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sun, 18 Sep 2022 19:21:49 +0300 Subject: [PATCH 24/39] Update windows.ps1 --- windows.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index b953903..2b18da7 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -68,7 +68,7 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Start-Sleep -s 10 -[System.Environment]::SetEnvironmentVariable('Path', "$env:localappdata/Microsoft/WindowsApps;",[System.EnvironmentVariableTarget]::User) +[System.Environment]::SetEnvironmentVariable('Path', "$env:localappdata\Microsoft\WindowsApps;" + [System.Environment]::GetEnvironmentVariable("Path","User") ,[System.EnvironmentVariableTarget]::User) $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") winget install Microsoft.VisualStudioCode --silent --accept-package-agreements --accept-source-agreements @@ -110,12 +110,12 @@ winget install "Visual Studio Build Tools 2022" --silent --accept-package-agreem Remove-Item "$pwd/.vsconfig" -[System.Environment]::SetEnvironmentVariable('Path', "$env:Path;C:\VS2022-BuildTools\VC\Tools\Llvm\bin;$env:programfiles/CMake/bin;$env:localappdata/Programs/Microsoft VS Code;$env:localappdata/Microsoft/WindowsApps;$env:localappdata/Programs/Python/Python39/Scripts/;$env:localappdata/Programs/Python/Python39/;",[System.EnvironmentVariableTarget]::User) +[System.Environment]::SetEnvironmentVariable('Path', "C:\VS2022-BuildTools\VC\Tools\Llvm\bin;$env:programfiles\CMake\bin;$env:localappdata\Programs\Microsoft VS Code;$env:localappdata\Programs\Microsoft VS Code\bin;$env:localappdata\Programs\Python\Python39\Scripts\;$env:localappdata\Programs\Python\Python39\;" + [System.Environment]::GetEnvironmentVariable("Path","User") ,[System.EnvironmentVariableTarget]::User) $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") Start-Sleep -s 10 -code --install-extension ms-vscode.cpptools-extension-pack --install-extension ms-vscode.cmake-tools --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format +code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format pip install --user conan ninja cmake From 52b91e5c06518d68566b26e72d12ff69455b28a4 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Sun, 18 Sep 2022 20:03:32 +0300 Subject: [PATCH 25/39] added powershell 7 --- windows.ps1 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 2b18da7..4866556 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -64,13 +64,16 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Remove-Item $wingetLicPath Remove-Item $uixamlZip Remove-Item $uixamlFolder -Recurse -} + + Start-Sleep -s 10 -Start-Sleep -s 10 + [System.Environment]::SetEnvironmentVariable('Path', "$env:localappdata\Microsoft\WindowsApps;" + + [System.Environment]::GetEnvironmentVariable("Path","User") ,[System.EnvironmentVariableTarget]::User) +} -[System.Environment]::SetEnvironmentVariable('Path', "$env:localappdata\Microsoft\WindowsApps;" + [System.Environment]::GetEnvironmentVariable("Path","User") ,[System.EnvironmentVariableTarget]::User) $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") +winget install Microsoft.PowerShell --silent --accept-package-agreements --accept-source-agreements winget install Microsoft.VisualStudioCode --silent --accept-package-agreements --accept-source-agreements winget install Git.git --silent --accept-package-agreements --accept-source-agreements winget install Python.Python.3.9 --silent --accept-package-agreements --accept-source-agreements @@ -110,7 +113,14 @@ winget install "Visual Studio Build Tools 2022" --silent --accept-package-agreem Remove-Item "$pwd/.vsconfig" -[System.Environment]::SetEnvironmentVariable('Path', "C:\VS2022-BuildTools\VC\Tools\Llvm\bin;$env:programfiles\CMake\bin;$env:localappdata\Programs\Microsoft VS Code;$env:localappdata\Programs\Microsoft VS Code\bin;$env:localappdata\Programs\Python\Python39\Scripts\;$env:localappdata\Programs\Python\Python39\;" + [System.Environment]::GetEnvironmentVariable("Path","User") ,[System.EnvironmentVariableTarget]::User) +[System.Environment]::SetEnvironmentVariable('Path', "C:\VS2022-BuildTools\VC\Tools\Llvm\bin;" + + "$env:programfiles\CMake\bin;" + + "$env:programfiles\Cppcheck;" + + "$env:localappdata\Programs\Microsoft VS Code;" + + # "$env:localappdata\Programs\Microsoft VS Code\bin;" + + # "$env:localappdata\Programs\Python\Python39\Scripts\;" + + # "$env:localappdata\Programs\Python\Python39\;" + + [System.Environment]::GetEnvironmentVariable("Path","User") ,[System.EnvironmentVariableTarget]::User) $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") Start-Sleep -s 10 From 6a1ae2d8b7c54474313a2cd4a4636e6143eb6676 Mon Sep 17 00:00:00 2001 From: Muhammed Galib Uludag Date: Fri, 23 Sep 2022 01:50:48 +0300 Subject: [PATCH 26/39] Update windows.ps1 --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index 4866556..555bace 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -118,7 +118,7 @@ Remove-Item "$pwd/.vsconfig" "$env:programfiles\Cppcheck;" + "$env:localappdata\Programs\Microsoft VS Code;" + # "$env:localappdata\Programs\Microsoft VS Code\bin;" + - # "$env:localappdata\Programs\Python\Python39\Scripts\;" + + "$env:appdata\Python\Python39\Scripts\;" + # "$env:localappdata\Programs\Python\Python39\;" + [System.Environment]::GetEnvironmentVariable("Path","User") ,[System.EnvironmentVariableTarget]::User) $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") From d9fe083590a0be88ca4083f1fa8812202d0115af Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Sun, 24 Sep 2023 12:47:55 +0300 Subject: [PATCH 27/39] add errorlens extenson --- windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 555bace..395d2ed 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -117,7 +117,7 @@ Remove-Item "$pwd/.vsconfig" "$env:programfiles\CMake\bin;" + "$env:programfiles\Cppcheck;" + "$env:localappdata\Programs\Microsoft VS Code;" + - # "$env:localappdata\Programs\Microsoft VS Code\bin;" + + "$env:localappdata\Programs\Microsoft VS Code\bin;" + "$env:appdata\Python\Python39\Scripts\;" + # "$env:localappdata\Programs\Python\Python39\;" + [System.Environment]::GetEnvironmentVariable("Path","User") ,[System.EnvironmentVariableTarget]::User) @@ -125,7 +125,7 @@ $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" Start-Sleep -s 10 -code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format +code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension usernamehw.errorlens --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format pip install --user conan ninja cmake From d063054d33a8248a29593f3a7f77230c3875de76 Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Thu, 19 Oct 2023 21:53:01 +0300 Subject: [PATCH 28/39] Update windows.ps1 add new extension --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index 395d2ed..1ded865 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -125,7 +125,7 @@ $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" Start-Sleep -s 10 -code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension usernamehw.errorlens --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format +code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension NathanJ.cpp-tools-plugin --install-extension usernamehw.errorlens --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format pip install --user conan ninja cmake From 42b873c0c92c589cdc1ee77fc65bde029d9d91cc Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Thu, 19 Oct 2023 22:09:20 +0300 Subject: [PATCH 29/39] Update windows.ps1 add clang-tidy extension --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index 1ded865..f63b52d 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -125,7 +125,7 @@ $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" Start-Sleep -s 10 -code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension NathanJ.cpp-tools-plugin --install-extension usernamehw.errorlens --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format +code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension notskm.clang-tidy --install-extension usernamehw.errorlens --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format pip install --user conan ninja cmake From 42aa7f224cf1da205b1a3c9d94e46d761f3d290b Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Sun, 22 Oct 2023 00:19:41 +0300 Subject: [PATCH 30/39] change vscode settings from powershell --- windows.ps1 | 103 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 77 insertions(+), 26 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index f63b52d..af50ac1 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -81,33 +81,32 @@ winget install Kitware.CMake --silent --accept-package-agreements --accept-sourc winget install cppcheck --silent --accept-package-agreements --accept-source-agreements -$vsconfig = "{ - `"version`": `"1.0`",` - `"components`": [ - `"Microsoft.VisualStudio.Component.Roslyn.Compiler`",` - `"Microsoft.Component.MSBuild`",` - `"Microsoft.VisualStudio.Component.CoreBuildTools`",` - `"Microsoft.VisualStudio.Workload.MSBuildTools`",` - `"Microsoft.VisualStudio.Component.Windows10SDK`",` - `"Microsoft.VisualStudio.Component.VC.CoreBuildTools`",` - `"Microsoft.VisualStudio.Component.VC.Tools.x86.x64`",` - `"Microsoft.VisualStudio.Component.VC.Redist.14.Latest`",` - `"Microsoft.VisualStudio.Component.Windows10SDK.19041`",` - `"Microsoft.VisualStudio.Component.VC.CMake.Project`",` - `"Microsoft.VisualStudio.Component.TestTools.BuildTools`",` - `"Microsoft.VisualStudio.Component.VC.ATL`",` - `"Microsoft.VisualStudio.Component.VC.ASAN`",` - `"Microsoft.VisualStudio.Component.VC.Modules.x86.x64`",` - `"Microsoft.VisualStudio.Component.TextTemplating`",` - `"Microsoft.VisualStudio.Component.VC.CoreIde`",` - `"Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core`",` - `"Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset`",` - `"Microsoft.VisualStudio.Component.VC.Llvm.Clang`",` - `"Microsoft.VisualStudio.Workload.VCTools`"` - ] -}" +$components = @( + "Microsoft.VisualStudio.Component.Roslyn.Compiler", + "Microsoft.Component.MSBuild", + "Microsoft.VisualStudio.Component.CoreBuildTools", + "Microsoft.VisualStudio.Workload.MSBuildTools", + "Microsoft.VisualStudio.Component.Windows10SDK", + "Microsoft.VisualStudio.Component.VC.CoreBuildTools", + "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "Microsoft.VisualStudio.Component.VC.Redist.14.Latest", + "Microsoft.VisualStudio.Component.Windows10SDK.19041", + "Microsoft.VisualStudio.Component.VC.CMake.Project", + "Microsoft.VisualStudio.Component.TestTools.BuildTools", + "Microsoft.VisualStudio.Component.VC.ATL", + "Microsoft.VisualStudio.Component.VC.ASAN", + "Microsoft.VisualStudio.Component.VC.Modules.x86.x64", + "Microsoft.VisualStudio.Component.TextTemplating", + "Microsoft.VisualStudio.Component.VC.CoreIde", + "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core", + "Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset", + "Microsoft.VisualStudio.Component.VC.Llvm.Clang", + "Microsoft.VisualStudio.Workload.VCTools" + ) -Out-File -FilePath $pwd/.vsconfig -InputObject $vsconfig +$vsconfig = @{"version" = 1.0; "components" = $components} + +$vsconfig | ConvertTo-Json | Out-File $pwd/.vsconfig -Encoding utf8 winget install "Visual Studio Build Tools 2022" --silent --accept-package-agreements --override "--config $pwd/.vsconfig --installPath C:/VS2022-BuildTools --quiet --wait" @@ -127,6 +126,58 @@ Start-Sleep -s 10 code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension notskm.clang-tidy --install-extension usernamehw.errorlens --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format +$settingsPath = "$env:APPDATA\Code\User\settings.json"; + +if (!(Test-Path $settingsPath)) { + @{} | ConvertTo-Json | Out-File $settingsPath -Encoding utf8 +} + +$settingsData = $jsondata = Get-Content -Raw -Path $settingsPath -ErrorAction silentlycontinue | ConvertFrom-Json + +if($settingsData){ + $clang_tidy_checks = @( + "bugprone-*", + "clang-analyzer-*", + "concurrency-*", + "cppcoreguidelines-*", + "hicpp-*", + "misc-*", + "modernize-*", + "performance-*", + "readability-*" + ) + $settings = @{ + "window.commandCenter" = $true; + "window.titleBarStyle" = "custom"; + "window.dialogStyle" = "custom"; + "editor.inlineSuggest.enabled" = $true; + "editor.guides.indentation" = $true; + "editor.guides.bracketPairs" = $true; + "C_Cpp.inactiveRegionOpacity" = 0.55; + "C_Cpp.autocompleteAddParentheses" = $true; + "C_Cpp.experimentalFeatures" = "enabled"; + "C_Cpp.inlayHints.parameterNames.enabled" = $true; + "C_Cpp.inlayHints.autoDeclarationTypes.showOnLeft" = $true; + "C_Cpp.inlayHints.autoDeclarationTypes.enabled" = $true; + "C_Cpp.inlayHints.referenceOperator.enabled" = $true; + "C_Cpp.intelliSenseEngineFallback" = "enabled"; + "C_Cpp.default.cppStandard" = "c++23"; + "C_Cpp.default.cStandard" = "c23"; + "C_Cpp.default.intelliSenseMode" = "windows-msvc-x64"; + "C_Cpp.default.mergeConfigurations" = $true; + "C_Cpp.default.configurationProvider" = "ms-vscode.cpptools"; + "C_Cpp.intelliSenseEngine" = "Tag Parser"; + "C_Cpp.codeAnalysis.clangTidy.enabled" = $true; + "C_Cpp.codeAnalysis.clangTidy.checks.enabled" = $clang_tidy_checks; + "clang-tidy.buildPath" = "`${workspaceFolder}/build"; + "clang-tidy.checks" = $clang_tidy_checks + } + + $settingsData.GetEnumerator().ForEach({$settingsData | Add-Member -Name $($_.Key) -Value $($_.Value) -MemberType NoteProperty -Force}) +} + +$settingsData | ConvertTo-Json | Out-File $settingsPath -Encoding utf8 + pip install --user conan ninja cmake exit From 089f6ea29ee5a95a0e6da59671fc58a76bed2035 Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Sun, 22 Oct 2023 00:22:16 +0300 Subject: [PATCH 31/39] fix vsconfig version value --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index af50ac1..6675da8 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -104,7 +104,7 @@ $components = @( "Microsoft.VisualStudio.Workload.VCTools" ) -$vsconfig = @{"version" = 1.0; "components" = $components} +$vsconfig = @{"version" = "1.0"; "components" = $components} $vsconfig | ConvertTo-Json | Out-File $pwd/.vsconfig -Encoding utf8 From fe947550c67acf2352d3b58828396d8fd4dcde07 Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Sun, 22 Oct 2023 00:36:03 +0300 Subject: [PATCH 32/39] fix winget link --- windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 6675da8..1a7b7bc 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -30,8 +30,8 @@ else $cmdName = "winget" $arch = ({x64}, {x86})[![Environment]::Is64BitOperatingSystem] -$wingetUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.1.12653/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.1.12653/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml" +$wingetUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.4.2011-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" +$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.4.2011-preview/036b289172bf4bf288f9a50d1ab7ab10_License1.xml" $vclibUrl = "https://aka.ms/Microsoft.VCLibs.$arch.14.00.Desktop.appx" $uixamlUrl = "https://globalcdn.nuget.org/packages/microsoft.ui.xaml.2.7.1.nupkg" From ee0e8741ac22e9aa8f3e6ad0f2c76a430be8d95d Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Sun, 22 Oct 2023 00:40:25 +0300 Subject: [PATCH 33/39] update winget link --- windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 1a7b7bc..9375988 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -30,8 +30,8 @@ else $cmdName = "winget" $arch = ({x64}, {x86})[![Environment]::Is64BitOperatingSystem] -$wingetUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.4.2011-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.4.2011-preview/036b289172bf4bf288f9a50d1ab7ab10_License1.xml" +$wingetUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.3.2691/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" +$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.3.2691/7bcb1a0ab33340daa57fa5b81faec616_License1.xml" $vclibUrl = "https://aka.ms/Microsoft.VCLibs.$arch.14.00.Desktop.appx" $uixamlUrl = "https://globalcdn.nuget.org/packages/microsoft.ui.xaml.2.7.1.nupkg" From 10de817e19edd63a5e9eee9079d7f5f9a1c7ef5b Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Sun, 22 Oct 2023 00:44:39 +0300 Subject: [PATCH 34/39] Update winget url --- windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 9375988..5e359ef 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -30,8 +30,8 @@ else $cmdName = "winget" $arch = ({x64}, {x86})[![Environment]::Is64BitOperatingSystem] -$wingetUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.3.2691/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.3.2691/7bcb1a0ab33340daa57fa5b81faec616_License1.xml" +$wingetUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.6.2771/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" +$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.6.2771/27abf0d1afe340e7a64fb696056b2672_License1.xml" $vclibUrl = "https://aka.ms/Microsoft.VCLibs.$arch.14.00.Desktop.appx" $uixamlUrl = "https://globalcdn.nuget.org/packages/microsoft.ui.xaml.2.7.1.nupkg" From 5ba8282020bfcfc78724ec344c589c94126fd59b Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Sun, 22 Oct 2023 01:15:57 +0300 Subject: [PATCH 35/39] fix vscode settings --- windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 5e359ef..3f870db 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -124,7 +124,7 @@ $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" Start-Sleep -s 10 -code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension notskm.clang-tidy --install-extension usernamehw.errorlens --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format +code.cmd --install-extension ms-vscode.cpptools-extension-pack --install-extension yuzuhakuon.vscode-cpp-project --install-extension jeff-hykin.better-cpp-syntax --install-extension CS128.cs128-clang-tidy --install-extension usernamehw.errorlens --install-extension eamodio.gitlens --install-extension jdinhlife.gruvbox --install-extension xaver.clang-format $settingsPath = "$env:APPDATA\Code\User\settings.json"; @@ -173,7 +173,7 @@ if($settingsData){ "clang-tidy.checks" = $clang_tidy_checks } - $settingsData.GetEnumerator().ForEach({$settingsData | Add-Member -Name $($_.Key) -Value $($_.Value) -MemberType NoteProperty -Force}) + $settings.GetEnumerator().ForEach({$settingsData | Add-Member -Name $($_.Key) -Value $($_.Value) -MemberType NoteProperty -Force}) } $settingsData | ConvertTo-Json | Out-File $settingsPath -Encoding utf8 From 74d355b1623fe3f43b110d786780b88260b177ab Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Tue, 14 May 2024 00:34:46 +0300 Subject: [PATCH 36/39] Update windows.ps1 --- windows.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 3f870db..b2ee562 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -30,8 +30,8 @@ else $cmdName = "winget" $arch = ({x64}, {x86})[![Environment]::Is64BitOperatingSystem] -$wingetUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.6.2771/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.6.2771/27abf0d1afe340e7a64fb696056b2672_License1.xml" +$wingetUrl = "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/17022c2f-1a0a-4762-9ffb-f1e2e7512eee?P1=1715636741&P2=404&P3=2&P4=BwQUMiuuznoSXL8VDOGXCQQofQVSNdH5UbdnRFpfyPJRG%2fA22%2bNxz6XZzhmEPiAVmdGLfMm2CH1c4ah4E3%2bs3g%3d%3d" +# $wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.6.2771/27abf0d1afe340e7a64fb696056b2672_License1.xml" $vclibUrl = "https://aka.ms/Microsoft.VCLibs.$arch.14.00.Desktop.appx" $uixamlUrl = "https://globalcdn.nuget.org/packages/microsoft.ui.xaml.2.7.1.nupkg" @@ -41,7 +41,7 @@ $uixamlZip = "Microsoft.UI.Xaml.2.7.1.nupkg.zip" $vclibPath = "$pwd/Microsoft.VCLibs.14.00.Desktop.appx" $uixamlPath = "$pwd/Microsoft.UI.Xaml.2.7.1.nupkg\tools\AppX\$arch\Release\Microsoft.UI.Xaml.2.7.appx" $wingetPath = "$pwd/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -$wingetLicPath = "$pwd/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml" +# $wingetLicPath = "$pwd/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml" if (!(Get-Command $cmdName -errorAction SilentlyContinue)) { @@ -49,19 +49,19 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Write-Host "Downloading $cmdName" Import-Module BitsTransfer Start-BitsTransfer -Source $wingetUrl -Destination $wingetPath - Start-BitsTransfer -Source $wingetLicUrl -Destination $wingetLicPath + # Start-BitsTransfer -Source $wingetLicUrl -Destination $wingetLicPath Start-BitsTransfer -Source $vclibUrl -Destination $vclibPath Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" Add-AppxProvisionedPackage -Online -PackagePath $vclibPath -SkipLicense Add-AppxProvisionedPackage -Online -PackagePath $uixamlPath -SkipLicense - Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -LicensePath $wingetLicPath # -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath + Add-AppxProvisionedPackage -Online -PackagePath $wingetPath #-LicensePath $wingetLicPath -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath # cleanup winget setup files Remove-Item $vclibPath Remove-Item $wingetPath - Remove-Item $wingetLicPath + # Remove-Item $wingetLicPath Remove-Item $uixamlZip Remove-Item $uixamlFolder -Recurse From b9a437fbe3be3757bdeb02fa571204c68d00010e Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Tue, 14 May 2024 00:38:27 +0300 Subject: [PATCH 37/39] Update windows.ps1 --- windows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows.ps1 b/windows.ps1 index b2ee562..3d7668c 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -56,7 +56,7 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Write-Host "Installing $cmdName" Add-AppxProvisionedPackage -Online -PackagePath $vclibPath -SkipLicense Add-AppxProvisionedPackage -Online -PackagePath $uixamlPath -SkipLicense - Add-AppxProvisionedPackage -Online -PackagePath $wingetPath #-LicensePath $wingetLicPath -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath + Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -SkipLicense #-LicensePath $wingetLicPath -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath # cleanup winget setup files Remove-Item $vclibPath From d51d4dedb60519d8d680f3146ce64a6770982061 Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Tue, 14 May 2024 00:49:46 +0300 Subject: [PATCH 38/39] Update windows.ps1 --- windows.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 3d7668c..38f60f2 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -30,8 +30,8 @@ else $cmdName = "winget" $arch = ({x64}, {x86})[![Environment]::Is64BitOperatingSystem] -$wingetUrl = "http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/17022c2f-1a0a-4762-9ffb-f1e2e7512eee?P1=1715636741&P2=404&P3=2&P4=BwQUMiuuznoSXL8VDOGXCQQofQVSNdH5UbdnRFpfyPJRG%2fA22%2bNxz6XZzhmEPiAVmdGLfMm2CH1c4ah4E3%2bs3g%3d%3d" -# $wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/download/v1.6.2771/27abf0d1afe340e7a64fb696056b2672_License1.xml" +$wingetUrl = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" +$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/latest/download/27abf0d1afe340e7a64fb696056b2672_License1.xml" $vclibUrl = "https://aka.ms/Microsoft.VCLibs.$arch.14.00.Desktop.appx" $uixamlUrl = "https://globalcdn.nuget.org/packages/microsoft.ui.xaml.2.7.1.nupkg" @@ -41,7 +41,7 @@ $uixamlZip = "Microsoft.UI.Xaml.2.7.1.nupkg.zip" $vclibPath = "$pwd/Microsoft.VCLibs.14.00.Desktop.appx" $uixamlPath = "$pwd/Microsoft.UI.Xaml.2.7.1.nupkg\tools\AppX\$arch\Release\Microsoft.UI.Xaml.2.7.appx" $wingetPath = "$pwd/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -# $wingetLicPath = "$pwd/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml" +$wingetLicPath = "$pwd/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml" if (!(Get-Command $cmdName -errorAction SilentlyContinue)) { @@ -49,19 +49,19 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Write-Host "Downloading $cmdName" Import-Module BitsTransfer Start-BitsTransfer -Source $wingetUrl -Destination $wingetPath - # Start-BitsTransfer -Source $wingetLicUrl -Destination $wingetLicPath + Start-BitsTransfer -Source $wingetLicUrl -Destination $wingetLicPath Start-BitsTransfer -Source $vclibUrl -Destination $vclibPath Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" Add-AppxProvisionedPackage -Online -PackagePath $vclibPath -SkipLicense Add-AppxProvisionedPackage -Online -PackagePath $uixamlPath -SkipLicense - Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -SkipLicense #-LicensePath $wingetLicPath -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath + Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -LicensePath $wingetLicPath #-DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath # cleanup winget setup files Remove-Item $vclibPath Remove-Item $wingetPath - # Remove-Item $wingetLicPath + Remove-Item $wingetLicPath Remove-Item $uixamlZip Remove-Item $uixamlFolder -Recurse From 04a311943178628a36a6c76ada797250247cda3d Mon Sep 17 00:00:00 2001 From: "M. Galib Uludag" Date: Tue, 14 May 2024 00:57:12 +0300 Subject: [PATCH 39/39] Update windows.ps1 --- windows.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/windows.ps1 b/windows.ps1 index 38f60f2..8284a66 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -30,8 +30,8 @@ else $cmdName = "winget" $arch = ({x64}, {x86})[![Environment]::Is64BitOperatingSystem] -$wingetUrl = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -$wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/latest/download/27abf0d1afe340e7a64fb696056b2672_License1.xml" +$wingetUrl = "https://aka.ms/getwinget" +# $wingetLicUrl = "https://github.com/microsoft/winget-cli/releases/latest/download/27abf0d1afe340e7a64fb696056b2672_License1.xml" $vclibUrl = "https://aka.ms/Microsoft.VCLibs.$arch.14.00.Desktop.appx" $uixamlUrl = "https://globalcdn.nuget.org/packages/microsoft.ui.xaml.2.7.1.nupkg" @@ -41,7 +41,7 @@ $uixamlZip = "Microsoft.UI.Xaml.2.7.1.nupkg.zip" $vclibPath = "$pwd/Microsoft.VCLibs.14.00.Desktop.appx" $uixamlPath = "$pwd/Microsoft.UI.Xaml.2.7.1.nupkg\tools\AppX\$arch\Release\Microsoft.UI.Xaml.2.7.appx" $wingetPath = "$pwd/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -$wingetLicPath = "$pwd/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml" +# $wingetLicPath = "$pwd/9c0fe2ce7f8e410eb4a8f417de74517e_License1.xml" if (!(Get-Command $cmdName -errorAction SilentlyContinue)) { @@ -49,19 +49,19 @@ if (!(Get-Command $cmdName -errorAction SilentlyContinue)) Write-Host "Downloading $cmdName" Import-Module BitsTransfer Start-BitsTransfer -Source $wingetUrl -Destination $wingetPath - Start-BitsTransfer -Source $wingetLicUrl -Destination $wingetLicPath + # Start-BitsTransfer -Source $wingetLicUrl -Destination $wingetLicPath Start-BitsTransfer -Source $vclibUrl -Destination $vclibPath Start-BitsTransfer -Source $uixamlUrl -Destination $uixamlZip Expand-Archive $uixamlZip Write-Host "Installing $cmdName" Add-AppxProvisionedPackage -Online -PackagePath $vclibPath -SkipLicense Add-AppxProvisionedPackage -Online -PackagePath $uixamlPath -SkipLicense - Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -LicensePath $wingetLicPath #-DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath + Add-AppxProvisionedPackage -Online -PackagePath $wingetPath -SkipLicense #-LicensePath $wingetLicPath -DependencyPackagePath $uixamlPath -DependencyPackagePath $vclibPath # cleanup winget setup files Remove-Item $vclibPath Remove-Item $wingetPath - Remove-Item $wingetLicPath + # Remove-Item $wingetLicPath Remove-Item $uixamlZip Remove-Item $uixamlFolder -Recurse