diff --git a/README.md b/README.md index 8e869478..fe3cd416 100755 --- a/README.md +++ b/README.md @@ -35,14 +35,10 @@ and a lot of useful features, including # INSTALLATION -## Automatic: -If you already downloaded the repo, simply run -* `install-all` +## Automatic: (Ubuntu based only) +Run in terminal: -Else simply run: - -* `git clone --recursive https://github.com/nullworks/One-in-all-cathook-install/blob/master/install-all.git` -and run it's install-all script. +* `wget https://raw.githubusercontent.com/nullworks/cathook/master/install-all && bash install-all` ## Manual: You need CMake to build cathook, CMake should take care of dependencies diff --git a/install-all b/install-all index 5b9fb851..2dbb670c 100755 --- a/install-all +++ b/install-all @@ -2,12 +2,14 @@ # Install base Dependencies # -sudo apt update && sudo apt install build-essential gcc-multilib g++-multilib software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot g++-6-multilib gcc-6 g++-6 -y && sudo apt update && sudo apt install git libssl-dev:i386 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake libpng-dev libssl-dev cmake gcc-multilib g++-multilib -y +sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install build-essential git gcc-multilib g++-multilib software-properties-common gcc-snapshot g++-6-multilib gcc-6 g++-6 libssl-dev:i386 libboost-all-dev libc6-dev:i386 gdb libsdl2-dev libglew-dev:i386 libglew-dev libfreetype6-dev libfreetype6-dev:i386 cmake libpng-dev libssl-dev cmake gcc-multilib g++-multilib -y # # Install libglez # +mkdir cathook; cd cathook + git clone --recursive https://github.com/nullworks/libglez.git;cd libglez;mkdir build;cd build;cmake ..;make;sudo make install;cd ..;cd .. # @@ -26,4 +28,12 @@ git clone --recursive https://github.com/nullworks/simple-ipc.git;cd simple-ipc; # Build cathook # -mkdir build;cd build;cmake ..;make -j$(grep -c '^processor' /proc/cpuinfo);make data +git clone --recursive https://github.com/nullworks/cathook.git;cd cathook;mkdir build;cd build;cmake ..;make -j$(grep -c '^processor' /proc/cpuinfo); sudo make data; cd ..; cd .. + +# +# Do post installation stuff +# + +cp -a -u ./cathook/tools/. ./ +rm ./README +cd ..; rm install-all diff --git a/tools/README b/tools/README new file mode 100644 index 00000000..b7037c9e --- /dev/null +++ b/tools/README @@ -0,0 +1 @@ +These files are not intended to be run from this folder. diff --git a/tools/attach b/tools/attach new file mode 100755 index 00000000..21deff49 --- /dev/null +++ b/tools/attach @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +cd cathook +sudo bash attach diff --git a/tools/update b/tools/update new file mode 100755 index 00000000..036e9134 --- /dev/null +++ b/tools/update @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +rm ./updater.sh +wget https://raw.githubusercontent.com/nullworks/cathook/master/tools/updater.sh +updater() { + source updater.sh +} +updater diff --git a/tools/updater.sh b/tools/updater.sh new file mode 100755 index 00000000..02b178b4 --- /dev/null +++ b/tools/updater.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +sudo echo Elevated + +cd libglez +git fetch >update.log +if ! git pull origin $(git rev-parse --abbrev-ref HEAD) >>update.log; then + $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 + exit +fi +if ! git submodule update --remote --recursive >>update.log; then + $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 + exit +fi +cd build; cmake ..; make;sudo make install;cd ..; cd .. + +cd libxoverlay +git fetch >update.log +if ! git pull origin $(git rev-parse --abbrev-ref HEAD) >>update.log; then + $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 + exit +fi +if ! git submodule update --remote --recursive >>update.log; then + $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 + exit +fi +cd build; cmake ..; make;sudo make install;cd ..; cd .. + +cd simple-ipc +git fetch >update.log +if ! git pull origin $(git rev-parse --abbrev-ref HEAD) >>update.log; then + $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 + exit +fi +if ! git submodule update --remote --recursive >>update.log; then + $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 + exit +fi +cd build; cmake ..; make;sudo make install;cd ..; cd .. + +cd cathook +git fetch >update.log +if ! git pull origin $(git rev-parse --abbrev-ref HEAD) >>update.log; then + $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 + exit +fi +if ! git submodule update --remote --recursive >>update.log; then + $DIALOG --title "Error" --backtitle "Updating" --msgbox "An error occured while updating cathook, check update.log for details. It might have been caused by changes in local files - in that case try resetting local repo." 8 78 + exit +fi +cd build; cmake ..; make; cd ..; cd .. + + +cp -a -u ./cathook/tools/. ./; rm ./README; rm ./updater.sh