当前位置: 首页 > news >正文

番禺做网站的百度竞价排名公式

番禺做网站的,百度竞价排名公式,怎样做运营一个网站,帮熟人做网站如何收费前言 在 Linux 环境下,开发完 Qt 程序后,也需要制作为一个安装包或者可执行文件进行分发。这里介绍使用 linuxdeployqt 将 Qt 程序打包为 .AppImage 应用程序(类似于 Windows 的绿色免安装软件) 环境配置 配置 Qt 环境变量 这…

前言

在 Linux 环境下,开发完 Qt 程序后,也需要制作为一个安装包或者可执行文件进行分发。这里介绍使用 linuxdeployqt 将 Qt 程序打包为 .AppImage 应用程序(类似于 Windows 的绿色免安装软件)

环境配置

配置 Qt 环境变量

这一步是为了能让 linuxdeployqt 工具识别到 Qt 的环境。编辑 bashrc 文件

vim ~/.bashrc

在最后一行后面加入自己的 Qt 环境

#QT ENV
export QTDIR=/home/leo/Qt/5.15.2/gcc_64export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
export QT_PLUGIN_PATH=$QTDIR/plugins:$QT_PLUGIN_PATH
export QML2_PATH=$QTDIR/qml:$QML2_PATH

立即生效

source ~/.bashrc

验证

qmake -v

配置 linuxdeployqt

前往 linuxdeployqt 下载 release 发布的 linuxdeployqt-continuous-x86_64.AppImage

然后授予可执行权限,并改个名方便使用,放入 /usr/local/bin 路径下,方便随地使用

chmod 777 linuxdeployqt-continuous-x86_64.AppImage
mv linuxdeployqt-continuous-x86_64.AppImage linuxdeployqt
sudo mv linuxdeployqt /usr/local/bin

测试一下

linuxdelpoyqt --version

piMs7NQ.png

配置 AppImageKit

前往 AppImageKit 下载 appimagetool-x86_64.AppImage

同样地,添加执行权限:

chmod 777 appimagetool-x86_64.AppImage

安装 patchelf

直接 apt 安装 patchelf 即可

sudo apt install patchelf

打包

将应用拷贝至 output 目录下,运行命令(这里以 QClipboard 可执行程序为例):

leo@leo-VirtualBox:~/Desktop/output$ linuxdeployqt QClipboard -appimage
linuxdeployqt  (commit 6fcaf74), build 55 built on 2023-09-23 13:33:41 UTC
Not using FHS-like mode
app-binary: "/home/leo/Desktop/output/QClipboard"
appDirPath: "/home/leo/Desktop/output"
relativeBinPath: "QClipboard"
ERROR: Desktop file missing, creating a default one (you will probably want to edit it)
ERROR: Icon file missing, creating a default one (you will probably want to edit it)
qmakePath 3= ""
appimagetool, continuous build (commit 8bbf694), build <local dev build> built on 2020-12-31 11:48:33 UTC
fatal: 不是 git 仓库(或者任何父目录):.git
Failed to run 'git rev-parse --short HEAD: Child process exited with code 128 (code 128)
Desktop file: /home/leo/Desktop/output/default.desktop
Categories entry not found in desktop file
.desktop file is missing a Categories= key

然后就可以看到,output 目录下生成了一些文件

lrwxrwxrwx 1 leo leo     10 11月  3 21:31 AppRun -> QClipboard
-rw-rw-r-- 1 leo leo    123 11月  3 21:31 default.desktop
-rw-rw-r-- 1 leo leo      0 11月  3 21:31 default.png
drwxrwxr-x 6 leo leo   4096 11月  3 21:31 doc
drwxrwxr-x 2 leo leo   4096 11月  3 21:32 lib
drwxrwxr-x 7 leo leo   4096 11月  3 21:32 plugins
-rwxrwxr-x 1 leo leo 157512 11月  3 21:30 QClipboard
-rw-rw-r-- 1 leo leo    145 11月  3 21:32 qt.conf
drwxrwxr-x 2 leo leo   4096 11月  3 21:32 translations

修改 desktop 文件

我们需要修改默认生成的 desktop 文件

leo@leo-VirtualBox :~/Desktop/output$ cat default. desktop 
[Desktop Entry]
Type=Application
Name=Application
Exec=AppRun %F
Icon=default
Comment=Edit this default file
Terminal=true

可以查看 desktop 文件规范进行修改

这里将 default. desktop 文件重命名为 QClipboard. desktop 文件,并修改为以下内容:

[Desktop Entry]
Categories=System; Office;
Type=Application
Keywords=clip; clipboard;
Name=QClipboard
Exec=AppRun %F
Icon=logo
Comment=A cross-platform clipboard tool that allows selecting items from clipboard history to paste.
Terminal=true

然后删除了多余的文件夹,最终效果如下:
在这里插入图片描述

