Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Windows: keep wxs file with keep option and delete usless code
Browse files Browse the repository at this point in the history
  • Loading branch information
DonnaWuDongxia committed Mar 23, 2016
1 parent 51478f8 commit 3ccd6ce
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions windows/lib/WixSDK.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,20 +257,14 @@ function(app_path, xwalk_path, meta_data, callback) {
});
}

// Extensions are supposed to be in the source application root dir: app_path.
// Then we copy them to the sub-directory of the installer folder:
// app_files_folder/xwalk-extensions
// So, if we still fully copy the source application root directory, all the
// extensions will be duplicated.
// Extensions can be divided by categories in seperate directories.
// Only .dll files in extension folders will be picked up into
// app_files_folder/xwalk-extensions.
this._manifest.extensions.forEach(function(extDir) {
installExtensionDlls(extDir, app_extensions_folder);
if (path.normalize(path.dirname(extDir)) == path.normalize(app_path)) {
extensions_relative_dir.push(path.relative(app_path, extDir));
}
}.bind(this));

// Skip in-folder extensions copying to avoid duplication.
// Because the needed extension files has already be installed by previous step.
installFiles(app_path, app_files_folder, this._manifest.extensions);

var program_menu_folder_ref = product.ele('DirectoryRef', { Id: 'ApplicationProgramsFolder' });
Expand Down Expand Up @@ -362,11 +356,14 @@ function(app_path, xwalk_path, meta_data, callback) {
if (success) {
// Pass back built package
meta_data.msi = path.resolve(basename + ".msi");
// Only delete on success, for debugging reasons.
ShellJS.rm("-f", basename + ".wxs");
ShellJS.rm("-f", basename + ".wixobj");
ShellJS.rm("-f", basename + ".wixpdb");
}
// move .wxs .wixobj .wixpdb files to root_path
// so that they can be kept with option "-k".
var root_path = path.normalize(path.dirname(app_path));
ShellJS.mv("-f", basename + ".wxs", root_path);
ShellJS.mv("-f", basename + ".wixobj", root_path);
ShellJS.mv("-f", basename + ".wixpdb", root_path);

callback(success);
});
};
Expand Down

0 comments on commit 3ccd6ce

Please sign in to comment.