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

Ability to control logging system, SSDP, and other "release vs debug vs headless" options more granularly via appmanifest #8830

Open
swajj opened this issue Apr 23, 2024 · 4 comments
Labels
engine Issues related to the Defold engine feature request A suggestion for a new feature pipeline Issue related to the asset build pipeline

Comments

@swajj
Copy link

swajj commented Apr 23, 2024

Is your feature request related to a problem? Please describe (REQUIRED):
I'd like to know exactly what engine features are enabled in my build and fine-tune them so I have more control over build sizes and attack surfaces.

For example, right now, I can use "release" build to disable logging, SSDP, and other features, or "debug" to keep them. A "headless" build appears to leave all the debug features enabled. (while disabling other features e.g. graphics output) Does headless build have SSDP? What if I want headless without SSDP, or perhaps logging?

Describe the solution you'd like (REQUIRED):
Ideally, the three default build types would be documented and defined in terms of "appmanifest" flags, and I could then simply fine-tune them via a custom appmanifest file to create any variation of "debug" vs "release" vs "headless" features, and be confident in exactly what is in my build.

The appmanifest itself is also not well-documented; users are redirected to an external tool to create one and the example in the documentation doesn't actually contain any flags. Ideally, all possible "flags" that could appear in an appmanifest would be documented.

Describe alternatives you've considered (REQUIRED):
I'm unaware of any other way to solve this short of a hand-rolled engine build.

@swajj swajj added the feature request A suggestion for a new feature label Apr 23, 2024
@swajj
Copy link
Author

swajj commented Apr 25, 2024

A related use case I'm explicitly interested in is "release build, but with logging". Would be great for internal testing.

@britzl britzl added engine Issues related to the Defold engine pipeline Issue related to the asset build pipeline labels Apr 29, 2024
@AGulev
Copy link
Contributor

AGulev commented Apr 29, 2024

A related use case I'm explicitly interested in is "release build, but with logging". Would be great for internal testing.

If your issue concerns having logs in the release build, it's already possible to address this using a simple native extension. Please take a look at this native API: dmLogRegisterListener.

Here are a few examples of how to use it:

  1. Poki SDK example on GitHub
  2. Defold Share Log on GitHub (Note: the dmLog namespace is deprecated, see documentation for the newer API).

If this addresses the main practical case for now, I'm closing this ticket. Feel free to open a new one if you need something else.

@AGulev AGulev closed this as completed Apr 29, 2024
@swajj
Copy link
Author

swajj commented Apr 29, 2024

The logging was one example - doing it via a native extension works fine, even if it would be easier to just flip a switch for Defold's own implementation.

The ticket was originally written because I was told I could probably do a "headless release" build via appmanifest, but the documentation for appmanifests doesn't cover any of the things that I know are different between debug/release.

e.g. I don't feel like I have ANY of these:

  • Insight into exactly what the differences are between debug, release, and headless
  • Granular control over those items individually
  • Documentation on all the possible appmanifest flags

The first I've pieced together over time from docs and conversations, but the other two are still open questions to me, and go further than simply rewriting a log extension.

@AGulev AGulev reopened this Apr 30, 2024
@britzl
Copy link
Contributor

britzl commented Apr 30, 2024

  • Insight into exactly what the differences are between debug, release, and headless

I added some additional information about the differences here: defold/doc#430

Granular control over those items individually

This can to some extent be done through the app manifest. In the case of "release mode with logs" you currently need to use the solution provided by Alexey. This solution is used by others and is well tested.

Documentation on all the possible appmanifest flags

Here: defold/doc#431
Also: https://defold.com/manuals/extensions-build-variants/#combined-context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issues related to the Defold engine feature request A suggestion for a new feature pipeline Issue related to the asset build pipeline
Projects
None yet
Development

No branches or pull requests

3 participants