From e35d273bf2287efa3bb034b1e48f7746fbfe06e6 Mon Sep 17 00:00:00 2001 From: ste Date: Thu, 15 Mar 2018 12:32:35 +0000 Subject: [PATCH 1/3] NOJIRA: Updated test to use a reg key that has more chance existing. --- .../registryResolver/test/testRegistryResolver.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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", From b3dc4bed07e91927e8ec39b67243814c496d56f4 Mon Sep 17 00:00:00 2001 From: ste Date: Fri, 1 Jun 2018 16:33:22 +0100 Subject: [PATCH 2/3] GPII-3092: Removed installer --- Vagrantfile | 3 +-- provisioning/Chocolatey.ps1 | 9 -------- provisioning/Installer.ps1 | 45 ------------------------------------- 3 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 provisioning/Installer.ps1 diff --git a/Vagrantfile b/Vagrantfile index a045b1371..50eac952c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -39,10 +39,9 @@ Vagrant.configure(2) do |config| $destinationDir = Join-Path $env:SystemDrive "tmp" cp $moduleLocation $destinationDir SHELL - + config.vm.provision "shell", path: "provisioning/Chocolatey.ps1" config.vm.provision "shell", path: "provisioning/Npm.ps1" config.vm.provision "shell", path: "provisioning/Build.ps1" - config.vm.provision "shell", path: "provisioning/Installer.ps1" end diff --git a/provisioning/Chocolatey.ps1 b/provisioning/Chocolatey.ps1 index 1e5e00991..ce0f83b2b 100644 --- a/provisioning/Chocolatey.ps1 +++ b/provisioning/Chocolatey.ps1 @@ -21,15 +21,6 @@ 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 diff --git a/provisioning/Installer.ps1 b/provisioning/Installer.ps1 deleted file mode 100644 index f7aa5511c..000000000 --- a/provisioning/Installer.ps1 +++ /dev/null @@ -1,45 +0,0 @@ -<# - This script create all the installers for Windows GPII. -#> -Import-Module (Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) 'Provisioning.psm1') -Force - -$installerRepo = "https://github.com/GPII/gpii-wix-installer" -$installerBranch = "master" - -$mainDir = Join-Path $env:SystemDrive "vagrant" -$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 From f595eb719ad94f0ad198ad1e4c4740361cef8f6d Mon Sep 17 00:00:00 2001 From: ste Date: Wed, 18 Jul 2018 13:08:43 +0100 Subject: [PATCH 3/3] GPII-3092: Removed MSBuild Extension Pack installation. --- provisioning/Chocolatey.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/provisioning/Chocolatey.ps1 b/provisioning/Chocolatey.ps1 index ce0f83b2b..9ee774346 100644 --- a/provisioning/Chocolatey.ps1 +++ b/provisioning/Chocolatey.ps1 @@ -21,7 +21,4 @@ Invoke-Command $chocolatey "install python2 -y" Add-Path $python2Path $true refreshenv -Invoke-Command $chocolatey "install msbuild.extensionpack -y" -refreshenv - exit 0