diff --git a/.github/workflows/nightly_posix.yml b/.github/workflows/nightly_posix.yml index 4d8d3b030..7ac0c1c26 100644 --- a/.github/workflows/nightly_posix.yml +++ b/.github/workflows/nightly_posix.yml @@ -47,5 +47,5 @@ jobs: with: release-tag: nightly # allows semicolon-separated list of case sensitive globs - files: "wezterm-*.deb;WezTerm-*.zip;wezterm-*.xz;wezterm-*.rpm;wezterm-*.tar.gz" + files: "wezterm-*.deb;WezTerm-*.AppImage;WezTerm-*.zip;wezterm-*.xz;wezterm-*.rpm;wezterm-*.tar.gz" repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index c07073e1d..ce802334a 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -65,6 +65,7 @@ jobs: mkdir pkg_ mv *.deb pkg_ mv *.xz pkg_ + mv *.AppImage pkg_ - uses: actions/upload-artifact@master if: contains(matrix.os, 'macos') with: diff --git a/.github/workflows/tag_posix.yml b/.github/workflows/tag_posix.yml index 8487eea3b..0458b9616 100644 --- a/.github/workflows/tag_posix.yml +++ b/.github/workflows/tag_posix.yml @@ -49,6 +49,7 @@ jobs: wezterm-*.rpm wezterm-*.deb WezTerm-*.zip + WezTerm-*.AppImage wezterm-*.xz wezterm-*.tar.gz env: diff --git a/.gitignore b/.gitignore index a99baf718..e1163c322 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ **/*.rs.bk .*.sw* /esctest.log +/AppDir +/WezTerm*.AppImage +/wezterm*-src.tar.gz diff --git a/assets/wezterm.appdata.xml b/assets/wezterm.appdata.xml new file mode 100644 index 000000000..890e9cc46 --- /dev/null +++ b/assets/wezterm.appdata.xml @@ -0,0 +1,27 @@ + + + org.wezfurlong.wezterm.desktop + MIT + MIT + Wez's Terminal Emulator + A GPU-accelerated cross-platform terminal emulator and multiplexer + +

+wezterm is a terminal emulator with support for modern features +such as fonts with ligatures, hyperlinks, tabs and multiple +windows. +

+
+ + org.wezfurlong.wezterm.desktop + + https://wezfurlong.org/wezterm/ + + + Ligatures in VIM + https://wezfurlong.org/wezterm/screenshots/two.png + + + + Wez Furlong +
diff --git a/assets/wezterm.desktop b/assets/wezterm.desktop index 078795062..b9253228c 100644 --- a/assets/wezterm.desktop +++ b/assets/wezterm.desktop @@ -1,7 +1,10 @@ [Desktop Entry] Name=WezTerm Comment=Wez's Terminal Emulator -Icon=/usr/share/wezterm/terminal.png +Keywords=shell;prompt;command;commandline;cmd; +Icon=org.wezfurlong.wezterm +TryExec=wezterm Exec=wezterm Type=Application -Categories=Terminal +Categories=System;TerminalEmulator;Utility; +Terminal=false diff --git a/ci/appimage.sh b/ci/appimage.sh new file mode 100755 index 000000000..f31990598 --- /dev/null +++ b/ci/appimage.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +rm -rf AppDir *.AppImage +mkdir AppDir + +install -Dsm755 -t AppDir/usr/bin target/release/wezterm +install -Dm644 assets/icon/terminal.png AppDir/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png +install -Dm644 -t AppDir/usr/share/wezterm/colors assets/colors/* +install -Dm644 assets/wezterm.desktop AppDir/usr/share/applications/org.wezfurlong.wezterm.desktop + +# [appimage/stderr] /usr/bin/appstream-util: symbol lookup error: /lib64/libsoup-2.4.so.1: undefined symbol: g_file_info_get_modification_date_time +# install -Dm644 assets/wezterm.appdata.xml AppDir/usr/share/metainfo/wezterm.appdata.xml + +[ -x /tmp/linuxdeploy ] || ( curl -L 'https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage' -o /tmp/linuxdeploy && chmod +x /tmp/linuxdeploy ) + +/tmp/linuxdeploy \ + --appdir AppDir \ + --output appimage \ + --desktop-file assets/wezterm.desktop diff --git a/ci/deploy.sh b/ci/deploy.sh index f23a93851..c7770401e 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -83,15 +83,17 @@ echo "Doing the build bit here" set -x mkdir -p %{buildroot}/usr/bin %{buildroot}/usr/share/wezterm %{buildroot}/usr/share/applications install -Dsm755 target/release/wezterm %{buildroot}/usr/bin -install -Dm644 assets/icon/terminal.png %{buildroot}/usr/share/wezterm/terminal.png +install -Dm644 assets/icon/terminal.png %{buildroot}/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png install -Dm644 -t %{buildroot}/usr/share/wezterm/colors assets/colors/* -install -Dm644 assets/wezterm.desktop %{buildroot}/usr/share/applications/wezterm.desktop +install -Dm644 assets/wezterm.desktop %{buildroot}/usr/share/applications/org.wezfurlong.wezterm.desktop +install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/wezterm.appdata.xml %files /usr/bin/wezterm -/usr/share/wezterm/terminal.png +/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png /usr/share/wezterm/colors/* -/usr/share/applications/wezterm.desktop +/usr/share/applications/org.wezfurlong.wezterm.desktop +/usr/share/metainfo/wezterm.appdata.xml EOF rpmbuild --build-in-place -bb --rmspec wezterm.spec --verbose @@ -114,10 +116,11 @@ Description: Wez's Terminal Emulator. windows. Depends: libc6, libegl-mesa0, libxcb-icccm4, libxcb-ewmh2, libxcb-keysyms1, libxcb-xkb1, libxkbcommon0, libxkbcommon-x11-0, libfontconfig1, xdg-utils, libxcb-render0, libxcb-shape0, libx11-6, libegl1 EOF - install -Dsm755 target/release/wezterm pkg/debian/usr/bin - install -Dm644 assets/icon/terminal.png pkg/debian/usr/share/wezterm/terminal.png + install -Dsm755 -t pkg/debian/usr/bin target/release/wezterm + install -Dm644 assets/icon/terminal.png pkg/debian/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png install -Dm644 -t pkg/debian/usr/share/wezterm/colors assets/colors/* - install -Dm644 assets/wezterm.desktop pkg/debian/usr/share/applications/wezterm.desktop + install -Dm644 assets/wezterm.desktop pkg/debian/usr/share/applications/org.wezfurlong.wezterm.desktop + install -Dm644 assets/wezterm.appdata.xml pkg/debian/usr/share/metainfo/wezterm.appdata.xml if [[ "$BUILD_REASON" == "Schedule" ]] ; then debname=wezterm-nightly else @@ -126,7 +129,7 @@ EOF fakeroot dpkg-deb --build pkg/debian $debname.deb tar cJf $debname.tar.xz -C pkg/debian/usr/bin wezterm rm -rf pkg - + ./ci/appimage.sh ;; esac ./ci/source-archive.sh diff --git a/src/config/mod.rs b/src/config/mod.rs index 6b83ef7f5..194f59207 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -672,6 +672,17 @@ impl Config { { paths.push(colors_dir); } + + // If running out of an AppImage, resolve our installed colors + // path relative to our binary location: + // `/usr/bin/wezterm` -> `/usr/share/wezterm/colors` + if let Some(colors_dir) = exe_name + .parent() + .and_then(|bin| bin.parent()) + .map(|usr| usr.join("share").join("wezterm").join("colors")) + { + paths.push(colors_dir); + } } if cfg!(target_os = "macos") {