Forums

Disable sound in Script

Disable sound in wine-install of the game in the install-script

Auteur Réponses
ertaiNL Lundi 19 Octobre 2015 à 22:17
ertaiNLAnonymous

I am looking at creating a script for installing Civilization II. However due to a bug if the sound is enabled in this game on wine then the game crashes. I have found how to disable the sound manually:

- go to regedt

- add "HKEY_CURRENT_USER/Software/Wine/Drivers/Audio" with an empty string-value.

But now I want to disable the sound in the installer. But when I try:

Set_SoundDriver ""
 
Then that doesn't work. How can I do this?
petch Lundi 19 Octobre 2015 à 23:04
petch
Développeur

Hi,

Interestingly, Set_SoundDriver checks that its parameter is not an empty string, so this doesn't work:

        if [ -n "$1" ]; then
...

Since the behavior of Wine when the driver is set to an empty string is documented, it looks like a bug. I wonder if this test has been added as a hardening attempt, or it prevents some specific problem.

Anyway, even if the test is removed, it doesn't help you for the time being, lots of PlayOnLinux clients with this test in place will be used for years. The next best thing you can use for the moment is the rest of Set_SoundDriver code:

[ "$POL_OS" = "Linux" ] && POL_Wine_UpdateRegistryWinePair 'Drivers' 'Audio' ''

 

 

 

petch Lundi 19 Octobre 2015 à 23:11
petch
Développeur

ertaiNL Mardi 20 Octobre 2015 à 0:06
ertaiNLAnonymous

Thnx, this works