Merge pull request #5 from nullworks/master

Install script
This commit is contained in:
LightCat 2018-05-21 11:40:48 +02:00 committed by GitHub
commit 024383d2bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 80 additions and 9 deletions

View File

@ -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

View File

@ -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

1
tools/README Normal file
View File

@ -0,0 +1 @@
These files are not intended to be run from this folder.

4
tools/attach Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd cathook
sudo bash attach

7
tools/update Executable file
View File

@ -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

53
tools/updater.sh Executable file
View File

@ -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