From ffe5a46123189cf69d9c8d4c8389913f1d6b6488 Mon Sep 17 00:00:00 2001 From: srgooglo Date: Wed, 15 Nov 2023 15:16:45 +0100 Subject: [PATCH] Upload files to "/" --- phasmophobia.manifest | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 phasmophobia.manifest diff --git a/phasmophobia.manifest b/phasmophobia.manifest new file mode 100644 index 0000000..04ed927 --- /dev/null +++ b/phasmophobia.manifest @@ -0,0 +1,66 @@ +global._ = { + pack_id: "phasmophobia", + version: "0.9.2.0", + author: "The Funny Team", + name: "Phasmophobia", + description: "Too much scary. (OnlineFix Patched)", + icon: "https://img.guildedcdn.com/asset/GameIcons/Phasmophobia-lg.png", + bundles: { + "win32-x64": { + url: "https://drive.google.com/uc?export=download&id=13cYBaqLgWH63T-r58EeWeMp4fC0GRlUX&confirm=t&uuid=a05dbbd4-206a-40c6-bf53-632d3828871e&at=AB6BwCCKpMB8eqSEbQAlFVTS0e3w:1700007776823", + filename: "bundle.zip", + }, + } +} + +// Please do not edit this following code, for gods sake. +const path = require("node:path") +const child_process = require("node:child_process") + +module.exports = { + id: global._.pack_id, + version: global._.version, + icon: global._.icon, + pack_name: global._.name, + description: global._.description, + author: global._.author, + configs: { + vrEnabled: false, + }, + executable: true, + init: ({ pack_dir, tmp_dir, os_string }) => { + // check if bundle is available for this os + if (typeof global._.bundles[os_string] === "undefined") { + throw new Error(`OS Not supported: ${os_string}`) + } + + const dlBundle = global._.bundles[os_string] + + const data = { + http_downloads: [ + { + path: dlBundle.filename, + url: dlBundle.url, + extract: true, + delete_after_extract: true, + progress: true, + } + ] + } + + return data + }, + execute: async ({ manifest, pack_dir, tmp_dir }) => { + console.log(manifest) + const binary = path.resolve(manifest.packPath, "Launcher.exe") + + await new Promise((resolve, reject) => { + const process = child_process.execFile(binary, [], { + shell: true, + }) + + process.on("exit", resolve) + process.on("error", reject) + }) + } +}