feat(hifi-wizard): non-systemd support and verify step fix
- Add Gentoo/OpenRC and Void/runit to distro selector - All systemctl commands now adapt to selected distro init system - Verify step warns user to close wizard before testing - Status/restart/rollback commands are distro-aware cc
This commit is contained in:
7 files changed
+57
-9
No files matched your search
@@ -5,7 +5,7 @@
|
||||
import WizardStepper, { type Step } from './wizard/WizardStepper.svelte';
|
||||
import CommandBlock from './wizard/CommandBlock.svelte';
|
||||
import WarningBanner from './wizard/WarningBanner.svelte';
|
||||
import DistroSelector from './wizard/DistroSelector.svelte';
|
||||
import DistroSelector, { restartCommands, statusCommands } from './wizard/DistroSelector.svelte';
|
||||
import BitPerfectAppSelector from './wizard/BitPerfectAppSelector.svelte';
|
||||
|
||||
// DAC capabilities from Tauri backend
|
||||
@@ -404,7 +404,7 @@
|
||||
<div class="step-content">
|
||||
<CommandBlock
|
||||
label={$t('dacWizard.precheck.hint')}
|
||||
command="systemctl --user status pipewire pipewire-pulse wireplumber"
|
||||
command={statusCommands[selectedDistro] || statusCommands['other']}
|
||||
/>
|
||||
|
||||
<p class="inactive-warning">{$t('dacWizard.precheck.inactiveWarning')}</p>
|
||||
@@ -626,7 +626,7 @@
|
||||
{:else if currentStep === 'restart'}
|
||||
<div class="step-content">
|
||||
<CommandBlock
|
||||
command="systemctl --user restart pipewire pipewire-pulse wireplumber"
|
||||
command={restartCommands[selectedDistro] || restartCommands['other']}
|
||||
/>
|
||||
|
||||
<WarningBanner variant="info" body={$t('dacWizard.restart.hint')} />
|
||||
@@ -639,6 +639,8 @@
|
||||
|
||||
{:else if currentStep === 'verify'}
|
||||
<div class="step-content">
|
||||
<WarningBanner variant="info" body={$t('dacWizard.verify.postCloseHint')} />
|
||||
|
||||
<div class="verify-instructions">
|
||||
<pre>{$t('dacWizard.verify.instructions')}</pre>
|
||||
</div>
|
||||
@@ -658,7 +660,7 @@
|
||||
'rm -rf ~/.config/pipewire ~/.config/wireplumber',
|
||||
'cp -a "$BACKUP/pipewire" ~/.config/',
|
||||
'cp -a "$BACKUP/wireplumber" ~/.config/',
|
||||
'systemctl --user restart pipewire pipewire-pulse wireplumber'
|
||||
restartCommands[selectedDistro] || restartCommands['other']
|
||||
]}
|
||||
/>
|
||||
|
||||
|
||||
@@ -1,3 +1,26 @@
|
||||
<script lang="ts" module>
|
||||
// Init system commands per distro — exported for use by DACSetupWizard
|
||||
export const restartCommands: Record<string, string> = {
|
||||
debian: 'systemctl --user restart pipewire pipewire-pulse wireplumber',
|
||||
fedora: 'systemctl --user restart pipewire pipewire-pulse wireplumber',
|
||||
arch: 'systemctl --user restart pipewire pipewire-pulse wireplumber',
|
||||
opensuse: 'systemctl --user restart pipewire pipewire-pulse wireplumber',
|
||||
gentoo: '# Depends on your init system:\n# OpenRC: rc-service pipewire restart\n# systemd: systemctl --user restart pipewire pipewire-pulse wireplumber',
|
||||
void: 'sv restart pipewire && sv restart wireplumber',
|
||||
other: '# Restart PipeWire using your init system'
|
||||
};
|
||||
|
||||
export const statusCommands: Record<string, string> = {
|
||||
debian: 'systemctl --user status pipewire pipewire-pulse wireplumber',
|
||||
fedora: 'systemctl --user status pipewire pipewire-pulse wireplumber',
|
||||
arch: 'systemctl --user status pipewire pipewire-pulse wireplumber',
|
||||
opensuse: 'systemctl --user status pipewire pipewire-pulse wireplumber',
|
||||
gentoo: '# Check PipeWire is running:\npw-cli info 0',
|
||||
void: 'sv status pipewire wireplumber',
|
||||
other: '# Check PipeWire is running:\npw-cli info 0'
|
||||
};
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { t } from '$lib/i18n';
|
||||
import CommandBlock from './CommandBlock.svelte';
|
||||
@@ -14,6 +37,8 @@
|
||||
{ id: 'fedora', labelKey: 'dacWizard.precheck.distros.fedora' },
|
||||
{ id: 'arch', labelKey: 'dacWizard.precheck.distros.arch' },
|
||||
{ id: 'opensuse', labelKey: 'dacWizard.precheck.distros.opensuse' },
|
||||
{ id: 'gentoo', labelKey: 'dacWizard.precheck.distros.gentoo' },
|
||||
{ id: 'void', labelKey: 'dacWizard.precheck.distros.void' },
|
||||
{ id: 'other', labelKey: 'dacWizard.precheck.distros.other' },
|
||||
];
|
||||
|
||||
@@ -31,6 +56,12 @@
|
||||
opensuse: [
|
||||
'sudo zypper install pipewire pipewire-pulseaudio wireplumber alsa-utils'
|
||||
],
|
||||
gentoo: [
|
||||
'sudo emerge media-video/pipewire media-video/wireplumber media-sound/alsa-utils'
|
||||
],
|
||||
void: [
|
||||
'sudo xbps-install pipewire wireplumber alsa-utils'
|
||||
],
|
||||
other: []
|
||||
};
|
||||
|
||||
|
||||
@@ -1609,6 +1609,8 @@
|
||||
"fedora": "Fedora / RHEL",
|
||||
"arch": "Arch / Manjaro / EndeavourOS",
|
||||
"opensuse": "openSUSE",
|
||||
"gentoo": "Gentoo / Funtoo (OpenRC)",
|
||||
"void": "Void Linux (runit)",
|
||||
"other": "Andere"
|
||||
},
|
||||
"otherHint": "Stellen Sie sicher, dass diese Pakete (oder Äquivalente) installiert sind: pipewire, pipewire-pulse, wireplumber, alsa-utils"
|
||||
@@ -1688,7 +1690,8 @@
|
||||
"failed": "Fehlgeschlagen",
|
||||
"skip": "Überspringen",
|
||||
"rollbackTitle": "Sicherung wiederherstellen",
|
||||
"rollbackHint": "Führen Sie diese Befehle aus, um Ihre vorherige Konfiguration wiederherzustellen:"
|
||||
"rollbackHint": "Führen Sie diese Befehle aus, um Ihre vorherige Konfiguration wiederherzustellen:",
|
||||
"postCloseHint": "Schließen Sie diesen Assistenten zuerst, dann überprüfen Sie in einem Terminal. Diese Anweisungen dienen als Referenz — Sie können den Assistenten jederzeit unter Einstellungen > Audio erneut öffnen."
|
||||
},
|
||||
"done": {
|
||||
"title": "Einrichtung abgeschlossen",
|
||||
|
||||
@@ -1682,6 +1682,8 @@
|
||||
"fedora": "Fedora / RHEL",
|
||||
"arch": "Arch / Manjaro / EndeavourOS",
|
||||
"opensuse": "openSUSE",
|
||||
"gentoo": "Gentoo / Funtoo (OpenRC)",
|
||||
"void": "Void Linux (runit)",
|
||||
"other": "Other"
|
||||
},
|
||||
"otherHint": "Ensure these packages (or equivalents) are installed: pipewire, pipewire-pulse, wireplumber, alsa-utils"
|
||||
@@ -1761,7 +1763,8 @@
|
||||
"failed": "Failed",
|
||||
"skip": "Skip",
|
||||
"rollbackTitle": "Restore Backup",
|
||||
"rollbackHint": "Run these commands to restore your previous configuration:"
|
||||
"rollbackHint": "Run these commands to restore your previous configuration:",
|
||||
"postCloseHint": "Close this wizard first, then verify in a terminal. These instructions are for reference — you can always re-open the wizard from Settings > Audio."
|
||||
},
|
||||
"done": {
|
||||
"title": "Setup Complete",
|
||||
|
||||
@@ -1682,6 +1682,8 @@
|
||||
"fedora": "Fedora / RHEL",
|
||||
"arch": "Arch / Manjaro / EndeavourOS",
|
||||
"opensuse": "openSUSE",
|
||||
"gentoo": "Gentoo / Funtoo (OpenRC)",
|
||||
"void": "Void Linux (runit)",
|
||||
"other": "Otra"
|
||||
},
|
||||
"otherHint": "Asegúrate de tener instalados (o equivalentes): pipewire, pipewire-pulse, wireplumber, alsa-utils"
|
||||
@@ -1761,7 +1763,8 @@
|
||||
"failed": "Falló",
|
||||
"skip": "Omitir",
|
||||
"rollbackTitle": "Restaurar Backup",
|
||||
"rollbackHint": "Ejecuta estos comandos para restaurar tu configuración anterior:"
|
||||
"rollbackHint": "Ejecuta estos comandos para restaurar tu configuración anterior:",
|
||||
"postCloseHint": "Cierra este asistente primero, luego verifica en una terminal. Estas instrucciones son de referencia — siempre puedes reabrir el asistente desde Configuración > Audio."
|
||||
},
|
||||
"done": {
|
||||
"title": "Configuración Completa",
|
||||
|
||||
@@ -1609,6 +1609,8 @@
|
||||
"fedora": "Fedora / RHEL",
|
||||
"arch": "Arch / Manjaro / EndeavourOS",
|
||||
"opensuse": "openSUSE",
|
||||
"gentoo": "Gentoo / Funtoo (OpenRC)",
|
||||
"void": "Void Linux (runit)",
|
||||
"other": "Autre"
|
||||
},
|
||||
"otherHint": "Assurez-vous que ces paquets (ou équivalents) sont installés : pipewire, pipewire-pulse, wireplumber, alsa-utils"
|
||||
@@ -1688,7 +1690,8 @@
|
||||
"failed": "Échoué",
|
||||
"skip": "Ignorer",
|
||||
"rollbackTitle": "Restaurer la sauvegarde",
|
||||
"rollbackHint": "Exécutez ces commandes pour restaurer votre configuration précédente :"
|
||||
"rollbackHint": "Exécutez ces commandes pour restaurer votre configuration précédente :",
|
||||
"postCloseHint": "Fermez d'abord cet assistant, puis vérifiez dans un terminal. Ces instructions sont pour référence — vous pouvez toujours rouvrir l'assistant depuis Paramètres > Audio."
|
||||
},
|
||||
"done": {
|
||||
"title": "Configuration terminée",
|
||||
|
||||
@@ -1680,6 +1680,8 @@
|
||||
"fedora": "Fedora / RHEL",
|
||||
"arch": "Arch / Manjaro / EndeavourOS",
|
||||
"opensuse": "openSUSE",
|
||||
"gentoo": "Gentoo / Funtoo (OpenRC)",
|
||||
"void": "Void Linux (runit)",
|
||||
"other": "Outra"
|
||||
},
|
||||
"otherHint": "Certifique-se de que estes pacotes (ou equivalentes) estejam instalados: pipewire, pipewire-pulse, wireplumber, alsa-utils"
|
||||
@@ -1759,7 +1761,8 @@
|
||||
"failed": "Falhou",
|
||||
"skip": "Pular",
|
||||
"rollbackTitle": "Restaurar Backup",
|
||||
"rollbackHint": "Execute estes comandos para restaurar sua configuração anterior:"
|
||||
"rollbackHint": "Execute estes comandos para restaurar sua configuração anterior:",
|
||||
"postCloseHint": "Feche este assistente primeiro, depois verifique em um terminal. Estas instruções são para referência — você pode sempre reabrir o assistente em Configurações > Áudio."
|
||||
},
|
||||
"done": {
|
||||
"title": "Configuração Concluída",
|
||||
|
||||
Reference in new issue
Block a user