1
0

get-settings.psm1 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. "Python3Dir" = "C:\Python37"
  15. "Scripts3Dir" = "C:\Python37\Scripts"
  16. "SitePkgs3Dir" = "C:\Python37\Lib\site-packages"
  17. "DownloadDir" = "$env:Temp\DevSalt"
  18. }
  19. $ini.Add("Settings", $Settings)
  20. Write-Verbose "DownloadDir === $($ini['Settings']['DownloadDir']) ==="
  21. # Prerequisite software
  22. $Prerequisites = @{
  23. "NSIS" = "nsis-3.03-setup.exe"
  24. "VCppBuildTools" = "visualcppbuildtools_full.exe"
  25. }
  26. $ini.Add("Prerequisites", $Prerequisites)
  27. # Location of programs on 64 bit Windows
  28. $64bitPaths = @{
  29. "NSISDir" = "C:\Program Files (x86)\NSIS"
  30. "VCforPythonDir" = "C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0"
  31. "VCppBuildToolsDir" = "C:\Program Files (x86)\Microsoft Visual C++ Build Tools"
  32. }
  33. $ini.Add("64bitPaths", $64bitPaths)
  34. # Location of programs on 32 bit Windows
  35. $32bitPaths = @{
  36. "NSISDir" = "C:\Program Files\NSIS"
  37. "VCforPythonDir" = "C:\Program Files\Common Files\Microsoft\Visual C++ for Python\9.0"
  38. "VCppBuildToolsDir" = "C:\Program Files\Microsoft Visual C++ Build Tools"
  39. }
  40. $ini.Add("32bitPaths", $32bitPaths)
  41. # Filenames for 64 bit Windows
  42. $64bitPrograms = @{
  43. "Python3" = "python-3.7.4-amd64.exe"
  44. "VCRedist" = "vcredist_x64_2013.exe"
  45. "VCRedistReg" = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{53CF6934-A98D-3D84-9146-FC4EDF3D5641}"
  46. }
  47. $ini.Add("64bitPrograms", $64bitPrograms)
  48. # Filenames for 32 bit Windows
  49. $32bitPrograms = @{
  50. "Python3" = "python-3.7.4.exe"
  51. "VCRedist" = "vcredist_x86_2013.exe"
  52. "VCRedistReg" = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{8122DAB1-ED4D-3676-BB0A-CA368196543E}"
  53. }
  54. $ini.Add("32bitPrograms", $32bitPrograms)
  55. # DLL's for 64 bit Windows
  56. $64bitDLLs = @{
  57. "Libeay" = "libeay32.dll"
  58. "SSLeay" = "ssleay32.dll"
  59. "OpenSSLLic" = "OpenSSL_License.txt"
  60. "Libsodium" = "libsodium.dll"
  61. }
  62. $ini.Add("64bitDLLs", $64bitDLLs)
  63. # DLL's for 32 bit Windows
  64. $32bitDLLs = @{
  65. "Libeay" = "libeay32.dll"
  66. "SSLeay" = "ssleay32.dll"
  67. "OpenSSLLic" = "OpenSSL_License.txt"
  68. "Libsodium" = "libsodium.dll"
  69. }
  70. $ini.Add("32bitDLLs", $32bitDLLs)
  71. Write-Verbose "$($MyInvocation.MyCommand.Name):: Finished Loading Settings"
  72. Return $ini
  73. }
  74. End
  75. {Write-Verbose "$($MyInvocation.MyCommand.Name):: Function ended"}
  76. }