import { app } from 'electron'
import { join } from 'path'

/** Bundled `resources/pipe` (extraResources) — use for spawning pipe.exe etc. */
export function getPipeBundleDir(): string {
  if (app.isPackaged) {
    return join(process.resourcesPath, 'pipe')
  }
  // In dev/preview, run from project root so we can use the plain resources/pipe folder
  return join(process.cwd(), 'resources/pipe')
}
