Qt程序自依赖AppImage打包教材2/4(以TheNewPlayerFree为例)
Tofloor
poster avatar
已退deepin
deepin
2020-07-11 17:02
Author
本帖最后由 user0001 于 2020-7-11 15:38 编辑


1/4

https://bbs.deepin.org/post/196995

2/4
https://bbs.deepin.org/post/196996

3/4
https://bbs.deepin.org/post/196998

4/4 (end)
https://bbs.deepin.org/post/196999


准备文件2


export appdir=$PWD
cd thenewplayerfree thenewplayer.AppDir/usr/local/thenewplayerfree/bin/
ln -s ../share/images images
ln -s ../share/languages languages
ln -s ../etc/qt.conf qt.conf
cd $appdir


准备图标
cp thenewplayerfree.png thenewplayer.AppDir/usr/local/thenewplayerfree/images/
cp thenewplayerfree.png thenewplayer.AppDir/usr/share/pixmaps/


准备桌面文件
cp thenewplayerfree.desktop thenewplayer.AppDir/usr/share/applications/

cd thenewplayer.AppDir
ln -s usr/share/applications/thenewplayerfree.desktop thenewplayerfree.desktop
ln -s usr/share/pixmaps/thenewplayerfree.png thenewplayerfree.png
ln -s usr/local/thenewplayerfree/bin/thenewplayerfree.sh  AppRun  #建立AppImage的执行入口文件


桌面文件thenewplayerfree.desktop内容
[Desktop Entry]
Categories=AudioVideolayer;
Comment=The best media player for UNIX
Exec=thenewplayerfree %f  # %f表示thenewplayerfree可以接受一个命令行参数,例如右键打开一个文件
GenericName=Movie
Icon=thenewplayerfree
#Icon=/usr/share/pixmaps/thenewplayerfree.png
#Icon=/usr/local/thenewplayerfree/share/images/thenewplayerfree_48x48.png
Keywords=IPTVlayer;Movie;Video;
MimeType=application/ogg;application/vnd.apple.mpegurl;application/vnd.rn-realmedia;application/x-extension-mp4;application/x-flac;application/x-matroska;application/x-ogg;application/xspf+xml;image/vnd.rn-realpix;misc/ultravox;video/3gpp;video/dv;video/mp2t;video/mp4;video/mp4v-es;video/mpeg;video/msvideo;video/ogg;video/quicktime;video/vnd.rn-realvideo;video/webm;video/x-anim;video/x-avi;video/x-flc;video/x-fli;video/x-flv;video/x-m4v;video/x-matroska;video/x-mpeg;video/x-mpeg2;video/x-ms-afs;video/x-ms-asf;video/x-msvideo;video/x-ms-wmv;video/x-ms-wmx;video/x-ms-wvxvideo;video/x-nsv;video/x-ogm+ogg;video/x-theora;video/x-theora+ogg;x-content/video-dvd;x-content/video-svcd;x-content/video-vcd;x-scheme-handler/mms;x-scheme-handler/rtmp;x-scheme-handler/rtsp;application/mxf;
Name=TheNewPlayerFree
StartupNotify=true
Type=Application
Terminal=false



待续....
Reply Favorite View the author
All Replies

No replies yet