diff --git a/configure b/configure index 5fe87b60fcd7a5..909cc8ed8063de 100755 --- a/configure +++ b/configure @@ -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 @@ -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) diff --git a/node.gyp b/node.gyp index b00ab2937cba99..92cc4b7bd53bea 100644 --- a/node.gyp +++ b/node.gyp @@ -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 } diff --git a/tools/msvs/msi/product.wxs b/tools/msvs/msi/product.wxs index 878999f309d205..f17894a4513719 100755 --- a/tools/msvs/msi/product.wxs +++ b/tools/msvs/msi/product.wxs @@ -9,7 +9,6 @@ - -