patch options.txt
This commit is contained in:
parent
697049e33d
commit
b3a9381504
|
@ -47,4 +47,5 @@
|
||||||
/**/**/logs
|
/**/**/logs
|
||||||
/**/**/libraries
|
/**/**/libraries
|
||||||
/**/**/saves
|
/**/**/saves
|
||||||
/**/**/versions
|
/**/**/versions
|
||||||
|
/**/**/options.txt
|
11
manifest
11
manifest
|
@ -23,12 +23,16 @@ const defaultConfig = {
|
||||||
assigned_memory: 4096,
|
assigned_memory: 4096,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fs = require("node:fs")
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
...vars,
|
...vars,
|
||||||
rsb_minimun_version: "0.11.1",
|
rsb_minimun_version: "0.11.1",
|
||||||
import_libs: [
|
import_libs: [
|
||||||
"mcl",
|
"mcl",
|
||||||
"ipc",
|
"ipc",
|
||||||
|
"fs",
|
||||||
|
"path",
|
||||||
],
|
],
|
||||||
configs: {
|
configs: {
|
||||||
username: {
|
username: {
|
||||||
|
@ -77,6 +81,13 @@ module.exports = {
|
||||||
},
|
},
|
||||||
executable: true,
|
executable: true,
|
||||||
check_updates_after_execute: true,
|
check_updates_after_execute: true,
|
||||||
|
after_install: async (pkg) => {
|
||||||
|
// patch options.txt from default_options.txt
|
||||||
|
const defaultOptionsPath = `${pkg.install_path}/default_options.txt`
|
||||||
|
const finalOptionsPath = `${pkg.install_path}/options.txt`
|
||||||
|
|
||||||
|
fs.copyFileSync(defaultOptionsPath, finalOptionsPath)
|
||||||
|
},
|
||||||
execute: async (pkg) => {
|
execute: async (pkg) => {
|
||||||
const auth = await pkg.libraries.mcl.auth((pkg.storaged_configs?.username ?? defaultConfig.username))
|
const auth = await pkg.libraries.mcl.auth((pkg.storaged_configs?.username ?? defaultConfig.username))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue