-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix translation and get image from Waydroid and not AUR
- Loading branch information
Showing
7 changed files
with
198 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 49 additions & 35 deletions
84
bigcontrolcenter/usr/share/bigbashview/bcc/apps/waydroid/install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,58 @@ | ||
#!/usr/bin/env bash | ||
|
||
#Install | ||
pamac-installer --build $1 & | ||
# #Install | ||
# pamac-installer --build $1 & | ||
# | ||
# # Fix installation in BBV window | ||
# PID="$!" | ||
# [[ "$PID" = "" ]] && exit | ||
# | ||
# CONTADOR=0 | ||
# while [ $CONTADOR -lt 100 ]; do | ||
# if [ "$(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ")" != "" ]; then | ||
# xsetprop -id=$(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") --atom WM_TRANSIENT_FOR --value $(wmctrl -p -l -x | grep Waydroid$ | cut -f1 -d" ") -f 32x | ||
# wmctrl -i -r $(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") -b add,skip_pager,skip_taskbar | ||
# wmctrl -i -r $(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") -b toggle,modal | ||
# break | ||
# fi | ||
# sleep 0.1 | ||
# let CONTADOR=CONTADOR+1 | ||
# done | ||
# wait | ||
|
||
# Fix installation in BBV window | ||
PID="$!" | ||
[[ "$PID" = "" ]] && exit | ||
if [ "$ACTION" = "install" ]; then | ||
systemctl stop waydroid-container | ||
grep sys.use_memfd=true /var/lib/waydroid/waydroid_base.prop || echo sys.use_memfd=true | tee -a /var/lib/waydroid/waydroid_base.prop | ||
waydroid init | ||
systemctl start waydroid-container | ||
elif [ "$ACTION" = "install_gapps" ]; then | ||
systemctl stop waydroid-container | ||
grep sys.use_memfd=true /var/lib/waydroid/waydroid_base.prop || echo sys.use_memfd=true | tee -a /var/lib/waydroid/waydroid_base.prop | ||
waydroid init -s GAPPS -c https://ota.waydro.id/system -v https://ota.waydro.id/vendor -f | ||
systemctl start waydroid-container | ||
else | ||
|
||
CONTADOR=0 | ||
while [ $CONTADOR -lt 100 ]; do | ||
if [ "$(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ")" != "" ]; then | ||
xsetprop -id=$(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") --atom WM_TRANSIENT_FOR --value $(wmctrl -p -l -x | grep Waydroid$ | cut -f1 -d" ") -f 32x | ||
wmctrl -i -r $(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") -b add,skip_pager,skip_taskbar | ||
wmctrl -i -r $(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") -b toggle,modal | ||
break | ||
fi | ||
sleep 0.1 | ||
let CONTADOR=CONTADOR+1 | ||
done | ||
wait | ||
pamac-installer waydroid waydroid-meta-x11 python-pyclip xclip wl-clipboard & | ||
PID="$!" | ||
[[ "$PID" = "" ]] && exit | ||
|
||
pamac-installer waydroid waydroid-meta-x11 & | ||
PID="$!" | ||
[[ "$PID" = "" ]] && exit | ||
CONTADOR=0 | ||
while [ $CONTADOR -lt 100 ]; do | ||
if [ "$(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ")" != "" ]; then | ||
xsetprop -id=$(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") --atom WM_TRANSIENT_FOR --value $(wmctrl -p -l -x | grep Waydroid$ | cut -f1 -d" ") -f 32x | ||
wmctrl -i -r $(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") -b add,skip_pager,skip_taskbar | ||
wmctrl -i -r $(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") -b toggle,modal | ||
break | ||
fi | ||
sleep 0.1 | ||
let CONTADOR=CONTADOR+1 | ||
done | ||
wait | ||
|
||
CONTADOR=0 | ||
while [ $CONTADOR -lt 100 ]; do | ||
if [ "$(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ")" != "" ]; then | ||
xsetprop -id=$(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") --atom WM_TRANSIENT_FOR --value $(wmctrl -p -l -x | grep Waydroid$ | cut -f1 -d" ") -f 32x | ||
wmctrl -i -r $(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") -b add,skip_pager,skip_taskbar | ||
wmctrl -i -r $(wmctrl -p -l | grep -m1 " $PID " | cut -f1 -d" ") -b toggle,modal | ||
break | ||
if [[ "$(lsmod | grep nvidia_drm)" != "" ]]; then | ||
waydroid-big-3d 0 | ||
else | ||
waydroid-big-3d 1 | ||
fi | ||
sleep 0.1 | ||
let CONTADOR=CONTADOR+1 | ||
done | ||
wait | ||
|
||
if [[ "$(lsmod | grep nvidia_drm)" != "" ]]; then | ||
waydroid-big-3d 0 | ||
else | ||
waydroid-big-3d 1 | ||
fi |
65 changes: 65 additions & 0 deletions
65
bigcontrolcenter/usr/share/bigbashview/bcc/apps/waydroid/install_terminal.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/usr/bin/env bash | ||
#shellcheck disable=SC2155,SC2034 | ||
#shellcheck source=/dev/null | ||
|
||
# /usr/share/bigbashview/bcc/apps/big-store/install_terminal.sh | ||
# Description: Big Store installing programs for BigLinux | ||
# | ||
# Created: 2022/01/11 | ||
# Altered: 2023/08/13 | ||
# | ||
# Copyright (c) 2023-2023, Vilmar Catafesta <vcatafesta@gmail.com> | ||
# 2022-2023, Bruno Gonçalves <www.biglinux.com.br> | ||
# 2022-2023, Rafael Ruscher <rruscher@gmail.com> | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# 1. Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# 2. Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
APP="${0##*/}" | ||
_VERSION_="1.0.0-20230813" | ||
LIBRARY=${LIBRARY:-'/usr/share/bigbashview/bcc/shell'} | ||
#export BOOTLOG="/tmp/bigwaydroid-$USER-$(date +"%d%m%Y").log" | ||
#export LOGGER='/dev/tty8' | ||
#[[ -f "${LIBRARY}/bcclib.sh" ]] && source "${LIBRARY}/bcclib.sh" | ||
#[[ -f "${LIBRARY}/bstrlib.sh" ]] && source "${LIBRARY}/bstrlib.sh" | ||
|
||
OIFS=$IFS | ||
IFS=$'\n' | ||
|
||
MARGIN_TOP_MOVE="-90" WINDOW_HEIGHT=20 PID_BIG_DEB_INSTALLER="$$" WINDOW_ID="$WINDOW_ID" ./install_terminal_resize.sh & | ||
|
||
case "$ACTION" in | ||
"install") | ||
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true ACTION=install /usr/share/bigbashview/bcc/apps/waydroid/install.sh | ||
kdialog --msgbox "ok" | ||
;; | ||
"install_gapps") | ||
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true ACTION=install_gapps /usr/share/bigbashview/bcc/apps/waydroid/install.sh | ||
;; | ||
esac | ||
|
||
|
||
if [ "$(xwininfo -id $WINDOW_ID 2>&1 | grep -i "No such window")" != "" ]; then | ||
kill -9 $PID_BIG_DEB_INSTALLER | ||
exit 0 | ||
fi | ||
|
||
IFS=$OIFS |
28 changes: 28 additions & 0 deletions
28
bigcontrolcenter/usr/share/bigbashview/bcc/apps/waydroid/install_terminal_resize.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
################################## | ||
# Author Create: Bruno Gonçalves (www.biglinux.com.br) | ||
# Author Modify: Rafael Ruscher (rruscher@gmail.com) | ||
# Create Date: 2020/01/11 | ||
# Modify Date: 2022/05/09 | ||
# | ||
# Description: Big Store installing programs for BigLinux | ||
# | ||
# Licensed by GPL V2 or greater | ||
################################## | ||
#Install .deb packages | ||
|
||
STOP=0 | ||
while [ "$STOP" = "0" ]; do | ||
WINDOW_HEIGHT_DETECT="$(xwininfo -id $WINDOW_ID | grep Height: | sed 's|.* ||g')" | ||
WINDOW_WIDTH="$(xwininfo -id $WINDOW_ID | grep Width: | sed 's|.* ||g')" | ||
WIDTH_TERMINAL="$(echo "$WINDOW_WIDTH * 0.8 / 10" | bc | cut -f1 -d".")" | ||
MARGIN_LEFT="$(echo "$WINDOW_WIDTH * 0.15" | bc | cut -f1 -d".")" | ||
MARGIN_TOP="$(echo "$WINDOW_HEIGHT_DETECT * 0.5" $MARGIN_TOP_MOVE | bc | cut -f1 -d".")" | ||
xtermset -geom ${WIDTH_TERMINAL}x${WINDOW_HEIGHT}+${MARGIN_LEFT}+${MARGIN_TOP} | ||
sleep 1 | ||
# if close bigbashview window, kill terminal too | ||
if [ "$(xwininfo -id $WINDOW_ID 2>&1 | grep -i "No such window")" != "" ]; then | ||
kill -9 $PID_TERM_BIG_STORE | ||
exit 0 | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
bigcontrolcenter/usr/share/bigbashview/bcc/apps/waydroid/remove.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
if pacman -Q waydroid-image-gapps &>/dev/null; then | ||
pamac-installer --remove waydroid waydroid-meta-x11 waydroid-image-gapps waydroid-biglinux libgbinder python-gbinder | ||
elif pacman -Q waydroid-image &>/dev/null; then | ||
pamac-installer --remove waydroid waydroid-meta-x11 waydroid-image waydroid-biglinux libgbinder python-gbinder | ||
else | ||
pamac-installer --remove waydroid waydroid-meta-x11 waydroid-biglinux libgbinder python-gbinder | ||
fi | ||
# Remove images | ||
rm -R /var/lib/waydroid/images/ | ||
rm /var/lib/waydroid/waydroid* | ||
kill $(ps -aux | grep waydroid | grep container | awk '{print $2}') |