mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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>
This commit is contained in:
parent
01736ddc00
commit
42c31f4f2d
@ -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"/>
|
||||
|
Loading…
Reference in New Issue
Block a user