User forums > Using Code::Blocks
Saving everything automatically before every build
cacb:
--- Quote from: oBFusCATed on March 01, 2018, 10:46:42 pm ---I have a patch applied for some time, but there is a concern that this will force a CC reparse which means there will would be slowdowns.
So I'm reluctant to apply it... If anyone is willing to modify the patch to prevent this reparse, I'll be happy to apply it.
--- End quote ---
I guess all the source files are already saved when you run a build, so it is mostly the project file and possibly some wxsmith files that are affected. Will saving the project file force a reparse? Even if the answer is yes, I would consider enabling such an option.
[ In my experience reparsing sometimes does not happen often enough, finding definitions does not always work ]
oBFusCATed:
--- Quote from: cacb on March 01, 2018, 11:01:41 pm ---Agreed if they are repeatable. But it is not always so.
--- End quote ---
If you are on linux it is pretty easy to always run under debugger. This way if it crashes you can gather the backtrace.
cacb:
--- Quote from: cacb on March 01, 2018, 11:10:19 pm ---Will saving the project file force a reparse?
--- End quote ---
Any answer?
cacb:
--- Quote from: cacb on March 01, 2018, 07:31:32 pm ---I've been using Code::blocks for quite a while and really love it. I am now running 17.12 on Win7 and Linux Kubuntu 17.10.
But I have not found out if there is a feature to save everything before every build. I would like to enable such a feature because I sometimes (too often!) run into issues like this
* Forgetting to save everything before I check in the project to source control, therefore missing updated files.
* Losing recently added files in the project or project settings when C::B crashes (it happens!)So, is there a way to always automatically run the equivalent of "Save Everything" (Shift+Alt+S) just before every build (Ctrl+F9 / F9 / Ctril+F11)? This would work for me.
--- End quote ---
I would like to bump this question, because it still applies to the way I work, I see this issue several times every day. Note there is (usually) no issue with crashes here, only that I fail to check in the Code::Blocks project (and maybe workspace) file into my git repository, because those files are not saved to disk after successful project build, so git does not detect them as modified. The result is incomplete commits.
I would be happy with any way to enable this (it does not have to be default C::B behaviour). It could be some option I had to enable in the GUI that would e.g. save the project file (.cbp) as a final build step. Alternatively it would also work for me if there was some way I could specify this in the project Post-build step, as indicated in the attachment.
So the question remains: Can I achieve this in any way using the latest nightly build? (I am on Win10 now and Kubuntu 18.04 using recent nightly builds)
BlueHazzard:
here is the relevant ticket:
https://sourceforge.net/p/codeblocks/tickets/396/
there is a small squirrel snippet you can use as pre build step
Preferably i would introduce a option that enables the saving on building...
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version