summaryrefslogtreecommitdiff
path: root/tools/msvs
diff options
context:
space:
mode:
authorSteven Rockarts <srockarts@invidi.com>2015-01-12 23:06:06 +0100
committerBert Belder <bertbelder@gmail.com>2015-01-12 23:06:29 +0100
commite431cae7e70069cd1631081f9dca09990b948feb (patch)
tree0550013c28936936c36b0da8fbe84f6988d1d93f /tools/msvs
parent42ebdcbff1b0846c8e2d291ee320c5e0fcfcb09e (diff)
downloadandroid-node-v8-e431cae7e70069cd1631081f9dca09990b948feb.tar.gz
android-node-v8-e431cae7e70069cd1631081f9dca09990b948feb.tar.bz2
android-node-v8-e431cae7e70069cd1631081f9dca09990b948feb.zip
win,msi: create npm folder in AppData directory
Create the empty npm folder in Roaming\Appdata so that non-Administrator users have a place to store global packages. This fixes the error Error: ENOENT, stat error that occurs when a user tries to run the npm install <package> command. Bug: https://github.com/joyent/node/issues/8141 PR: https://github.com/joyent/node/pull/8838 Reviewed-by: Bert Belder <bertbelder@gmail.com> Please enter the commit message for your changes. Lines starting
Diffstat (limited to 'tools/msvs')
-rwxr-xr-xtools/msvs/msi/product.wxs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs
index 39170bc192..ea14943772 100755
--- a/tools/msvs/msi/product.wxs
+++ b/tools/msvs/msi/product.wxs
@@ -46,6 +46,7 @@
<ComponentRef Id="NodeExecutable"/>
<ComponentRef Id="NodeVarsScript"/>
<ComponentRef Id="NodeStartMenuAndRegistryEntries"/>
+ <ComponentRef Id="AppData" />
<ComponentGroupRef Id="Product.Generated"/>
<Feature Id="NodePerfCtrSupport"
@@ -70,6 +71,7 @@
<ComponentRef Id="NpmCmdScript"/>
<ComponentRef Id="NpmBashScript"/>
<ComponentRef Id="NpmConfigurationFile"/>
+ <ComponentRef Id="AppData" />
<ComponentGroupRef Id="NpmSourceFiles"/>
</Feature>
@@ -184,6 +186,16 @@
</Component>
</Directory>
</Directory>
+
+ <Directory Id="AppDataFolder">
+ <Directory Id="AppDataDir" Name="npm">
+ <Component Id="AppData" Guid="D3B35D0E-D0F9-4D11-A773-D4608E90E1D1">
+ <CreateFolder />
+ <RemoveFolder Id="AppDataDir" On="uninstall" />
+ <RegistryValue Root="HKCU" Key="$(var.RegistryKeyPath)\Components" Type="string" Value="" />
+ </Component>
+ </Directory>
+ </Directory>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">