mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-05 18:38:26 +02:00
- Fixes install issue of kinto xkeysnail implementation on manjaro. Adds gcc check, closes #168.
This commit is contained in:
76
setup.py
76
setup.py
@@ -289,52 +289,54 @@ def Uninstall():
|
|||||||
if dename == "kde" or dename == "xfce":
|
if dename == "kde" or dename == "xfce":
|
||||||
print("Please log off and back on for your original DE hotkeys to take effect.")
|
print("Please log off and back on for your original DE hotkeys to take effect.")
|
||||||
|
|
||||||
check_xbind = cmdline("which xbindkeys 2>/dev/null").strip()
|
def kintoImpOne():
|
||||||
check_xdotool = cmdline("which xdotool 2>/dev/null").strip()
|
|
||||||
check_ibus = cmdline("which ibus-setup 2>/dev/null").strip()
|
|
||||||
|
|
||||||
pkgm = cmdline("which apt-get 2>/dev/null").strip()
|
check_xbind = cmdline("which xbindkeys 2>/dev/null").strip()
|
||||||
|
check_xdotool = cmdline("which xdotool 2>/dev/null").strip()
|
||||||
|
check_ibus = cmdline("which ibus-setup 2>/dev/null").strip()
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
pkgm = cmdline("which apt-get 2>/dev/null").strip()
|
||||||
pkgm = cmdline("which dnf 2>/dev/null").strip()
|
|
||||||
if len(pkgm) > 0:
|
|
||||||
pkgm += " check-update;sudo dnf install -y "
|
|
||||||
else:
|
|
||||||
pkgm += " install -y "
|
|
||||||
pkgm += " update; sudo apt-get install -y "
|
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
if len(pkgm) == 0:
|
||||||
pkgm = cmdline("which pacman 2>/dev/null").strip()
|
pkgm = cmdline("which dnf 2>/dev/null").strip()
|
||||||
if len(pkgm) > 0:
|
if len(pkgm) > 0:
|
||||||
pkgm += " -Syy; sudo pacman -S "
|
pkgm += " check-update;sudo dnf install -y "
|
||||||
|
else:
|
||||||
|
pkgm += " install -y "
|
||||||
|
pkgm += " update; sudo apt-get install -y "
|
||||||
|
|
||||||
|
if len(pkgm) == 0:
|
||||||
|
pkgm = cmdline("which pacman 2>/dev/null").strip()
|
||||||
|
if len(pkgm) > 0:
|
||||||
|
pkgm += " -Syy; sudo pacman -S "
|
||||||
|
|
||||||
|
|
||||||
if len(pkgm) == 0:
|
if len(pkgm) == 0:
|
||||||
print("No supported package manager found. Exiting...")
|
print("No supported package manager found. Exiting...")
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
runpkg = 0
|
runpkg = 0
|
||||||
run_pkg = ""
|
run_pkg = ""
|
||||||
|
|
||||||
if len(check_xbind) > 0 and len(check_xdotool) > 0 and len(check_ibus) > 0:
|
if len(check_xbind) > 0 and len(check_xdotool) > 0 and len(check_ibus) > 0:
|
||||||
print("Xbindkeys, xdotool and IBus requirement is installed.")
|
print("Xbindkeys, xdotool and IBus requirement is installed.")
|
||||||
if len(check_xbind) == 0:
|
if len(check_xbind) == 0:
|
||||||
run_pkg = "xbindkeys"
|
run_pkg = "xbindkeys"
|
||||||
runpkg = 1
|
runpkg = 1
|
||||||
if len(check_xdotool) == 0:
|
if len(check_xdotool) == 0:
|
||||||
run_pkg += " xdotool"
|
run_pkg += " xdotool"
|
||||||
runpkg = 1
|
runpkg = 1
|
||||||
if len(check_ibus) == 0:
|
if len(check_ibus) == 0:
|
||||||
# may differ with distro, but for now
|
# may differ with distro, but for now
|
||||||
run_pkg += " ibus"
|
run_pkg += " ibus"
|
||||||
runpkg = 1
|
runpkg = 1
|
||||||
|
|
||||||
if runpkg != 0:
|
if runpkg != 0:
|
||||||
requirements(pkgm)
|
requirements(pkgm)
|
||||||
|
|
||||||
if not os.path.exists(homedir + '/.config/ibus/bus') and cmdline("ls ~/.config/ibus/bus -1rt") == "":
|
if not os.path.exists(homedir + '/.config/ibus/bus') and cmdline("ls ~/.config/ibus/bus -1rt") == "":
|
||||||
install_ibus()
|
install_ibus()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
f = open("defaults.json")
|
f = open("defaults.json")
|
||||||
@@ -390,6 +392,8 @@ if(kintotype == 4):
|
|||||||
Uninstall()
|
Uninstall()
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
kintoImpOne()
|
||||||
|
|
||||||
for index, item in enumerate(data['defaulttypes']):
|
for index, item in enumerate(data['defaulttypes']):
|
||||||
ossym = ""
|
ossym = ""
|
||||||
if item == "windows":
|
if item == "windows":
|
||||||
|
@@ -3,13 +3,13 @@
|
|||||||
if pkgmgr="$( which apt-get )" 2> /dev/null; then
|
if pkgmgr="$( which apt-get )" 2> /dev/null; then
|
||||||
echo "Debian"
|
echo "Debian"
|
||||||
$pkgmgr update
|
$pkgmgr update
|
||||||
$pkgmgr --yes --force-yes install "$1"
|
$pkgmgr --yes --force-yes install $1
|
||||||
elif pkgmgr="$( which dnf )" 2> /dev/null; then
|
elif pkgmgr="$( which dnf )" 2> /dev/null; then
|
||||||
echo "dnf"
|
echo "dnf"
|
||||||
$pkgmgr check-update; $pkgmgr install -y "$1"
|
$pkgmgr check-update; $pkgmgr install -y $1
|
||||||
elif pkgmgr="$( which pacman )" 2> /dev/null; then
|
elif pkgmgr="$( which pacman )" 2> /dev/null; then
|
||||||
echo "Arch-based"
|
echo "Arch-based"
|
||||||
$pkgmgr -Syy;yes | $pkgmgr -S "$1"
|
$pkgmgr -Syy;yes | $pkgmgr -S $1
|
||||||
else
|
else
|
||||||
echo "Package manager not found, please install $1" >&2
|
echo "Package manager not found, please install $1" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@@ -120,9 +120,9 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
|
|||||||
sudo ./system-config/unipkg.sh "$pydev"
|
sudo ./system-config/unipkg.sh "$pydev"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if ! [ -x "$(command -v xhost)" ]; then
|
if ! [ -x "$(command -v xhost)" ] || ! [ -x "$(command -v gcc)" ]; then
|
||||||
if [ "$distro" == "\"manjaro linux\"" ]; then
|
if [ "$distro" == "\"manjaro linux\"" ]; then
|
||||||
sudo ./system-config/unipkg.sh xorg-xhost
|
sudo ./system-config/unipkg.sh "xorg-xhost gcc"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# echo "Transferring files..."
|
# echo "Transferring files..."
|
||||||
|
Reference in New Issue
Block a user