diff --git a/README.md b/README.md index 5c863fc..637053c 100644 --- a/README.md +++ b/README.md @@ -76,8 +76,7 @@ appimagetool ./src ```bash # 安装 -sudo mv wechat-x86_64.AppImage /usr/bin/wechat -sudo wechat --install # 安装图标、桌面文件 +sudo ./wechat-x86_64.AppImage --install # 卸载 sudo wechat --remove ``` @@ -102,7 +101,7 @@ wechat-x86_64.AppImage --help wechat-x86_64.AppImage --debug # 关闭微信进程(早期版本无法退出,现在应该不需要这个功能了) wechat-x86_64.AppImage --kill -# 安装图标、桌面文件 +# 安装图标、桌面文件、应用 sudo wechat-x86_64.AppImage --install # 卸载图标、桌面文件、应用 sudo wechat-x86_64.AppImage --remove diff --git a/src/.DirIcon b/src/.DirIcon new file mode 120000 index 0000000..145b335 --- /dev/null +++ b/src/.DirIcon @@ -0,0 +1 @@ +wechat.png \ No newline at end of file diff --git a/src/AppRun b/src/AppRun index 8ccf10b..7478ded 100755 --- a/src/AppRun +++ b/src/AppRun @@ -21,8 +21,10 @@ if [ $# -eq 1 ]; then exit $? fi if [ "$1" = "--install" ]; then - cp $APPDIR/usr/share/applications/wechat.desktop /usr/share/applications - cp $APPDIR/usr/share/icons/hicolor/256x256/apps/wechat.png /usr/share/icons/hicolor/256x256/apps + cp $APPIMAGE /usr/bin/wechat + cp $APPDIR/wechat.desktop /usr/share/applications + cp $APPDIR/wechat.png /usr/share/icons/hicolor/256x256/apps + sed -i 's#Icon=wechat#Icon=/usr/share/icons/hicolor/256x256/apps/wechat.png#g' /usr/share/applications/wechat.desktop exit $? fi if [ "$1" = "--remove" ]; then diff --git a/src/usr/share/applications/wechat.desktop b/src/usr/share/applications/wechat.desktop deleted file mode 100644 index c534cfc..0000000 --- a/src/usr/share/applications/wechat.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=微信 -Exec=wechat %U -StartupNotify=true -Terminal=false -Icon=/usr/share/icons/hicolor/256x256/apps/wechat.png -Type=Application -Categories=Utility; -Comment=微信桌面版 diff --git a/src/usr/share/icons/hicolor/256x256/apps/wechat.png b/src/usr/share/icons/hicolor/256x256/apps/wechat.png deleted file mode 100644 index 9133e9f..0000000 Binary files a/src/usr/share/icons/hicolor/256x256/apps/wechat.png and /dev/null differ diff --git a/src/wechat.desktop b/src/wechat.desktop index f735bff..4ec0cf2 100755 --- a/src/wechat.desktop +++ b/src/wechat.desktop @@ -1,5 +1,6 @@ [Desktop Entry] Name=wechat +Exec=wechat %U StartupNotify=true Terminal=false Icon=wechat diff --git a/src/wechat.png b/src/wechat.png index 9133e9f..fa1593d 100644 Binary files a/src/wechat.png and b/src/wechat.png differ