Skip to content

Commit

Permalink
WIP: gypify msi build
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Jan 21, 2015
1 parent 752585d commit 4220fa3
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 3 deletions.
10 changes: 10 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,15 @@ def configure_winsdk(o):
print('ctrpp not found in WinSDK path--using pre-gen files '
'from tools/msvs/genfiles.')


def configure_wix(o):
if flavor != 'win':
return

o['variables']['wix_bin_dir'] = os.path.abspath(os.path.join(
os.environ.get('WIX'), 'bin'));


def write(filename, data):
filename = os.path.join(root_dir, filename)
print 'creating ', filename
Expand Down Expand Up @@ -949,6 +958,7 @@ configure_libuv(output)
configure_v8(output)
configure_openssl(output)
configure_winsdk(output)
configure_wix(output)
configure_intl(output)
configure_fullystatic(output)

Expand Down
100 changes: 99 additions & 1 deletion node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,104 @@
],
} ],
]
}
},

{
'target_name':'npm-files.wxs',
'type':'none',
'actions': [
{
'action_name':'heat',
'inputs': [
'deps/npm',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/npm-files.wxs',
],
'action': [
'"<(wix_bin_dir)/heat.exe"',
'dir', '<@(_inputs)',
'-out', '<@(_outputs)',
'-cg', 'NpmSourceFiles',
'-dr', 'NodeModulesFolder',
'-var', 'var.NpmSourceDir',
'-gg',
],
'msvs_quote_cmd': 0
},
],
},


{
'target_name':'installer',
'type':'none',
'dependencies': [ 'npm-files.wxs' ],

'conditions': [
['target_arch=="x64"', {
'variables': { 'program_files_folder_id': 'ProgramFiles64Folder' }
}, {
'variables': { 'program_files_folder_id': 'ProgramFilesFolder' }
}],
],
'sources': [
'tools/msvs/msi/product.wxs',
'<(SHARED_INTERMEDIATE_DIR)/npm-files.wxs'
],
'rules': [
{
'rule_name':'candle',
'extension':'wxs',
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).wixobj',
],
'action': [
'"<(wix_bin_dir)/candle.exe"',
'-dProductVersion=0.0.0.0',
'-dNoETW=0',
'-dNoPerfCtr=0',
'-dProgramFilesFolderId=<(program_files_folder_id)',
'-dNpmSourceDir=deps/npm',
'-dSourceDir=<(PRODUCT_DIR).',
'-dProjectDir=tools/msvs/msi/',
'-arch', '<(target_arch)',
'-ext', '<(wix_bin_dir)/WixUtilExtension.dll',
'-nologo',
'-out',
'<@(_outputs)',
'<(RULE_INPUT_PATH)',
],
},
],

}, {
'target_name': 'msi',
'type': 'none',
'dependencies': [ 'installer' ],
'actions': [
{
'action_name': 'light',
'inputs': [
'<(SHARED_INTERMEDIATE_DIR)/product.wixobj',
'<(SHARED_INTERMEDIATE_DIR)/npm-files.wixobj'
],
'outputs': [
'<(PRODUCT_DIR)/iojs-v-<(target_arch).msi'
],
'action': [
'"<(wix_bin_dir)/light.exe"',
'-cultures:en-US',
'-ext', '<(wix_bin_dir)/WixUIExtension.dll',
'-ext', '<(wix_bin_dir)/WixUtilExtension.dll',
'-loc', 'tools/msvs/msi/WixUI_en-us.wxl',
'<@(_inputs)',
'-out',
'<@(_outputs)'
]
}
]
},

] # end targets
}
2 changes: 0 additions & 2 deletions tools/msvs/msi/product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<?define RegistryKeyPath = "SOFTWARE\io.js" ?>

<?define RepoDir="$(var.ProjectDir)..\..\..\" ?>
<?define SourceDir="$(var.RepoDir)\$(var.Configuration)\" ?>

<Product Id="*"
Name="$(var.ProductName)"
Expand Down Expand Up @@ -47,7 +46,6 @@
<ComponentRef Id="NodeVarsScript"/>
<ComponentRef Id="NodeStartMenuAndRegistryEntries"/>
<ComponentRef Id="AppData" />
<ComponentGroupRef Id="Product.Generated"/>

<Feature Id="NodeAlias"
Level="1"
Expand Down

0 comments on commit 4220fa3

Please sign in to comment.