Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Default compile target #90

Open
DosMike opened this issue Jan 11, 2021 · 2 comments
Open

[Feature Request] Default compile target #90

DosMike opened this issue Jan 11, 2021 · 2 comments

Comments

@DosMike
Copy link

DosMike commented Jan 11, 2021

Hey,
i have a multi-file project with multiple sp/inc files. The structure is and include structure, so build all does not work.
It would be nice if i could optionally right click my main file in the project list and set it as default compile target.
If that is set, F3 could compile the main file instead of the current tab.
If no file is marked or the main file is unmarked, the current behaviour is alright.
Would save me switching tabs to check if it compiles :)

@Timocop
Copy link
Owner

Timocop commented Jun 7, 2021

Any reason why Compile/Test in the project explorer doesn't work for you?

image

@DosMike
Copy link
Author

DosMike commented Jun 7, 2021

Oh that does work, it's really just a convenience thing.
For clarity maybe, the structure is something like this:

─ main.sp
  ├─ dbwrapper.inc
  ├─ entityutils.inc
  ├─ furniture.inc
  ├─ items.inc
  ├─ talk.inc
  ├─ zones.inc
  ├─ gameutils.inc
  │  ├─ usrmsg.inc
  │  └─ ...
  └─ ...

In this project only the main file compiles as plugin, including all others.
If I change the talk script for example, F3 targets the active tab and wont compile, so I'd have to ctrl+tab to the main file or even worse - use my mouse 😨

It's a legacy project with 12.5k lines of code that is a bit fiddly with include order and without include guards and it might take some time to completely update/refactor it.
I agree the structure should probably be better, but that's where I'm at rn. Also I think even with include guards the active tab's filename is used to generate the output filename so even with include guards i might get multiple compiled versions?

As i said it's just a convenience thing, and for this instance it would be nice to be able to configure the project to always compile the main file when I hit some key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants