• Linux创建AppImage打包程序(以TrustedQSL为例)


    在业余无线电领域,TrustedQSL是ARRL的LotW(ARRL's Logbook of the World)的通联日志签名上传程序,在Debian和Ubuntu等多数Linux发行版中自带tqsl程序,直接通过软件仓库安装,但是通常都不是最新版本。我们可以基于ARRL发布的源代码在我们自己的电脑上编译最新版本。我使用的是Linux Mint操作系统,以此为例:

     1 #!/bin/sh
     2 #
     3 # Make a Linux AppImage for tqsl
     4 # 
     5 
     6 wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
     7 chmod a+x ./linuxdeploy-x86_64.AppImage
     8 
     9 git clone https://git.code.sf.net/p/trustedqsl/tqsl
    10 
    11 cd tqsl
    12 rm -rf build AppDir
    13 mkdir build
    14 cd build
    15 cmake .. -DCMAKE_INSTALL_PREFIX=/usr
    16 make
    17 make install DESTDIR=../AppDir
    18 cd ..
    19 cp ./build/apps/tqsl AppDir/usr/bin/
    20 cp ./apps/icons/key48.png AppDir/TrustedQSL.png
    21 cp ./apps/tqsl.desktop AppDir
    22 ln -s usr/bin/tqsl AppDir/AppRun
    23 sed -i s/"TrustedQSL.png"/"TrustedQSL"/ AppDir/tqsl.desktop
    24 linuxdeploy-x86_64.AppImage -e AppDir/usr/bin/tqsl -d AppDir/tqsl.desktop -i AppDir/TrustedQSL.png --output appimage --appdir AppDir
    25 chmod 755 TQSL-*x86_64.AppImage

     linuxdeploy.AppImage会把当前编译出来的应用程序,以及它依赖的所有库打包在一个可执行文件中,因此可能程序大小偏大,好处是方便部署。

  • 相关阅读:
    Sqlserver 迁移数据库批量迁移作业(Job)
    在VS2010开发的MVC3 应用程序中设定默认的浏览器
    创建继承自System.Web.UI.WebControls.WebControl基类的控件类
    遍历页面控件
    @fontface
    加密配置节点
    视图状态的程序分块
    BlogEngine.NET 1.5的BlogProvider、DbBlogProvider
    避免target特性
    SCOPE_IDENTITY、IDENT_CURRENT 、@@IDENTITY
  • 原文地址:https://www.cnblogs.com/lyuyangly/p/16246100.html
Copyright © 2020-2023  润新知