From 076ae0fa0b9f60e15e69c00ce46427697f2a9620 Mon Sep 17 00:00:00 2001 From: gustavosotnas Date: Thu, 5 Mar 2015 18:22:39 -0300 Subject: [PATCH] =?UTF-8?q?Lan=C3=A7amento=20da=20vers=C3=A3o=200.1.2=20-?= =?UTF-8?q?=20Adicionado=20recurso=20"sempre=20no=20topo"=20na=20janela=20?= =?UTF-8?q?de=20carregamento=20do=20Android=20SDK=20Emulator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- avd-launcher/DEBIAN/control | 2 +- avd-launcher/usr/share/avd-launcher/avd-launcher-helper.sh | 2 +- avd-launcher/usr/share/avd-launcher/avd-launcher.sh | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/avd-launcher/DEBIAN/control b/avd-launcher/DEBIAN/control index b2f9a1f..8abce34 100644 --- a/avd-launcher/DEBIAN/control +++ b/avd-launcher/DEBIAN/control @@ -1,5 +1,5 @@ Package: avd-launcher -Version: 0.1.1 +Version: 0.1.2 Section: devel Maintainer: Gustavo Moraes Homepage: https://github.com/gustavosotnas/avd-launcher diff --git a/avd-launcher/usr/share/avd-launcher/avd-launcher-helper.sh b/avd-launcher/usr/share/avd-launcher/avd-launcher-helper.sh index abcfd7b..12d0b1c 100644 --- a/avd-launcher/usr/share/avd-launcher/avd-launcher-helper.sh +++ b/avd-launcher/usr/share/avd-launcher/avd-launcher-helper.sh @@ -11,7 +11,7 @@ # 100 = "No" para fechar APP_NAME="Android Virtual Device Launcher" -VERSION="0.1.1" +VERSION="0.1.2" HELP_DESCRIPTION_TEXT="$APP_NAME is a simple tool that allows running the Android SDK emulator without opening Android Studio or using command-line interface (terminal). You can also perform some operations with Android Virtual Device (AVD) opened: Install and Uninstall APKs, copy files to the AVD or AVD to the computer, install Google Apps (Android 4.3+ only) and send adb commands to the AVD." ADVICE_DESCRIPTION_TEXT="This tool doesn't download or manage AVDs, for that, use \"AVD Manager\"." APP_AUTHOR="Copyright (C) 2015 Gustavo Moraes http://about.me/gustavosotnas" diff --git a/avd-launcher/usr/share/avd-launcher/avd-launcher.sh b/avd-launcher/usr/share/avd-launcher/avd-launcher.sh index cc46ab3..19e2234 100644 --- a/avd-launcher/usr/share/avd-launcher/avd-launcher.sh +++ b/avd-launcher/usr/share/avd-launcher/avd-launcher.sh @@ -11,7 +11,7 @@ # 100 = "No" para fechar APP_NAME="Android Virtual Device Launcher" -VERSION="0.1.1" +VERSION="0.1.2" CONFIG_FILE_SDK="$HOME/.config/androidSDK_path.conf" AVD_FOLDER="$HOME/.android/avd" # Valor padrão (default) - pode ser diferente HELP_DESCRIPTION_TEXT="$APP_NAME is a simple tool that allows running the Android SDK emulator without opening Android Studio or using command-line interface (terminal). You can also perform some operations with Android Virtual Device (AVD) opened: Install and Uninstall APKs, copy files to the AVD or AVD to the computer, install Google Apps (Android 4.3+ only) and send adb commands to the AVD." @@ -203,6 +203,8 @@ load_avd() EMULATOR_PID=$(ps -xo pid,command | grep emulator | grep --invert-match grep | cut -d'.' -f1) # Nome do processo pode ser "emulator64-x86", "emulator-x86", "emulator-arm", "emulator-mips", etc. ### Poderia usar o comando "pidof", mas a filtragem para obter apenas o nome do processo (sem "PATH" junto) daria um comando enorme, com um monte de pipes (mais LENTO!) EMULATOR_PSTATE="S"; # Valor inicial ("SLEEPING": apenas para entrar no while) ( # Início do pipe para o zenity + sleep 1; + wmctrl -r "$APP_NAME" -b toggle,above; # Deixa a janela de progresso do zenity "always-on-top" sleep 4; # Tempo aproximado para o "emulator*" estabilizar seus PSTATES (pra não sair do while antes da hora) while [ "$EMULATOR_PSTATE" != "R" ] # Enquanto o emulador não estiver no estado "Running" (PROCESS STATE CODES: R -> running or runnable (on run queue); D -> uninterruptible sleep (usually IO); S -> interruptible sleep (waiting for an event to complete); Z -> defunct/zombie, terminated but not reaped by its parent; T -> stopped, either by a job control signal or because it is being traced) do