[Bug]: juce_gui_extra.cpp defaults to including web browser ignoring CMake option
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- cpp
- 领域
- build-system
调研方向
从 modules/juce_gui_extra/juce_gui_extra.h 第 75-77 行开始,这里 JUCE_WEB_BROWSER 的定义与 CMake 的 NEEDS_WEB_BROWSER 选项无关,然后检查 juce_add_gui_app 在 cmake/JUCEUtils.cmake 中如何传递 NEEDS_WEB_BROWSER,以及 modules/juce_gui_extra/juce_gui_extra.cpp 随后引入了什么。判断头文件是否应仅在显式启用时才定义 JUCE_WEB_BROWSER,还是应由 CMake 强制将其设为 0。完成的标准是:一个 NEEDS_WEB_BROWSER 关闭的 juce_add_gui_app 目标能够在没有手动 JUCE_WEB_BROWSER=0 编译定义的情况下构建。
由索引模型根据 Issue 内容生成。
描述
Detailed steps on how to reproduce the bug
When using, for example, juce_add_gui_app() and with the default option of NEEDS_WEB_BROWSER set to false, the following in juce_gui_extra.h causes attempts to import headers in juce_gui_extra.cpp that are then correctly not linked by cmake, causing a build error:
https://github.com/juce-framework/JUCE/blob/3ba67d4585e9d1fbcdb26a877c7978608b1f802e/modules/juce_gui_extra/juce_gui_extra.h#L75-L77
Workaround is to set the compile definition JUCE_WEB_BROWSER=0 but given the default is this already when adding the target, this definition should be set to 0 by default, or the setting of it in that file should be removed so it's only ever explicitly defined when enabled.
What is the expected behaviour?
Builds successfully.
Operating systems
Linux
What versions of the operating systems?
Fedora 44.
Architectures
x86_64
Stacktrace
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
I have not tested against the develop branch
Code of Conduct
- I agree to follow the Code of Conduct
- 主要语言
- C++
- 星标
- 8.9k
- 派生
- 2.2k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
juce-framework/JUCE 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
juce-framework/JUCE#1765 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
juce-framework/JUCE#1764 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
juce-framework/JUCE#1762 ·
维护者通常 2 天内回复
-
Linux: WebBrowserComponent shows nothing unless the GTK and WebKit development packages are installed可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
juce-framework/JUCE#1730 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
juce-framework/JUCE#1687 · 1 条评论 ·
维护者通常 2 天内回复
查看 juce-framework/JUCE 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
mesonbuild/wrapdb#2961 ·
维护者通常 1 天内回复
-
80 Instance - Raid - Northrend
难度 2/5 1-3 小时 新手友好度 62/100
azerothcore/azerothcore-wotlk#28075 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
objectionary/eo-graphs#80 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
scanaislop/aislop#476 ·
维护者通常 1 天内回复