Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat/663] Option to launch BS without SteamVR #664

Merged
merged 10 commits into from
Dec 21, 2024
10 changes: 7 additions & 3 deletions assets/jsons/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"advanced-launch": {
"button": "Erweiterter Start",
"placeholder": "Weitere Argumente, bspw: --revert; --nowait"
}
},
"skipsteam": "Steam überspringen",
"skipsteam-description": "Verhindert, dass Steam automatisch mit Beat Saber geöffnet wird. Aktivieren Sie dies, wenn Sie eine andere VR-Laufzeit wie WiVRn oder Monado verwenden, mit der SteamVR interferieren könnte."
},
"maps": {
"search-bar": {
Expand Down Expand Up @@ -429,11 +431,13 @@
"success": {
"titles": {
"BS_LAUNCHING": "Starte... 🚀",
"STEAM_LAUNCHING": "Steam startet!"
"STEAM_LAUNCHING": "Steam startet!",
"SKIPPING_STEAM_LAUNCH": "Steam-Start überspringen"
},
"msg": {
"BS_LAUNCHING": "Vergiss nicht, dich aufzuwärmen 😉",
"STEAM_LAUNCHING": "Beat Saber wird automatisch nach Steam gestartet."
"STEAM_LAUNCHING": "Beat Saber wird automatisch nach Steam gestartet.",
"SKIPPING_STEAM_LAUNCH": "Ich hoffe, du weißt, was du tust :)"
}
},
"errors": {
Expand Down
14 changes: 9 additions & 5 deletions assets/jsons/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"advanced-launch": {
"button": "Advanced launch",
"placeholder": "Additional arguments ex: --revert; --nowait"
}
},
"skipsteam": "Skip Steam",
"skipsteam-description": "Stops Steam from opening automatically with Beat Saber, enable if you are using a different VR runtime like WiVRn or Monado that SteamVR may interfere with."
},
"maps": {
"search-bar": {
Expand Down Expand Up @@ -244,7 +246,7 @@
"confirm-btn": "Yes I'm sure"
},
"error-notification": {
"message": "An error occur, unable to disable hardware acceleration."
"message": "An error occured, unable to disable hardware acceleration."
}
},
"use-symlinks": {
Expand All @@ -256,7 +258,7 @@
"confirm-btn": "Yes I'm sure"
},
"error-notification": {
"message": "An error occur, unable to change symlinks settings."
"message": "An error occured, unable to change symlinks settings."
}
}
}
Expand Down Expand Up @@ -429,11 +431,13 @@
"success": {
"titles": {
"BS_LAUNCHING": "Launching...🚀",
"STEAM_LAUNCHING": "Steam is launching!"
"STEAM_LAUNCHING": "Steam is launching!",
"SKIPPING_STEAM_LAUNCH": "Skipping Steam launch"
},
"msg": {
"BS_LAUNCHING": "Don't forget to warm up 😉",
"STEAM_LAUNCHING": "Beat Saber will automatically launch after Steam."
"STEAM_LAUNCHING": "Beat Saber will automatically launch after Steam.",
"SKIPPING_STEAM_LAUNCH": "I hope you know what you're doing :)"
}
},
"errors": {
Expand Down
10 changes: 7 additions & 3 deletions assets/jsons/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
"export-maps": "Exportar mapas",
"delete-maps": "Borrar mapas",
"delete-duplicate-maps": "Borrar duplicados"
}
},
"skipsteam": "Saltar Steam",
"skipsteam-description": "Evita que Steam se abra automáticamente con Beat Saber, habilita esto si estás usando un runtime de VR diferente como WiVRn o Monado que SteamVR podría interferir."
},
"tabs": {
"maps": {
Expand Down Expand Up @@ -429,11 +431,13 @@
"success": {
"titles": {
"BS_LAUNCHING": "Lanzamiento...🚀",
"STEAM_LAUNCHING": "¡Steam se está iniciando!"
"STEAM_LAUNCHING": "¡Steam se está iniciando!",
"SKIPPING_STEAM_LAUNCH": "Saltando el lanzamiento de Steam"
},
"msg": {
"BS_LAUNCHING": "No olvides calentar 😉",
"STEAM_LAUNCHING": "Beat Saber se iniciará automáticamente después de Steam."
"STEAM_LAUNCHING": "Beat Saber se iniciará automáticamente después de Steam.",
"SKIPPING_STEAM_LAUNCH": "Espero que sepas lo que estás haciendo :)"
}
},
"errors": {
Expand Down
10 changes: 7 additions & 3 deletions assets/jsons/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"advanced-launch": {
"button": "Lancement avancé",
"placeholder": "Arguments supplémentaires ex: --revert; --nowait"
}
},
"skipsteam": "Ignorer Steam",
"skipsteam-description": "Empêche Steam de s'ouvrir automatiquement avec Beat Saber, activez-le si vous utilisez un autre runtime VR comme WiVRn ou Monado avec lequel SteamVR pourrait interférer."
},
"maps": {
"search-bar": {
Expand Down Expand Up @@ -429,11 +431,13 @@
"success": {
"titles": {
"BS_LAUNCHING": "Lancement...🚀",
"STEAM_LAUNCHING": "Steam se lance !"
"STEAM_LAUNCHING": "Steam se lance !",
"SKIPPING_STEAM_LAUNCH": "Sauter le lancement de Steam"
},
"msg": {
"BS_LAUNCHING": "N'oublie pas de t'échauffer 😉",
"STEAM_LAUNCHING": "Beat Saber se lancera automatiquement après Steam."
"STEAM_LAUNCHING": "Beat Saber se lancera automatiquement après Steam.",
"SKIPPING_STEAM_LAUNCH": "J'espère que vous savez ce que vous faites :)"
}
},
"errors": {
Expand Down
10 changes: 7 additions & 3 deletions assets/jsons/translations/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"advanced-launch": {
"button": "高度な起動",
"placeholder": "追加引数 例:--revert; --nowait"
}
},
"skipsteam": "Steamをスキップ",
"skipsteam-description": "Beat Saberと一緒にSteamが自動的に開くのを防ぎます。SteamVRが干渉する可能性のあるWiVRnやMonadoなど、別のVRランタイムを使用している場合は有効にしてください。"
},
"maps": {
"search-bar": {
Expand Down Expand Up @@ -429,11 +431,13 @@
"success": {
"titles": {
"BS_LAUNCHING": "起動中...🚀",
"STEAM_LAUNCHING": "Steamの起動を確認しました!"
"STEAM_LAUNCHING": "Steamの起動を確認しました!",
"SKIPPING_STEAM_LAUNCH": "Steamの起動をスキップ"
},
"msg": {
"BS_LAUNCHING": "ウォームアップを忘れずに 😉",
"STEAM_LAUNCHING": "Beat SaberはSteamの起動後に自動的に起動します。"
"STEAM_LAUNCHING": "Beat SaberはSteamの起動後に自動的に起動します。",
"SKIPPING_STEAM_LAUNCH": "あなたが何をしているのか分かっていることを願っています :)"
}
},
"errors": {
Expand Down
10 changes: 7 additions & 3 deletions assets/jsons/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"advanced-launch": {
"button": "고급 실행",
"placeholder": "추가 인수 예: --revert; --nowait"
}
},
"skipsteam": "Steam 실행 건너뛰기",
"skipsteam-description": "Beat Saber와 함께 Steam이 자동으로 열리는 것을 방지합니다. SteamVR이 간섭할 수 있는 WiVRn 또는 Monado와 같은 다른 VR 런타임을 사용하는 경우 활성화하세요."
},
"maps": {
"search-bar": {
Expand Down Expand Up @@ -429,11 +431,13 @@
"success": {
"titles": {
"BS_LAUNCHING": "실행 중...🚀",
"STEAM_LAUNCHING": "Steam 실행 확인 완료!"
"STEAM_LAUNCHING": "Steam 실행 확인 완료!",
"SKIPPING_STEAM_LAUNCH": "Steam 실행 건너뛰기"
},
"msg": {
"BS_LAUNCHING": "워밍업을 잊지 마세요 😉",
"STEAM_LAUNCHING": "Beat Saber는 Steam 실행 후 자동으로 시작됩니다."
"STEAM_LAUNCHING": "Beat Saber는 Steam 실행 후 자동으로 시작됩니다.",
"SKIPPING_STEAM_LAUNCH": "신이 무엇을 하고 있는지 알고 있기를 바랍니다 :)"
}
},
"errors": {
Expand Down
10 changes: 7 additions & 3 deletions assets/jsons/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"advanced-launch": {
"button": "Расширенный запуск",
"placeholder": "Параметры запуска, например: --revert; --nowait"
}
},
"skipsteam": "Пропустить Steam",
"skipsteam-description": "Предотвращает автоматическое открытие Steam с Beat Saber, включите, если вы используете другую VR-среду, такую как WiVRn или Monado, с которой SteamVR может мешать."
},
"maps": {
"search-bar": {
Expand Down Expand Up @@ -429,11 +431,13 @@
"success": {
"titles": {
"BS_LAUNCHING": "Запуск...🚀",
"STEAM_LAUNCHING": "Steam запускается!"
"STEAM_LAUNCHING": "Steam запускается!",
"SKIPPING_STEAM_LAUNCH": "Пропуск запуска Steam"
},
"msg": {
"BS_LAUNCHING": "Не забудьте разогреться 😉",
"STEAM_LAUNCHING": "Beat Saber запустится сам после Steam."
"STEAM_LAUNCHING": "Beat Saber запустится сам после Steam.",
"SKIPPING_STEAM_LAUNCH": "Надеюсь, вы знаете, что делаете :)"
}
},
"errors": {
Expand Down
10 changes: 7 additions & 3 deletions assets/jsons/translations/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"advanced-launch": {
"button": "高級啟動",
"placeholder": "額外啟動參數,例如: --revert; --nowait"
}
},
"skipsteam": "跳過 Steam",
"skipsteam-description": "防止 Steam 與 Beat Saber 自動打開,如果您使用的是其他 VR 執行時,如 WiVRn 或 Monado,SteamVR 可能會干擾,請啟用此選項。"
},
"maps": {
"search-bar": {
Expand Down Expand Up @@ -429,11 +431,13 @@
"success": {
"titles": {
"BS_LAUNCHING": "啟動中...🚀",
"STEAM_LAUNCHING": "Steam 正在啟動!"
"STEAM_LAUNCHING": "Steam 正在啟動!",
"SKIPPING_STEAM_LAUNCH": "跳過 Steam 啟動"
},
"msg": {
"BS_LAUNCHING": "別忘了熱身哦 😉",
"STEAM_LAUNCHING": "Beat Saber 會在 Steam 啟動後自動啟動。"
"STEAM_LAUNCHING": "Beat Saber 會在 Steam 啟動後自動啟動。",
"SKIPPING_STEAM_LAUNCH": "希望你知道自己在做什麼 :)"
}
},
"errors": {
Expand Down
10 changes: 7 additions & 3 deletions assets/jsons/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"advanced-launch": {
"button": "高级启动",
"placeholder": "额外启动参数,例如: --revert; --nowait"
}
},
"skipsteam": "跳过 Steam",
"skipsteam-description": "防止 Steam 与 Beat Saber 自动打开,如果您使用的是其他 VR 运行时,如 WiVRn 或 Monado,SteamVR 可能会干扰,请启用此选项。"
},
"maps": {
"search-bar": {
Expand Down Expand Up @@ -429,11 +431,13 @@
"success": {
"titles": {
"BS_LAUNCHING": "启动中...🚀",
"STEAM_LAUNCHING": "Steam 正在启动!"
"STEAM_LAUNCHING": "Steam 正在启动!",
"SKIPPING_STEAM_LAUNCH": "跳过 Steam 启动"
},
"msg": {
"BS_LAUNCHING": "别忘了热身哦 😉",
"STEAM_LAUNCHING": "Beat Saber 会在 Steam 启动后自动启动。"
"STEAM_LAUNCHING": "Beat Saber 会在 Steam 启动后自动启动。",
"SKIPPING_STEAM_LAUNCH": "希望你知道自己在做什么 :)"
}
},
"errors": {
Expand Down
5 changes: 4 additions & 1 deletion src/main/services/bs-launcher/bs-launcher.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ export class BSLauncherService {
oculus: params.oculusMode === "true",
desktop: params.desktopMode === "true",
debug: params.debug === "true",
additionalArgs: params.additionalArgs
additionalArgs: params.additionalArgs,
skipSteam: params.skipSteam === "true",
};

return res;
Expand All @@ -123,6 +124,7 @@ export class BSLauncherService {
if(launchOptions.desktop){ res.desktopMode = "true"; }
if(launchOptions.debug){ res.debug = "true"; }
if(launchOptions.additionalArgs){ res.additionalArgs = launchOptions.additionalArgs; }
if(launchOptions.skipSteam){ res.skipSteam = "true"; }

return res;
}
Expand Down Expand Up @@ -239,6 +241,7 @@ type ShortcutParams = {
desktopMode?: string;
debug?: string;
additionalArgs?: string[];
skipSteam?: string;
version: string;
versionName?: string;
versionIno?: string;
Expand Down
8 changes: 7 additions & 1 deletion src/main/services/bs-launcher/steam-launcher.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
throw CustomError.fromError(new Error(`Path not exist : ${bsExePath}`), BSLaunchError.BS_NOT_FOUND);
}

const skipSteam: boolean = launchOptions.skipSteam ?? false;

// Open Steam if not running
if(!(await this.steam.isSteamRunning())){
if(!skipSteam && !(await this.steam.isSteamRunning())){

obs.next({type: BSLaunchEvent.STEAM_LAUNCHING});

await this.steam.openSteam().then(() => {
Expand All @@ -84,6 +87,9 @@ export class SteamLauncherService extends AbstractLauncherService implements Sto
obs.next({type: BSLaunchWarning.UNABLE_TO_LAUNCH_STEAM});
});
}
else if (launchOptions.skipSteam) {
obs.next({ type: BSLaunchEvent.SKIPPING_STEAM_LAUNCH});
}

// Backup SteamVR when desktop mode is enabled
if(launchOptions.desktop){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function BsVersionItem(props: { version: BSVersion }) {

useOnUpdate(() => {
const subs: Subscription[] = []

subs.push(bsDownloader.downloadingVersion$.pipe(map(download => equal(download, props.version)), distinctUntilChanged()).subscribe(isDownloading => {
setIsDownloading(() => isDownloading);
}));
Expand Down Expand Up @@ -63,6 +63,7 @@ export function BsVersionItem(props: { version: BSVersion }) {
oculus: !!configService.get<boolean>(LaunchMods.OCULUS_MOD),
desktop: !!configService.get<boolean>(LaunchMods.DESKTOP_MOD),
debug: !!configService.get<boolean>(LaunchMods.DEBUG_MOD),
skipSteam: !!configService.get<boolean>(LaunchMods.SKIPSTEAM_MOD),
});
return lastValueFrom(launch$).catch(() => {});
};
Expand Down
14 changes: 8 additions & 6 deletions src/renderer/components/svgs/bsm-icon.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ import { CancelIcon } from "./icons/cancel-icon.component";
import { WarningIcon } from "./icons/warning-icon.component";


export type BsmIconType = SongDetailDiffCharactertistic | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "web-site" | "clean" | "browse" | "add-file" | "cancel" | "warning" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag" | "zh-TW-flag" | "ja-JP-flag" | "ko-KR-flag");

export type BsmIconType = SongDetailDiffCharactertistic | ("settings" | "trash" | "favorite" | "folder" | "bsNote" | "check" | "three-dots" | "twitch" | "eye" | "play" | "checkCircleIcon" | "discord" | "info" | "eye-cross" | "terminal" | "desktop" | "oculus" | "add" | "cross" | "task" | "github" | "close" | "thumbUpFill" | "timerFill" | "pause" | "twitter" | "sync" | "chevron-top" | "copy" | "steam" | "edit" | "export" | "patreon" | "search" | "bsMapDifficulty" | "link" | "unlink" | "download" | "filter" | "mee6" | "volume-up" | "volume-off" | "volume-down" | "shortcut" | "backup-restore" | "web-site" | "clean" | "browse" | "add-file" | "cancel" | "warning" | "fr-FR-flag" | "es-ES-flag" | "en-US-flag" | "en-EN-flag" | "de-DE-flag" | "ru-RU-flag" | "zh-CN-flag" | "zh-TW-flag" | "ja-JP-flag" | "ko-KR-flag" | "null" );

export const BsmIcon = memo(({ className, icon, style }: { className?: string; icon: BsmIconType; style?: CSSProperties }) => {
// TODO : Very ugly very messy, need to find a better way to do this
Expand Down Expand Up @@ -277,13 +278,14 @@ export const BsmIcon = memo(({ className, icon, style }: { className?: string; i
if(icon === "add-file") {
return <AddFileIcon className={className} style={style} />;
}

if(icon === "cancel"){
if(icon === "null") {
return null;
}
if(icon === "cancel") {
return <CancelIcon className={className} style={style} />;
}

if(icon === "warning"){
return <WarningIcon className={className} style={style} />;
if(icon === "warning") {
return <WarningIcon className={className} style={style} />
}

return <TrashIcon className={className} style={style} />;
Expand Down
Loading
Loading