From 8368c899c4dfb0663656cf1e609f8b3ef239baa3 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Fri, 22 Aug 2014 16:11:43 -0500 Subject: [PATCH] support for projects with different names than directory --- buildwin.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/buildwin.ps1 b/buildwin.ps1 index 7650afe69..6fc748074 100644 --- a/buildwin.ps1 +++ b/buildwin.ps1 @@ -337,6 +337,19 @@ function Build if ($omitArray -NotContains $component) { $vsProject = "$poco_base\$componentDir\$componentName$($platformName)$($suffix).$($extension)" + + if (!(Test-Path -Path $vsProject)) # when VS project name is not same as directory name + { + $vsProject = "$poco_base\$componentDir$($platformName)$($suffix).$($extension)" + if (!(Test-Path -Path $vsProject)) # not found + { + Write-Host "+------------------------------------------------------------------" + Write-Host "| VS project $vsProject not found, skipping." + Write-Host "+------------------------------------------------------------------" + Return # since Foreach-Object is a function, this is actually loop "continue" + } + } + Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" Write-Host "| Building $vsProject" Write-Host "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"