xmake-io / xmake

🔥 A cross-platform build utility based on Lua
https://xmake.io
Apache License 2.0
9.87k stars 776 forks source link

解决rc文件不会重新编译的问题 #5355

Closed ChrisCatCP closed 2 months ago

ChrisCatCP commented 2 months ago

Is your feature request related to a problem? Please describe.

rc包含资源文件时不会检查资源文件更新 这样很不方便

Describe the solution you'd like

我觉得可以在add_file中加一个功能 对源文件添加一个depfiles列表 在任意一个depfiles的mtime更新的时候 重新编译这个源文件

Describe alternatives you've considered

No response

Additional context

No response

Issues-translate-bot commented 2 months ago

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


Title: Solve the problem that rc files will not be recompiled

waruqi commented 2 months ago

常年老问题,重复了 https://github.com/xmake-io/xmake/issues/4342#issuecomment-1788259826

ChrisCatCP commented 2 months ago

额 但是这是个feature request

waruqi commented 2 months ago

我觉得可以在add_file中加一个功能 对源文件添加一个depfiles列表 在任意一个depfiles的mtime更新的时候 重新编译这个源文件

不考虑。这种你搞个 rule 处理下,before_build 里面自己判断 Depfiles mtime 后,去 os.touch 下对应的 rc file 触发编译。。也就几行代码的事情。。

Issues-translate-bot commented 2 months ago

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


An old question, repeated https://github.com/xmake-io/xmake/issues/4342#issuecomment-1788259826

Issues-translate-bot commented 2 months ago

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


Um, but this is a feature request

Issues-translate-bot commented 2 months ago

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


I think we can add a function in add_file to add a depfiles list to the source file and recompile the source file when the mtime of any depfiles is updated.

Not consider. You can create a rule to handle this. After you determine the Depfiles mtime in before_build, go to the corresponding rc file under os.touch to trigger compilation. . It’s just a matter of a few lines of code. .

star-hengxing commented 2 months ago

msbuild 是开源的,我觉得可以去那边提个 issue 问问是怎么实现的,然后 xmake 这边才好支持

ChrisCatCP commented 2 months ago

msbuild 是开源的,我觉得可以去那边提个 issue 问问是怎么实现的,然后 xmake 这边才好支持

msbuild 也不增量编译rc

ChrisCatCP commented 2 months ago

msbuild 是开源的,我觉得可以去那边提个 issue 问问是怎么实现的,然后 xmake 这边才好支持

所以才想弄个曲线救国的法子

Issues-translate-bot commented 2 months ago

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


msbuild is open source. I think you can raise an issue there to ask how it is implemented, and then xmake can support it here.

Issues-translate-bot commented 2 months ago

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


msbuild is open source. I think you can raise an issue there to ask how it is implemented, and then xmake can support it here.

msbuild does not incrementally compile rc either

Issues-translate-bot commented 2 months ago

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


msbuild is open source. I think you can raise an issue there to ask how it is implemented, and then xmake can support it here.

That’s why I wanted to find a way to save the country.

star-hengxing commented 2 months ago

before_build 里面自己判断 Depfiles mtime 后,去 os.touch 下对应的 rc file 触发编译

那可以基于这个改善一下 rc 的 rule :)

Issues-translate-bot commented 2 months ago

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


After judging the Depfiles mtime in before_build, go to the corresponding rc file under os.touch to trigger compilation

Then you can improve the rc rule based on this :)