Skip to content

Commit

Permalink
fix #178: simplify use of node.js x64 with iisnode
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Janczuk authored and Tomasz Janczuk committed Sep 13, 2012
1 parent eafa808 commit 79997c5
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/config/iisnode_dev_x64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
<attribute name="node_env" type="string" expanded="true" defaultValue="%node_env%"/>
<attribute name="asyncCompletionThreadCount" type="uint" defaultValue="0"/>
<attribute name="nodeProcessCountPerApplication" type="uint" defaultValue="1"/>
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\nodejs\node.exe&quot;"/>
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles%\nodejs\node.exe&quot;"/>
<attribute name="interceptor" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\iisnode-dev\release\x64\interceptor.js&quot;" />
<attribute name="maxConcurrentRequestsPerProcess" type="uint" allowInfitnite="true" defaultValue="1024"/>
<attribute name="maxNamedPipeConnectionRetry" type="uint" defaultValue="100"/>
Expand Down
2 changes: 1 addition & 1 deletion src/config/iisnode_dev_x86_on_x64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
<attribute name="node_env" type="string" expanded="true" defaultValue="%node_env%"/>
<attribute name="asyncCompletionThreadCount" type="uint" defaultValue="0"/>
<attribute name="nodeProcessCountPerApplication" type="uint" defaultValue="1"/>
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\nodejs\node.exe&quot;"/>
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles%\nodejs\node.exe&quot;"/>
<attribute name="interceptor" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\iisnode-dev\release\x86\interceptor.js&quot;" />
<attribute name="maxConcurrentRequestsPerProcess" type="uint" allowInfitnite="true" defaultValue="1024"/>
<attribute name="maxNamedPipeConnectionRetry" type="uint" defaultValue="100"/>
Expand Down
2 changes: 1 addition & 1 deletion src/config/iisnode_express_schema_x64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
<attribute name="node_env" type="string" expanded="true" defaultValue="%node_env%"/>
<attribute name="asyncCompletionThreadCount" type="uint" defaultValue="0"/>
<attribute name="nodeProcessCountPerApplication" type="uint" defaultValue="1"/>
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\nodejs\node.exe&quot;"/>
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles%\nodejs\node.exe&quot;"/>
<attribute name="interceptor" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\iisnode-express\interceptor.js&quot;" />
<attribute name="maxConcurrentRequestsPerProcess" type="uint" allowInfitnite="true" defaultValue="1024"/>
<attribute name="maxNamedPipeConnectionRetry" type="uint" defaultValue="100"/>
Expand Down
2 changes: 1 addition & 1 deletion src/config/iisnode_schema_x64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Details at http://learn.iis.net/page.aspx/241/configuration-extensibility/
<attribute name="node_env" type="string" expanded="true" defaultValue="%node_env%"/>
<attribute name="asyncCompletionThreadCount" type="uint" defaultValue="0"/>
<attribute name="nodeProcessCountPerApplication" type="uint" defaultValue="1"/>
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles(x86)%\nodejs\node.exe&quot;"/>
<attribute name="nodeProcessCommandLine" type="string" expanded="true" defaultValue="&quot;%programfiles%\nodejs\node.exe&quot;"/>
<attribute name="interceptor" type="string" expanded="true" defaultValue="&quot;%programfiles%\iisnode\interceptor.js&quot;" />
<attribute name="maxConcurrentRequestsPerProcess" type="uint" allowInfitnite="true" defaultValue="1024"/>
<attribute name="maxNamedPipeConnectionRetry" type="uint" defaultValue="100"/>
Expand Down
20 changes: 15 additions & 5 deletions src/setup/iisnode-express-msi/iisnode.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@

<Property Id="ALLUSERS" Secure="yes"/>

<Property Id="NODEEXE">
<DirectorySearch Id="NodeDir" Path="[ProgramFilesFolder]nodejs">
<Property Id="NODEEXE32">
<DirectorySearch Id="NodeDir32" Path="[ProgramFilesFolder]nodejs">
<FileSearch Name="node.exe" />
</DirectorySearch>
</Property>

<Property Id="NODEEXE64">
<DirectorySearch Id="NodeDir64" Path="[ProgramFiles64Folder]nodejs">
<FileSearch Name="node.exe" />
</DirectorySearch>
</Property>
Expand All @@ -47,14 +53,18 @@
<![CDATA[NOT ALLUSERS]]>
</Condition>

<Condition Message="IIS Express 7.x must be installed before iisnode for IIS Express 7.x installation.">
<Condition Message="IIS Express 7.x or later must be installed before iisnode for IIS Express 7.x installation.">
<![CDATA[Installed or APPCMDEXE]]>
</Condition>

