diff --git a/gui/electron/main/paths.ts b/gui/electron/main/paths.ts index 07facfba5..a13d25c9a 100644 --- a/gui/electron/main/paths.ts +++ b/gui/electron/main/paths.ts @@ -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((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. diff --git a/gui/public/fonts/NotoSansCJK-VF.otf.woff2 b/gui/public/fonts/NotoSansCJK-VF.otf.woff2 deleted file mode 100644 index 042a981b4..000000000 Binary files a/gui/public/fonts/NotoSansCJK-VF.otf.woff2 and /dev/null differ diff --git a/gui/public/fonts/noto-sans-v42-latin-regular.woff2 b/gui/public/fonts/noto-sans-v42-latin-regular.woff2 new file mode 100644 index 000000000..f9e0a65f8 Binary files /dev/null and b/gui/public/fonts/noto-sans-v42-latin-regular.woff2 differ diff --git a/gui/public/images/relaxed_pose_flat.webp b/gui/public/images/relaxed_pose_flat.webp deleted file mode 100644 index fbff001a4..000000000 Binary files a/gui/public/images/relaxed_pose_flat.webp and /dev/null differ diff --git a/gui/public/images/relaxed_pose_sitting.webp b/gui/public/images/relaxed_pose_sitting.webp deleted file mode 100644 index c092cbf83..000000000 Binary files a/gui/public/images/relaxed_pose_sitting.webp and /dev/null differ diff --git a/gui/public/images/relaxed_pose_standing.webp b/gui/public/images/relaxed_pose_standing.webp deleted file mode 100644 index 11cde3a81..000000000 Binary files a/gui/public/images/relaxed_pose_standing.webp and /dev/null differ diff --git a/gui/src/components/settings/pages/InterfaceSettings.tsx b/gui/src/components/settings/pages/InterfaceSettings.tsx index fe94c9e3e..358fc8a79 100644 --- a/gui/src/components/settings/pages/InterfaceSettings.tsx +++ b/gui/src/components/settings/pages/InterfaceSettings.tsx @@ -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'), diff --git a/gui/src/index.scss b/gui/src/index.scss index b231223c9..de68b08be 100644 --- a/gui/src/index.scss +++ b/gui/src/index.scss @@ -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'); diff --git a/package.json b/package.json index 2fbc2aca9..51a7f9726 100644 --- a/package.json +++ b/package.json @@ -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"