Skip to content

Commit

Permalink
Add windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtrujy committed Nov 11, 2021
1 parent 440a2ea commit 06ae91c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 18 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Install dependencies Ubuntu
- name: Install dependencies Alpine
if: matrix.os[0] == 'alpine'
run: |
apk add build-base bash git autoconf automake python3 py3-pip cmake pkgconfig libarchive-dev openssl-dev libtool
- name: Install dependencies Fedora
if: matrix.os[0] == 'fedora'
run: |
dnf -y install @development-tools g++ wget git autoconf automake python3 python3-pip cmake pkgconf libarchive-devel openssl-devel libtool
dnf -y install @development-tools g++ git autoconf automake python3 python3-pip cmake pkgconf libarchive-devel openssl-devel libtool
- name: Compile Tools
run: |
Expand All @@ -36,8 +36,7 @@ jobs:
runs-on: ${{ matrix.os[0] }}
strategy:
matrix:
os: [[macos-latest, bash], [ubuntu-latest, bash]]
fail-fast: false
os: [[macos-latest, bash], [macOS-11, bash], [ubuntu-latest, bash], [windows-latest, msys2]]
defaults:
run:
shell: ${{ matrix.os[1] }} {0}
Expand All @@ -52,21 +51,21 @@ jobs:
echo "MSYSTEM=x64" >> $GITHUB_ENV
- name: Install Dependencies Mac
if: matrix.os[0] == 'macOS-latest'
if: startsWith( matrix.os[0], 'macOS' )
run: |
brew install automake libarchive bash openssl libtool
echo "MSYSTEM=x64" >> $GITHUB_ENV
# - name: Install MSYS2 texinfo bison flex
# if: matrix.os[0] == 'windows-latest'
# uses: msys2/setup-msys2@v2
# with:
# msystem: MINGW32
# install: |
# base-devel git make texinfo flex bison patch binutils mingw-w64-i686-gcc mpc-devel tar
# mingw-w64-i686-cmake mingw-w64-i686-extra-cmake-modules mingw-w64-i686-make
# update: true
# shell: msys2 {0}
- name: Install in MSYS2
if: matrix.os[0] == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
install: |
base-devel git make texinfo flex bison patch binutils mingw-w64-i686-gcc mingw-w64-i686-dlfcn mingw-w64-i686-mpc
mingw-w64-i686-cmake mingw-w64-i686-python-pip mingw-w64-i686-libarchive mingw-w64-i686-openssl
update: true
shell: msys2 {0}

- name: Compile Tools
run: |
Expand Down
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
# psp-tools
A set of tools needed before compiling psp-packages
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/pspdev/psptoolchain-extra/CI?label=CI&logo=github&style=for-the-badge)](https://github.com/pspdev/psptoolchain-extra/actions?query=workflow%3ACI)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/pspdev/psptoolchain-extra/CI-Docker?label=CI-Docker&logo=github&style=for-the-badge)](https://github.com/pspdev/psptoolchain-extra/actions?query=workflow%3ACI-Docker)

What does this do?
==================

This program will automatically build and install extra tools
used in the creation of homebrew software for the Sony Playstation Portable
handheld videogame system.

How do I use it?
==================

1. Set up your environment by installing the following software:

bg++/gcc-c++, gcc, git, autoconf, automake, python3, py3-pip, cmake, pkgconfig, libarchive, openssl and libtool

2. Set the PSPDEV and PATH environmental variables:

```shell
export PSPDEV=/usr/local/pspdev
export PATH=$PATH:$PSPDEV/bin
```

The PSPDEV variable is the directory the toolchain will be installed to,
change this if you wish. If possible the toolchain script will automatically
add these variables to your systems login scripts, otherwise you will need
to manually add these variables yourself.

3. Run the toolchain script:
```shell
./build-all.sh
```
2 changes: 1 addition & 1 deletion depends/check-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ header_paths=(
"/usr/local/include/$(uname -m)-linux-gnu" \
"/usr/include/i386-linux-gnu" \
"/usr/local/include/i386-linux-gnu"
"/mingw32/include/"
# -- Add more locations here --
)

Expand Down Expand Up @@ -56,7 +57,6 @@ fi

check_program git
check_program patch
check_program wget
check_program autoconf
check_program automake

Expand Down
6 changes: 6 additions & 0 deletions scripts/002-psp-pacman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@ fi
## Determine the maximum number of processes that Make can work with.
PROC_NR=$(getconf _NPROCESSORS_ONLN)

# TODO: Fix PACMAN compilation issues for Windows
OSVER=$(uname)
if [ "${OSVER:0:5}" == MINGW ]; then
exit 0;
fi

## Compile and install.
./pacman.sh || { exit 1; }

0 comments on commit 06ae91c

Please sign in to comment.