mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2026-05-06 18:35:49 +05:30
refactor: improved windows arch specific configs and shell spawning
This commit is contained in:
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -37,11 +37,11 @@ jobs:
|
||||
- platform: 'windows-latest'
|
||||
target_platform: 'win32'
|
||||
target_arch: 'x64'
|
||||
args: ''
|
||||
args: '--target x86_64-pc-windows-msvc --config ./src-tauri/tauri.windows-x86_64.conf.json'
|
||||
- platform: 'windows-11-arm'
|
||||
target_platform: 'win32'
|
||||
target_arch: 'arm64'
|
||||
args: '--target aarch64-pc-windows-msvc'
|
||||
args: '--target aarch64-pc-windows-msvc --config ./src-tauri/tauri.windows-aarch64.conf.json'
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: 🚚 Checkout repository
|
||||
|
||||
@@ -150,7 +150,8 @@ Want to build/compile NeoDLP from the source code? Follow these simple steps to
|
||||
5. Run build process (run the command based on your platform and architecture)
|
||||
```shell
|
||||
# command for windows users
|
||||
npm run tauri build # for both x64/ARM64 devices
|
||||
npm run tauri:build:windows-x64 # for x64 devices
|
||||
npm run tauri:build:windows-arm64 # for ARM64 devices
|
||||
|
||||
# commands for linux users
|
||||
npm run tauri:build:linux-x64 # for x64 devices
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
"tauri:build:macos-x64": "npm run tauri build -- --config ./src-tauri/tauri.macos-x86_64.conf.json",
|
||||
"tauri:dev:macos-arm64": "npm run tauri dev -- --config ./src-tauri/tauri.macos-aarch64.conf.json",
|
||||
"tauri:build:macos-arm64": "npm run tauri build -- --config ./src-tauri/tauri.macos-aarch64.conf.json",
|
||||
"tauri:dev:windows-x64": "npm run tauri dev -- --target x86_64-pc-windows-msvc",
|
||||
"tauri:build:windows-x64": "npm run tauri build -- --target x86_64-pc-windows-msvc",
|
||||
"tauri:dev:windows-arm64": "npm run tauri dev -- --target aarch64-pc-windows-msvc",
|
||||
"tauri:build:windows-arm64": "npm run tauri build -- --target aarch64-pc-windows-msvc",
|
||||
"tauri:dev:windows-x64": "npm run tauri dev -- --config ./src-tauri/tauri.windows-x86_64.conf.json",
|
||||
"tauri:build:windows-x64": "npm run tauri build -- --config ./src-tauri/tauri.windows-x86_64.conf.json",
|
||||
"tauri:dev:windows-arm64": "npm run tauri dev -- --config ./src-tauri/tauri.windows-aarch64.conf.json",
|
||||
"tauri:build:windows-arm64": "npm run tauri build -- --config ./src-tauri/tauri.windows-aarch64.conf.json",
|
||||
"download": "node ./scripts/download-bins.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
63
src-tauri/tauri.windows-aarch64.conf.json
Normal file
63
src-tauri/tauri.windows-aarch64.conf.json
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"identifier": "com.neosubhamoy.neodlp",
|
||||
"build": {
|
||||
"beforeDevCommand": "cargo build --target=aarch64-pc-windows-msvc --manifest-path=./src-tauri/msghost/Cargo.toml && npm run dev",
|
||||
"beforeBuildCommand": "cargo build --release --target=aarch64-pc-windows-msvc --manifest-path=./src-tauri/msghost/Cargo.toml && npm run build",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"frontendDist": "../dist"
|
||||
},
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "NeoDLP",
|
||||
"width": 1080,
|
||||
"height": 680,
|
||||
"decorations": false,
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": null,
|
||||
"capabilities": [
|
||||
"default",
|
||||
"shell-scope"
|
||||
]
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": ["msi", "nsis"],
|
||||
"createUpdaterArtifacts": true,
|
||||
"licenseFile": "../LICENSE",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"externalBin": [
|
||||
"binaries/yt-dlp",
|
||||
"binaries/ffmpeg",
|
||||
"binaries/ffprobe",
|
||||
"binaries/aria2c",
|
||||
"binaries/deno",
|
||||
"binaries/neodlp-pot"
|
||||
],
|
||||
"resources": {
|
||||
"target/aarch64-pc-windows-msvc/release/neodlp-msghost.exe": "neodlp-msghost.exe",
|
||||
"resources/msghost-manifest/windows/chrome.json": "chrome.json",
|
||||
"resources/msghost-manifest/windows/firefox.json": "firefox.json",
|
||||
"resources/plugins/yt-dlp-plugins/": "yt-dlp-plugins/"
|
||||
},
|
||||
"windows": {
|
||||
"wix": {
|
||||
"fragmentPaths": ["installer/windows/wix/reg-fragment.wxs"],
|
||||
"componentRefs": ["NeoDlpRegEntriesFragment"]
|
||||
},
|
||||
"nsis": {
|
||||
"installerHooks": "installer/windows/nsis/hooks.nsi"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"identifier": "com.neosubhamoy.neodlp",
|
||||
"build": {
|
||||
"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",
|
||||
"beforeDevCommand": "cargo build --target=x86_64-pc-windows-msvc --manifest-path=./src-tauri/msghost/Cargo.toml && npm run dev",
|
||||
"beforeBuildCommand": "cargo build --release --target=x86_64-pc-windows-msvc --manifest-path=./src-tauri/msghost/Cargo.toml && npm run build",
|
||||
"devUrl": "http://localhost:1420",
|
||||
"frontendDist": "../dist"
|
||||
},
|
||||
@@ -45,7 +45,7 @@
|
||||
"binaries/neodlp-pot"
|
||||
],
|
||||
"resources": {
|
||||
"target/release/neodlp-msghost.exe": "neodlp-msghost.exe",
|
||||
"target/x86_64-pc-windows-msvc/release/neodlp-msghost.exe": "neodlp-msghost.exe",
|
||||
"resources/msghost-manifest/windows/chrome.json": "chrome.json",
|
||||
"resources/msghost-manifest/windows/firefox.json": "firefox.json",
|
||||
"resources/plugins/yt-dlp-plugins/": "yt-dlp-plugins/"
|
||||
@@ -201,9 +201,10 @@ export default function useDownloader() {
|
||||
|
||||
const isFlatpak = await invoke<boolean>('is_flatpak');
|
||||
const xdgDataDir = await dataDir();
|
||||
const spawnOpts = { env: { PYTHONUNBUFFERED: '1' } };
|
||||
const command = isFlatpak
|
||||
? Command.create('sh', ['-c', `${xdgDataDir}/yt-dlp/yt-dlp ${args.map(arg => `'${arg.replace(/'/g, "'\\''")}'`).join(' ')}`])
|
||||
: Command.sidecar('binaries/yt-dlp', args);
|
||||
? Command.create('sh', ['-c', `${xdgDataDir}/yt-dlp/yt-dlp ${args.map(arg => `'${arg.replace(/'/g, "'\\''")}'`).join(' ')}`], spawnOpts)
|
||||
: Command.sidecar('binaries/yt-dlp', args, spawnOpts);
|
||||
|
||||
let jsonOutput = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user