jdarling
18-02-2010, 09:58 PM
I've always been annoyed at how much crap FPC throws into your project folder (at least in Delphi you could set a junk folder). And I've always hated getting a project ready to deploy to the public by having to write then run a cleanup script, praying that I remember to add strip for all of the exe's, dll's, so's, whatever...
There used to be a really good project for doing this for Delphi, and being the stubborn fool that I am I went ahead and wrote a new project that is very similar for Delphi, FPC, and Lazarus projects. Really, it could be used for any project or programming language, but these were my direct targets.
The app is command line based and I recommend placing it into your path for eased use. It should work on Windows, Linux, Mac, or anything else you can compile for with FPC/Lazarus. Of course, it also includes full source code.
Basic usage is; download package, extract some place, add to your systems PATH variable (not required), edit the ini file as you see fit, and run it with:
clean <projectFolder> [options]
The options are basically anything in the ini file preceded by a -
So, in as an example if you wanted to override the clean.exe setting from the command line:
clean MyProject -clean.exe *.exe;*.dll
OR
clean MyProject -clean.exe=*.exe;*.dll
Default settings out of the box are:
strip.exe=C:\lazarus\fpc\2.2.2\bin\i386-win32\strip
strip.mask=*\bin\*.exe;*\bin\*.dll
projects.path=C:\lazarus\projects\
erase.exe=erase
erase.mask=*.ppu;*.o;*.compiled;*.~*;*.dcu;*.bak;* .a;*.or;*.res;*.rst
Download it at: http://www.eonclash.com/execleaner/cleaner.zip
There used to be a really good project for doing this for Delphi, and being the stubborn fool that I am I went ahead and wrote a new project that is very similar for Delphi, FPC, and Lazarus projects. Really, it could be used for any project or programming language, but these were my direct targets.
The app is command line based and I recommend placing it into your path for eased use. It should work on Windows, Linux, Mac, or anything else you can compile for with FPC/Lazarus. Of course, it also includes full source code.
Basic usage is; download package, extract some place, add to your systems PATH variable (not required), edit the ini file as you see fit, and run it with:
clean <projectFolder> [options]
The options are basically anything in the ini file preceded by a -
So, in as an example if you wanted to override the clean.exe setting from the command line:
clean MyProject -clean.exe *.exe;*.dll
OR
clean MyProject -clean.exe=*.exe;*.dll
Default settings out of the box are:
strip.exe=C:\lazarus\fpc\2.2.2\bin\i386-win32\strip
strip.mask=*\bin\*.exe;*\bin\*.dll
projects.path=C:\lazarus\projects\
erase.exe=erase
erase.mask=*.ppu;*.o;*.compiled;*.~*;*.dcu;*.bak;* .a;*.or;*.res;*.rst
Download it at: http://www.eonclash.com/execleaner/cleaner.zip