-
Notifications
You must be signed in to change notification settings - Fork 14
Initial checkin for the Node.js UWP code #1
Changes from 1 commit
8e8f8c9
de88785
fb0d466
6624d5e
09b0fb7
7850cb4
f77f278
932065e
ee3634c
70c973c
ddd7af3
4997de3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
@echo off | ||
|
||
if not defined node_dir ( | ||
echo Error: set node_dir to the path of your Node.js clone. | ||
goto end | ||
) | ||
|
||
set batch_dir=%~dp0 | ||
|
||
set copyrelease= | ||
|
@@ -21,8 +26,12 @@ goto next-arg | |
|
||
:args-done | ||
|
||
set node_dir=C:\repos\node | ||
set release_dir=c:\buildoutput\node-uwp | ||
if defined copyrelease ( | ||
if not defined release_dir ( | ||
echo Error: release_dir needs to be set when using copyrelease. | ||
goto end | ||
) | ||
) | ||
|
||
if "%target_arch%"=="arm" goto arm | ||
if "%target_arch%"=="x86" goto x86 | ||
|
@@ -33,45 +42,45 @@ set buildall=1 | |
:arm | ||
@rem build node.dll | ||
call "%node_dir%\vcbuild.bat" arm chakra uwp-dll withoutssl | ||
cd %batch_dir% | ||
pushd %batch_dir% | ||
@rem build nodeuwp.dll | ||
set WindowsSdkDir=%programfiles(x86)%\Windows Kits\10\ | ||
msbuild nodeuwp.sln /p:configuration=release /p:platform=arm | ||
|
||
@rem copy to release directory | ||
if defined copyrelease ( | ||
echo D | xcopy /y /f /i "%node_dir%\Release\node.dll" "%release_dir%\ARM" | ||
echo D | xcopy /y /f /i %~dp0\ARM\release\nodeuwp\nodeuwp.dll "%release_dir%\ARM" | ||
echo D | xcopy /y /f "%node_dir%\Release\node.dll" "%release_dir%\ARM" | ||
echo D | xcopy /y /f "%~dp0\ARM\release\nodeuwp\nodeuwp.dll" "%release_dir%\ARM" | ||
) | ||
if not defined buildall goto end | ||
|
||
:x86 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The x86, x64 and arm labels seem to contain almost identical commands. Consider unifying and using variable expansion. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's cleaner and more readable the way it is since it's small. I'd need to introduce a loop which I would unnecessarily complicate it (esp. since I have a "buildall" option for all labels). |
||
@rem build node.dll | ||
call "%node_dir%\vcbuild.bat" x86 chakra uwp-dll withoutssl | ||
cd %batch_dir% | ||
pushd %batch_dir% | ||
@rem build nodeuwp.dll | ||
set WindowsSdkDir=%programfiles(x86)%\Windows Kits\10\ | ||
msbuild nodeuwp.sln /p:configuration=release /p:platform=x86 | ||
|
||
@rem copy to release directory | ||
if defined copyrelease ( | ||
echo D | xcopy /y /f /i "%node_dir%\Release\node.dll" "%release_dir%\x86" | ||
echo D | xcopy /y /f /i %~dp0\release\nodeuwp\nodeuwp.dll "%release_dir%\x86" | ||
echo D | xcopy /y /f "%node_dir%\Release\node.dll" "%release_dir%\x86" | ||
echo D | xcopy /y /f "%~dp0\release\nodeuwp\nodeuwp.dll" "%release_dir%\x86" | ||
) | ||
if not defined buildall goto end | ||
|
||
:x64 | ||
@rem build node.dll | ||
call "%node_dir%\vcbuild.bat" x64 chakra uwp-dll withoutssl | ||
cd %batch_dir% | ||
pushd %batch_dir% | ||
@rem build nodeuwp.dll | ||
set WindowsSdkDir=%programfiles(x86)%\Windows Kits\10\ | ||
msbuild nodeuwp.sln /p:configuration=release /p:platform=x64 | ||
|
||
@rem copy to release directory | ||
if defined copyrelease ( | ||
echo D | xcopy /y /f /i "%node_dir%\Release\node.dll" "%release_dir%\x64" | ||
echo D | xcopy /y /f /i %~dp0\x64\release\nodeuwp\nodeuwp.dll "%release_dir%\x64" | ||
echo D | xcopy /y /f "%node_dir%\Release\node.dll" "%release_dir%\x64" | ||
echo D | xcopy /y /f "%~dp0\x64\release\nodeuwp\nodeuwp.dll" "%release_dir%\x64" | ||
) | ||
|
||
:end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,10 +29,9 @@ | |
namespace nodeuwp | ||
{ | ||
[Windows::Foundation::Metadata::WebHostHidden] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bad alignment, tabs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is actually autogenerated but I've put tabs to be consistent with the cpp file. |
||
public ref class StartupTask sealed : public Windows::ApplicationModel::Background::IBackgroundTask | ||
{ | ||
public: | ||
virtual void Run(Windows::ApplicationModel::Background::IBackgroundTaskInstance^ taskInstance); | ||
|
||
}; | ||
public ref class StartupTask sealed : public Windows::ApplicationModel::Background::IBackgroundTask | ||
{ | ||
public: | ||
virtual void Run(Windows::ApplicationModel::Background::IBackgroundTaskInstance^ taskInstance); | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assumes msbuild on your path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. vcbuild.bat calls vcvarsall.bat before it creates the node project so msbuild env variables will already be set.