mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 00:45:14 +00:00
Update winlibs.js
This commit is contained in:
parent
d29bd6c515
commit
8065234bfc
|
@ -9,6 +9,32 @@ exports.require = global.require;
|
|||
var SHELL = require("lib/shell");
|
||||
var FILE = require("lib/file");
|
||||
|
||||
/**
|
||||
* @param {string} LIB
|
||||
* @return {string} clsid
|
||||
*/
|
||||
exports.createManifest = function(FN, clsid) {
|
||||
var manifestPath = FN + ".manifest";
|
||||
|
||||
if (typeof(clsid) !== "undefined") {
|
||||
clsid = "4B72FC46-C543-4101-80DB-7777848DACDC";
|
||||
}
|
||||
|
||||
var lines = [
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>",
|
||||
"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">",
|
||||
"<file name=\"" + FN + ".dll\">",
|
||||
"<comClass clsid=\"{" + clsid + "}\" threadingModel=\"Apartment\" progid=\"" + FN + "\" />",
|
||||
"</file>",
|
||||
"</assembly>"
|
||||
];
|
||||
|
||||
// write a manifest file
|
||||
FILE.writeFile(manifestPath, lines.join("\r\n"), "utf-8");
|
||||
|
||||
return FILE.fileExists(manifestPath);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} LIB
|
||||
* @return {function}
|
||||
|
|
Loading…
Reference in New Issue
Block a user