Open emilet16 opened 3 years ago
It is same to me.
I build app by electron-builder with asar: "true"
option. so, I extracted .exe
file from this library by using afterPackHook
exports.default = async function (context) {
var fs = require("fs");
var path = require("path");
var origin = path.join(
context.appOutDir,
"resources/app.asar.unpacked/node_modules/mwl-loudness/impl/windows/adjust_get_current_system_volume_vista_plus.exe"
);
var destiny = path.join(
context.appOutDir,
"resources/app.asar.unpacked/adjust_get_current_system_volume_vista_plus.exe"
);
fs.promises.copyFile(origin, destiny, console.log);
};
package.json
"build": {
...,
"asar": true,
"afterPack": "./afterPackHook.js",
},
but it can't find file when released. Is there any option to be replaced or fixed?
I have the same problem when use in electron. To fix it ,i use myw-loudness
instead and it works.
I have the same problem when use in electron.
Loudness is a really nice lib. When I build it with "node .", it works well but if I build it using "electron ." (because I'm using it to make my app), it does nothing. How can I fix this?