This commit is contained in:
Gregory Schier
2024-07-19 16:53:37 -07:00
parent c480c8d6cf
commit f0f12f7606
3 changed files with 4 additions and 4 deletions

1
.gitignore vendored
View File

@@ -30,3 +30,4 @@ dist-ssr
.cargo
.tmp
tmp

View File

@@ -1,6 +1,6 @@
const path = require('node:path');
const {execSync} = require('node:child_process');
const {cpSync, mkdirSync, chmodSync, unlinkSync, mkdtempSync} = require('node:fs');
const {cpSync, mkdirSync, chmodSync, unlinkSync} = require('node:fs');
const pluginRuntimeDir = path.join(__dirname, '..');
const destDir = path.join(__dirname, '..', '..', 'src-tauri', 'vendored', 'plugin-runtime');
const blobPath = path.join(pluginRuntimeDir, 'yaak-plugins.blob');
@@ -16,7 +16,7 @@ const DST_BIN_MAP = {
console.log('Building SEA blob');
execSync('node --experimental-sea-config sea-config.json', {cwd: pluginRuntimeDir});
const tmp = mkdtempSync('yaak_sea');
const tmp = path.join(__dirname, 'tmp', `${Math.random()}`);
mkdirSync(tmp, {recursive: true});
let tmpNodePath = process.platform === 'win32' ? path.join(tmp, 'node.exe') : path.join(tmp, 'node');

View File

@@ -3,7 +3,6 @@ const Downloader = require("nodejs-file-downloader");
const path = require("node:path");
const fs = require("node:fs");
const rimraf = require('rimraf');
const {mkdtempSync} = require("fs");
// `${process.platform}_${process.arch}`
const MAC_ARM = 'darwin_arm64';
@@ -35,7 +34,7 @@ const SRC_BIN_MAP = {
(async function () {
const key = `${process.platform}_${process.env.NODE_ARCH ?? process.arch}`;
const url = URL_MAP[key];
const tmpDir = mkdtempSync('yaak_protoc');
const tmpDir = path.join(__dirname, 'tmp', `${Math.random()}`);
const dstDir = path.join(__dirname, `..`, 'src-tauri', 'vendored', 'protoc');
rimraf.sync(dstDir);