Add sed Command for NFAA file

This commit is contained in:
Maroxy 2022-02-05 22:20:46 +01:00
parent ae085b858f
commit 5be0d2c212
No known key found for this signature in database
GPG key ID: F4B27EADB21E3021

View file

@ -121,12 +121,12 @@ export default (launcher: Launcher): Promise<void> => {
if (shaders !== 'custom')
{
if (shaders === 'notahuman')
Neutralino.os.execCommand(`sed -i 's/\\/the\\/absolute\\/path\\/to\\/NFAA.fx/${constants.paths.shadersDir.replaceAll('/', '\\/')}/${shaders}\\/NFAA.fx/g' "${path.addSlashes(constants.paths.shadersDir)}/${shaders}/vkBasalt.conf"`);
const userShadersFile = `${constants.paths.shadersDir}/${shaders}/vkBasalt.conf`;
await Neutralino.filesystem.writeFile(launcherShadersFile, await Neutralino.filesystem.readFile(userShadersFile));
if (shaders == 'notahuman')
await Neutralino.os.execCommand(`sed -i 's/\\/the\\/absolute\\/path\\/to\\/NFAA.fx/${constants.paths.shadersDir.replaceAll('/', '\\/')}\\/${shaders}\\/NFAA.fx/g' "${path.addSlashes(await constants.paths.launcherDir)}/vkBasalt.conf"`);
}
}