diff options
author | Bert Belder <bertbelder@gmail.com> | 2015-01-14 01:11:51 +0100 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2015-01-14 02:17:10 +0100 |
commit | 42c31f4f2d0cd1c230466471bc850e61ab6ade3f (patch) | |
tree | 039e7612629ad50bc00ebddcd12fae0423e53dfe /tools/msvs | |
parent | 01736ddc0082572d28205ff97525a3b2418a0e4d (diff) | |
download | nodejs-42c31f4f2d0cd1c230466471bc850e61ab6ade3f.tar.gz nodejs-42c31f4f2d0cd1c230466471bc850e61ab6ade3f.tar.bz2 nodejs-42c31f4f2d0cd1c230466471bc850e61ab6ade3f.zip |
win,msi: link node.exe to iojs.exe
Add a feature to the MSI installer that, when selected, hard-links
node.exe to iojs.exe.
PR: https://github.com/iojs/io.js/pull/346
Reviewed-by: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-by: Rod Vagg <rod@vagg.com>
Diffstat (limited to 'tools/msvs')
-rwxr-xr-x | tools/msvs/msi/product.wxs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index b05b04c84..18f9936bf 100755 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -49,6 +49,13 @@ <ComponentRef Id="AppData" /> <ComponentGroupRef Id="Product.Generated"/> + <Feature Id="NodeAlias" + Level="1" + Title="Alias node to iojs" + Description="Create node.exe as an alias for iojs.exe."> + <ComponentRef Id="NodeAlias"/> + </Feature> + <Feature Id="NodePerfCtrSupport" Level="1" Title="Performance counters" @@ -117,6 +124,12 @@ <File Id="iojs.exe" KeyPath="yes" Source="$(var.SourceDir)\iojs.exe"/> </Component> + <Component Id="NodeAlias" Guid="fde09cce-a503-4409-a3c4-61ae2a5a5906"> + <!-- Always remove node.exe. The hard link will be recreated by the + `LinkNodeExeToIojsExe` custom action whenever needed. --> + <RemoveFile Id="node.exe" Name="node.exe" On="both" /> + </Component> + <Component Id="NodeVarsScript"> <File Id="nodevars.bat" KeyPath="yes" Source="$(var.RepoDir)\tools\msvs\nodevars.bat"/> </Component> @@ -249,6 +262,19 @@ </Component> </DirectoryRef> + <CustomAction Id="LinkNodeExeToIojsExe" + FileKey="iojs.exe" + ExeCommand="-e " require('fs').linkSync(process.execPath, require('path').resolve(process.execPath, '../node.exe')); "" + Impersonate="no" + Execute="deferred" + Return="check" /> + + <InstallExecuteSequence> + <Custom Action="LinkNodeExeToIojsExe" After="InstallFiles"> + $NodeAlias = 3 + </Custom> + </InstallExecuteSequence> + <UI Id="NodeInstallUI"> <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8"/> <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12"/> |