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(cmake): use symlink/junction for shaders in build dir #3013

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

ns6089
Copy link
Contributor

@ns6089 ns6089 commented Aug 13, 2024

Description

Use directory junction instead of copy in the build directory during cmake configure on Windows.
This prevents work-in-progress shaders getting overwritten without any confirmation.

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

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same changes also needed for Linux.

# copy assets to build directory, for running without install
file(COPY "${SUNSHINE_SOURCE_ASSETS_DIR}/linux/assets/"
DESTINATION "${CMAKE_BINARY_DIR}/assets")

cmake/packaging/windows.cmake Show resolved Hide resolved
@ns6089
Copy link
Contributor Author

ns6089 commented Aug 16, 2024

Same changes also needed for Linux.

I wouldn't say needed. but I can make them. But I can't say for sure that it won't break some obscure build configuration or packager, unlike windows on linux copying symlinks copy symlinks themselves, not what they point at.

@ReenigneArcher so in light of this information, should I do it or not?

@ReenigneArcher
Copy link
Member

I wouldn't say needed

Right, it could just be annoyance when developing on Linux, just like it was for you on Windows. Shouldn't affect anything for packagers as I only added this for allowing unit tests to run without doing a full blown install.

should I do it or not?

Yes, please.

@ns6089 ns6089 changed the title Use junction for shaders in build dir feat(cmake): use symlink/junction for shaders in build dir Aug 17, 2024
@ns6089 ns6089 marked this pull request as draft August 17, 2024 13:42
@ns6089
Copy link
Contributor Author

ns6089 commented Aug 22, 2024

Added shaders directory symlink to linux cmake.
Untested, but if CI doesn't fail it should work fine.

@ns6089 ns6089 marked this pull request as ready for review August 22, 2024 08:23
Copy link

sonarcloud bot commented Aug 22, 2024

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 9.69%. Comparing base (0a6abb7) to head (d75bc3a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #3013    +/-   ##
=======================================
  Coverage    9.69%   9.69%            
=======================================
  Files         101     101            
  Lines       17913   17913            
  Branches     8376    8376            
=======================================
  Hits         1736    1736            
+ Misses      13453   13313   -140     
- Partials     2724    2864   +140     
Flag Coverage Δ
Linux 7.31% <ø> (ø)
Windows 5.06% <ø> (ø)
macOS-12 10.50% <ø> (ø)
macOS-13 10.42% <ø> (ø)
macOS-14 10.73% <ø> (ø)

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

see 31 files with indirect coverage changes

@ReenigneArcher ReenigneArcher merged commit 0164be6 into LizardByte:master Aug 22, 2024
48 of 49 checks passed
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.

3 participants