From 44b4222bc02f102480d1afe05d940612ff6cb983 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sun, 27 Mar 2022 17:56:40 +0200 Subject: WIP Alicorn port (abandonned, To be removed) --- commands/installable.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'commands/installable.js') diff --git a/commands/installable.js b/commands/installable.js index 2c80d58..db7e30f 100644 --- a/commands/installable.js +++ b/commands/installable.js @@ -64,9 +64,9 @@ module.exports = async () => { signs[pack.id] = c.red("unsafe"); } - if (pack.platforms.windows === 2 && pack.platforms.linux === 2 && pack.platforms.mac === 2) { + if (pack.platforms.windows === 2 && pack.platforms.linux === 2 && pack.platforms.mac === 2 && pack.platforms.alicorn === 2) { platforms[pack.id] = c.cyan("all"); - } else if (pack.platforms.windows === 1 && pack.platforms.linux === 1 && pack.platforms.mac === 1) { + } else if (pack.platforms.windows === 1 && pack.platforms.linux === 1 && pack.platforms.mac === 1 && pack.platforms.alicorn === 1) { platforms[pack.id] = c.yellow("all"); } else { platforms[pack.id] = ""; @@ -76,6 +76,8 @@ module.exports = async () => { if (pack.platforms.linux === 2) { platforms[pack.id] += c.cyan("linux") + "," } if (pack.platforms.mac === 1) { platforms[pack.id] += c.yellow("macos") + "," } if (pack.platforms.mac === 2) { platforms[pack.id] += c.cyan("macos") + "," } + if (pack.platforms.alicorn === 1) { platforms[pack.id] += c.yellow("alicorn") + "," } + if (pack.platforms.alicorn === 2) { platforms[pack.id] += c.cyan("alicorn") + "," } if (platforms[pack.id].endsWith(",")) { platforms[pack.id] = platforms[pack.id].substring(0, platforms[pack.id].length - 1) } } @@ -86,11 +88,13 @@ module.exports = async () => { let pack = JSON.parse(fs.readFileSync(home + "/repository/" + dir + "/" + pkg + ".json").toString()); installable = true; - if (os.platform() === "win32" && pack.platforms.windows === 0) { + if (twiplatform === "win32" && pack.platforms.windows === 0) { installable = false; - } else if (os.platform() === "linux" && pack.platforms.linux === 0) { + } else if (twiplatform === "linux" && pack.platforms.linux === 0) { installable = false; - } else if (os.platform() === "darwin" && pack.platforms.mac === 0) { + } else if (twiplatform === "darwin" && pack.platforms.mac === 0) { + installable = false; + } else if (twiplatform === "alicorn" && pack.platforms.alicorn === 0) { installable = false; } -- cgit