Jump to content


Photo

How do I run the OS X install script?


  • Please log in to reply
24 replies to this topic

#1 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 21 January 2008 - 06:52 PM

Hello,

As this isn't a WeiDU mod, and as my experience with Terminal commands isn't too extensive, I'm unable to figure out how to run the install script for the OS X version of this mod. I tried navigating to the shs#soundsets directory inside my BGII directory (after placing it there), and then typing "./install_osx.sh", but I got an error message saying sox is not found (though I can see it right there). Please advise.

I would have simply converted the .ogg files to .wav files, and added them to the sounds folder, but I currently lack a converter.

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#2 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 21 January 2008 - 08:47 PM

Hmm. Try running the other .sh file (linux), and see if that makes any difference.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#3 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 21 January 2008 - 10:08 PM

Hmm. Try running the other .sh file (linux), and see if that makes any difference.


No dice, I get exactly the same result. I was inaccurate in what I said before about sox, so here's the Terminal session:

Silverbird:~ ericp$ cd /BGII\ -\ SoA
Silverbird:/BGII - SoA ericp$ ./shs#soundsets/install_linux.sh
Installing PC Soundsets
./shs#soundsets/install_linux.sh: line 9: sox: command not found

Previously, I tried running install_osx.sh, and the same "command not found" message appeared. This appears with many mods, even though they install successfully.

If it matters, I use a PPC G4 Mac (named Silverbird, hence the name in the Terminal lines).

Any ideas?

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#4 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 21 January 2008 - 10:14 PM

Try adding "./" to the appropriate line in the script. soundsets/sox becomes ./soundsets/sox.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#5 ronin

ronin
  • Modder
  • 2114 posts

Posted 22 January 2008 - 02:09 AM

do you have sox installed. I am not sure how to on a Mac but in linux you can check by typing: which sox

#6 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 22 January 2008 - 07:53 AM

Try adding "./" to the appropriate line in the script. soundsets/sox becomes ./soundsets/sox.


OK, here's the entire contents of the OS X script:

#!/bin/sh

