Page 1 of 1

New "Clean Project" behaviour in v7 causes problems

Posted: Fri Mar 27, 2015 4:06 am
by metamorphosis
Hi there-
current 'clean project' behaviour in v7 means that anything in the debug/release folder gets wiped, including any .dll files that've been put in there to let the code run, such as SDL2.dll, or others.
This is crazily-annoying, as the debug .dll for most libraries is different to the release .dll, so they need to stay in their respective folders - without being wiped.

In other words, after every 'clean' I have to copy all the .dll files back again.

Re: New "Clean Project" behaviour in v7 causes problems

Posted: Fri Mar 27, 2015 8:35 am
by eranif
You should not place anything in the intermediate folder (hence the name).
A simple solution will be to:

* set the output file to a different location project settings->common settings->general->output file and place your DLLs there
* Add a post build command to copy the output file from the default location to another location

Eran

Re: New "Clean Project" behaviour in v7 causes problems

Posted: Sat Mar 28, 2015 3:26 am
by metamorphosis
eranif wrote:You should not place anything in the intermediate folder (hence the name).
A simple solution will be to:

* set the output file to a different location project settings->common settings->general->output file and place your DLLs there
* Add a post build command to copy the output file from the default location to another location

Eran
Why go to all that effort? This is a really common scenario. It's not something that should be hacked around, as it's the more common case, not the less common one.
Previous versions of codelite only deleted actual generated files, not files which weren't generated by codelite.

Re: New "Clean Project" behaviour in v7 causes problems

Posted: Sat Mar 28, 2015 5:59 am
by Gibbon1
Looked,

did notice that my make file has

Code: Select all

-include $(IntermediateDirectory)/*$(DependSuffix)
##
## Clean
##
clean:
	$(RM) ./Debug/*$(ObjectSuffix)
	$(RM) ./Debug/*$(DependSuffix)
	$(RM) $(OutputFile)
	$(RM) $(OutputFile).exe
	$(RM) "../.build-debug/repeater_v3"
Notable since this project doesn't even create an exe file, creates a .elf instead. I can sort of see why one might just go for the rm *. instead of a list of objects.

Suggest opening a feature request.

Anyway not sure if moving the executable will be golden I seem to remember that last time I tried that gdb couldn't find it. (Might have been fixed).

If me was you, I'd create a small bat/sh file to copy the necessary libs into t the Debug Directory if not present. You can then add that to the pre or post build step under settings.

Other option is locate the outside libs elsewhere in the tree and configure the things so that your program can find them. I have no idea how to do that since I seldom use libraries.

Re: New "Clean Project" behaviour in v7 causes problems

Posted: Sun Mar 29, 2015 11:30 pm
by eranif
Gibbon1 wrote:If me was you, I'd create a small bat/sh file to copy the necessary libs into t the Debug Directory if not present. You can then add that to the pre or post build step under settings.

Other option is locate the outside libs elsewhere in the tree and configure the things so that your program can find them. I have no idea how to do that since I seldom use libraries.
There is no need to write batch scripts...

Here is an example post build command (taken from CodeLite's project):

Code: Select all

copy "$(IntermediateDirectory)\codelite-dbg.exe" ..\Runtime
This simple command copies the executable from the $(IntermediateDirectory) directory and place it in the "..\Runtime" folder.
The working directory is _always_ set to project being built

And to make Gdb locate it, update your project settings->common settings->general->Executable to Debug/Run

Eran

Re: New "Clean Project" behaviour in v7 causes problems

Posted: Mon Mar 30, 2015 2:00 am
by metamorphosis
If you want to create a "temporary file" folder, where everything gets wiped, do it outside of the Debug and Release folders.
Wiping everything in those folders is unintuitive, unnecessary and a regression from previous versions.

Re: New "Clean Project" behaviour in v7 causes problems

Posted: Mon Mar 30, 2015 9:42 am
by eranif
metamorphosis wrote:If you want to create a "temporary file" folder, where everything gets wiped, do it outside of the Debug and Release folders.
You are missing the point here. These are the temporary folders...

Eran

Re: New "Clean Project" behaviour in v7 causes problems

Posted: Sat May 02, 2015 7:20 am
by metamorphosis
Respectfully, I'm not... if you read above you'll understand why this is behaviour regression, and a waste of user's time. There is no need for it.

Re: New "Clean Project" behaviour in v7 causes problems

Posted: Sat May 02, 2015 9:52 am
by eranif
Lets agree to disagree here.
The solution for this is simple: you can make this configurable
A pull request is most welcome here

Eran