I think your best bet is to avoid the hassle and do what you are doing now - one component drops all .wav into override at install, removes all at uninstall. But there are some alternatives, too -
The simplest way would be what Mike1072 suggested. Set up scripts for each individual component that covers just those particular sounds - for the overlap, if you are careful about component install order you might even be able to avoid having weidu uninstall the ones you want.
the way to make this possible might be to simply decompress / convert all .oggs (suggest doing this in the source folder - the bigg, Mike1072, and Miloch had good posts awhile back on how to do this) up front as a resource file filled with .wavs. Then, in each component, use WeiDU's COPY to place the necessary soundfile in override. It leaves the original .wav there, so installing components can continue to copy everything needed - the "downstream" problem is taken care of by weidu itself, isn't it, if you copy each resurce needed in each component it is used in, and let WeiDu handle the removal from override (I can see A uninstalled a.wav, and B then reinstalls a.wav as weidu rolls everything back on uninstall and then moves forward again: it might take a test, but if each component uses COPY or [god help you, and someone else needs to clean up this brainstorm to workable code]
ACTION_FOR_EACH ~%mysoundfile.wav%~ IN ~list_of_files~ BEGIN
A_I !F_E ~override/%mysoundfile.wav%~ THEN BEGIN
COPY ~mymod/%mysoundfile.wav%~ override
END
)
Alternatives might include what I did for BG1NPC MusicPack - I set up each original component as a subcomponent, so:
.tp2
BACKUP ~bg1npcmusic/backup~
AUTHOR ~http://forums.gibberlings3.net/index.php?showforum=45~
//MODDER
README ~bg1npcmusic/readme-bg1npc_music.html~
VERSION ~v5~
BEGIN ~Install All Audio~
SUBCOMPONENT ~The BG1 NPC Project Music Pack~
UNINSTALL ~SETUP-MBG1NPC.TP2~ ~0~
MKDIR ~music/blank~
COPY ~bg1npcmusic/blank.mus~ ~music~
~bg1npcmusic/blank.acm~ ~music/blank/blanka.acm~
COPY_EXISTING ~songlist.2da~ ~override~
SET_2DA_ENTRY 0 0 2 ~2DA_V1.0~
SET_2DA_ENTRY 0 1 2 ~~
SET_2DA_ENTRY 0 0 2 ~IDOBEK Name~
SET_2DA_ENTRY 1 2 3 ~BLANK.MUS~
SET_2DA_ENTRY 0 0 3 ~~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~2DA_V1.0~ ~2DA V1.0~
COPY_EXISTING ~sw1h01.itm~ ~override/bg1npcmusic.g3~
PRINT ~PLEASE do not close this window until music decompression is complete.~
// scripts to compress/decompress sounds
ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~) THEN BEGIN
AT_NOW ~bg1npcmusic/batchfiles/allaudio_win.bat~
AT_INTERACTIVE_UNINSTALL ~bg1npcmusic/batchfiles/allaudio_win.bat~
END ELSE BEGIN
ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~) THEN BEGIN
AT_NOW ~sh bg1npcmusic/batchfiles/allaudio_osx.sh~
AT_INTERACTIVE_UNINSTALL ~sh bg1npcmusic/batchfiles/uninstall_allaudio_osx.sh~
END ELSE BEGIN
AT_NOW ~bash bg1npcmusic/batchfiles/allaudio_lin.sh~
AT_INTERACTIVE_UNINSTALL ~bash bg1npcmusic/batchfiles/uninstall_allaudio_lin.sh~
END
END
BEGIN ~Install Regular Audio Only~
SUBCOMPONENT ~The BG1 NPC Project Music Pack~
UNINSTALL ~SETUP-MBG1NPC.TP2~ ~0~
MKDIR ~music/blank~
COPY ~bg1npcmusic/blank.mus~ ~music~
~bg1npcmusic/blank.acm~ ~music/blank/blanka.acm~
COPY_EXISTING ~songlist.2da~ ~override~
SET_2DA_ENTRY 0 0 2 ~2DA_V1.0~
SET_2DA_ENTRY 0 1 2 ~~
SET_2DA_ENTRY 0 0 2 ~IDOBEK Name~
SET_2DA_ENTRY 1 2 3 ~BLANK.MUS~
SET_2DA_ENTRY 0 0 3 ~~
REPLACE_TEXTUALLY CASE_INSENSITIVE ~2DA_V1.0~ ~2DA V1.0~
COPY_EXISTING ~sw1h01.itm~ ~override/bg1npcmusic.g3~
PRINT ~PLEASE do not close this window until music decompression is complete.~
// scripts to compress/decompress sounds
ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~) THEN BEGIN
AT_NOW ~bg1npcmusic/batchfiles/regularaudio_win.bat~
AT_INTERACTIVE_UNINSTALL ~bg1npcmusic/batchfiles/regularaudio_win.bat~
END ELSE BEGIN
ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~) THEN BEGIN
AT_NOW ~sh bg1npcmusic/batchfiles/regularaudio_osx.sh~
AT_INTERACTIVE_UNINSTALL ~sh bg1npcmusic/batchfiles/uninstall_regularaudio_osx.sh~
END ELSE BEGIN
AT_NOW ~bash bg1npcmusic/batchfiles/regularaudio_lin.sh~
AT_INTERACTIVE_UNINSTALL ~bash bg1npcmusic/batchfiles/uninstall_regularaudio_lin.sh~
END
END
BEGIN ~Install Romance Audio Only~
SUBCOMPONENT ~The BG1 NPC Project Music Pack~
UNINSTALL ~SETUP-MBG1NPC.TP2~ ~0~
MKDIR ~music/blank~
COPY ~bg1npcmusic/blank.mus~ ~music~
~bg1npcmusic/blank.acm~ ~music/blank/blanka.acm~
and had a batch file with just the list of files.
Another way would be to preserve current components, and use something that works like Fixpack's READLN to set up the lists, but that seems like just as much work (and user error might creep in). The idea here is creating a flag file or check for each component, and at the end of install read those flags like Fixpack reads the "romance tweaks". Just like PIDs have to go last, you can set up a final component that runs at the end of each install/uninstall (using DESIGNATED with INSTALL_BY_DEFAULT or some such combo), but you could also set up something with a straight
MOD_IS_INSTALLED modTp2Name modComponent
looking for what components are already installed (it should work, just like REQUIRE_COMPONENT
...
hey. Why not just use a set of components at the end of the install, like this:
BEGIN ~Audio for Component 1~
DESIGNATED ~2000~
REQUIRE_COMPONENT "setup-spellpack.tp2" "1" "Skipping audio for component one, as it is not installed"
stuff
BEGIN ~Audio for Component 2~
DESIGNATED ~2001~
REQUIRE_COMPONENT "setup-spellpack.tp2" "2" "Skipping audio for component two, as it is not installed"
stuff
OK, my head hurts. But that was fun. Now, what was the problem with shortcutting this with a simple ALWAYS that does a check for a designated .wav and if it doesn't see it does a full blanket install of the audio? BWP folks are going to biff anyways, and non-BWP could be warned that they may need the bigg's generalized biffing Mod if you want to suggest that in the readme.
The last means one list, all audio files, no problems with maintaining a list.