生成 appimage 应用

使用 appimagetool 生成 appimage 应用。

执行 ./appimagetool-x 86_64. AppImage output/ 后面的output就是我们的 output 目录。

注意:由于下载的appimagetool-x 86_64. AppImage应用并没有放入/usr/local/bin路径下,所以不能直接执行它。

leo@leo-VirtualBox :~/Downloads$ ./appimagetool-x 86_64. AppImage ~/Desktop/output/
appimagetool, continuous build (commit 8 bbf 694), build <local dev build> built on 2020-12-31 11:48:33 UTC
/home/leo/Desktop/output/QClipboard. desktop: hint: value "System; Office;" for key "Categories" in group "Desktop Entry" contains more than one main category; application might appear more than once in the application menu
Using architecture x 86_64
/home/leo/Desktop/output should be packaged as QClipboard-x 86_64. AppImage
WARNING: AppStream upstream metadata is missing, please consider creating itin usr/share/metainfo/QClipboard. appdata. xmlPlease see https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopAppsfor more information or use the generator at http://output.jsbin.com/qoqukof.
Generating squashfs...
Parallel mksquashfs: Using 6 processors
Creating 4.0 filesystem on QClipboard-x 86_64. AppImage, block size 131072.
[========================================================================/] 530/530 100%Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072compressed data, compressed metadata, compressed fragments,compressed xattrs, compressed idsduplicates are removed
Filesystem size 25011.83 Kbytes (24.43 Mbytes)39.56% of uncompressed filesystem size (63223.96 Kbytes)
Inode table size 2316 bytes (2.26 Kbytes)55.20% of uncompressed inode table size (4196 bytes)
Directory table size 861 bytes (0.84 Kbytes)52.25% of uncompressed directory table size (1648 bytes)
Number of duplicate files found 0
Number of inodes 69
Number of files 59
Number of fragments 12
Number of symbolic links  2
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 8
Number of ids (unique uids + gids) 1
Number of uids 1root (0)
Number of gids 1root (0)
Embedding ELF...
Marking the AppImage as executable...
Embedding MD 5 digest
SuccessPlease consider submitting your AppImage to AppImageHub, the crowd-sourced
central directory of available AppImages, by opening a pull request
at https://github.com/AppImage/appimage.github.io

然后就可以在appimagetool-x 86_64. AppImage同级路径下,看到生成的QClipboard-x 86_64. AppImage包了

执行测试

QClipboard 应用成功执行

在这里插入图片描述

注意,分发给别人时,需要加上执行权限才可运行

总结

以上就是在 Linux 系统下,打包 Qt 程序为 AppImage 程序的全部过程。

同时欢迎对跨平台剪贴板工具加star:https://github.com/L-Super/QClipboard

https://blog.csdn.net/zyhse/article/details/106381937

https://www.cnblogs.com/linuxAndMcu/p/11016322.html

UnityLaunchersAndDesktopFiles - Community Help Wiki (ubuntu.com)

desktop文件规范 | DeepinWiki

icon-theme-spec

http://www.yidumall.com/news/47707.html

相关文章:

  • 网站管理人员队伍建设有待加强seo引擎搜索
  • 最好用的crm软件网站优化软件费用
  • 网站建设总计常用的网络营销平台有哪些
  • 银川网站建设实习生湖南专业seo公司
  • 深圳石岩做网站的公司太原网站推广排名
  • 网站开发需求大吗上海网络推广招聘
  • 废旧回收做哪个网站好网络营销的认知
  • 网站搭建实训总结国外网站谷歌seo推广
  • wordpress导出导入数据库seo是什么味
  • 电脑制作网站总么做百度推广的效果
  • 什么软件 做短视频网站上海seo排名
  • 西宁公司网站设计目前主流搜索引擎是哪种
  • dedecms下载站百度收录域名
  • 彩票网站给实体店做代销如何快速网络推广
  • 域名到期如何续费苏州首页排名关键词优化
  • 如何将自己做的网站挂到服务器上百度排名点击软件
  • 网店推广的常用方法有哪些企业网站seo优化公司
  • 自己做网站自己买服务器东莞市网络seo推广企业
  • 营销型网站主页定制郑州做网站公司有哪些
  • 网站建设制作免费咨询开发一个平台需要多少钱
  • 联想公司网站建设现状太原百度快照优化排名
  • 番禺制作网站报价管理系统
  • 收费网站空间百度pc端网页版
  • 湘潭网站建设 电话磐石网络百度大数据官网入口
  • 沈阳网站建设 景乔科技网络营销服务公司有哪些
  • 建设机械网站资讯免费站推广网站在线
  • 做网站建设的公司是什么类型郑州网站制作公司哪家好
  • 桂林森威建筑工程监理有限责任公司百度seo流量
  • 模仿网站怎么做免费发广告的软件
  • iis7.5配置网站中国行业数据分析网