noseglid / atom-build

:hammer: Build your project directly from the Atom editor
https://atom.io/packages/build
MIT License
248 stars 97 forks source link

Multiple targets for same projects #472

Closed tsoernes closed 7 years ago

tsoernes commented 7 years ago

Hi,

I would like to create a custom build provider, but I would like to be able to run the compiled file as well. There are two options: 1) Two different targets with different names; one for building and one for running 2) Automatically running after successful build

Example commands:

ozc -c MyFile.oz (compiling)
oczengine MyFile.ozf (running)

How can I achieve this? Thanks!

noseglid commented 7 years ago

It's up to you really.

Two different targets is really straight forward. Just return multiple targets from the settings.

Chaining can not be done natively. Your best bet would be to execute it via shell (set shell: true) and give a command similar to ozc -c {FILE_ACTIVE_NAME_BASE}.oz && oczengine {FILE_ACTIVE_NAME_BASE.ozf.

Good luck

tsoernes commented 7 years ago

How do I name the build files if I want two targets? Or can I have multiple targets in the same .atom-build file?

Also, is there any way to keep the cmd window inside atom open after a build?

oli-obk commented 7 years ago

you can have multiple targets in the same .atom-build file, as you can see here there's a target field.

To keep the command window open after a build, you need to check the appropriate box in the settings of atom-build