From fc280c65ee3b1b301899400aae522e5fa869bdda Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Thu, 1 Aug 2024 22:01:20 +0300 Subject: [PATCH] fix cuda ci --- scripts/pre_build.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/scripts/pre_build.js b/scripts/pre_build.js index 027cfcf6..46274388 100755 --- a/scripts/pre_build.js +++ b/scripts/pre_build.js @@ -147,18 +147,12 @@ if (hasFeature('cuda')) { } if (platform === 'windows') { - const windowsConfig = { - bundle: { - resources: { - 'ffmpeg\\bin\\x64\\*': './', - 'openblas\\bin\\*.dll': './', - [`${cudaPath}\\bin\\cudart64_*`]: './', - [`${cudaPath}\\bin\\cublas64_*`]: './', - [`${cudaPath}\\bin\\cublasLt64_*`]: './', - }, - }, - } - await fs.writeFile('tauri.windows.conf.json', JSON.stringify(windowsConfig, null, 4)) + const tauriConfigContent = await fs.readFile('tauri.windows.conf.json', { encoding: 'utf-8' }) + const tauriConfig = JSON.parse(tauriConfigContent) + tauriConfig.bundle.resources[`${cudaPath}\\bin\\cudart64_*`] = './' + tauriConfig.bundle.resources[`${cudaPath}\\bin\\cublas64_*`] = './' + tauriConfig.bundle.resources[`${cudaPath}\\bin\\cublasLt64_*`] = './' + await fs.writeFile('tauri.windows.conf.json', JSON.stringify(tauriConfig, null, 4)) } if (platform === 'linux') { // Add cuda toolkit depends package