diff --git a/Vagrantfile b/Vagrantfile index 1b616af36..19101ab1d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -38,6 +38,5 @@ Vagrant.configure(2) do |config| config.vm.provision "shell", path: "provisioning/Chocolatey.ps1", args: "-originalBuildScriptPath \"C:\\vagrant\\provisioning\\\"" config.vm.provision "shell", path: "provisioning/Npm.ps1", args: "-originalBuildScriptPath \"C:\\vagrant\\provisioning\\\"" config.vm.provision "shell", path: "provisioning/Build.ps1", args: "-originalBuildScriptPath \"C:\\vagrant\\provisioning\\\"" - config.vm.provision "shell", path: "provisioning/Installer.ps1", args: "-originalBuildScriptPath \"C:\\vagrant\\provisioning\\\"" end diff --git a/gpii/node_modules/registryResolver/test/testRegistryResolver.js b/gpii/node_modules/registryResolver/test/testRegistryResolver.js index a78e81966..eb411f6fd 100644 --- a/gpii/node_modules/registryResolver/test/testRegistryResolver.js +++ b/gpii/node_modules/registryResolver/test/testRegistryResolver.js @@ -31,8 +31,8 @@ jqUnit.test("Test Boolean Registry Lookups", function () { jqUnit.expect(2); jqUnit.assertTrue("Testing a registry key that always exists.", - gpii.deviceReporter.registryKeyExists("HKEY_CURRENT_USER", - "Software\\Microsoft\\Command Processor", "CompletionChar", "REG_DWORD")); + gpii.deviceReporter.registryKeyExists("HKEY_LOCAL_MACHINE", + "Software\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot", "REG_DWORD")); jqUnit.assertFalse("Testing a registry key that does not exist.", gpii.deviceReporter.registryKeyExists("HKEY_CURRENT_USER", diff --git a/provisioning/Chocolatey.ps1 b/provisioning/Chocolatey.ps1 index 86e3936c1..d5398ff64 100644 --- a/provisioning/Chocolatey.ps1 +++ b/provisioning/Chocolatey.ps1 @@ -30,16 +30,4 @@ Invoke-Command $chocolatey "install python2 -y" Add-Path $python2Path $true refreshenv -Invoke-Command $chocolatey "install wixtoolset -y" -refreshenv -# The path to WIX can be found in $env:WIX env variable but looks like chocolatey's refreshenv -# is not able to set such variable in this session. As a workaround, we ask the registry -# for such environmental variable and set it so we can use it inside this powershell session. -$wixSetupPath = Join-Path (Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -Name WIX).WIX "bin" -Add-Path $wixSetupPath $true -refreshenv - -Invoke-Command $chocolatey "install msbuild.extensionpack -y" -refreshenv - exit 0 diff --git a/provisioning/Installer.ps1 b/provisioning/Installer.ps1 deleted file mode 100644 index 949c78532..000000000 --- a/provisioning/Installer.ps1 +++ /dev/null @@ -1,53 +0,0 @@ -<# - This script create all the installers for Windows GPII. - - If the script is copied and run from a temporary folder (like when running via vagrant) - the -originalBuildScriptPath parameter should be passed with the path to the original - "provisioning" folder -#> -param ( # default to script path if no parameter is given - [string]$originalBuildScriptPath = (Split-Path -parent $PSCommandPath) -) - -Import-Module "$($originalBuildScriptPath)/Provisioning.psm1" -Force - -$installerRepo = "https://github.com/GPII/gpii-wix-installer" -$installerBranch = "master" - -$mainDir = (get-item $originalBuildScriptPath).parent.FullName -$installerDir = Join-Path $env:SystemDrive "installer" -$npm = "npm" -f $env:SystemDrive -$git = "git" -f $env:SystemDrive -$node = Get-Command "node.exe" | Select -expandproperty Path - -if (!(Test-Path -Path $installerDir)){ - Invoke-Command $git "clone --branch $($installerBranch) $($installerRepo) $($installerDir)" -} - -# Integrate into installer the current version of Node.js in the host machine. -$nodeDestinationDir = Join-Path $installerDir "staging" -Write-Verbose "Copying $($node) to $($nodeDestinationDir) directory for including it into the installer." -cp $node -Destination $nodeDestinationDir -Force - -$stagingWindowsDir = [io.path]::combine($installerDir, "staging", "windows") -if (Test-Path -Path $stagingWindowsDir) { - rm $stagingWindowsDir -Recurse -Force -} -md $stagingWindowsDir - -# We are exiting with as a successful value if robocopy error is less or equal to 3 -# to avoid interruption. http://ss64.com/nt/robocopy-exit.html -Invoke-Command "robocopy" "..\gpii $(Join-Path $stagingWindowsDir "gpii") /job:windows.rcj *.*" (Join-Path $mainDir "provisioning") -errorLevel 3 -Invoke-Command "robocopy" "..\node_modules $(Join-Path $stagingWindowsDir "node_modules") /job:windows.rcj *.*" (Join-Path $mainDir "provisioning") -errorLevel 3 -Invoke-Command "robocopy" "..\tests $(Join-Path $stagingWindowsDir "tests") /job:windows.rcj *.*" (Join-Path $mainDir "provisioning") -errorLevel 3 -Invoke-Command "robocopy" ".. $($stagingWindowsDir) gpii.js index.js package.json package-lock.json README.md LICENSE.txt /NFL /NDL" (Join-Path $mainDir "provisioning") -errorLevel 3 - -Invoke-Command $npm "prune --production" $stagingWindowsDir - -md (Join-Path $installerDir "output") -md (Join-Path $installerDir "temp") - -Invoke-Environment "C:\Program Files (x86)\Microsoft Visual C++ Build Tools\vcbuildtools_msbuild.bat" -$setupDir = Join-Path $installerDir "setup" -$msbuild = Get-MSBuild "4.0" -Invoke-Command $msbuild "setup.msbuild" $setupDir