Skip to content

Commit

Permalink
add tinyxml2 lib directory to path.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearsandwich committed Apr 4, 2017
1 parent 75d03eb commit 55963f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion package/tinyxml2/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $ErrorActionPreference = 'Stop'; # stop on all errors
# Source registry key values which are shared between install and uninstall
. $PSScriptRoot\regKeys.ps1


# CMake doesn't set registry keys for the system package repository by default so we check for the presence of CMake by observing the registry path for the current user.
# We need to register the package path to the machine because the jenkins node user doesn't have privileges to install packages via chocolatey. There may be other options to work around this and use HKCU.
if (Test-Path $CMakeRegistryPath) {
Expand All @@ -17,4 +18,7 @@ if (Test-Path $CMakeRegistryPath) {

New-Item "$CMakeSystemRepositoryPath\$CMakePackageName" -ItemType directory
New-ItemProperty -Name "CMakePackageDir" -PropertyType String -Value "$env:ChocolateyPackageFolder\share\cmake" -Path "$CMakeSystemRepositoryPath\$CMakePackageName"
}
}

# Add lib directory to path for dlls.
Install-ChocolateyPath "$env:ChocolateyPackageFolder\lib" -PathType "Machine"
5 changes: 4 additions & 1 deletion package/tinyxml2/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ if (Test-Path $CMakeRegistryPath) {
if (Test-Path $CMakeSystemRepositoryPath) {
Remove-Item "$CMakeSystemRepositoryPath\$CMakePackageName"
}
}
}

# Removal of the dynamic library from the system Path
# is handled automagically by the use of Install-ChocolateyPath.

0 comments on commit 55963f1

Please sign in to comment.