将QT套件设置复制到另一台计算机

发布于 2025-02-06 02:59:45 字数 711 浏览 3 评论 0原文

我有一个bash脚本可以从远程服务器到Linux计算机下载tarballs,并使用sysroot和交叉填充工具链(出于各种原因,我们正在使用Ubuntu,Kubuntu,Debian,Mint等)下载TARBALLS,并在特定路径中解压缩它们。通往系统根和工具链的路径始终是相同的(有一些具有绝对路径的符号链接,BuildRoot的遗产。我们认为它不像Isssue不足以更改它)。

现在,我认为为什么没有作为同一脚本的一部分也没有设置QTCreator套件的功能。这将极大地帮助我。

由于我还没有找到任何有用的提示,因为如果不完全重写当前设置,我只希望附加一个新的套件,而不是删除用户可能已经设置的任何内容),我已经找到了〜/。 config/qtproject/qtcreator/profiles.xml ,试图简单地“复制”套件定义(并将thi profile.count提高1)。但是,该文件在每个QMaker启动之后都被重写为原始状态...我尝试删除〜/.. cashe,它的效果是在XML中重命名了套件(配置文件),但是添加新套件仍然没有。现在我承认我不知道自己在做什么,我不确定这是否可以起作用,鉴于XML文件中有一些哈希(例如< value type =“ qString” key =“ pe” pe 。 profiles.xml,decection.xml等)一致,当找到重复时,我将停止脚本)。

是否有更好的方法将设置/导出套件(和编译器)设置为另一台计算机? 这是这样,我错过了明显的东西吗?

I have a bash script to download the tarballs with sysroot and crosscompilation toolchain from remote server to a linux computer (we are using Ubuntu, Kubuntu, Debian, mint etc. for various reasons) and decompress them in a certain path. The paths to the sysroot and toolchain will ALWAYS be the same (there are some symlinks with absolute paths, legacy of buildroot. We consider it to not be an isssue pressing enough to change that).

Now I thought why do not have, as part of the same script, some feature to set the QtCreator kit as well. It would help me greatly.

As I have not found any usefull hints as how to do so (without completely rewriting the current settings, i only wish to append a new kit and not delete anything the user might already have set) i have located the ~/.config/QtProject/qtcreator/profiles.xml and tried to simply "copy" the kit definition (and increase thi Profile.Count by 1). However the file got rewritten to it's original state after each Qmaker start... I tried to delete the ~/.cashe, which had the effect that renaming a kit (profile) in the XML worked, but adding a new kit still does not. Now I admit I have no idea what am I doing, and I am unsure whether this could work at all, given there are some hashes in the XML file (such as <value type="QString" key="PE.Profile.Device">{8a289892-2c6c-4588-9ad5-f835b487c0ca}</value>), but I figured it should be all right as long as I keep all the hashes in all xml files (profiles.xml, devices.xml etc.) consistent and I will stop the script when duplicity is found).

Is there any better way to import/export kit (and compiler) setting to another computer?
Is this the way and I am missing something obvious?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文