Skip to content

Commit

Permalink
src: rename node to io.js for Windows installer
Browse files Browse the repository at this point in the history
* quote "NODE_VERSION_STRING" in node.rc to allow for complex version
  strings
* change user-facing strings
* make sure .bat files are crlf

PR-URL: #291
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
  • Loading branch information
rvagg committed Jan 12, 2015
1 parent dd260d2 commit 43e4c90
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 42 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/fixtures/* -text
*.bat text eol=crlf
14 changes: 7 additions & 7 deletions src/res/node.rc
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Joyent, Inc"
VALUE "ProductName", "Node.js"
VALUE "FileDescription", "Node.js: Evented I/O for V8 JavaScript"
VALUE "FileVersion", NODE_VERSION_STRING
VALUE "ProductVersion", NODE_VERSION_STRING
VALUE "CompanyName", "io.js"
VALUE "ProductName", "io.js"
VALUE "FileDescription", "io.js: Server-side JavaScript"
VALUE "FileVersion", "NODE_VERSION_STRING"
VALUE "ProductVersion", "NODE_VERSION_STRING"
VALUE "OriginalFilename", "iojs.exe"
VALUE "InternalName", "node"
VALUE "LegalCopyright", "Copyright Joyent, Inc. and other Node contributors. MIT license."
VALUE "InternalName", "iojs"
VALUE "LegalCopyright", "Copyright io.js contributors. MIT license."
END
END
BLOCK "VarFileInfo"
Expand Down
2 changes: 1 addition & 1 deletion tools/msvs/msi/nodemsi.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ProductVersion>3.5</ProductVersion>
<ProjectGuid>{1d808ff0-b5a9-4be9-859d-b334b6f48be2}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>node-v$(NodeVersion)-$(Platform)</OutputName>
<OutputName>iojs-v$(NodeVersion)-$(Platform)</OutputName>
<OutputType>Package</OutputType>
<EnableProjectHarvesting>True</EnableProjectHarvesting>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
Expand Down
50 changes: 25 additions & 25 deletions tools/msvs/msi/product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<?define ProductName = "Node.js" ?>
<?define ProductDescription = "Node.js" ?>
<?define ProductAuthor = "Joyent, Inc. and other Node contributors" ?>
<?define ProductName = "io.js" ?>
<?define ProductDescription = "io.js" ?>
<?define ProductAuthor = "io.js contributors" ?>

<?define RegistryKeyPath = "SOFTWARE\Node.js" ?>
<?define RegistryKeyPath = "SOFTWARE\io.js" ?>

<?define RepoDir="$(var.ProjectDir)..\..\..\" ?>
<?define SourceDir="$(var.RepoDir)\$(var.Configuration)\" ?>
Expand All @@ -23,11 +23,11 @@
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>

<MajorUpgrade AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A later version of node.js is already installed. Setup will now exit."/>
DowngradeErrorMessage="A later version of io.js is already installed. Setup will now exit."/>

<Icon Id="NodeIcon" SourceFile="$(var.RepoDir)\src\res\node.ico"/>
<Property Id="ARPPRODUCTICON" Value="NodeIcon"/>
<Property Id="ApplicationFolderName" Value="nodejs"/>
<Property Id="ApplicationFolderName" Value="iojs"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>

<Property Id="INSTALLDIR">
Expand All @@ -40,8 +40,8 @@

<Feature Id="NodeRuntime"
Level="1"
Title="Node.js runtime"
Description="Install the core Node.js runtime (node.exe)."
Title="io.js runtime"
Description="Install the core io.js runtime (iojs.exe)."
Absent="disallow">
<ComponentRef Id="NodeExecutable"/>
<ComponentRef Id="NodeVarsScript"/>
Expand All @@ -52,22 +52,22 @@
<Feature Id="NodePerfCtrSupport"
Level="1"
Title="Performance counters"
Description="Installs support for Node.js-specific performance counters.">
Description="Installs support for io.js-specific performance counters.">
<ComponentRef Id="NodePerfCtrSupport"/>
</Feature>

<Feature Id="NodeEtwSupport"
Level="1"
Title="Event tracing (ETW)"
Description="Installs support for event tracing (ETW) events generated by Node.js.">
Description="Installs support for event tracing (ETW) events generated by io.js.">
<ComponentRef Id="NodeEtwSupport"/>
</Feature>
</Feature>

<Feature Id="npm"
Level="1"
Title="npm package manager"
Description="Install npm, the recommended package manager for Node.js.">
Description="Install npm, the recommended package manager for io.js.">
<ComponentRef Id="NpmCmdScript"/>
<ComponentRef Id="NpmBashScript"/>
<ComponentRef Id="NpmConfigurationFile"/>
Expand All @@ -78,18 +78,18 @@
<Feature Level="1"
Id="DocumentationShortcuts"
Title="Online documentation shortcuts"
Description="Add start menu entries that link the the online documentation for Node.js $(var.ProductVersion) and the Node.js website.">
Description="Add start menu entries that link the the online documentation for io.js $(var.ProductVersion) and the io.js website.">
<ComponentRef Id="DocumentationShortcuts"/>
</Feature>

<Feature Id="EnvironmentPath"
Level="1"
Title="Add to PATH"
Description="Add Node, npm, and modules that were globally installed by npm to the PATH environment variable.">
Description="Add io.js, npm, and modules that were globally installed by npm to the PATH environment variable.">
<Feature Id="EnvironmentPathNode"
Level="1"
Title="Node and npm"
Description="Add Node and npm (if installed) to the PATH environment variable.">
Title="io.js and npm"
Description="Add io.js and npm (if installed) to the PATH environment variable.">
<ComponentRef Id="EnvironmentPathNode"/>
</Feature>

Expand All @@ -103,11 +103,11 @@

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="Node.js"/>
<Directory Id="ApplicationProgramsFolder" Name="io.js"/>
</Directory>

<Directory Id="$(var.ProgramFilesFolderId)">
<Directory Id="INSTALLDIR" Name="nodejs">
<Directory Id="INSTALLDIR" Name="iojs">
</Directory>
</Directory>
</Directory>
Expand Down Expand Up @@ -152,17 +152,17 @@
Type="string"
Value="$(var.ProductVersion)"/>
<Shortcut Id="NodeVarsScriptShortcut"
Name="Node.js command prompt"
Name="io.js command prompt"
Target="[%ComSpec]"
Arguments='/k "[INSTALLDIR]nodevars.bat"'
Show="normal"
WorkingDirectory="INSTALLDIR"/>
<Shortcut Id="NodeExecutableShortcut"
Name="Node.js"
Name="io.js"
Target="[INSTALLDIR]iojs.exe"
WorkingDirectory="INSTALLDIR"/>
<Shortcut Id="UninstallProduct"
Name="Uninstall Node.js"
Name="Uninstall io.js"
Target="[SystemFolder]msiexec.exe"
Arguments="/x [ProductCode]"/>
<RemoveFolder Id="RemoveApplicationProgramsFolder"
Expand Down Expand Up @@ -207,12 +207,12 @@
Value="1"
KeyPath="yes"/>
<util:InternetShortcut Id="WebsiteShortcut"
Name="Node.js website"
Target="http://nodejs.org"
Name="io.js website"
Target="http://iojs.org"
Type="url"/>
<util:InternetShortcut Id="DocsShortcut"
Name="Node.js documentation"
Target="http://nodejs.org/dist/v$(var.ProductVersion)/docs/api/"
Name="io.js documentation"
Target="https://iojs.org/dist/v$(var.ProductVersion)/docs/api/"
Type="url"/>
</Component>
</DirectoryRef>
Expand Down Expand Up @@ -293,7 +293,7 @@
<Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="2">NOT Installed</Publish>
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>

<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Node.js has been successfully installed."/>
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="io.js has been successfully installed."/>
</UI>

<UIRef Id="WixUI_Common"/>
Expand Down
10 changes: 5 additions & 5 deletions tools/msvs/nodevars.bat
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
@echo off

rem Ensure this Node.js and npm are first in the PATH
rem Ensure this io.js and npm are first in the PATH
set PATH=%APPDATA%\npm;%~dp0;%PATH%

setlocal enabledelayedexpansion
pushd "%~dp0"

rem Figure out the node version.
rem Figure out the io.js version.
set print_version=.\iojs.exe -p -e "process.versions.node + ' (' + process.arch + ')'"
for /F "usebackq delims=" %%v in (`%print_version%`) do set version=%%v

rem Print message.
if exist npm.cmd (
echo Your environment has been set up for using Node.js !version! and npm.
echo Your environment has been set up for using io.js !version! and npm.
) else (
echo Your environment has been set up for using Node.js !version!.
echo Your environment has been set up for using io.js !version!.
)

popd
endlocal

rem If we're in the node.js directory, change to the user's home dir.
rem If we're in the io.js directory, change to the user's home dir.
if "%CD%\"=="%~dp0" cd /d "%HOMEDRIVE%%HOMEPATH%"
8 changes: 4 additions & 4 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ if errorlevel 1 goto exit
@rem Skip signing if the `nosign` option was specified.
if defined nosign goto licensertf

signtool sign /a /d "Node.js" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\iojs.exe
signtool sign /a /d "io.js" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\iojs.exe
if errorlevel 1 echo Failed to sign exe&goto exit

:licensertf
Expand All @@ -149,12 +149,12 @@ if not defined NIGHTLY goto msibuild
set NODE_VERSION=%NODE_VERSION%.%NIGHTLY%

:msibuild
echo Building node-%NODE_VERSION%
echo Building iojs-%NODE_VERSION%
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:Platform=%msiplatform% /p:NodeVersion=%NODE_VERSION% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
if errorlevel 1 goto exit

if defined nosign goto run
signtool sign /a /d "Node.js" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\node-v%NODE_VERSION%-%msiplatform%.msi
signtool sign /a /d "io.js" /t http://timestamp.globalsign.com/scripts/timestamp.dll Release\iojs-v%NODE_VERSION%-%msiplatform%.msi
if errorlevel 1 echo Failed to sign msi&goto exit

:run
Expand Down Expand Up @@ -218,5 +218,5 @@ rem ***************
:getnodeversion
set NODE_VERSION=
for /F "usebackq tokens=*" %%i in (`python "%~dp0tools\getnodeversion.py"`) do set NODE_VERSION=%%i
if not defined NODE_VERSION echo Cannot determine current version of node.js & exit /b 1
if not defined NODE_VERSION echo Cannot determine current version of io.js & exit /b 1
goto :EOF

0 comments on commit 43e4c90

Please sign in to comment.