berelinde Posted April 12, 2010 Share Posted April 12, 2010 I've been trying to muddle through this on my own, but it's just not going to work. I just don't know enough about shell script code. I've got the Windows end sorted, but I'm not going to be able to release the mod for Mac or Linux users without help. I've already tried copying code from Amber and other mods that use both area and sound decompression scripts with no luck. Each mod has its own file structure and without an understanding of shell script structure, I can't make sense of any of it. I hate to say that I'm looking for a kind soul to write my shell scripts for me... but that's pretty much what I'm doing. The mod's file structure: tp2: gavin_bg2/setup-gavin_bg2.tp2 Sound-related files: gavin_bg2/audio/*.ogg gavin_bg2/audio/audio-install-lin.sh gavin_bg2/audio/audio-uninstall-lin.sh gavin_bg2/audio/audio-install-osx.sh gavin_bg2/audio/audio-uninstall-osx.sh gavin_bg2/audio/sox gavin_bg2/audio/oggdec Area-related files: gavin_bg2/install/install-lin.sh gavin_bg2/install/uninstall-lin.sh gavin_bg2/install/install-osx.sh gavin_bg2/install/uninstll-osx.sh gavin_bg2/areas/*.tiz gavin_bg2/areas/lin-tisunpack gavin_bg2/areas/osx-tisunpack tp2 material relating to area and sound handling /* Areas, Audio, and Music */ COPY ~gavin_bg2/areas/b!aley~ ~override~ COPY ~gavin_bg2/areas/b!wood~ ~override~ ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~) THEN BEGIN COPY ~gavin_bg2/areas/tisunpack.exe~ ~override~ AT_NOW ~gavin_bg2/install/install.bat~ AT_INTERACTIVE_UNINSTALL ~gavin_bg2/install/uninstall.bat~ END ELSE BEGIN ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~) THEN BEGIN COPY ~gavin_bg2/areas/osx-tisunpack~ ~override/tisunpack~ AT_NOW ~sh gavin_bg2/install/install-osx.sh~ AT_INTERACTIVE_UNINSTALL ~sh gavin_bg2/install/uninstall-osx.sh~ END ELSE BEGIN COPY ~gavin_bg2/areas/lin-tisunpack~ ~override/tisunpack~ AT_NOW ~bash gavin_bg2/install/install-lin.sh~ AT_INTERACTIVE_UNINSTALL ~bash gavin_bg2/install/uninstall-lin.sh~ END END ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~) THEN BEGIN AT_NOW ~gavin_bg2/audio/audio-install.bat~ AT_INTERACTIVE_UNINSTALL ~gavin_bg2/audio/audio-uninstall.bat~ END ELSE BEGIN ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~) THEN BEGIN AT_NOW ~sh gavin_bg2/audio/audio-install-osx.sh~ AT_INTERACTIVE_UNINSTALL ~sh gavin_bg2/audio/audio-uninstall-osx.sh~ END ELSE BEGIN AT_NOW ~bash gavin_bg2/audio/audio-install-lin.sh~ AT_INTERACTIVE_UNINSTALL ~bash gavin_bg2/audio/audio-uninstall-lin.sh~ END END Here's where I need the help of somebody who knows their scripts. This install/install-lin.sh. I know it's wrong, but I don't know what to do to fix it. It looks way, way too complicated compared to the OSX version. #!/bin/sh for a in b\!*.tiz; do tisunpack -s -o `echo $a | sed -e 's/\\.tiz/.tis/g'` $a done rm b\aley.tiz rm b\wood.tiz This is what I've got for install/uninstall-lin.sh. It will probably work, since it looks pretty darned simple. #!/bin/bash rm override/b!aley.tis rm override/b!wood.tis For OSX, this is install/install-osx.sh. Again, I know it's wrong, but I'm not familiar enough with Mac scripts to know how to fix it. #!/bin/sh cd override ./tisunpack -s 'b!'*.tiz rm -f 'b!'*.tiz rm -f tisunpack And for the uninstall, this is install/uninstall-osx.sh. Since it's so simple, it will probably work. #!/bin/sh rm -f override/b!aley.tis rm -f override/b!wood.tis Just for the sake of completeness, these are the sound scripts. I won't have any way to know if they work until some kind soul tests them, but I don't want to put somebody through that until I've got the area problem sorted. audio/audio-install-lin.sh #!/bin/sh oggdec gavin_bg2/audio/*.ogg mv -f gavin_bg2/audio/*.wav override audio/audio-uninstall-lin.sh #!/bin/sh rm -f override/bg_*.wav rm -f override/bgav*wav audio/audio-install-osx.sh ogg_files=`cd gavin_bg2/audio/; ls *.ogg;` for file in $ogg_files; do echo Converting $file gavin_bg2/audio/sox gavin_bg2/audio/$file override/${file%.ogg}.wav done audio/audio-uninstall-osx.sh #!/bin/sh rm -f override/bgav*.wav rm -f override/bg_*wav Link to comment
berelinde Posted April 12, 2010 Author Share Posted April 12, 2010 If it helps, I can zip and upload the mod somewhere. The files are in place. They just won't work properly without some recoding by somebody who knows what they're doing. Link to comment
the bigg Posted April 12, 2010 Share Posted April 12, 2010 If it helps, I can zip and upload the mod somewhere. The files are in place. They just won't work properly without some recoding by somebody who knows what they're doing. I'll have a crack at it if you upload it (put it on TolkienOnTheWater to save me some headaches getting the file). Link to comment
berelinde Posted April 12, 2010 Author Share Posted April 12, 2010 Thanks. I've sent the TATW download links in a PM. Link to comment
Steve Posted April 12, 2010 Share Posted April 12, 2010 Be sure to put a 'chmod +x sox tisunpack' in the shell scripts that use them. Link to comment
berelinde Posted April 12, 2010 Author Share Posted April 12, 2010 Unfortunately, I don't know enough about Mac scripts to even understand your reminder. Where would that go? The sad truth is that like some other IE modders, I'm not well-versed in computer knowledge of any kind. I've learned enough about WeiDU code to write dialogues and simple game scripts, but anything more advanced, and I do mean anything, is well beyond my expertise. Link to comment
Steve Posted April 13, 2010 Share Posted April 13, 2010 > Unfortunately, I don't know enough about Mac scripts to even understand your reminder. As long as T.Bigg knows... Some Mac mods from G3 come with 'sox' set to non-executable. Link to comment
the bigg Posted April 13, 2010 Share Posted April 13, 2010 I'm actually only testing/fixing on the Linux version. Link to comment
berelinde Posted April 13, 2010 Author Share Posted April 13, 2010 Steve, would you be able to check out/fix the Mac version? @the bigg: I feel like I'm asking the quarterback to pass out the towels, but believe me when I say that I really, really appreciate your help. Link to comment
the bigg Posted April 13, 2010 Share Posted April 13, 2010 fixed install-lin.sh: cd override #!/bin/sh for a in b\!*.tiz; do tisunpack -s -o `echo $a | sed -e 's/\\.tiz/.tis/g'` $a done rm b\!aley.tiz rm b\!wood.tiz The big bug is that you forgot the 'cd override'. There was a typo when deleting the tiz files, but that would've just resulted in minor disk waste, not any in-game problem. The other linux files work correctly. Link to comment
berelinde Posted April 13, 2010 Author Share Posted April 13, 2010 Thank you very much! Since the only changes that I will be making between now and release are adding the additinal voicing and npc-initiated flirts (unless the poll results change dramatically), it looks that's Linux testing done. Cheers! Link to comment
Steve Posted April 13, 2010 Share Posted April 13, 2010 I'm actually only testing/fixing on the Linux version. You still need to 'chmod +x tisunpack oggdec' since they're not executable in the archive. Also, the AT_NOW commands for Linux use Bash but the scripts themselves work with any shell and I don't know if all distributions of Linux come with Bash. Edit: Aha! StuffIt Expander will set all files executable so the mod will at least load. None of the other de-archivers do that, but I'm not sure how many people use StuffIt anymore. Link to comment
the bigg Posted April 13, 2010 Share Posted April 13, 2010 I'm actually only testing/fixing on the Linux version. You still need to 'chmod +x tisunpack oggdec' since they're not executable in the archive. They shouldn't be distributed in the archive - generally, Linux mods place oggdec and tisunpack in the $PATH. Also, the AT_NOW commands for Linux use Bash but the scripts themselves work with any shell and I don't know if all distributions of Linux come with Bash. If your distro doesn't support bash, you're skilled enough to translate the script. Link to comment
berelinde Posted April 13, 2010 Author Share Posted April 13, 2010 It isn't a big deal for me to add chmod +x tisunpack right after the directory change in install-lin.sh, if it saves players a little bit of head scratching. For audio-install-lin.sh, chmod +x oggdec #!/bin/sh etc right? I don't want to have to make players pick the mod apart just to delete a non-executable oggdec or tisunpack and then insert executable copies. It kind of seems like Linux players are expected to jump through hoops just to install a mod. Link to comment
the bigg Posted April 13, 2010 Share Posted April 13, 2010 Remove them from the archive altogether - the Linux standard is for the user to download WeiDU (/oggdec/tisunpack) and install it once on their system, rather than ship 3000 copies of it with every mod. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.