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

build(cmake): copy asset files to build dir #2338

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

ReenigneArcher
Copy link
Member

Description

This PR makes a change to the build process, where asset files are copied to the build directory, so that the generated binary can be run without an install. This is mostly to improve the development process, although some users have wanted to run Sunshine without an install in the past as well.

This uses the file(COPY ...) method which actually copies the files when running cmake, before the build.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

Copy link

codecov bot commented Mar 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 6.10%. Comparing base (1329c51) to head (7713b5b).

Additional details and impacted files
@@           Coverage Diff           @@
##           nightly   #2338   +/-   ##
=======================================
  Coverage     6.10%   6.10%           
=======================================
  Files           85      85           
  Lines        18303   18303           
  Branches      8319    8319           
=======================================
  Hits          1118    1118           
- Misses       15362   15374   +12     
+ Partials      1823    1811   -12     
Flag Coverage Δ
Linux 4.11% <ø> (ø)
Windows 1.51% <ø> (ø)
macOS-12 8.11% <ø> (ø)
macOS-13 7.44% <ø> (+0.04%) ⬆️
macOS-14 7.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 16 files with indirect coverage changes

@ReenigneArcher ReenigneArcher force-pushed the build(cmake)-copy-asset-files-to-build-dir branch from 2cdc6c1 to 7713b5b Compare March 31, 2024 14:56
@ReenigneArcher
Copy link
Member Author

@FrogTheFrog I think you asked about this before, if you want to give it a try.

@FrogTheFrog
Copy link
Collaborator

@FrogTheFrog I think you asked about this before, if you want to give it a try.

No, it was about:

COMMAND bash -c \"npm install && SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW} SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR} SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR} npm run build\") # cmake-lint: disable=C0301

@FrogTheFrog
Copy link
Collaborator

I don't have bash on Windows...

@ReenigneArcher
Copy link
Member Author

ReenigneArcher commented Mar 31, 2024

@FrogTheFrog I think you asked about this before, if you want to give it a try.

No, it was about:

COMMAND bash -c \"npm install && SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW} SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR} SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR} npm run build\") # cmake-lint: disable=C0301

Okay, that is actually another issue I'm facing. While I do have bash, for some reason on CLion it finds very old versions of npm and node, but I can't reproduce it in any of my shells manually.

In any event, this PR makes it so you can execute the built binary, without doing an "install" or copying any files manually to the build directory.

@ReenigneArcher ReenigneArcher merged commit b4739b0 into nightly Mar 31, 2024
51 checks passed
@ReenigneArcher ReenigneArcher deleted the build(cmake)-copy-asset-files-to-build-dir branch March 31, 2024 15:52
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Jun 6, 2024
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.

2 participants