Merge pull request #283 from SylveonBottle/master

(2) Update and rename update-gccdowngrade to arch-gcc-fix
This commit is contained in:
oneechanhax 2017-08-16 14:48:31 -05:00 committed by GitHub
commit 211e5fb751
3 changed files with 21 additions and 30 deletions

View File

@ -42,7 +42,7 @@ sudo apt update && sudo apt install git libssl-dev:i386 libc6-dev:i386 gdb libsd
Arch gcc6 & dependencies installation: Arch gcc6 & dependencies installation:
```bash ```bash
sudo pacman -Syu && sudo pacman -S gdb gdb-common glew1.10 glew lib32-glew1.10 rsync --noconfirm && yes | sudo pacman -U https://archive.archlinux.org/packages/g/gcc-multilib/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/g/gcc-libs-multilib/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz https://archive.archlinux.org/packages/l/lib32-gcc-libs/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz sudo pacman -U /var/cache/pacman/pkg/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz && sudo cp -r /usr/include/c++/6.3.1/ /tmp/ && sudo pacman -S gdb gdb-common glew1.10 glew lib32-glew1.10 rsync lib62-gcc-libs gcc-libs-multilib gcc-multilib --noconfirm && yes | sudo cp -r /tmp/6.3.1/ /usr/include/c++/
``` ```
If you don't use Ubuntu or Arch (or if Arch script gets outdated), here's the list of what cathook requires: If you don't use Ubuntu or Arch (or if Arch script gets outdated), here's the list of what cathook requires:
@ -51,13 +51,14 @@ If you don't use Ubuntu or Arch (or if Arch script gets outdated), here's the li
* `g++-6` * `g++-6`
* `gcc-6-multilib` * `gcc-6-multilib`
* `g++-6-multilib` * `g++-6-multilib`
* `glew`
* `gdb` (for the injection script, you can use different injector if you want) * `gdb` (for the injection script, you can use different injector if you want)
* `libssl-dev:i386` * `libssl-dev:i386`
* `libc6-dev:i386` * `libc6-dev:i386`
* `libsdl2-dev` * `libsdl2-dev`
* `libglew-dev:i386` * `libglew-dev:i386`
* `libfreetype6-dev:i386` * `libfreetype6-dev:i386`
* `rsync` (only for copying shaders/fonts to tf2 data directory, `update-data` script) * `rsync` (used for copying shaders/fonts to tf2 data directory, `update-data` script)
Cathook installation script: Cathook installation script:

18
arch-gcc-fix Normal file
View File

@ -0,0 +1,18 @@
#!/bin/bash
#
# THIS IS FOR ARCH USERS ONLY
# Cathook requires gcc6 to build. Steam requires gcc7 to run. There is no gcc6 and gcc7 package on arch, only a single gcc package that is currently updated to gcc7.
# A solution to this would be to simply downgrade to gcc6 to update cathook, then re-upgrade to gcc7 to launch steam.
# This will install gcc6, backup the files, then upgrade to gcc7 and place the files back. This way, gcc7 will be installed, but cathook can still use gcc6.
#
# Get gcc6
sudo pacman -U /var/cache/pacman/pkg/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz
# Backup gcc6 to /tmp
sudo cp -r /usr/include/c++/6.3.1/ /tmp/
# Update back to gcc7
sudo pacman -S lib62-gcc-libs gcc-libs-multilib gcc-multilib
# Use backup of gcc6 and place back into c++
sudo cp -r /tmp/6.3.1/ /usr/include/c++/
# Should we remove the tmp folder afterwards..? It'll be deleted on restart regardless.

View File

@ -1,28 +0,0 @@
#!/bin/bash
#
# Super l33t code to downloade gcc to v6, update cathook, then re-upgrade to v7
# Script was created to automate the problem of downgrading to gcc6 to update cathook, then update to gcc7 to launch steam
# This should only be useful for arch users who can not install gcc6 and gcc7 as seperate packages due to either lack of knowledge or technical reasons
#
if [ $EUID == 0 ]; then
echo "This script must be ran as root" # Standard root check to not break anything if anything is breakable.
exit
fi
if [ -e "/var/cache/pacman/pkg/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz" ] # Check if user even has gcc6
then
sudo pacman -U /var/cache/pacman/pkg/lib32-gcc-libs-6.3.1-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/gcc-libs-multilib-6.3.1-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg/gcc-multilib-6.3.1-2-x86_64.pkg.tar.xz # Downgrade to gcc6
else
echo "Weird, it doesn't appear that you have gcc6 installed." # Exit script if gcc6 isnt found,
echo "This would have normally been installed if you ran the" # which is impossible if they
echo "arch dependencies script provided by the cathook page." # followed the installation
echo "How about you go do that first before running cathook." # guide properly.
exit
fi
cd ~/cathook # cd into cathook
sudo ./update # run cathook's update script
cd - # cd back into what we were in before the previous cd
sudo pacman -Syu # update the system (and gcc)