netspider1
New member
Hello,
Many games have bulk size because are stuffed with unused music (.bor .ogg .wav) files inside. Sometimes it reach hundreds of MB
However to walk through every .bor .ogg .wav file and check whether is invoked in the game or not and delete it, is a loooong dirty job. Especially if you have huge collection with 90% of the games stuffed with dead music files inside. :-\
So, I decided to clean the .pak files from dead music inside that eating gigabytes of space.
Thereby I made a tools that does it automatically. Might be useful for developers and gamers who wants to shrink the size of .pak files and save a lot of space. 8)
Here you are my 2 tools:
1. clean_music.bat Use this to clean one game at once. First unpack the game (inside in the archive you will find the standard packing/unpacking tools) then copy clean_music.bat in data folder and run it. This will check every music (.bor .ogg .wav) file whether is invoked in every .txt and .c file. If no one is referring the music file therefore that (.bor .ogg .wav) file is orphan and shows deleting file. Also the tool shows every music file in which file is referred and shows a snipped of code linked to the (.bor .ogg .wav) file.
When the tool finish all orphan musical files are deleted, and you can pack the game back. To sum up, this tool require manually to unpack, run the tool and pack the game. Because it is designed when you dealing with only one game. But if you feel to lazy to pack and unpack every game checkout my 2nd tool ;D
2. clean_music_all_paks.bat Use this tool to clean a bunch of (.pak) games at once. Just copy all the (.pak) game files in tool directory, and run it. That's all, nothing more!
It will clean every single (.pak) game that will find. It will unpack automatically every (.pak) game, will run clean_music.bat to delete the orphan files, and will pack the game back. So when it finish you will have all your (.pak) games cleaned with reduced size. If you have big collection expect to save you gigabytes 8)
If there is any problem, let me know. The tools are not very fast because for every .bor .ogg .wav file is checking every .txt and .c file, so multiply the count of .bor .ogg .wav files by count of .txt .c files and will get the number of iterations, you can do the maths
http://openbor.55freehost.com/Makepak & Extractor.7z
Many games have bulk size because are stuffed with unused music (.bor .ogg .wav) files inside. Sometimes it reach hundreds of MB

However to walk through every .bor .ogg .wav file and check whether is invoked in the game or not and delete it, is a loooong dirty job. Especially if you have huge collection with 90% of the games stuffed with dead music files inside. :-\
So, I decided to clean the .pak files from dead music inside that eating gigabytes of space.

Thereby I made a tools that does it automatically. Might be useful for developers and gamers who wants to shrink the size of .pak files and save a lot of space. 8)
Here you are my 2 tools:
1. clean_music.bat Use this to clean one game at once. First unpack the game (inside in the archive you will find the standard packing/unpacking tools) then copy clean_music.bat in data folder and run it. This will check every music (.bor .ogg .wav) file whether is invoked in every .txt and .c file. If no one is referring the music file therefore that (.bor .ogg .wav) file is orphan and shows deleting file. Also the tool shows every music file in which file is referred and shows a snipped of code linked to the (.bor .ogg .wav) file.
When the tool finish all orphan musical files are deleted, and you can pack the game back. To sum up, this tool require manually to unpack, run the tool and pack the game. Because it is designed when you dealing with only one game. But if you feel to lazy to pack and unpack every game checkout my 2nd tool ;D
2. clean_music_all_paks.bat Use this tool to clean a bunch of (.pak) games at once. Just copy all the (.pak) game files in tool directory, and run it. That's all, nothing more!
It will clean every single (.pak) game that will find. It will unpack automatically every (.pak) game, will run clean_music.bat to delete the orphan files, and will pack the game back. So when it finish you will have all your (.pak) games cleaned with reduced size. If you have big collection expect to save you gigabytes 8)
If there is any problem, let me know. The tools are not very fast because for every .bor .ogg .wav file is checking every .txt and .c file, so multiply the count of .bor .ogg .wav files by count of .txt .c files and will get the number of iterations, you can do the maths

http://openbor.55freehost.com/Makepak & Extractor.7z