CamDawg Posted April 9, 2004 Share Posted April 9, 2004 edit: this thread was started as a request for a Mac port tutorial request. Now the tutorial is written but I don't feel like locking it so it's now a comment thread. I know there are many folks here who play BG2 on the Mac side. Not having a Mac around to test mods on, I was hoping we could get someone to help with some Mac-friendly tips. The two items I do know: * EXE files won't execute on a Mac (of course) so self-extracting exe installers are out. I know StuffIt is a popular compression format for Macs and zip files also work. Not sure about other formats--rar, ace, etc. * File paths in the tp2 should not be delimited with \. Use / instead as it works on both Mac and Windows. Can anyone help? Quote Link to comment
Idobek Posted April 9, 2004 Share Posted April 9, 2004 If you think you can handle a few rants about the short comings of Windows and the superiority of Macs, I suggest you post this at the Adventurers' Spa & Grill. Unless you already have. Disclaimer: Idobek is joking when he makes comments refering to Mac/PC users and their differences of opinion. Quote Link to comment
icelus Posted April 9, 2004 Share Posted April 9, 2004 This would be most helpful. Although there are a few different ways to code the same thing in a .tp2, it would be nice to know which way is the most universally compatible. Quote Link to comment
CamDawg Posted April 13, 2004 Author Share Posted April 13, 2004 Lo folks, Scar was kind enough to post some pointers over at the Spa and Grill. I've already asked for a copy of Mac WeiDU v154 so we can use BUT_ONLY_IF_IT_CHANGES. (Best. WeiDU. Flag. Ever.) Also, I requested a little bit more info on #6 for the ogg -> wav conversion on OS X. Normally a WeiDU mod for Windows works fine on a Mac with little to no changes. Yet, a few basic rules: 1. Use / instead of \ in paths. 2. For regexps \ is fine and necessary [1]. 3. Don't use EXE installers. RAR and ZIP work fine (even the self extracting versions). 4. A setup-xyz.exe for Windows doesn't help much. Either include a Mac version or leave it out completely. 5. The latest WeiDU readily available for Mac is v148 [2]. 6. For distribution of OGG audio files, you need a little CLI tool called sox and a proper shell script. 7. Speaking of shell scripts, WeiDU requires Mac OS X (if you wanna post system requirements). 8. Some installation instructions would be handy [3]. 9. Last but not least, use VIEW instead of notepad to display a ReadMe at exit. [1] If you're using regexps, put big fat warnings everywhere not to use Mod Organizer (that's a little GUI app that calls WeiDU with the proper arguments and replaces any \ with / (in any TP2 in the BG 2 folder!), which is BAD for regexps). [2] Yet, compiling the newest version on your own is not difficult. I've got one handy (v154), so, if anybody wants to distribute it with his mod, give me a call and I'll mail it over... [3] Well, 3 steps: - Copy the mod folder and TP2 into the BG 2 folder. - Start Mod Organizer (GUI) or WeiDU itself (CLI). - Follow WeiDU's instructions on screen. Mod Organizer is quite easy to handle, but not the best bet, given it's problems with regexps. The safe way would be to start WeiDU via a Terminal Window, but we are Mac users, remember, and easily intimidated by a CLI . Now, if someone could whip up a doubleclickable shell script doing all the typing, that would be nifty... (doubleclicking an aptly named weidu.app doesn't work, since it starts out with the user's 'home' as working dir ). Armin Quote Link to comment
Idobek Posted May 13, 2004 Share Posted May 13, 2004 The LinkMaster provided me with "this" regarding TISPack. Quote Link to comment
jcompton Posted May 13, 2004 Share Posted May 13, 2004 Oh, yay for the linkmaster, I couldn't find it. I've put it on the PPG TISpack site as well. Quote Link to comment
jcompton Posted May 14, 2004 Share Posted May 14, 2004 TISpack's author, Per Olofsson, is now compiling Mac binaries with the new official distros, V0.91 has both PC and Mac OS X executables. Click here. Quote Link to comment
Caedwyr Posted July 4, 2004 Share Posted July 4, 2004 I'm curious, does the Mac version treat .bcs files that have been compiled in Windows the same as on a Win9X system or should I distribute the .baf and compile it during the installation? Quote Link to comment
Idobek Posted July 4, 2004 Share Posted July 4, 2004 The operating system makes no difference in the compilation of bcs files. Quote Link to comment
Caedwyr Posted July 4, 2004 Share Posted July 4, 2004 Ok, then to further the question. Is it better practice for mods in general to use Weidu to compile the .baf file on the user's computer or is it better to package a pre-compiled .bcs file? Quote Link to comment
Idobek Posted July 4, 2004 Share Posted July 4, 2004 (edited) I'd compile during install, it's generally easier because you only have to deal with the one file. ie Just the baf, not the baf and the bcs. EDIT: Clarifcation Edited July 4, 2004 by Idobek Quote Link to comment
Loriel Posted January 3, 2005 Share Posted January 3, 2005 First of all, thanks to CamDawg for compiling this tutorial and for helping to make all the G3 mods Mac-friendly! All four of us that download and use them are extremely appreciative! Second, I'd like to give a (hopefully) better solution for listing all the .ogg files in the .command script. I'm going to assume that the reasoning behind listing the files in the ogg_files variable is for two reasons: expansion of wildcards doesn't work with sox (as stated in the tutorial) and that you only want to affect the .ogg files used by this particular mod (not all .oggs by any mod). While listing all the oggs will work, there is a much simpler way of doing it that will save on potential install issues from spelling errors. #!/bin/sh ogg_files=`ls path/to/audio/folder | grep '.ogg'` for file in $ogg_files; do echo Converting $file... path/to/sox path/to/audio/folder/$file override/${file%.ogg}.wav done Notice the backquotes used in the ogg_files variable (same key as the tilde). They tell the script to use the output of this unix command. This will simply make a listing of all the files in your mod's audio folder that have .ogg in the filename, thus eliminating the need to manually type each one. For uninstalling the wavs, you will need a slightly modified version: #!/bin/sh wav_files=`ls path/to/audio/folder | grep '.ogg' | sed s/.ogg/.wav/g` for file in $wav_files; do if [ -e override/$file ]; then echo Removing $file... rm -f override/$file fi done This time, the script took the list from the audio folder and substituted the .wav suffix (instead of .ogg). Then, it checked for the existence of the file in the override folder before deleting each one. Finally, I have run into a problem with early versions of OSX that makes the script choke. The problem comes from the fact that it runs as if located at the root of the system (which isn't where BG2 is!). To compensate for this problem, you can simply add this snippet to the top of the script: #!/bin/sh command_path=${0%/*} cd "$command_path" # rest of the script below... I use this in all my scripts that must affect files relative to the script's location (such as installing the mod/ogg/tiz, etc). It simply assigns the absolute path of this script's location to the $command_path variable, then cd's to it. Makes life easier for the tech support people... Quote Link to comment
the bigg Posted December 25, 2005 Share Posted December 25, 2005 Changes with WeiDU v187: - \ is automatically converted to / (except for regexp) for Mac OS X (hopefully). - AT_* NOTEPAD this and AT_* EXPLORER this now defaults to AT_* VIEW this. - .DS_Store is ignored by the COMPILE action (hopefully). Quote Link to comment
the bigg Posted April 13, 2006 Share Posted April 13, 2006 (edited) A quick note: to copy wav or tis files to the override, you should probably use COPY_LARGE (which is slightly faster and won't choke on TIZ files that are > 16 Mb), rather than usual COPY. EDIT: also, for the sake of Linux-porting, you should run the .bat file if WEIDU_OS STRING_COMPARE_CASE ~WIN32~ = 0, since Linux would use the same .sh file and has x86 as WEIDU_ARCH as well. Edited April 13, 2006 by the bigg Quote Link to comment
CamDawg Posted April 13, 2006 Author Share Posted April 13, 2006 Cheers, edits made. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.