mirror of
https://github.com/neosubhamoy/pytubepp-helper.git
synced 2026-02-04 11:22:22 +05:30
(refactor): replaced windows copyFiles.js build script with new tauri resource mapping
This commit is contained in:
18
copyFiles.js
18
copyFiles.js
@@ -1,18 +0,0 @@
|
|||||||
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');
|
|
||||||
@@ -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 && node copyFiles.js && npm run build",
|
"beforeBuildCommand": "cargo build --release --manifest-path=./src-tauri/msghost/Cargo.toml && npm run build",
|
||||||
"devUrl": "http://localhost:1422",
|
"devUrl": "http://localhost:1422",
|
||||||
"frontendDist": "../dist"
|
"frontendDist": "../dist"
|
||||||
},
|
},
|
||||||
@@ -62,11 +62,11 @@
|
|||||||
"installerHooks": "installer/windows/nsis-hooks.nsi"
|
"installerHooks": "installer/windows/nsis-hooks.nsi"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"resources": [
|
"resources": {
|
||||||
"pytubepp-helper-msghost.json",
|
"msghost-manifest/windows/chrome/com.neosubhamoy.pytubepp.helper.json": "pytubepp-helper-msghost.json",
|
||||||
"pytubepp-helper-msghost-moz.json",
|
"msghost-manifest/windows/firefox/com.neosubhamoy.pytubepp.helper.json": "pytubepp-helper-msghost-moz.json",
|
||||||
"pytubepp-helper-msghost.exe"
|
"target/release/pytubepp-helper-msghost.exe": "pytubepp-helper-msghost.exe"
|
||||||
],
|
},
|
||||||
"externalBin": [
|
"externalBin": [
|
||||||
"binaries/7zip"
|
"binaries/7zip"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user