我在 linux 操作系统中使用 Qt Creator 创建了一个网络浏览器。 我必须在另一个也有 linux 操作系统的系统上运行这个浏览器。 而且我不想在其他系统中安装 Qt Creator。 我希望我的浏览器应该独立运行。 使用 build 我创建了浏览器,但是当我运行 .exe 文件时,它显示找不到 .dll 文件。 所以,我想知道如何将我的应用程序与库绑定(bind)。 谢谢。
最佳答案
要创建 .deb 包,您可以根据需要调整我的方法。
/!\ You have to build your program with a kit compatible with qt5-default
创建一棵树,例如:
package_folder
|-DEBIAN
|-control (a file)
|-postinst (bash script)
|-opt
|-your_binary (your app binary)
|-usr
|-bin
|-share
|-application
|-package_folder.desktop (to create a shortcut)
控制文件:
Package: regexp-testor
Version: 1.0
Section: devel
Priority: optional
Architecture: amd64
Depends: qt5-default
Maintainer: thibsc <mail@mail.com>
Homepage: https://github.com/thibsc
Description: RegExp testor
RegExp testor is a regular expression testor like the rubular.com website.
postinst 脚本:
#!/bin/bash
echo "Create a symbolic link towards the binary"
sudo ln -s /opt/regexp_testor/regexp_testor /usr/bin
echo "Enjoy ;)"
package_folder.desktop 文件:
[Desktop Entry]
Version=1.0
Type=Application
Name=RegExp testor
GenericName=RegExp testor
Comment=A regular expression testor like the rubular.com website
Exec=/opt/regexp_testor/regexp_testor
Terminal=false
MimeType=text/plain;
Icon=regexp_testor_icon
Categories=Development;
StartupNotify=true
然后将您置于您的 package_folder 级别并运行 sudo dpkg-deb --build package_folder
,您应该有一个可以使用的 .deb 包。
编辑:
您也可以使用 debpac生成您的数据包。
关于c++ - 如何在其他 linux 平台上部署带有所有 dll 文件的 Qt 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43518705/