Skip to content

Commit

Permalink
Merge pull request #69 from wally4000/new-prepare-script
Browse files Browse the repository at this point in the history
New prepare script
  • Loading branch information
fjtrujy committed May 2, 2024
2 parents 99ca5eb + 3369447 commit ea9c49a
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 133 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/compilation.yml
Expand Up @@ -19,21 +19,10 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Install dependencies on Ubuntu
if: startsWith( matrix.os[0], 'ubuntu' )
run: |
sudo apt-get update
sudo apt-get -y install texinfo bison flex gettext libgmp3-dev libmpfr-dev libmpc-dev libusb-dev libreadline-dev libcurl4 libcurl4-openssl-dev libssl-dev libarchive-dev libgpgme-dev
echo "MSYSTEM=x64" >> $GITHUB_ENV
- name: Install dependencies on MacOS
if: startsWith( matrix.os[0], 'macos' )
run: |
brew update
brew install gettext texinfo bison flex gnu-sed ncurses gsl gmp mpfr autoconf automake cmake libusb-compat libarchive gpgme bash openssl libtool
gsed -i '/Requires.private: iconv/d' $(brew --prefix libarchive)/lib/pkgconfig/libarchive.pc || true
echo "MSYSTEM=x64" >> $GITHUB_ENV

- name : Install dependencies on required OS
run: |
./prepare.sh
- name: Runs full build in shell
run: |
Expand Down Expand Up @@ -87,9 +76,7 @@ jobs:
- name: Install dependencies Fedora
if: ${{ matrix.container[0] == 'fedora' }}
run: |
dnf -y install @development-tools gcc gcc-c++ g++ wget git autoconf automake python3 python3-pip make cmake pkgconf \
libarchive-devel openssl-devel gpgme-devel libtool gettext texinfo bison flex gmp-devel mpfr-devel libmpc-devel ncurses-devel diffutils \
libusb-compat-0.1-devel readline-devel libcurl-devel which glibc-gconv-extra xz
./prepare.sh
- name: Runs full build in shell
run: |
Expand Down
22 changes: 1 addition & 21 deletions README.md
Expand Up @@ -51,28 +51,8 @@ These scripts download (`git clone`) and install:
- If you don't have those.
We offer a script to help you for installing dependencies:

### Ubuntu/Debian

```bash
sudo ./prepare-debian-ubuntu.sh
```

### Fedora

```bash
sudo ./prepare-fedora.sh
```

### Arch

```bash
sudo ./prepare-arch.sh
```

### OSX

```bash
sudo ./prepare-mac-os.sh
sudo ./prepare.sh
```

1. _Optional._ If you are upgrading from the previous version of the PSPDEV environment, it is highly recommended removing the content of the PSPDEV folder before upgrade. This is a necessary step after the major toolchain upgrade.
Expand Down
5 changes: 0 additions & 5 deletions prepare-arch.sh

This file was deleted.

7 changes: 0 additions & 7 deletions prepare-debian-ubuntu.sh

This file was deleted.

7 changes: 0 additions & 7 deletions prepare-fedora.sh

This file was deleted.

14 changes: 0 additions & 14 deletions prepare-gentoo.sh

This file was deleted.

61 changes: 0 additions & 61 deletions prepare-mac-os.sh

This file was deleted.

38 changes: 38 additions & 0 deletions prepare.sh
@@ -0,0 +1,38 @@
#!/bin/bash

echo "Detecting OS and installing packages required for PSP Toolchain"

#Handle macOS first
if [[ $(uname) = "Darwin" ]]; then
brew update
brew install gettext texinfo bison flex gnu-sed ncurses gsl gmp mpfr autoconf automake cmake libusb-compat libarchive gpgme bash openssl libtool

else

TESTOS=$(cat /etc/os-release | grep -w "ID" | cut -d '=' -f2)

case $TESTOS in

ubuntu | debian)
sudo apt-get update
sudo apt-get -y install texinfo bison flex gettext libgmp3-dev libmpfr-dev libmpc-dev libusb-dev libreadline-dev libcurl4 libcurl4-openssl-dev libssl-dev libarchive-dev libgpgme-dev
;;
rhel | fedora)
dnf -y install @development-tools gcc gcc-c++ g++ wget git autoconf automake python3 python3-pip make cmake pkgconf \
libarchive-devel openssl-devel gpgme-devel libtool gettext texinfo bison flex gmp-devel mpfr-devel libmpc-devel ncurses-devel diffutils \
libusb-compat-0.1-devel readline-devel libcurl-devel which glibc-gconv-extra xz
;;
gentoo)
sudo emerge --noreplace net-misc/wget dev-vcs/git dev-python/pip sys-apps/fakeroot \
app-arch/libarchive app-crypt/gpgme sys-devel/bison sys-devel/flex\
dev-libs/mpc dev-libs/libusb-compat
;;
arch)
sudo pacman -Sy gcc clang make cmake patch git texinfo flex bison gettext wget gsl gmp mpfr libmpc libusb readline libarchive gpgme bash openssl libtool libusb-compat boost python-pip
;;
*)
echo "$TESTOS not supported here"
;;
esac

fi

0 comments on commit ea9c49a

Please sign in to comment.