mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-24 11:01:20 -08:00
Remove unused assets + formating
This commit is contained in:
1 parent
215228551d
commit
24b2c8722b
9 files changed
+23
-13
No files matched your search
@@ -5,12 +5,11 @@ import { glob } from 'glob';
|
||||
import { spawn } from 'node:child_process';
|
||||
import javaVersionJar from '../resources/java-version/JavaVersion.jar?asset&asarUnpack';
|
||||
import { existsSync } from 'node:fs';
|
||||
import { options } from './cli'
|
||||
import { options } from './cli';
|
||||
|
||||
const javaBin = getPlatform() === 'windows' ? 'java.exe' : 'java';
|
||||
export const CONFIG_IDENTIFIER = 'dev.slimevr.SlimeVR';
|
||||
|
||||
|
||||
export const getGuiDataFolder = () => {
|
||||
const platform = getPlatform();
|
||||
|
||||
@@ -49,7 +48,8 @@ export const getLogsFolder = () => {
|
||||
return join(getGuiDataFolder(), 'logs');
|
||||
};
|
||||
|
||||
export const getWindowStateFile = () => join(getServerDataFolder(), '.window-state.json');
|
||||
export const getWindowStateFile = () =>
|
||||
join(getServerDataFolder(), '.window-state.json');
|
||||
|
||||
const localJavaBin = (sharedDir: string) => {
|
||||
const jre = join(sharedDir, 'jre/bin', javaBin);
|
||||
@@ -60,23 +60,23 @@ const javaHomeBin = () => {
|
||||
const javaHome = process.env['JAVA_HOME'];
|
||||
if (!javaHome) return null;
|
||||
const javaHomeJre = join(javaHome, 'bin', javaBin);
|
||||
console.log(javaHomeJre);
|
||||
return javaHomeJre;
|
||||
};
|
||||
|
||||
|
||||
export const findSystemJRE = async (sharedDir: string) => {
|
||||
const paths = [
|
||||
localJavaBin(sharedDir),
|
||||
javaHomeBin(),
|
||||
...(await glob('/usr/lib/jvm/*/bin/' + javaBin)),
|
||||
...(await glob('/Library/Java/JavaVirtualMachines/*/Contents/Home/bin/' + javaBin)),
|
||||
]
|
||||
];
|
||||
|
||||
for (const path of paths) {
|
||||
if (!path) continue;
|
||||
|
||||
const version = await new Promise<number | null>((resolve) => {
|
||||
const process = spawn(path, ['-jar', javaVersionJar]);
|
||||
const process = spawn(path, ['-jar', javaVersionJar], {});
|
||||
|
||||
let version: number | null = null;
|
||||
|
||||
@@ -88,18 +88,20 @@ export const findSystemJRE = async (sharedDir: string) => {
|
||||
}
|
||||
});
|
||||
|
||||
process.on('error', () => {
|
||||
resolve(null);
|
||||
});
|
||||
|
||||
process.on('exit', () => {
|
||||
resolve(version);
|
||||
});
|
||||
});
|
||||
|
||||
if (version && version >= 17) return path;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
export const findServerJar = () => {
|
||||
|
||||
const paths = [
|
||||
options.path ? path.resolve(options.path) : undefined,
|
||||
// AppImage passes the fakeroot in `APPDIR` env var.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
@@ -79,7 +79,7 @@ export function InterfaceSettings() {
|
||||
{
|
||||
label: l10n.getString('settings-interface-appearance-font-slime_font'),
|
||||
value: 'poppins',
|
||||
fontName: 'poppins, Noto Sans CJK',
|
||||
fontName: 'poppins, Noto Sans',
|
||||
},
|
||||
{
|
||||
label: 'OpenDyslexic',
|
||||
@@ -89,9 +89,9 @@ export function InterfaceSettings() {
|
||||
{ label: 'Lexend', value: 'Lexend', fontName: 'Lexend' },
|
||||
{ label: 'Ubuntu', value: 'Ubuntu', fontName: 'Ubuntu' },
|
||||
{
|
||||
label: 'Noto Sans (CJK)',
|
||||
value: 'Noto Sans CJK',
|
||||
fontName: 'Noto Sans CJK',
|
||||
label: 'Noto Sans',
|
||||
value: 'Noto Sans',
|
||||
fontName: 'Noto Sans',
|
||||
},
|
||||
{
|
||||
label: l10n.getString('settings-interface-appearance-font-os_font'),
|
||||
|
||||
@@ -53,6 +53,14 @@ body {
|
||||
font-style: oblique 0deg 20deg;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
src: url('/fonts/noto-sans-v42-latin-regular.woff2') format('woff2-variations');
|
||||
font-family: 'Noto Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
src: url('/fonts/Ubuntu-R.woff2') format('woff2');
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
"gui": "pnpm run update-solarxr && cd gui && pnpm run gui",
|
||||
"lint:fix": "cd gui && pnpm lint:fix",
|
||||
"skipbundler": "cd gui && pnpm run skipbundler",
|
||||
"build": "echo \"Prob should do something about that\"",
|
||||
"build": "cd gui && pnpm build",
|
||||
"update-solarxr": "cd solarxr-protocol && pnpm run build",
|
||||
"prepare": "husky && pnpm run update-solarxr",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
|
||||
Reference in new issue
Block a user