Board index DeFRaG DeFRaG in general

DeFRaG demo cleaner

Are you really the best?

DeFRaG demo cleaner

Postby yourGn » Apr 24th, '16, 12:58 am

democleaner.txt
Just in case anyone needs, I attach a C++ source of a small program to clean up your demos directory. Only the fastest time for each player on each map is left (it ofc also takes into account the physics, etc.).

It has no external dependencies, compile with 'make democleaner', put the executable in your demos/ directory, run and have a look if you're satisfied with the results. At this point the program will only show which files it intends to delete, but doesn't delete anything. If you think everything is ok, uncomment line 44 (which actually deletes files), recompile, and repeat the procedure.

It seems to work, but I take no responsibility, in case it has bugs and deletes any of your precious demos. Use at your own risk!

PS. The cleaning seems to be necessary to play demos from the console, after enough demo files have been accumulated, because otherwise the game crashes (at least under some versions of iodfe running on Ubuntu). See this thread: viewtopic.php?f=7&t=831 for more info.

PSS. Forum doesn't let me attach cpp files, so I upload it as txt file. You'll need to rename it manually.
You do not have the required permissions to view the files attached to this post.
User avatar
yourGn
 
Posts: 41
Joined: Jan 1st, '12, 6:43 pm