1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00
joplin/packages/app-desktop/utils/7zip/pathToBundled7Zip.ts

14 lines
462 B
TypeScript
Raw Normal View History

import { join, resolve } from 'path';
import bridge from '../../services/bridge';
const pathToBundled7Zip = () => {
// 7zip-bin is very large -- return the path to a version of 7zip
// copied from 7zip-bin.
const executableName = process.platform === 'win32' ? '7za.exe' : '7za';
const baseDir = join(bridge().buildDir(), '7zip');
return { baseDir, executableName, fullPath: resolve(join(baseDir, executableName)) };
};
export default pathToBundled7Zip;