Author Topic: Changing default properties on new files  (Read 3980 times)

Offline K-Sys

  • Single posting newcomer
  • *
  • Posts: 4
Changing default properties on new files
« on: February 19, 2021, 11:16:59 am »
Hello,
I recently started to learn Vulkan and successfully compiled everything with CodeBlocks so far.
Now I'm starting to write some shaders and wanted to automatically compile them with the rest of the project.
I managed to set up a custom compile command for them (via advanced compiler options, for file endings .vert and .frag) and that works great.

However when adding those files to my project or creating new ones the compile option in the files properties is unchecked, which means they won't actually get compiled unless i manually check that box for each file.
In contrast when creating a new .cpp file the compile option and the link option both are checked by default.

Is there any way to change this behaviour, so all my shader files (.vert and .frag) get the compile option checked by default?
I couldn't find any setting for that, nor a solution when googling for the problem.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Changing default properties on new files
« Reply #1 on: February 19, 2021, 06:56:45 pm »
What happens if you add them to "Sources" in Projects -> Project tree -> Edit file types & categories?
I don't guarantee that it will work. :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline K-Sys

  • Single posting newcomer
  • *
  • Posts: 4
Re: Changing default properties on new files
« Reply #2 on: February 20, 2021, 10:44:10 am »
No that doesn't seem to work either.
I also tried creating a new category for shaders, but there doesn't seem to be a setting to change those default properties of new files.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Changing default properties on new files
« Reply #3 on: February 20, 2021, 12:28:31 pm »
Then you'll have to read to source :)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline K-Sys

  • Single posting newcomer
  • *
  • Posts: 4
Re: Changing default properties on new files
« Reply #4 on: February 21, 2021, 09:51:35 am »
What do you mean by that?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Changing default properties on new files
« Reply #5 on: February 21, 2021, 12:25:18 pm »
s/to source/the source.

That you'll have to find the relevant part of the code and see what it is doing and if there is a way to do what you want to do.  ;)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline K-Sys

  • Single posting newcomer
  • *
  • Posts: 4
Re: Changing default properties on new files
« Reply #6 on: February 22, 2021, 03:27:49 pm »
That is probably not worth doing in my case, since i have only a small project for learning. But thanks for your help.

Offline benkenobi01

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: Changing default properties on new files
« Reply #7 on: February 22, 2021, 06:25:28 pm »
s/to source/the source.

That you'll have to find the relevant part of the code and see what it is doing and if there is a way to do what you want to do.  ;)
In that case he better go with something else than codeblocks if he doesn't want to utterly waste his time and if you people here could stop with these genius reply like: "you should check the source code" accompanied with the blink eye emoticon.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Changing default properties on new files
« Reply #8 on: February 22, 2021, 07:47:15 pm »
benkenobi01:
Keep in mind that any work done on codeblocks is done by volunteers.
So we (the volunteers) have three options: 1. ignore the topic, 2. give some suggestions, 3. do the work.
If we don't have the time for 3., are you suggesting that we should stick to 1.?
How is that better than 2.?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]