echo "Installing PC Soundsets"
for dir in soundsets/*
do
for path in $dir/*
do
file=${path#$dir}
soundsets/sox $path ../sounds${file%.ogg}.wav
done
done

So, changing the third line from the bottom by adding the "./" is what you advise, right? I'll give it a try, and report the results here.

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#7 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 22 January 2008 - 07:56 AM

do you have sox installed. I am not sure how to on a Mac but in linux you can check by typing: which sox


Something strange...I had a WeiDU folder in my BGII directory, inside which was sox, among other files, but now I see no such folder there, but instead an executable file by the name of weidu. I'll add the folder back in, and see if the script will run...but I'm not sure how picky the Terminal will be about the file paths.

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#8 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 22 January 2008 - 08:13 AM

No luck with adding "./" in the installer script, and no luck after adding the WeiDU folder (latest version) inside my BGII directory. I tried running the script after placing a copy of sox inside the shs#soundsets folder, inside the enclosed soundsets folder, and even just inside the BGII folder.

I have a feeling that weidu-mac could successfully handle this, if there was a way to use it to install this mod. I understand that would require a .tp2 file (yes or no?), at least. Clearly, it's learn as I go ;)

Any more ideas?

Thanks,
Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#9 ronin

ronin
  • Modder
  • 2114 posts

Posted 22 January 2008 - 10:25 AM

You need to make sure that weidu and sox are somewhere in your %path% (usr/local/bin for ubuntu but might be different for MAC) putting it in the mod directory will not work. Or put it in the bg2 top level directory and see if that works.

#10 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 22 January 2008 - 03:05 PM

As far as I know, the presence or absence of WeiDU shouldn't have anything to do with this issue. My experience with OSX is limited, however. :(

In any case, I can't reproduce the error. On cygwin and my linux server, the OSX script works as intended. I don't have a Mac to test the script on, and unless I find a way to emulate an OSX terminal on Windows, I'm not sure how I could.

In any case, could you add a new line saying "pwd" (without the quotation marks) just before "soundsets/sox $path ../sounds${file%.ogg}.wav" and let me know what it outputs? If there's something messed up with the directories, that should at least tell us where we're at.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#11 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 22 January 2008 - 06:09 PM

As far as I know, the presence or absence of WeiDU shouldn't have anything to do with this issue. My experience with OSX is limited, however. :(

In any case, I can't reproduce the error. On cygwin and my linux server, the OSX script works as intended. I don't have a Mac to test the script on, and unless I find a way to emulate an OSX terminal on Windows, I'm not sure how I could.

In any case, could you add a new line saying "pwd" (without the quotation marks) just before "soundsets/sox $path ../sounds${file%.ogg}.wav" and let me know what it outputs? If there's something messed up with the directories, that should at least tell us where we're at.


I'll give that a go, and report back. There's some sort of hacklike way to run OS X on a Windows machine, but I don't know how stable/useful it would be. As you may know, OS X is based on FreeBSD, in case that information is at all useful for our purposes. So, OS X and Linux have much more in common than OS X and Windows (which is kinda like comparing an F-22 fighter plane to The Spirit of St. Louis ;) ).

- E

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#12 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 22 January 2008 - 06:25 PM

I know that OSX is based on FreeBSD - curiously enough, BSD is the *nix variant I know best. Please check it out, though. :)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#13 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 22 January 2008 - 07:29 PM

Another strike for me. Adding a line with pwd above the line that starts with "soundsets/sox..." (and indented the same way) yields the same result as before.

For comparison's sake, here's the audio installer script for the Yasraena mod, chosen because her audio converted perfectly, and functions perfectly in the game. The file lives in the same subdirectory as sox in the mod folder:

cd override
if [ -e "sox" ]; then
chmod 755 sox
fi
if [ -e "tisunpack" ]; then
chmod 755 tisunpack
fi
echo "Converting audio..."
for file in yasra*.ogg; do
echo " $file"
./sox $file ${file%.ogg}.wav
done
rm -f yasra*.ogg
rm -f sox
cd ..

Can we use this as a model of sorts to modify install_osx.sh? Just a thought from a novice young apprentice ;)

- E

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#14 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 22 January 2008 - 07:43 PM

Another strike for me. Adding a line with pwd above the line that starts with "soundsets/sox..." (and indented the same way) yields the same result as before.

For comparison's sake, here's the audio installer script for the Yasraena mod, chosen because her audio converted perfectly, and functions perfectly in the game. The file lives in the same subdirectory as sox in the mod folder:

cd override
if [ -e "sox" ]; then
chmod 755 sox
fi
if [ -e "tisunpack" ]; then
chmod 755 tisunpack
fi
echo "Converting audio..."
for file in yasra*.ogg; do
echo " $file"
./sox $file ${file%.ogg}.wav
done
rm -f yasra*.ogg
rm -f sox
cd ..

Can we use this as a model of sorts to modify install_osx.sh? Just a thought from a novice young apprentice ;)

- E

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#15 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 22 January 2008 - 07:44 PM

Try moving sox into the same directory as the .sh script, then change soundsets/sox to ./sox. Though at this point, I'm not sure that would make much of a difference.

Weird that pwd didn't work - it really should have.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#16 Eric P.

Eric P.

    Journeyman Modder

  • Member
  • 1178 posts

Donator

Posted 22 January 2008 - 08:34 PM

Success! :)

I don't know if it was due to moving sox into the same directory as install_osx.sh, or if it was because of my navigating to that folder from the command line and then running the script, but the sounds have now installed successfully to the "sounds" folder inside my BGII directory. I look forward to hearing how they all sound.

Thanks for all the help!

- Eric

Working and playing on a Mac Pro 6,1 running Mac OS X 10.13.6 High Sierra, and a Mac Pro 3,1 running Mac OS X 10.11.6 El Capitan.

~Buion na 'ell! I serve with joy! Your eyes and ears I shall be. Let us hunt together!~
- Erysseril Gwaethorien: a joinable, romanceable NPC mod for BGII - SoA/ToB, in sporadic development.

A female elf warrior of nature and a Bhaalspawn cross paths during their quests, joining forces to share adventure and companionship. Will they find more?


#17 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 22 January 2008 - 09:43 PM

Cool. You're welcome! :)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#18 Heartless

Heartless
  • Member
  • 8 posts

Posted 13 February 2009 - 02:58 AM

I've been studying this thread for a long while now and still cannot manage to force this to work. I don't really know what I'm doing - the auto-installers so popular elsewhere have crippled my ability to function within a terminal. I'm on a Mac, any additional advice would be great.

If it helps?

Last login: Fri Feb 13 06:10:17 on ttyp1
/BGII\ -\ SoA/shs\#soundsets/temp/sox; exit
Welcome to Darwin!
kee-leongs-dator:~ keebear$ /BGII\ -\ SoA/shs\#soundsets/temp/sox; exit
/BGII - SoA/shs#soundsets/temp/sox: Usage: [ gopts ] [ fopts ] ifile [ fopts ] ofile [ effect [ effopts ] ]

Failed: Not enough input files specified
logout
[Process completed]

Edited by Heartless, 13 February 2009 - 03:00 AM.


#19 Steve

Steve
  • Member
  • 142 posts

Posted 13 February 2009 - 06:39 AM

If you haven't already, move install_osx.sh and the soundsets folder into your Baldur's Gate folder. Then, edit the install_osx.sh file by right-clicking (or control-click) on it and choose Open With -> TextEdit. Replace the contents of it with:

#!/bin/sh
cd "${0%/*}"
echo "Installing PC Soundsets"
for path in soundsets/*/*.ogg; do
file=${path##*/}
soundsets/sox $path sounds/${file%.ogg}.wav
done

Double-click install_osx.sh and it will add files to the Sounds folder. You're done. You can delete the soundsets folder since it's not needed anymore. All the added files start with f_ or m_ in case you want to delete some of them.

#20 Heartless

Heartless
  • Member
  • 8 posts

Posted 13 February 2009 - 08:59 PM

That got me:

Last login: Sat Feb 14 00:09:31 on ttyp1
/BGII\ -\ SoA/soundsets/install_osx.command; exit
Welcome to Darwin!
kee-leongs-dator:~ keebear$ /BGII\ -\ SoA/soundsets/install_osx.command; exit
Installing PC Soundsets
/BGII - SoA/soundsets/install_osx.command: line 6: soundsets/sox: No such file or directory
logout
[Process completed]

Afterthought: Why bother with ogg, anyways? Not a dig, just a serious, honest question. I mean, according to what I was told to put in the terminal, I'm just converting them into wav anyways.

I ditched the sox in line 6, which the terminal didn't understand, and got:

/BGII - SoA/install_osx.command: line 6: soundsets/: is a directory

I'm getting closer. I added the sox to the soundsets folder. It's doing something.

Note: I had to replace the .sh extension to .command to get it to run.

Note2: These files are enormous. To anyother mac user, this can take a long time. I am going to see if this worked.

Last login: Sat Feb 14 00:15:43 on ttyp1
/BGII\ -\ SoA/install_osx.command; exit
Welcome to Darwin!
kee-leongs-dator:~ keebear$ /BGII\ -\ SoA/install_osx.command; exit
Installing PC Soundsets
logout
[Process completed]

Edited by Heartless, 13 February 2009 - 09:13 PM.