update dei datatypes SQL...

This commit is contained in:
Samuele E. Locatelli
2017-01-24 12:43:52 +01:00
parent 60cf738ed5
commit f4b2413200
27 changed files with 2 additions and 296 deletions
@@ -1,52 +0,0 @@
param($installPath, $toolsPath, $package, $project)
$packagePath = (New-Object system.IO.DirectoryInfo $toolsPath).Parent.FullName
$cppBinaryPathx86 = Join-Path $packagePath "nativeBinaries\x86\msvcr100.dll"
$cppBinaryPathx64 = Join-Path $packagePath "nativeBinaries\x64\msvcr100.dll"
$sqlBinaryPathx86 = Join-Path $packagePath "nativeBinaries\x86\SqlServerSpatial110.dll"
$sqlBinaryPathx64 = Join-Path $packagePath "nativeBinaries\x64\SqlServerSpatial110.dll"
$sqlServerTypes = $project.ProjectItems.Item("SqlServerTypes")
$folderx86 = $sqlServerTypes.ProjectItems | where Name -eq "x86"
if (!$folderx86)
{
$folderx86 = $sqlServerTypes.ProjectItems.AddFolder("x86")
}
$folderx64 = $sqlServerTypes.ProjectItems | where Name -eq "x64"
if (!$folderx64)
{
$folderx64 = $sqlServerTypes.ProjectItems.AddFolder("x64")
}
$cppLinkx86 = $folderx86.ProjectItems | where Name -eq "msvcr100.dll"
if (!$cppLinkx86)
{
$cppLinkx86 = $folderx86.ProjectItems.AddFromFile($cppBinaryPathx86)
$cppLinkx86.Properties.Item("CopyToOutputDirectory").Value = 2
}
$sqlLinkx86 = $folderx86.ProjectItems | where Name -eq "SqlServerSpatial110.dll"
if (!$sqlLinkx86)
{
$sqlLinkx86 = $folderx86.ProjectItems.AddFromFile($sqlBinaryPathx86)
$sqlLinkx86.Properties.Item("CopyToOutputDirectory").Value = 2
}
$cppLinkx64 = $folderx64.ProjectItems | where Name -eq "msvcr100.dll"
if (!$cppLinkx64)
{
$cppLinkx64 = $folderx64.ProjectItems.AddFromFile($cppBinaryPathx64)
$cppLinkx64.Properties.Item("CopyToOutputDirectory").Value = 2
}
$sqlLinkx64 = $folderx64.ProjectItems | where Name -eq "SqlServerSpatial110.dll"
if (!$sqlLinkx64)
{
$sqlLinkx64 = $folderx64.ProjectItems.AddFromFile($sqlBinaryPathx64)
$sqlLinkx64.Properties.Item("CopyToOutputDirectory").Value = 2
}
$readmefile = Join-Path (Split-Path $project.FileName) "SqlServerTypes\readme.htm"
$dte.ItemOperations.Navigate($readmefile)
@@ -1,52 +0,0 @@
param($installPath, $toolsPath, $package, $project)
$sqlServerTypes = $project.ProjectItems | where Name -eq "SqlServerTypes"
if($sqlServerTypes)
{
$folderx86 = $sqlServerTypes.ProjectItems | where Name -eq "x86"
if ($folderx86)
{
$cppFilex86 = $folderx86.ProjectItems | where Name -eq "msvcr100.dll"
if($cppFilex86)
{
$cppFilex86.Delete();
}
$sqlFilex86 = $folderx86.ProjectItems | where Name -eq "SqlServerSpatial110.dll"
if($sqlFilex86)
{
$sqlFilex86.Delete();
}
if($folderx86.ProjectItems.Count -eq 0)
{
$folderx86.Delete()
}
}
$folderx64 = $sqlServerTypes.ProjectItems | where Name -eq "x64"
if ($folderx64)
{
$cppFilex64 = $folderx64.ProjectItems | where Name -eq "msvcr100.dll"
if($cppFilex64)
{
$cppFilex64.Delete();
}
$sqlFilex64 = $folderx64.ProjectItems | where Name -eq "SqlServerSpatial110.dll"
if($sqlFilex64)
{
$sqlFilex64.Delete();
}
if($folderx64.ProjectItems.Count -eq 0)
{
$folderx64.Delete()
}
}
if($sqlServerTypes.ProjectItems.Count -eq 0)
{
$sqlServerTypes.Delete()
}
}