v3mt
Version:
A CLI toolkit for managing and deploying Victoria 3 mods, including sending mod files to the game, launching the game, and more.
22 lines (21 loc) • 727 B
JavaScript
import { getLinuxTool } from './get-linux-tool.js';
import os_commands from './os_commands.js';
import { LinuxTools } from './types.js';
function getOSCommands(linuxTool) {
switch (process.platform) {
case 'win32':
return os_commands.windows;
case 'darwin':
return os_commands.macos;
default:
const tool = linuxTool || getLinuxTool();
if (tool == LinuxTools.zenity)
return os_commands.zenity;
if (tool == LinuxTools.qarma)
return os_commands.qarma;
if (tool == LinuxTools.yad)
return os_commands.yad;
return os_commands.kdialog;
}
}
export default getOSCommands;