linux support

This commit is contained in:
Asaki Yuki 2026-02-20 23:47:22 +07:00
parent 246cdbb8d2
commit 994fb34dbd
2 changed files with 12 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"name": "asajs",
"version": "4.0.5-indev",
"version": "4.0.6-indev",
"description": "Create your Minecraft JSON-UI resource packs using JavaScript",
"keywords": [
"Minecraft",

View file

@ -173,6 +173,17 @@ export function getGamedataPath() {
}
}
case "linux": {
const gamedata = path.join(process.env.HOME!, "\\.local\\share\\mcpelauncher\\games\\com.mojang")
if (fs.existsSync(gamedata)) return (pathinfo.gamepath = gamedata)
else {
return (pathinfo.gamepath = path.join(
process.env.HOME!,
"\\.var\\app\\io.mrarm.mcpelauncher\\data\\mcpelauncher\\games\\com.mojang",
))
}
}
default: {
console.warn(`Your platform is not supported the install feature yet! \nYour OS version: ${os.version()}`)
}