1
1
mirror of https://github.com/neosubhamoy/pytubepp-helper.git synced 2026-02-04 19:32:21 +05:30

(fixed): failed to bundle project error running candle.exe and light.exe

This commit is contained in:
2025-03-03 22:30:54 +05:30
Verified
parent 1715806d82
commit 96e6bdbc71
10 changed files with 30 additions and 12 deletions

View File

@@ -0,0 +1,18 @@
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const msghostSrc = path.join(__dirname, 'src-tauri', 'target', 'release', 'pytubepp-helper-msghost.exe');
const msghostDest = path.join(__dirname, 'src-tauri', 'pytubepp-helper-msghost.exe');
const msghostManifestWinChromeSrc = path.join(__dirname, 'src-tauri', 'msghost-manifest', 'windows', 'chrome', 'com.neosubhamoy.pytubepp.helper.json');
const msghostManifestWinChromeDest = path.join(__dirname, 'src-tauri', 'pytubepp-helper-msghost.json');
const msghostManifestWinFirefoxSrc = path.join(__dirname, 'src-tauri', 'msghost-manifest', 'windows', 'firefox', 'com.neosubhamoy.pytubepp.helper.json');
const msghostManifestWinFirefoxDest = path.join(__dirname, 'src-tauri', 'pytubepp-helper-msghost-moz.json');
fs.copyFileSync(msghostSrc, msghostDest);
fs.copyFileSync(msghostManifestWinChromeSrc, msghostManifestWinChromeDest);
fs.copyFileSync(msghostManifestWinFirefoxSrc, msghostManifestWinFirefoxDest);
console.log('Files copied successfully');

View File

@@ -130,7 +130,7 @@
] ]
}, },
{ {
"name": "binaries/7zip", "name": "binaries/sevenzip",
"args": true, "args": true,
"sidecar": true "sidecar": true
} }
@@ -140,7 +140,7 @@
"identifier": "shell:allow-spawn", "identifier": "shell:allow-spawn",
"allow": [ "allow": [
{ {
"name": "binaries/7zip", "name": "binaries/sevenzip",
"args": true, "args": true,
"sidecar": true "sidecar": true
} }

View File

@@ -75,7 +75,7 @@
} }
}, },
"externalBin": [ "externalBin": [
"binaries/7zip" "binaries/sevenzip"
] ]
} }
} }

View File

@@ -73,7 +73,7 @@
"pytubepp-helper-autostart.plist" "pytubepp-helper-autostart.plist"
], ],
"externalBin": [ "externalBin": [
"binaries/7zip" "binaries/sevenzip"
] ]
} }
} }

View File

@@ -1,7 +1,7 @@
{ {
"build": { "build": {
"beforeDevCommand": "cargo build --manifest-path=./src-tauri/msghost/Cargo.toml && npm run dev", "beforeDevCommand": "cargo build --manifest-path=./src-tauri/msghost/Cargo.toml && npm run dev",
"beforeBuildCommand": "cargo build --release --manifest-path=./src-tauri/msghost/Cargo.toml && npm run build", "beforeBuildCommand": "cargo build --release --manifest-path=./src-tauri/msghost/Cargo.toml && node copyFiles.x86_64-pc-windows-msvc.js && npm run build",
"devUrl": "http://localhost:1422", "devUrl": "http://localhost:1422",
"frontendDist": "../dist" "frontendDist": "../dist"
}, },
@@ -62,13 +62,13 @@
"installerHooks": "installer/windows/nsis-hooks.nsi" "installerHooks": "installer/windows/nsis-hooks.nsi"
} }
}, },
"resources": { "resources": [
"msghost-manifest/windows/chrome/com.neosubhamoy.pytubepp.helper.json": "pytubepp-helper-msghost.json", "pytubepp-helper-msghost.json",
"msghost-manifest/windows/firefox/com.neosubhamoy.pytubepp.helper.json": "pytubepp-helper-msghost-moz.json", "pytubepp-helper-msghost-moz.json",
"target/release/pytubepp-helper-msghost.exe": "pytubepp-helper-msghost.exe" "pytubepp-helper-msghost.exe"
}, ],
"externalBin": [ "externalBin": [
"binaries/7zip" "binaries/sevenzip"
] ]
} }
} }

View File

@@ -101,7 +101,7 @@ export default function ExtensionManagerPage() {
); );
setUpdateStatus('Unpacking') setUpdateStatus('Unpacking')
const output = await Command.sidecar('binaries/7zip', ['x', tempExtensionDownloadPath, `-o${extensionDirPath}`, '-aoa']).execute() const output = await Command.sidecar('binaries/sevenzip', ['x', tempExtensionDownloadPath, `-o${extensionDirPath}`, '-aoa']).execute()
if (output.code === 0) { if (output.code === 0) {
console.log(output.stdout) console.log(output.stdout)
console.log(`Unpacked ${tempExtensionDownloadPath} to ${extensionDirPath}`) console.log(`Unpacked ${tempExtensionDownloadPath} to ${extensionDirPath}`)