-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathNpmInstall.ps1
More file actions
executable file
·41 lines (32 loc) · 1.74 KB
/
NpmInstall.ps1
File metadata and controls
executable file
·41 lines (32 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<#
This script is executed by `npm install`, and builds things required by gpii-windows.
#>
# Turn verbose on, change to "SilentlyContinue" for default behaviour.
$VerbosePreference = "continue"
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$rootDir = Split-Path -Parent $scriptDir
# Include main Provisioning module.
Import-Module (Join-Path $scriptDir 'Provisioning.psm1') -Force -Verbose
$msbuild = Get-MSBuild "4.0"
# Build the settingsHelper solution
nuget restore .\settingsHelper\SettingsHelper.sln
$env:VisualStudioVersion = '15.0'
$settingsHelperDir = Join-Path $rootDir "settingsHelper"
Invoke-Command $msbuild "SettingsHelper.sln /p:Configuration=Release /p:Platform=`"x64`" /p:FrameworkPathOverride=`"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1`"" $settingsHelperDir
## Original from master
## Invoke-Command $msbuild "SettingsHelper.sln /p:Configuration=Release /p:Platform=`"Any CPU`" /p:FrameworkPathOverride=`"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1`"" $settingsHelperDir
# Build the volumeControl solution
$volumeControlDir = Join-Path $rootDir "gpii\node_modules\nativeSettingsHandler\nativeSolutions\VolumeControl"
Invoke-Command $msbuild "VolumeControl.sln /p:Configuration=Release /p:Platform=`"x86`"" $volumeControlDir
# Build the process test helper
$testProcessHandlingDir = Join-Path $rootDir "gpii\node_modules\processHandling\test"
$csc = Join-Path -Path (Split-Path -Parent $msbuild) csc.exe
Invoke-Command $csc "/target:exe /out:test-window.exe test-window.cs" $testProcessHandlingDir
# Build the Windows Service
try
{
subst q: (Join-Path $rootDir "gpii-service")
Invoke-Command "npm" "install" q:
} finally {
subst /d q:
}