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

rc文件引用外部文件更新如何重新编译rc? #3712

Closed
ChrisCatCP opened this issue May 6, 2023 · 8 comments
Closed

rc文件引用外部文件更新如何重新编译rc? #3712

ChrisCatCP opened this issue May 6, 2023 · 8 comments

Comments

@ChrisCatCP
Copy link
Contributor

你在什么场景下需要该功能?

xmake使用rc作为源文件时

描述可能的解决方案

描述你认为的候选方案

No response

其他信息

我修改了rc引用的外部文件但是必须得重新生成才能重新编译rc文件 项目类型为vsxmake 请问有什么解决的办法吗

@waruqi
Copy link
Member

waruqi commented May 6, 2023

这跟 rc 没关系,你 xmake.lua 做任何改动,都要重新生成 vsxmake 工程。。可以配置自动更新生成 https://xmake.io/#/zh-cn/manual/custom_rule?id=pluginvsxmakeautoupdate

或者不用 vsxmake 直接走 xmake 命令编译。

@ChrisCatCP
Copy link
Contributor Author

这个我已经开启 我试过更新工程了 我没有改动rc 只是改动rc引用的外部文件

@waruqi
Copy link
Member

waruqi commented May 6, 2023

那你这个属于 rc 的增量编译。。这个目前没法像 c/c++ 编译做到完全精准的,因为 rc.exe 原生不支持 依赖文件获取,只能通过 cl.exe -E 预处理变相获取部分引用信息,但不全。。

如果你感兴趣,可以自己调试下这块,看能否进一步改进。。

@ChrisCatCP
Copy link
Contributor Author

好吧 了解了

@waruqi
Copy link
Member

waruqi commented May 6, 2023

如果后续你有兴趣,可以直接来 pr 改进,这里我先关了,目前我这也没其他更好的办法和可以继续改进点,只能做到这个程度。

@waruqi waruqi closed this as completed May 6, 2023
@ChrisCatCP
Copy link
Contributor Author

好的

@SnowinterCat
Copy link

我也遇到这个问题了,我在想可不可以在before_build_file和before_build_files里面添加一个标记来标识某个文件是否会在build的时候编译。然后让用户自己检查自己感兴趣的文件,然后自己将rc文件设置为需要在build阶段编译?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I also encountered this problem. I was wondering if I could add a mark in before_build_file and before_build_files to identify whether a certain file will be compiled during build. Then let the user check the files they are interested in, and then set the rc file themselves to need to be compiled in the build phase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants