mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: term opening on Linux (#845)
This commit is contained in:
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version: "3.32.2"
|
||||
flutter-version: "3.32.8"
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "zulu"
|
||||
@@ -58,24 +58,17 @@ jobs:
|
||||
run: |
|
||||
sudo apt update
|
||||
# Basic
|
||||
sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev libvulkan-dev desktop-file-utils wget
|
||||
sudo apt install -y clang cmake ninja-build pkg-config libgtk-3-dev mesa-utils libvulkan-dev desktop-file-utils wget
|
||||
# App Specific
|
||||
sudo apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libunwind-dev
|
||||
# Packaging
|
||||
sudo wget https://github.com/AppImage/appimagetool/releases/download/1.9.0/appimagetool-x86_64.AppImage -O /bin/appimagetool
|
||||
sudo chmod +x /bin/appimagetool
|
||||
sudo apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libunwind-dev libsecret-1-dev
|
||||
- name: Build
|
||||
run: |
|
||||
dart run fl_build -p linux
|
||||
- name: Rename artifacts
|
||||
run: |
|
||||
appimage_name=$(ls dist/*/*.AppImage)
|
||||
mv $appimage_name ${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_amd64.appimage
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_amd64.appimage
|
||||
${{ env.APP_NAME }}_${{ env.BUILD_NUMBER }}_amd64.AppImage
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
@@ -281,59 +281,24 @@ bool _checkClient(BuildContext context, String id) {
|
||||
|
||||
const _runEmulatorShell = '''
|
||||
#!/bin/sh
|
||||
# launch_terminal.sh
|
||||
|
||||
TERMINAL="\$1"
|
||||
shift # Remove the first argument (terminal name)
|
||||
shift
|
||||
|
||||
# Auto detect terminal if not provided
|
||||
if [ -z "\$TERMINAL" ] || [ "\$TERMINAL" = "x-terminal-emulator" ]; then
|
||||
# Follow the order of preference
|
||||
for term in kitty alacritty gnome-terminal konsole xfce4-terminal terminator tilix wezterm foot; do
|
||||
if command -v "\$term" >/dev/null 2>&1; then
|
||||
TERMINAL="\$term"
|
||||
break
|
||||
fi
|
||||
for term in kitty alacritty gnome-terminal gnome-console konsole xfce4-terminal terminator tilix wezterm foot xterm; do
|
||||
command -v "\$term" >/dev/null 2>&1 && { TERMINAL="\$term"; break; }
|
||||
done
|
||||
|
||||
[ -z "\$TERMINAL" ] && TERMINAL="x-terminal-emulator"
|
||||
fi
|
||||
|
||||
case "\$TERMINAL" in
|
||||
gnome-terminal)
|
||||
exec "\$TERMINAL" -- "\$@"
|
||||
;;
|
||||
konsole|terminator|tilix)
|
||||
exec "\$TERMINAL" -e "\$@"
|
||||
;;
|
||||
xfce4-terminal)
|
||||
exec "\$TERMINAL" -e "\$*"
|
||||
;;
|
||||
gnome-terminal|gnome-console) exec "\$TERMINAL" -- "\$@" ;;
|
||||
alacritty)
|
||||
# Check alacritty version
|
||||
if "\$TERMINAL" --version 2>&1 | grep -q "alacritty 0\\.1[3-9]"; then
|
||||
# 0.13.0+
|
||||
exec "\$TERMINAL" --command "\$@"
|
||||
else
|
||||
# Old versions
|
||||
exec "\$TERMINAL" -e "\$@"
|
||||
fi
|
||||
;;
|
||||
kitty)
|
||||
exec "\$TERMINAL" "\$@"
|
||||
;;
|
||||
wezterm)
|
||||
exec "\$TERMINAL" start -- "\$@"
|
||||
;;
|
||||
foot)
|
||||
exec "\$TERMINAL" "\$@"
|
||||
;;
|
||||
urxvt|rxvt-unicode)
|
||||
exec "\$TERMINAL" -e "\$@"
|
||||
;;
|
||||
x-terminal-emulator|*)
|
||||
# Default
|
||||
exec "\$TERMINAL" -e "\$@"
|
||||
;;
|
||||
"\$TERMINAL" --version 2>&1 | grep -q "alacritty 0\\.1[3-9]" &&
|
||||
exec "\$TERMINAL" --command "\$@" || exec "\$TERMINAL" -e "\$@" ;;
|
||||
kitty|foot) exec "\$TERMINAL" "\$@" ;;
|
||||
wezterm) exec "\$TERMINAL" start -- "\$@" ;;
|
||||
xfce4-terminal) exec "\$TERMINAL" -e "\$*" ;;
|
||||
*) exec "\$TERMINAL" -e "\$@" ;;
|
||||
esac
|
||||
''';
|
||||
|
||||
Reference in New Issue
Block a user