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

feat(acap-build): Allow building apps without the ACAP Native SDK #134

Merged
merged 7 commits into from
Nov 24, 2024

Conversation

apljungquist
Copy link
Contributor

With this commit it becomes possible to build ACAP apps without installing the ACAP Native SDK. The functionality is enabled by setting ACAP_BUILD_IMPL=equivalent. Note however that the sysroots are still needed e.g. to link with the ACAP Native SDK C APIs.

`apps/challenge_build_tools/manifest.json`:
- `acapPackageConf.setup.version` is chosen to utilize much of the
  flexibility allowed by SemVer.
- The values set are those that handled explicitly or that affect any
  of the generated files.
- `acapPackageConf.copyProtection.customOptions` is not set because the
  manifest validation rejects extra values.
- pre-uninstall and post-install scripts are omitted because the
  reference implementation would try and fail to open them. I choose to
  not implement support at this time because this commit is already big
  and it is not obvious how to expose this functionality.

`crates/acap-build/src/bin/acap-build.rs`:
- The purpose of this binary is twofold. First to replace `acap-build`
  in the docker images of `acap-native-sdk-examples` to demonstrate
  that the result is exactly the same (except for one example that
  doesn't produce reproducible shared object files). Second to document
  the progress on making the equivalent implementation capable of
  supporting the API of the original program.

`crates/acap-build/src/files/package_conf.rs`:
- Flattening is not implemented for arrays because it is not needed
  and it makes handling `acapPackageConf.configuration.httpConfig` more
  straight forward since we can match on the entire path and we don't
  have to consider triggering the case multiple times.
- Parameters set by special cases don't have a source set even if they
  could to avoid ambiguity surrounding how the parameters get their
  values. Comments are used to avoid confusion with parameters that
  don't get their value directly from the manifest.
@apljungquist apljungquist requested a review from a team as a code owner November 22, 2024 14:51
@apljungquist apljungquist merged commit fa5f3b6 into main Nov 24, 2024
3 checks passed
@apljungquist apljungquist deleted the acap-build branch November 24, 2024 20:29
apljungquist added a commit that referenced this pull request Nov 25, 2024
* upstream/main:
  feat(acap-build): Enable building apps without ACAP Native SDK (#134)
  chore: Document pitfall with reproducible builds (#133)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant