Add files via upload
This commit is contained in:
12 files changed
+4682
No files matched your search
@@ -0,0 +1,20 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
/**
|
||||
* Ensure ffmpeg.dll is next to the exe (appOutDir) so the portable exe finds it.
|
||||
* extraFiles may place it in resources/app; copy to root if needed.
|
||||
*/
|
||||
module.exports = async function (context) {
|
||||
if (context.electronPlatformName !== 'win32') return;
|
||||
|
||||
const appOutDir = context.appOutDir;
|
||||
const rootFfmpeg = path.join(appOutDir, 'ffmpeg.dll');
|
||||
const appFfmpeg = path.join(appOutDir, 'resources', 'app', 'ffmpeg.dll');
|
||||
|
||||
if (fs.existsSync(rootFfmpeg)) return; // already in place
|
||||
|
||||
if (fs.existsSync(appFfmpeg)) {
|
||||
fs.copyFileSync(appFfmpeg, rootFfmpeg);
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user