fstiewitz / build-tools-cpp

Build your projects in atom
https://atom.io/packages/build-tools
MIT License
31 stars 6 forks source link

request global default build configuration #39

Closed trcook closed 8 years ago

trcook commented 8 years ago

Would it be possible to have a global or default build configuration -- one that acts when no other project build configuration is present? Sorry if this is already possible--maybe i'm just missing how to set it?

fstiewitz commented 8 years ago

Short answer: No, there isn't. Long answer: The package gets its build configuration from .build-tools.cson config files and when you trigger a command, it will climb up the file tree, starting from the currently active text editor, until it finds one. Now in theory you could create a config file in a folder that all your projects share (e.g. your home folder) and when no config file is present in a project it would read the commands from your "global" config file. Problem here is that these commands would run in the folder of the config file they're in and not your project's root folder.

Right now the only (good) solution would be to create a small config file in your project and use the "Link to configuration file" provider with "Overwrite working directory" enabled and the path to your global config file ... but it would still require a bit work configuring the project.

If your commands are supposed to run in the same folder than the file you are currently editing then you could use wildcards to change the working directory dynamically ... but that only works in simple "one folder" projects.

This probably needs an easier solution. I'll see what I can do.

fstiewitz commented 8 years ago

I released a modifier package that changes the working directory to the next best Atom project folder.

  1. Create a config file in a folder that all your projects share (that's your "global" config file).
  2. Configure commands and enable the "Change Project Folder" modifier.

Let me know if there are any questions/problems.