I'm currently trying to convert the Tutu source for Mac, but there's one particular naming convention that is causing me problems. Apparently, the BG2 executable in Windows is called BGMain.exe whether it is the SOA or TOB application. The MacPlay developers made things more confusing for us on the Mac side. Here's what I mean:
Baldur's Gate II Mac OS X (this is the OSX version of SOA)
Baldur's Gate II (this is the pre-OSX version of SOA)
Baldur's Gate II (this is the OSX version of TOB)
There's no pre-OSX version of TOB, so we don't have to worry about that, but you can't simply look for a file called "Baldur's Gate II". Now, Tutu v4 simply looked for "Baldur's Gate II Mac OS X" which meant that anyone who had TOB installed was out of luck. What I need to know is, how can I check for the existance of a file and assign it to a variable that I can use in place of "BGMain.exe". If variables won't work, then how about putting a function in there that returns with the string of the game's name. For example, in bash:
app="Baldur's Gate II"
osx=" Mac OS X"
bif="data/25Dialog.bif"
if [ -e "$app$osx" ]; then
game="$app$osx"
elif [[ -e "$app" && -e "$bif" ]]; then
game="$app"
fi
Also, I'm assuming that since this is a Mac-only issue, that it should go in the src/arch_osx.ml, but if any thinks differently please tell me.