mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
tools: remove-all-arm64
Add script to remove ARM64 project configurations for builds on VS2015
This commit is contained in:
parent
41cc70e573
commit
6ab1ed3b7f
16
tools/gensrc/remove-all-arm64.bat
Normal file
16
tools/gensrc/remove-all-arm64.bat
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
|
cd %~dp0..\..
|
||||||
|
for /r %%f in (*.vcxproj) do (
|
||||||
|
echo %%f
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0remove-vcxproj-config.ps1' -Path '%%f' -ProjectConfiguration '|ARM64'
|
||||||
|
)
|
||||||
|
|
||||||
|
for /r %%f in (*.sln) do (
|
||||||
|
echo %%f
|
||||||
|
findstr /V /C:"|ARM64" "%%f" > "%%f.new"
|
||||||
|
move /Y "%%f.new" "%%f" >nul
|
||||||
|
)
|
20
tools/gensrc/remove-vcxproj-config.ps1
Normal file
20
tools/gensrc/remove-vcxproj-config.ps1
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
param (
|
||||||
|
[Parameter(Mandatory)][string]$Path,
|
||||||
|
[Parameter(Mandatory)][string[]]$ProjectConfiguration
|
||||||
|
)
|
||||||
|
|
||||||
|
$file = Get-Item $Path
|
||||||
|
|
||||||
|
$xmlob = New-Object xml
|
||||||
|
$xmlob.PreserveWhitespace = $true
|
||||||
|
$xmlob.Load($file.FullName)
|
||||||
|
|
||||||
|
$xmlns = @{"msbuild" = "http://schemas.microsoft.com/developer/msbuild/2003"}
|
||||||
|
$configs = Select-Xml -Xml $xmlob -Namespace $xmlns `
|
||||||
|
-XPath "//msbuild:ProjectConfiguration[contains(@Include,'$ProjectConfiguration')]"
|
||||||
|
foreach ($config in $configs) {
|
||||||
|
$child = $config.Node
|
||||||
|
[void]$child.ParentNode.RemoveChild($child)
|
||||||
|
}
|
||||||
|
|
||||||
|
$xmlob.Save($file.FullName)
|
Loading…
x
Reference in New Issue
Block a user