I have asked CodeLite to rebuild my project, and suddently all of my OpenGL shaders inside the Release folder of my project disappeared!
Those shaders I created manually outside CodeLite and they shouldnt be touched! Another IDE (Codeblocks) lets them intact, so this a very bad surprise!
Furthermore, I have seen that when I click "Clean" on my project, the whole Release folder is destroeyed. The default behaviour has to be that only files generated by the compiling process has to disappear (.o files and executable files), and not anything else.
The curent behaviour is very dangerous and will upset many users!
When will this behaviour be changed?
Is there currently any way to disable this behaviour?
Thanks
Undesired behaviour: All files being wiped out on rebuild
-
- CodeLite Curious
- Posts: 2
- Joined: Thu Nov 03, 2016 12:00 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Undesired behaviour: All files being wiped out on rebuil
The "Release" folder (or in its name in CodeLite: "Intermediate Directory") are deleted on Clean, these folders are auto generated based on the configuration and contain the object files and all intermediate files that can be deleted later.
CodeLite supports 2 build systems: the one that you are using - "Default" and "CMake"
This is the behaviour of the "Default" build system, you can switch to CMake which behaves differently
You can choose to:
1. Change the build system in CodeLite from "Default" to "CMake" from: project settings->Makefile generator
See this wiki page for more details:
http://codelite.org/LiteEditor/TheCMakePlugin
2. Don't place your custom files into the intermediate folder ("Release", "Debug" etc) but place them in your own folder and make CodeLite copy the binaries (executables, shared objects etc) to that folder.
For example:
1. Create a folder named "Runtime" in the root of the workspace.
2. Create all your custom files in that folder
3. Tell CodeLite to generate the executable directly into that folder. from: project settings->general->output file, and change it from: or whatever you have there, into:
Eran
The current behaviour have been like this for years, for a reason: having to delete thousands of files by name can take a while on Windows... while removing the intermediate folder is very fastThe curent behaviour is very dangerous and will upset many users!
Not in the foreseen futureWhen will this behaviour be changed?
CodeLite supports 2 build systems: the one that you are using - "Default" and "CMake"
This is the behaviour of the "Default" build system, you can switch to CMake which behaves differently
See below:Is there currently any way to disable this behaviour?
You can choose to:
1. Change the build system in CodeLite from "Default" to "CMake" from: project settings->Makefile generator
See this wiki page for more details:
http://codelite.org/LiteEditor/TheCMakePlugin
2. Don't place your custom files into the intermediate folder ("Release", "Debug" etc) but place them in your own folder and make CodeLite copy the binaries (executables, shared objects etc) to that folder.
For example:
1. Create a folder named "Runtime" in the root of the workspace.
2. Create all your custom files in that folder
3. Tell CodeLite to generate the executable directly into that folder. from: project settings->general->output file, and change it from:
Code: Select all
$(IntermediateDirectory)/$(ProjectName).exe
Code: Select all
$(WorkspacePath)/Runtime/$(ProjectName).exe
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 2
- Joined: Thu Nov 03, 2016 12:00 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Undesired behaviour: All files being wiped out on rebuil
Ok, your information was useful!! Now I have no trouble with losing my files!
A weird thing is that the project settings goes into debug mode automatically even if I am on release mode (compare the green ball against the other ones in the picture)
I tried to change the mode in RED colour to Release, but It shows no other option than Debug.
It doesnt impact my work right now, but is confusing and I bet it will cause trouble in the future when I start making debug and release versions and I cant control anymore how each version will have its executable exported.
1) Is this a bug to be fixed?
2) How can I apply the new settings you told me to be the default behaviour to ALL current and future projects, not only this one?
Thank you!
A weird thing is that the project settings goes into debug mode automatically even if I am on release mode (compare the green ball against the other ones in the picture)
I tried to change the mode in RED colour to Release, but It shows no other option than Debug.
It doesnt impact my work right now, but is confusing and I bet it will cause trouble in the future when I start making debug and release versions and I cant control anymore how each version will have its executable exported.
1) Is this a bug to be fixed?
2) How can I apply the new settings you told me to be the default behaviour to ALL current and future projects, not only this one?
Thank you!
You do not have the required permissions to view the files attached to this post.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Undesired behaviour: All files being wiped out on rebuil
The drop down control in the workspace view (rounded with green) is the Workspace configuration.
The project settings dialog shows the ... project configuration that is currently associated with the workspace configuration "Release"
You need to create a "Release" configuration for the project from the configuration manager.
Notice that each project created by CodeLite has 2 configurations by default: Release and Debug. If you can't see the "Release" one, than you probably deleted it by mistake.
I highly recommend that you read this wiki page it will clarify how it works in CodeLite:
http://codelite.org/LiteEditor/ConfigurationManager
The project settings dialog shows the ... project configuration that is currently associated with the workspace configuration "Release"
You need to create a "Release" configuration for the project from the configuration manager.
Notice that each project created by CodeLite has 2 configurations by default: Release and Debug. If you can't see the "Release" one, than you probably deleted it by mistake.
I highly recommend that you read this wiki page it will clarify how it works in CodeLite:
http://codelite.org/LiteEditor/ConfigurationManager
Make sure you have read the HOW TO POST thread