-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
add qt ts files building #5103
add qt ts files building #5103
Conversation
1143910315
commented
May 14, 2024
- Before adding new features and new modules, please go to issues to submit the relevant feature description first.
- Write good commit messages and use the same coding conventions as the rest of the project.
- Please commit code to dev branch and we will merge into master branch in feature
- Ensure your edited codes with four spaces instead of TAB.
- 增加新特性和新模块之前,请先到issues提交相关特性说明,经过讨论评估确认后,再进行相应的代码提交,避免做无用工作。
- 编写友好可读的提交信息,并使用与工程代码相同的代码规范,代码请用4个空格字符代替tab缩进。
- 请提交代码到dev分支,如果通过,我们会在特定时间合并到master分支上。
- 为了规范化提交日志的格式,commit消息,不要用中文,请用英文描述。
我实际上不清楚qt.quickapp_static和qt.qmlplugin是否有使用ts的场景,但是我在lua里判断了ts文件是否存在,即使在用不到ts文件的项目启用此规则应该没大影响 |
I actually don't know whether qt.quickapp_static and qt.qmlplugin have scenarios where ts is used, but I have judged whether the ts file exists in Lua. Even if this rule is enabled in projects that do not use ts files, it should not have a big impact. |
建议在 https://github.com/xmake-io/xmake/tree/master/tests/projects/qt 里面单独加个带 ts 的 project example,方便测试 |
测试代码已提交,按测试项目的运行结果,根据系统语言会分别显示英语、简体中文、繁体中文 |
部分代码参考自,未能验证先前的代码逻辑 |
主要对其中的qt.libexecdir和qt.libexecdir_host的意义不明 |
The test code has been submitted. According to the running results of the test project, English, Simplified Chinese, and Traditional Chinese will be displayed according to the system language. |
Mainly the meaning of qt.libexecdir and qt.libexecdir_host is unclear |
如果是交叉编译,qt.libexecdir 里面的 bin 是执行不了的,所以用的都是 qt.libexecdir_host 里面编译工具 |
If it is cross-compiled, bin in qt.libexecdir cannot be executed, so the compilation tools in qt.libexecdir_host are used. |
@1143910315 可以加下prefixdir 支持吗? add_files("Resource/languages/*.ts", {
prefixdir = "translations"
}) |
@1143910315 Can you add prefixdir support? add_files("Resource/languages/*.ts", {
prefixdir = "translations"
}) |
加,我加😭 |
Add, I’ll add 😭 |
|
|
@1143910315 谢谢大佬 |
@1143910315 Thank you, boss |
https://github.com/search?q=path%3A*.qrc+%2F%3Cfile%3E.*\.qm%3C%2F&type=code 为什么是prefixdir?目前的实现只能把qm输出到targetdir底下,很多项目会在qrc里写qm的路径,这样就需要把qm输出到targetdir以外。 |
https://github.com/search?q=path%3A*.qrc+%2F%3Cfile%3E.*\.qm%3C%2F&type=code Why prefixdir? The current implementation can only output qm to the targetdir. Many projects will write the path of qm in qrc, so it is necessary to output qm outside targetdir. |
不能使用../../..从targetdir目录返回到上级目录来实现你说的效果吗? |
Can't we use ../../.. to return to the upper-level directory from the targetdir directory to achieve the effect you mentioned? |