sync
This commit is contained in:
parent
bf9406f924
commit
1a31e419cc
@ -92,7 +92,7 @@ img.logo {
|
|||||||
img.mascot {
|
img.mascot {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: calc(300px - (50% + 12px));
|
margin-top: calc(300px - (50% + 32px));
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset {
|
fieldset {
|
||||||
@ -372,7 +372,25 @@ div.checkboxes > input[type="checkbox"] {
|
|||||||
font-size: small;
|
font-size: small;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button.load {
|
||||||
|
content: "";
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[hidden] {
|
[hidden] {
|
||||||
display: none;
|
display: none;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
@keyframes backgroundAnimation {
|
||||||
|
0% {
|
||||||
|
background-position: 0% 50%;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
background-position: 100% 50%;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: 0% 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -86,10 +86,18 @@ system.result("server::ping", pong => {
|
|||||||
|
|
||||||
function handleOptionsChanges(key, value) {
|
function handleOptionsChanges(key, value) {
|
||||||
system.call("game::optionSet", { key, value })
|
system.call("game::optionSet", { key, value })
|
||||||
|
const span = document.querySelector(`span#${key}`)
|
||||||
|
if (span) {
|
||||||
|
span.innerText = Math.floor(value)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSettingsChanges(key, value) {
|
function handleSettingsChanges(key, value) {
|
||||||
system.call("settings::set", { key, value })
|
system.call("settings::set", { key, value })
|
||||||
|
const span = document.querySelector(`span#${key == "ram" ? "currentRam" : key}`)
|
||||||
|
if (span) {
|
||||||
|
span.innerText = key == "ram" ? Math.floor(value.max / 1024) + " G" : value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
system.result("game::parseOptions", options => {
|
system.result("game::parseOptions", options => {
|
||||||
@ -121,6 +129,9 @@ system.result("player::profile", playerProfile => {
|
|||||||
console.log(playerProfile)
|
console.log(playerProfile)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
system.result("oculus::getdefaultshaderset", boolean => {
|
||||||
|
sildurs_shader.checked = boolean
|
||||||
|
})
|
||||||
|
|
||||||
window.onload = () => {
|
window.onload = () => {
|
||||||
system.call("hardware::ramInformation")
|
system.call("hardware::ramInformation")
|
||||||
@ -128,5 +139,6 @@ window.onload = () => {
|
|||||||
system.call("server::ping")
|
system.call("server::ping")
|
||||||
system.call("player::profile")
|
system.call("player::profile")
|
||||||
system.call("settings::read")
|
system.call("settings::read")
|
||||||
|
system.call("oculus::getdefaultshaderset")
|
||||||
startAudio()
|
startAudio()
|
||||||
}
|
}
|
||||||
@ -46,10 +46,10 @@
|
|||||||
Ram alloué
|
Ram alloué
|
||||||
</label>
|
</label>
|
||||||
<div class="ranges">
|
<div class="ranges">
|
||||||
<span>
|
<span id="currentRam">
|
||||||
0.5GB
|
0.5GB
|
||||||
</span>
|
</span>
|
||||||
<input type="range" name="ram" min="0" max="2048" id="ram" onchange="handleSettingsChanges(this.name, this.value)">
|
<input type="range" name="ram" min="0" max="2048" id="ram" onchange="handleSettingsChanges('ram', { max: this.value })">
|
||||||
<span id="maxRam">
|
<span id="maxRam">
|
||||||
MAX
|
MAX
|
||||||
</span>
|
</span>
|
||||||
@ -59,7 +59,7 @@
|
|||||||
Distance de rendu
|
Distance de rendu
|
||||||
</label>
|
</label>
|
||||||
<div class="ranges">
|
<div class="ranges">
|
||||||
<span>
|
<span id="renderDistance">
|
||||||
4
|
4
|
||||||
</span>
|
</span>
|
||||||
<input type="range" name="renderDistance" min="4" max="32" id="renderDistance" onchange="handleOptionsChanges(this.name, this.value)">
|
<input type="range" name="renderDistance" min="4" max="32" id="renderDistance" onchange="handleOptionsChanges(this.name, this.value)">
|
||||||
@ -72,7 +72,7 @@
|
|||||||
Taille de l'interface
|
Taille de l'interface
|
||||||
</label>
|
</label>
|
||||||
<div class="ranges">
|
<div class="ranges">
|
||||||
<span>
|
<span id="guiScale">
|
||||||
1
|
1
|
||||||
</span>
|
</span>
|
||||||
<input type="range" name="guiScale" min="1" max="4" id="guiScale" onchange="handleOptionsChanges(this.name, this.value)">
|
<input type="range" name="guiScale" min="1" max="4" id="guiScale" onchange="handleOptionsChanges(this.name, this.value)">
|
||||||
@ -100,12 +100,12 @@
|
|||||||
Luminsoité max
|
Luminsoité max
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>
|
<div>
|
||||||
<input type="checkbox" name="sildurs_shader" id="sildurs_shader">
|
<input type="checkbox" name="sildurs_shader" id="sildurs_shader" onclick="system.call('oculus::defaultshaderset', { boolean: this.checked })">
|
||||||
<label for="sildurs_shader">
|
<label for="sildurs_shader">
|
||||||
Sildur's Shader
|
Sildur's Shader
|
||||||
</label>
|
</label>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</details>
|
</details>
|
||||||
@ -205,7 +205,7 @@
|
|||||||
<section class="center">
|
<section class="center">
|
||||||
<img class="logo" src="./assets/img/logo.png" alt="">
|
<img class="logo" src="./assets/img/logo.png" alt="">
|
||||||
<br>
|
<br>
|
||||||
<button class="play" name="play" onclick="system.call('game::launch')">
|
<button class="play load" name="play" onclick="system.call('game::launch')">
|
||||||
Jouer
|
Jouer
|
||||||
</button>
|
</button>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
76
main.js
76
main.js
@ -1,4 +1,5 @@
|
|||||||
const { BrowserWindow, app, net, dialog, ipcMain, nativeImage, session, shell } = require("electron")
|
const { BrowserWindow, app, net, dialog, ipcMain, nativeImage, session, shell } = require("electron")
|
||||||
|
const properties = require("js-java-properties")
|
||||||
const msmc = require("msmc")
|
const msmc = require("msmc")
|
||||||
const os = require("node:os")
|
const os = require("node:os")
|
||||||
const fs = require("node:fs")
|
const fs = require("node:fs")
|
||||||
@ -46,7 +47,7 @@ async function createLauncherWindow() {
|
|||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
preload: path.join(__dirname, "modules", "preload.js"),
|
preload: path.join(__dirname, "modules", "preload.js"),
|
||||||
webviewTag: true,
|
webviewTag: true,
|
||||||
devTools: true
|
devTools: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (os.platform() == "darwin") {
|
if (os.platform() == "darwin") {
|
||||||
@ -211,6 +212,9 @@ ipcMain.on("call", async (event, data) => {
|
|||||||
case "auth::reset":
|
case "auth::reset":
|
||||||
launcherSettings.set("auth", { token: "", type: "msa", clientToken: "" })
|
launcherSettings.set("auth", { token: "", type: "msa", clientToken: "" })
|
||||||
break
|
break
|
||||||
|
case "settings::set":
|
||||||
|
launcherSettings.set(data.args.key, data.args.value)
|
||||||
|
break
|
||||||
case "shell::openExternal":
|
case "shell::openExternal":
|
||||||
shell.openExternal(data.args.url)
|
shell.openExternal(data.args.url)
|
||||||
break
|
break
|
||||||
@ -256,6 +260,19 @@ ipcMain.on("call", async (event, data) => {
|
|||||||
case "app::devtools":
|
case "app::devtools":
|
||||||
launcherWindow.webContents.openDevTools()
|
launcherWindow.webContents.openDevTools()
|
||||||
break
|
break
|
||||||
|
case "oculus::defaultshaderset":
|
||||||
|
const oculusProperties = properties.parse(fs.readFileSync(path.join(app.getPath("appData"), ".catboat", "config", "oculus.properties")).toString())
|
||||||
|
if (data.args.boolean) {
|
||||||
|
properties.setProperty(oculusProperties, "shaderPack", "Sildur%27s+Vibrant+Shaders+v1.50+Medium.zip")
|
||||||
|
} else {
|
||||||
|
properties.setProperty(oculusProperties, "shaderPack", "")
|
||||||
|
}
|
||||||
|
fs.writeFileSync(path.join(app.getPath("appData"), ".catboat", "config", "oculus.properties"), properties.stringify(oculusProperties))
|
||||||
|
break
|
||||||
|
case "oculus::getdefaultshaderset":
|
||||||
|
const $oculusProperties = properties.parse(fs.readFileSync(path.join(app.getPath("appData"), ".catboat", "config", "oculus.properties")).toString())
|
||||||
|
launcherWindow.webContents.send("Response<oculus::getdefaultshaderset>", properties.getProperty($oculusProperties, "shaderPack") == "Sildur%27s+Vibrant+Shaders+v1.50+Medium.zip" ? true : false)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -264,20 +281,51 @@ async function launchGame(restartGame) {
|
|||||||
const downloadQueue = []
|
const downloadQueue = []
|
||||||
const remoteFiles = await fileManager.getRemoteFiles()
|
const remoteFiles = await fileManager.getRemoteFiles()
|
||||||
const localFiles = fs.readdirSync(path.join(app.getPath("appData"), ".catboat"), { recursive: true })
|
const localFiles = fs.readdirSync(path.join(app.getPath("appData"), ".catboat"), { recursive: true })
|
||||||
launcherWindow.setProgressBar(10, {
|
if (launcherWindow instanceof BrowserWindow) {
|
||||||
mode: "indeterminate"
|
launcherWindow.webContents.send("Response<progress::update>", { type: "landing" })
|
||||||
})
|
}
|
||||||
|
for (const remoteFile of remoteFiles) {
|
||||||
|
try {
|
||||||
|
const localFile = localFiles.find(file => file === remoteFile)
|
||||||
|
|
||||||
launcherWindow.setProgressBar(0, {
|
if (!localFile) {
|
||||||
mode: "none"
|
downloadQueue.push(remoteFile)
|
||||||
})
|
continue
|
||||||
dialog.showMessageBox(launcherWindow, {
|
}
|
||||||
title: "Téléchargement des fichiers",
|
|
||||||
message: "Téléchargement fini."
|
const localHash = await fileManager.getFileHash(path.join(app.getPath("appData"), ".catboat", localFile))
|
||||||
})
|
const remoteHash = await fileManager.getRemoteFileHash(localFile)
|
||||||
|
if (localHash != remoteHash) {
|
||||||
|
downloadQueue.push(localFile)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const localFile of localFiles) {
|
||||||
|
if (!remoteFiles.find(remoteFile => remoteFile.path == localFile) && localFile.startsWith("/mods")) {
|
||||||
|
fs.unlinkSync(path.join(app.getPath("appData"), ".catboat", localFile))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const item of downloadQueue) {
|
||||||
|
const url = `${config.api.base}${config.api.endpoints.downloadFile}/${new String(item).replace(/\\/g, "/")}`
|
||||||
|
try {
|
||||||
|
await download(url, path.join(app.getPath("appData"), ".catboat", path.dirname(item)))
|
||||||
|
if (launcherWindow instanceof BrowserWindow) {
|
||||||
|
launcherWindow.webContents.send("Response<progress::update>", { type: "landing" })
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
if (launcherWindow instanceof BrowserWindow) {
|
||||||
|
launcherWindow.webContents.send("Response<progress::error>", { type: "landing" })
|
||||||
|
}
|
||||||
|
dialog.showErrorBox("Erreur lors du téléchargement des fichiers", error.toString())
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
gamePlayable = true
|
gamePlayable = true
|
||||||
launcher.on("close", () => {
|
launcher.on("close", () => {
|
||||||
launcherSettings.webContents.send("Response<game::launch>", { disablePlayButton: true })
|
launcherWindow.webContents.send("Response<game::launch>", { disablePlayButton: true })
|
||||||
gamePlayable = true
|
gamePlayable = true
|
||||||
})
|
})
|
||||||
launcher.on("debug", (log) => {
|
launcher.on("debug", (log) => {
|
||||||
@ -286,6 +334,9 @@ async function launchGame(restartGame) {
|
|||||||
launcher.on("data", (log) => {
|
launcher.on("data", (log) => {
|
||||||
console.log(log)
|
console.log(log)
|
||||||
})
|
})
|
||||||
|
launcher.on("data", (log) => {
|
||||||
|
console.log(log)
|
||||||
|
})
|
||||||
if (gamePlayable || restartGame) {
|
if (gamePlayable || restartGame) {
|
||||||
const $launchProcess = await launcher.launch({
|
const $launchProcess = await launcher.launch({
|
||||||
root: path.join(app.getPath("appData"), ".catboat"),
|
root: path.join(app.getPath("appData"), ".catboat"),
|
||||||
@ -295,6 +346,7 @@ async function launchGame(restartGame) {
|
|||||||
type: "release"
|
type: "release"
|
||||||
},
|
},
|
||||||
forge: path.join(app.getPath("appData"), ".catboat", "forge-1.16.5.jar"),
|
forge: path.join(app.getPath("appData"), ".catboat", "forge-1.16.5.jar"),
|
||||||
|
javaPath: "C:\\Program Files\\Java\\jdk-17\\bin\\java.exe",
|
||||||
memory: {
|
memory: {
|
||||||
min: 512,
|
min: 512,
|
||||||
max: launcherSettings.get("ram").max
|
max: launcherSettings.get("ram").max
|
||||||
|
|||||||
182
modules/java.js
Normal file
182
modules/java.js
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
const os = require("os")
|
||||||
|
const path = require("path")
|
||||||
|
const osmeta = require("./osmeta")
|
||||||
|
const { exec } = require("child_process")
|
||||||
|
const files = require("./files")
|
||||||
|
const config = require("../config.json")
|
||||||
|
const settings = require("./settings")
|
||||||
|
const { dialog, BrowserWindow, shell } = require("electron")
|
||||||
|
const AdmZip = require("adm-zip")
|
||||||
|
|
||||||
|
function isJavaInstalled() {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
try {
|
||||||
|
exec(`"${settings.get("javaPath") == "" ? "java" : settings.get("javaPath")}" -version`, (error, stdout, stderr) => {
|
||||||
|
if (error) {
|
||||||
|
reject({
|
||||||
|
java: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const output = `${stdout}\n${stderr}`
|
||||||
|
const lines = output.split("\n")
|
||||||
|
const version = lines.filter(line => line.includes("version \""))[0]
|
||||||
|
try {
|
||||||
|
let matchRegEx
|
||||||
|
if (version.includes("_")) {
|
||||||
|
matchRegEx = /(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)\_(?<update>\d+)/
|
||||||
|
} else {
|
||||||
|
matchRegEx = /(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/
|
||||||
|
}
|
||||||
|
const versionMatch = version.match(matchRegEx)
|
||||||
|
const { major, minor, patch, update } = versionMatch.groups
|
||||||
|
resolve({
|
||||||
|
java: true,
|
||||||
|
version: {
|
||||||
|
major: parseInt(major),
|
||||||
|
minor: parseInt(minor),
|
||||||
|
patch: parseInt(patch),
|
||||||
|
update: update ? parseInt(update) : null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
reject({
|
||||||
|
java: false,
|
||||||
|
error
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
reject({
|
||||||
|
java: false,
|
||||||
|
error
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function showJavaErrorBox() {
|
||||||
|
const javaErrorBox = await dialog.showMessageBox(BrowserWindow.getFocusedWindow(), {
|
||||||
|
title: "Mauvaise version de Java",
|
||||||
|
message: "Mauvaise version de Java",
|
||||||
|
detail: "La version de java installé sur votre ordinateur n'est pas compatible avec la version de minecraft utilisé",
|
||||||
|
icon: path.join(__dirname, "code/app/assets/img/java.png"),
|
||||||
|
buttons: [
|
||||||
|
"Fermer",
|
||||||
|
"Installer automatiquement java",
|
||||||
|
"Installer manuellement java",
|
||||||
|
"Utilise un chemin d'accès personnalié",
|
||||||
|
],
|
||||||
|
cancelId: 0,
|
||||||
|
defaultId: 1
|
||||||
|
})
|
||||||
|
return javaErrorBox
|
||||||
|
}
|
||||||
|
function installJava(dest) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
const response = await fetch(`${config.apiServicesURL}/api/java`)
|
||||||
|
const java = await response.json()
|
||||||
|
const arch = osmeta.arch() == "unknow" ? "x64" : osmeta.arch()
|
||||||
|
if (java.downloads[os.platform()]) {
|
||||||
|
if (java.downloads[os.platform()][arch]) {
|
||||||
|
files.downloadFile(config.apiServicesURL + java.downloads[os.platform()][arch].url, path.join(dest, "java.zip"), (error, file) => {
|
||||||
|
if (error) throw error
|
||||||
|
try {
|
||||||
|
const zip = new AdmZip(path.join(dest, "java.zip"))
|
||||||
|
zip.extractAllTo(path.join(dest, "java"), true)
|
||||||
|
files.removeFile(path.join(dest, "java.zip"))
|
||||||
|
if (os.platform() == "darwin") {
|
||||||
|
exec(`chmod +x "${path.join(dest, "java", "jre-1.8.0_411.jre", "Contents", "Home", "bin", "java")}"`, (error) => {
|
||||||
|
if (error) reject(error)
|
||||||
|
resolve(path.join(dest, "java", "jre-1.8.0_411.jre", "Contents", "Home", "bin", "java"))
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
exec(`chmod +x "${path.join(dest, "java", "bin", "java")}"`, (error) => {
|
||||||
|
if (error) reject(error)
|
||||||
|
resolve(path.join(dest, "java", "bin", "java"))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
reject(new Error("Java are not supported for your OS arch"))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
reject(new Error("Java are not supported for your OS"))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main(requiredJavaVersionMinor, dest) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
try {
|
||||||
|
const java = await isJavaInstalled()
|
||||||
|
if (java.version.minor < parseInt(requiredJavaVersionMinor)) {
|
||||||
|
const javaErrorBox = await showJavaErrorBox()
|
||||||
|
switch (javaErrorBox.response) {
|
||||||
|
case 0:
|
||||||
|
resolve()
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
installJava(dest).then(javaPath => {
|
||||||
|
resolve(javaPath)
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
shell.openExternal(`https://www.java.com/fr/download/manual.jsp`)
|
||||||
|
resolve()
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
const javaBinPathSelect = await dialog.showOpenDialog(BrowserWindow.getFocusedWindow(), {
|
||||||
|
filters: [
|
||||||
|
{
|
||||||
|
name: "java",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
if (javaBinPathSelect.canceled) {
|
||||||
|
showJavaErrorBox()
|
||||||
|
} else {
|
||||||
|
resolve(javaBinPathSelect.filePaths[0])
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
resolve()
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
const javaErrorBox = await showJavaErrorBox()
|
||||||
|
switch (javaErrorBox.response) {
|
||||||
|
case 0:
|
||||||
|
resolve()
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
installJava(dest).then(javaPath => {
|
||||||
|
resolve(javaPath)
|
||||||
|
})
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
shell.openExternal(`https://www.java.com/fr/download/manual.jsp`)
|
||||||
|
resolve()
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
const javaBinPathSelect = await dialog.showOpenDialog(BrowserWindow.getFocusedWindow(), {
|
||||||
|
filters: [
|
||||||
|
{
|
||||||
|
name: "java",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
if (javaBinPathSelect.canceled) {
|
||||||
|
showJavaErrorBox()
|
||||||
|
} else {
|
||||||
|
resolve(javaBinPathSelect.filePaths[0])
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports.java = main
|
||||||
@ -5,7 +5,7 @@ let launcherDataPath = path.join(__dirname, ".catboat")
|
|||||||
|
|
||||||
const baseSettings = {
|
const baseSettings = {
|
||||||
ram: {
|
ram: {
|
||||||
max: 1024
|
max: 2048
|
||||||
},
|
},
|
||||||
auth: {
|
auth: {
|
||||||
token: "",
|
token: "",
|
||||||
|
|||||||
27
modules/osmeta.js
Normal file
27
modules/osmeta.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
const os = require("os")
|
||||||
|
|
||||||
|
function arch() {
|
||||||
|
switch (os.arch()) {
|
||||||
|
case "x32":
|
||||||
|
case "ia32":
|
||||||
|
case "x86":
|
||||||
|
case "mips":
|
||||||
|
case "ppc":
|
||||||
|
case "s390":
|
||||||
|
return "x86"
|
||||||
|
case "x64":
|
||||||
|
case "arm64":
|
||||||
|
return "arm64"
|
||||||
|
case "mipsel":
|
||||||
|
case "ppc64":
|
||||||
|
case "riscv64":
|
||||||
|
case "s390x":
|
||||||
|
case "loong64":
|
||||||
|
return "x64"
|
||||||
|
|
||||||
|
default:
|
||||||
|
return "unknown"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports.arch = arch
|
||||||
Loading…
x
Reference in New Issue
Block a user