update for new api
This commit is contained in:
parent
913d7af120
commit
cac6919e7b
|
@ -1,10 +1,4 @@
|
||||||
global._ = {
|
global._ = {
|
||||||
pack_id: "zootycoon2-uc",
|
|
||||||
version: "33.05.00.0002UO",
|
|
||||||
author: "Microsoft Games | Blue Fang",
|
|
||||||
name: "Zoo Tycoon 2 Ultimate Collection",
|
|
||||||
description: "Zoo Tycoon 2 is an economic simulation video game whose main objective is to create and manage a zoo, in order to raise money for reinvestment, satisfying the needs of its visitors, hiring staff to care for animals, purchasing buildings and attractions, etc.",
|
|
||||||
icon: "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/8c425ae9-aebd-4172-99af-ce419151b76a/dbhnre8-8c8fd2df-ddd8-400d-981a-91b370d8d55c.png",
|
|
||||||
bundles: {
|
bundles: {
|
||||||
"win32-x64": {
|
"win32-x64": {
|
||||||
url: "https://b2-cdn.ragestudio.net/file/bundler-sg/bundles/zoo-tycoon2-uc/versions/33.05.00.0002UO/bnl-win.zip",
|
url: "https://b2-cdn.ragestudio.net/file/bundler-sg/bundles/zoo-tycoon2-uc/versions/33.05.00.0002UO/bnl-win.zip",
|
||||||
|
@ -17,17 +11,13 @@ global._ = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Please do not edit this following code, for gods sake.
|
|
||||||
const path = require("node:path")
|
|
||||||
const child_process = require("node:child_process")
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
id: global._.pack_id,
|
id: "zootycoon2-uc",
|
||||||
version: global._.version,
|
name: "Zoo Tycoon 2 Ultimate Collection",
|
||||||
icon: global._.icon,
|
version: "33.05.00.0002UO",
|
||||||
pack_name: global._.name,
|
icon: "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/8c425ae9-aebd-4172-99af-ce419151b76a/dbhnre8-8c8fd2df-ddd8-400d-981a-91b370d8d55c.png",
|
||||||
description: global._.description,
|
description: "Zoo Tycoon 2 is an economic simulation video game whose main objective is to create and manage a zoo, in order to raise money for reinvestment, satisfying the needs of its visitors, hiring staff to care for animals, purchasing buildings and attractions, etc.",
|
||||||
author: global._.author,
|
author: "Microsoft Games | Blue Fang",
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
id: "es_patch",
|
id: "es_patch",
|
||||||
|
@ -57,39 +47,36 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
execute: `%{pack_dir}/zt.exe`,
|
||||||
executable: true,
|
executable: true,
|
||||||
init: ({ pack_dir, tmp_dir, os_string }) => {
|
init: ({ os_string }) => {
|
||||||
// check if bundle is available for this os
|
|
||||||
if (typeof global._.bundles[os_string] === "undefined") {
|
if (typeof global._.bundles[os_string] === "undefined") {
|
||||||
throw new Error(`OS Not supported: ${os_string}`)
|
throw new Error(`OS Not supported: ${os_string}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const dlBundle = global._.bundles[os_string]
|
const dlBundle = global._.bundles[os_string]
|
||||||
|
|
||||||
const data = {
|
return {
|
||||||
http_downloads: [
|
install_steps: {
|
||||||
{
|
http_downloads: [
|
||||||
path: dlBundle.filename,
|
{
|
||||||
url: dlBundle.url,
|
path: dlBundle.filename,
|
||||||
extract: true,
|
url: dlBundle.url,
|
||||||
delete_after_extract: true,
|
extract: true,
|
||||||
progress: true,
|
delete_after_extract: true,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
update_steps: {
|
||||||
|
http_downloads: [
|
||||||
|
{
|
||||||
|
path: dlBundle.filename,
|
||||||
|
url: dlBundle.url,
|
||||||
|
extract: true,
|
||||||
|
delete_after_extract: 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)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue