Compare commits
4 Commits
337a8af68f
...
a358ff08fa
Author | SHA1 | Date | |
---|---|---|---|
a358ff08fa | |||
5db981228e | |||
3247a3fcdf | |||
7b9a6d77ab |
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;
|
||||
@ -126,6 +127,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) {
|
||||
|
@ -8,6 +8,10 @@
|
||||
font-family: 'Exo 2', 'Roboto' !important;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #24283B;
|
||||
}
|
||||
|
||||
.sections {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
17
osUtil.js
Normal file
17
osUtil.js
Normal file
@ -0,0 +1,17 @@
|
||||
const fs = require("fs");
|
||||
|
||||
const getLinuxDistroInfo = async() => {
|
||||
let os = await fs.promises.readFile('/etc/os-release', 'utf8')
|
||||
let opj = {}
|
||||
|
||||
os?.split('\n')?.forEach((line, index) => {
|
||||
let words = line?.split('=')
|
||||
let key = words[0]?.toLowerCase()
|
||||
if (key === '') return
|
||||
let value = words[1]?.replace(/"/g, '')
|
||||
opj[key] = value
|
||||
})
|
||||
return opj;
|
||||
}
|
||||
|
||||
module.exports = { getLinuxDistroInfo };
|
@ -7,7 +7,7 @@ let loggedIn = false;
|
||||
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
titlebar = new Titlebar({
|
||||
backgroundColor: Color.fromHex("#303030"),
|
||||
backgroundColor: Color.fromHex("#24283B"),
|
||||
itemBackgroundColor: Color.fromHex("#121212"),
|
||||
menu: null,
|
||||
maximizable: false
|
||||
|
@ -12,7 +12,7 @@ module.exports = {
|
||||
minWidth: windowWidth / 1.25,
|
||||
frame: false,
|
||||
titleBarStyle: 'hidden',
|
||||
backgroundColor: "#121212",
|
||||
backgroundColor: "#24283B",
|
||||
resizable: false,
|
||||
maximizable: false,
|
||||
minimizable: true,
|
||||
@ -34,9 +34,6 @@ module.exports = {
|
||||
|
||||
window.webContents.setUserAgent(`${appInfo.appName} ${appInfo.appVersion}`);
|
||||
attachTitlebarToWindow(window);
|
||||
// window.webContents.openDevTools({
|
||||
// mode: "detach"
|
||||
// });
|
||||
|
||||
return window;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user