<Condition Message="The node.exe is not found at [ProgramFilesFolder]nodejs. IIS cannot serve node.js applications without node.exe. Please run the latest node.js installer from https://github.com/tjanczuk/node/archives/master, then restart this installer.">
<![CDATA[Installed OR NODEEXE]]>
<Condition Message="Node.js x64 is not found in the [ProgramFiles64Folder]\nodejs folder. Please install node.js x64 and restart this installer.">
<![CDATA[VersionNT64 and (Installed OR NODEEXE64)]]>
</Condition>

<Condition Message="Node.js x86 is not found in the [ProgramFilesFolder]\nodejs folder. Please install node.js x86 and restart this installer.">
<![CDATA[NOT(VersionNT64) and (Installed OR NODEEXE32)]]>
</Condition>

<PropertyRef Id="WIX_DIR_COMMON_DOCUMENTS"/>

<Directory Id="TARGETDIR" Name="SourceDir">
Expand Down
4 changes: 2 additions & 2 deletions src/setup/iisnode-msi/customactions.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@

<?if $(var.isWin64) = "yes" ?>
<CustomAction Id="AddPermissionsToNodeExeForDefaultIISUser"
ExeCommand="[System64Folder]icacls.exe &quot;[NODEEXE]&quot; /grant IIS_IUSRS:rx"
ExeCommand="[System64Folder]icacls.exe &quot;[NODEEXE64]&quot; /grant IIS_IUSRS:rx"
Directory="TARGETDIR"
Execute="deferred"
Return="check"
Impersonate="no"/>
<?else?>
<CustomAction Id="AddPermissionsToNodeExeForDefaultIISUser"
ExeCommand="[SystemFolder]icacls.exe &quot;[NODEEXE]&quot; /grant IIS_IUSRS:rx"
ExeCommand="[SystemFolder]icacls.exe &quot;[NODEEXE32]&quot; /grant IIS_IUSRS:rx"
Directory="TARGETDIR"
Execute="deferred"
Return="check"
Expand Down
24 changes: 17 additions & 7 deletions src/setup/iisnode-msi/iisnode.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@

<Property Id="ALLUSERS" Value="1" />

<Property Id="NODEEXE">
<DirectorySearch Id="NodeDir" Path="[ProgramFilesFolder]nodejs">
<Property Id="NODEEXE32">
<DirectorySearch Id="NodeDir32" Path="[ProgramFilesFolder]nodejs">
<FileSearch Name="node.exe" />
</DirectorySearch>
</Property>

<Property Id="NODEEXE64">
<DirectorySearch Id="NodeDir64" Path="[ProgramFiles64Folder]nodejs">
<FileSearch Name="node.exe" />
</DirectorySearch>
</Property>
Expand All @@ -66,20 +72,24 @@

<?if $(var.isWin64) = "yes"?>
<Condition Message="Microsoft Visual C++ 2012 Redistributable Package (x64) is required but not installed. Please install it then rerun this installer.">
<![CDATA[INstalled OR VCREDIST2012INSTALLED]]>
<![CDATA[Installed OR VCREDIST2012INSTALLED]]>
</Condition>
<?else?>
<Condition Message="Microsoft Visual C++ 2012 Redistributable Package (x86) is required but not installed. Please install it then rerun this installer.">
<![CDATA[INstalled OR VCREDIST2012INSTALLED]]>
<![CDATA[Installed OR VCREDIST2012INSTALLED]]>
</Condition>
<?endif?>

<Condition Message="IIS 7.x must be installed before iisnode installation.">
<Condition Message="IIS 7.x or later must be installed before iisnode installation.">
<![CDATA[IISMAJORVERSION >= "#7"]]>
</Condition>

<Condition Message="The node.exe is not found at [ProgramFilesFolder]nodejs. IIS cannot serve node.js applications without node.exe. Please run the latest node.js installer from https://github.com/tjanczuk/node/archives/master, then restart this installer.">
<![CDATA[Installed OR NODEEXE]]>
<Condition Message="Node.js x64 is not found in the [ProgramFiles64Folder]\nodejs folder. Please install node.js x64 and restart this installer.">
<![CDATA[Installed OR NOT(VersionNT64) OR NODEEXE64 OR WOW]]>
</Condition>

<Condition Message="Node.js x86 is not found in the [ProgramFilesFolder]\nodejs folder. Please install node.js x86 and restart this installer.">
<![CDATA[Installed OR (VersionNT64 and NOT(WOW)) OR NODEEXE32]]>
</Condition>

<Directory Id="TARGETDIR" Name="SourceDir">
Expand Down

0 comments on commit 79997c5

Please sign in to comment.