diff --git a/phasmophobia.manifest b/phasmophobia.manifest index 04ed927..5ebbf1c 100644 --- a/phasmophobia.manifest +++ b/phasmophobia.manifest @@ -52,7 +52,7 @@ module.exports = { }, execute: async ({ manifest, pack_dir, tmp_dir }) => { console.log(manifest) - const binary = path.resolve(manifest.packPath, "Launcher.exe") + const binary = path.resolve(pack_dir, "Launcher.exe") await new Promise((resolve, reject) => { const process = child_process.execFile(binary, [], { diff --git a/zootycoon2-uc.manifest b/zootycoon2-uc.manifest new file mode 100644 index 0000000..d635caa --- /dev/null +++ b/zootycoon2-uc.manifest @@ -0,0 +1,65 @@ +global._ = { + pack_id: "zootycoon2-uc", + version: "1.0.0", + author: "The Funny Team", + name: "Zoo Tycoon 2 Ultimate Collection", + description: "(Includes Widescreen patch)", + icon: "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/8c425ae9-aebd-4172-99af-ce419151b76a/dbhnre8-8c8fd2df-ddd8-400d-981a-91b370d8d55c.png", + bundles: { + "win32-x64": { + url: "https://drive.google.com/uc?export=download&id=1EpIIdqLsxI3ZqxUGvh8SlYQkfHDCf9xn&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 }) => { + const binary = path.resolve(pack_dir, "zt.exe") + + await new Promise((resolve, reject) => { + const process = child_process.execFile(binary, [], { + shell: true, + }) + + process.on("exit", resolve) + process.on("error", reject) + }) + } +}