New "Clean Project" behaviour in v7 causes problems

Discussion about CodeLite development process and patches
metamorphosis
CodeLite Enthusiast
Posts: 45
Joined: Tue Jan 28, 2014 3:03 pm
Genuine User: Yes
IDE Question: C++
Contact:

New "Clean Project" behaviour in v7 causes problems

Post by metamorphosis » Fri Mar 27, 2015 4:06 am

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.

User avatar
eranif
CodeLite Plugin
Posts: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Fri Mar 27, 2015 8:35 am

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
Make sure you have read the HOW TO POST thread

metamorphosis
CodeLite Enthusiast
Posts: 45
Joined: Tue Jan 28, 2014 3:03 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by metamorphosis » Sat Mar 28, 2015 3:26 am

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.

Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by Gibbon1 » Sat Mar 28, 2015 5:59 am

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.

User avatar
eranif
CodeLite Plugin
Posts: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Sun Mar 29, 2015 11:30 pm

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
Make sure you have read the HOW TO POST thread

metamorphosis
CodeLite Enthusiast
Posts: 45
Joined: Tue Jan 28, 2014 3:03 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by metamorphosis » Mon Mar 30, 2015 2:00 am

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.

User avatar
eranif
CodeLite Plugin
Posts: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Mon Mar 30, 2015 9:42 am

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
Make sure you have read the HOW TO POST thread

metamorphosis
CodeLite Enthusiast
Posts: 45
Joined: Tue Jan 28, 2014 3:03 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by metamorphosis » Sat May 02, 2015 7:20 am

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.

User avatar
eranif
CodeLite Plugin
Posts: 6110
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Sat May 02, 2015 9:52 am

Lets agree to disagree here.
The solution for this is simple: you can make this configurable
A pull request is most welcome here

Eran
Make sure you have read the HOW TO POST thread

Post Reply