reformat and add distro check for linux
This commit is contained in:
parent
7b9a6d77ab
commit
3247a3fcdf
10
app.js
10
app.js
|
@ -8,6 +8,7 @@ const fs = require('fs');
|
|||
const rpc = require('./discordPresence');
|
||||
const windowName = require('get-window-by-name');
|
||||
const terminalUtil = require('./terminalUtil');
|
||||
const osUtil = require('./osUtil');
|
||||
|
||||
let tempOsuPath;
|
||||
let osuWindowInfo;
|
||||
|
@ -119,6 +120,15 @@ const run = () => {
|
|||
await tryLogin(mainWindow);
|
||||
await doUpdateCheck(mainWindow);
|
||||
if (platform === "linux") {
|
||||
const linuxDistroInfo = await osUtil.getLinuxDistroInfo();
|
||||
if (linuxDistroInfo?.id != "arch") {
|
||||
if (linuxDistroInfo?.id_like != "arch") {
|
||||
mainWindow.webContents.send('status_update', {
|
||||
type: "info",
|
||||
message: "We detected that you are running the Launcher under Linux. It's currently just compatible with Arch like distributions!"
|
||||
});
|
||||
}
|
||||
}
|
||||
try {
|
||||
await terminalUtil.execCommand(`osu-stable -h`);
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user