From 7a1f2ff7b738d0ede9faa1e409c9ad14d00c4abc Mon Sep 17 00:00:00 2001 From: srgooglo Date: Wed, 29 Nov 2023 14:30:15 +0100 Subject: [PATCH] write run bat --- manifests/lethal-company.manifest | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/manifests/lethal-company.manifest b/manifests/lethal-company.manifest index 014aff6..b9b6fc1 100644 --- a/manifests/lethal-company.manifest +++ b/manifests/lethal-company.manifest @@ -53,5 +53,19 @@ module.exports = { return data }, - execute: `%install_path%/Lethal Company.exe` + after_install: async ({manifest}) => { + const path = require("node:path") + const fs = require("node:fs") + + const runwinBat = path.resolve(manifest.install_path, "runwin.bat") + + await fs.writeFileSync(runwinBat, ` + @echo off + cd "${manifest.install_path}" + start Lethal Company.exe + `, { encoding: 'utf8' }) + + return true + }, + execute: `%install_path%/runwin.bat` }