get-settings.psm1 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. "PythonDir" = "C:\Python37"
  15. "ScriptsDir" = "C:\Python37\Scripts"
  16. "SitePkgsDir" = "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. "Python" = "python-3.7.4-amd64.exe"
  44. }
  45. $ini.Add("64bitPrograms", $64bitPrograms)
  46. # Filenames for 32 bit Windows
  47. $32bitPrograms = @{
  48. "Python" = "python-3.7.4.exe"
  49. }
  50. $ini.Add("32bitPrograms", $32bitPrograms)
  51. # DLL's for 64 bit Windows
  52. $64bitDLLs = @{
  53. "Libeay" = "libeay32.dll"
  54. "SSLeay" = "ssleay32.dll"
  55. "OpenSSLLic" = "OpenSSL_License.txt"
  56. "msvcr" = "msvcr120.dll"
  57. "Libsodium" = "libsodium.dll"
  58. }
  59. $ini.Add("64bitDLLs", $64bitDLLs)
  60. # DLL's for 32 bit Windows
  61. $32bitDLLs = @{
  62. "Libeay" = "libeay32.dll"
  63. "SSLeay" = "ssleay32.dll"
  64. "OpenSSLLic" = "OpenSSL_License.txt"
  65. "msvcr" = "msvcr120.dll"
  66. "Libsodium" = "libsodium.dll"
  67. }
  68. $ini.Add("32bitDLLs", $32bitDLLs)
  69. Write-Verbose "$($MyInvocation.MyCommand.Name):: Finished Loading Settings"
  70. Return $ini
  71. }
  72. End
  73. {Write-Verbose "$($MyInvocation.MyCommand.Name):: Function ended"}
  74. }