-
Notifications
You must be signed in to change notification settings - Fork 37
fix: [build] adapt dconfig in low-version envrionment #338
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
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a fallback installation path for the DConfig JSON metadata file when DSG_DATA_DIR is not defined, ensuring builds work in environments without DTK DConfig support. Flow diagram for DConfig metadata handling in build systemflowchart TD
A[Configure build] --> B{DSG_DATA_DIR defined?}
B -- Yes --> C[Use dconfig_meta_files with APPID and configFile]
C --> D[DTK DConfig handles metadata installation]
B -- No --> E[Install configFile to CMAKE_INSTALL_DATADIR/dsg/configs/org.deepin.compressor/]
E --> F[Metadata available via fallback DSG path]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've left some high level feedback:
- The hardcoded install path
dsg/configs/org.deepin.compressor/may be brittle; consider deriving the last directory component fromAPPIDor a shared variable so APPID changes don’t require manual path updates. - Before using
${CMAKE_INSTALL_DATADIR}in the new branch, ensure it is always defined in all supported environments (e.g., viainclude(GNUInstallDirs)in a common place) to avoid configuration-time errors in low-version setups.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The hardcoded install path `dsg/configs/org.deepin.compressor/` may be brittle; consider deriving the last directory component from `APPID` or a shared variable so APPID changes don’t require manual path updates.
- Before using `${CMAKE_INSTALL_DATADIR}` in the new branch, ensure it is always defined in all supported environments (e.g., via `include(GNUInstallDirs)` in a common place) to avoid configuration-time errors in low-version setups.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LiHua000, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
Log: as title
Bug: https://pms.uniontech.com/bug-view-345745.html
Summary by Sourcery
Ensure DConfig metadata is available in environments without DTK DConfig support by installing the configuration file directly to the expected dsg configs path when DSG_DATA_DIR is not defined.
Enhancements:
Build: