1
0

get-settings.psm1 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. Function Get-Settings {
  2. [CmdletBinding()]
  3. Param()
  4. Begin
  5. {Write-Verbose "$($MyInvocation.MyCommand.Name):: Function started"}
  6. Process
  7. {
  8. Write-Verbose "$($MyInvocation.MyCommand.Name):: Loading Settings"
  9. $ini = @{}
  10. # Location where the files are kept
  11. $Settings = @{
  12. "SaltRepo" = "https://repo.saltstack.com/windows/dependencies"
  13. "SaltDir" = "C:\salt"
  14. "Python2Dir" = "C:\Python27"
  15. "Scripts2Dir" = "C:\Python27\Scripts"
  16. "SitePkgs2Dir" = "C:\Python27\Lib\site-packages"
  17. "Python3Dir" = "C:\Python35"
  18. "Scripts3Dir" = "C:\Python35\Scripts"
  19. "SitePkgs3Dir" = "C:\Python35\Lib\site-packages"
  20. "DownloadDir" = "$env:Temp\DevSalt"
  21. }
  22. $ini.Add("Settings", $Settings)
  23. Write-Verbose "DownloadDir === $($ini['Settings']['DownloadDir']) ==="
  24. # Prerequisite software
  25. $Prerequisites = @{
  26. "NSIS" = "nsis-3.03-setup.exe"
  27. "VCforPython" = "VCForPython27.msi"
  28. "VCppBuildTools" = "visualcppbuildtools_full.exe"
  29. }
  30. $ini.Add("Prerequisites", $Prerequisites)
  31. # Location of programs on 64 bit Windows
  32. $64bitPaths = @{
  33. "NSISDir" = "C:\Program Files (x86)\NSIS"
  34. "VCforPythonDir" = "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0"
  35. "VCppBuildToolsDir" = "C:\Program Files (x86)\Microsoft Visual C++ Build Tools"
  36. }
  37. $ini.Add("64bitPaths", $64bitPaths)
  38. # Location of programs on 32 bit Windows
  39. $32bitPaths = @{
  40. "NSISDir" = "C:\Program Files\NSIS"
  41. "VCforPythonDir" = "C:\Program Files\Common Files\Microsoft\Visual C++ for Python\9.0"
  42. "VCppBuildToolsDir" = "C:\Program Files\Microsoft Visual C++ Build Tools"
  43. }
  44. $ini.Add("32bitPaths", $32bitPaths)
  45. # Filenames for 64 bit Windows
  46. $64bitPrograms = @{
  47. "Python2" = "python-2.7.15.amd64.msi"
  48. "Python3" = "python-3.5.4-amd64.exe"
  49. }
  50. $ini.Add("64bitPrograms", $64bitPrograms)
  51. # Filenames for 32 bit Windows
  52. $32bitPrograms = @{
  53. "Python2" = "python-2.7.15.msi"
  54. "Python3" = "python-3.5.4.exe"
  55. }
  56. $ini.Add("32bitPrograms", $32bitPrograms)
  57. # DLL's for 64 bit Windows
  58. $64bitDLLs = @{
  59. "Libeay" = "libeay32.dll"
  60. "SSLeay" = "ssleay32.dll"
  61. "OpenSSLLic" = "OpenSSL_License.txt"
  62. "msvcr" = "msvcr120.dll"
  63. "Libsodium" = "libsodium.dll"
  64. }
  65. $ini.Add("64bitDLLs", $64bitDLLs)
  66. # DLL's for 32 bit Windows
  67. $32bitDLLs = @{
  68. "Libeay" = "libeay32.dll"
  69. "SSLeay" = "ssleay32.dll"
  70. "OpenSSLLic" = "OpenSSL_License.txt"
  71. "msvcr" = "msvcr120.dll"
  72. "Libsodium" = "libsodium.dll"
  73. }
  74. $ini.Add("32bitDLLs", $32bitDLLs)
  75. Write-Verbose "$($MyInvocation.MyCommand.Name):: Finished Loading Settings"
  76. Return $ini
  77. }
  78. End
  79. {Write-Verbose "$($MyInvocation.MyCommand.Name):: Function ended"}
  80. }