Skip to content

Commit

Permalink
msys2
Browse files Browse the repository at this point in the history
Closes AerialX#1
  • Loading branch information
AerialX committed Dec 4, 2021
1 parent 83b8091 commit 36d3b79
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 5 deletions.
82 changes: 79 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,101 @@
on:
- push
- pull_request

jobs:
build:
riiv:
name: Riivolution
runs-on: ubuntu-latest
container:
image: devkitpro/devkitppc:20210726
steps:
- uses: actions/checkout@v2
- run: |
dpkg --add-architecture i386
apt-get update && apt-get install -y --no-install-recommends g++ libgcc1:i386 zlib1g:i386 python3 python3-yaml
apt-get update && apt-get install -y --no-install-recommends g++ libgcc1:i386 zlib1g:i386
name: dependencies
- run: make launcher -j
- uses: actions/upload-artifact@v2
with:
name: riivolution
path: launcher/riiv.zip
- run: make riifs -j
rawk:
name: RawkSD
runs-on: ubuntu-latest
container:
image: devkitpro/devkitppc:20210726
steps:
- uses: actions/checkout@v2
- run: |
dpkg --add-architecture i386
apt-get update && apt-get install -y --no-install-recommends g++ libgcc1:i386 zlib1g:i386 python3 python3-yaml
name: dependencies
- run: make rawksd -j
- uses: actions/upload-artifact@v2
with:
name: rawksd
path: rawksd/rawk.zip
- run: make riifs -j
msys2:
name: Windows MSYS2
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
release: false
- uses: actions/checkout@v2
- run: |
pacman-key --recv BC26F752D25B92CE272E0F44F7FD5492264BB9D0 --keyserver keyserver.ubuntu.com || pacman-key --recv BC26F752D25B92CE272E0F44F7FD5492264BB9D0
pacman-key --lsign BC26F752D25B92CE272E0F44F7FD5492264BB9D0
pacman --noconfirm -U https://pkg.devkitpro.org/devkitpro-keyring.pkg.tar.xz
echo -e '[dkp-libs]\nServer = https://pkg.devkitpro.org/packages' >> /etc/pacman.conf
echo -e '[dkp-windows]\nServer = https://pkg.devkitpro.org/packages/windows/$arch/' >> /etc/pacman.conf
sed -i 's/^CheckSpace/#CheckSpace/g' /etc/pacman.conf
pacman --noconfirm -Sy
name: devkitPro
- run: |
pacman -S --noconfirm --needed wii-dev ppc-portlibs wii-portlibs devkitARM
name: devkitPPC
- run: |
pacman -S --noconfirm --needed python-yaml zip unzip python
name: dependencies
- run: |
DEVKITPRO=/opt/devkitpro DEVKITPPC=$DEVKITPRO/devkitPPC DEVKITARM=$DEVKITPRO/devkitARM \
make launcher -j
name: make launcher
- uses: actions/upload-artifact@v2
with:
name: msys2-riivolution
path: launcher/riiv.zip
- run: |
PYTHON=/usr/bin/python3.exe \
DEVKITPRO=/opt/devkitpro DEVKITPPC=$DEVKITPRO/devkitPPC DEVKITARM=$DEVKITPRO/devkitARM \
make rawksd -j
name: make rawksd
- uses: actions/upload-artifact@v2
with:
name: msys2-rawksd
path: rawksd/rawk.zip
mingw:
name: Windows Mingw
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- run: make riifs
- uses: actions/upload-artifact@v2
with:
name: mingw32-riifs
path: riifs/server-c/riifs.exe
- run: make -C stripios
- uses: actions/upload-artifact@v2
with:
name: mingw32-stripios
path: stripios/stripios.exe
- run: make -C launcher/dollz3
- uses: actions/upload-artifact@v2
with:
name: mingw32-dol2elf
path: launcher/dollz3/dol2elf.exe
62 changes: 60 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,69 @@
# [Riivolution](https://wiibrew.org/wiki/Riivolution) and [RawkSD](https://wiibrew.org/wiki/RawkSD)

Information archives:
- [Riivolution Wiki](https://aerialx.github.io/rvlution.net/wiki/Main_Page/)
- [RawkSD beta](https://www.japaneatahand.com/rawksd/beta.htm)

## Dependencies

- [devkitPPC and devkitARM](https://devkitpro.org/wiki/Getting_Started)
- `dkp-pacman -S wii-dev ppc-portlibs wii-portlibs devkitARM`
- a build environment for your host with GNU Make, some coreutils, and a C++ compiler
- on Windows, devkitPro supplies and requires this via [MSYS2](https://www.msys2.org/)
- Python 3.x and python-yaml or pyyaml (only for rawksd)
- `curl`, `unzip`, and i386 multilibs (for dollz3)
- `zip` (only for packaging the build result)

## Building

With the required dependencies installed, just run `make` in the project's directory:

```shell
make -j

# alternatively...
make launcher -j # Riivolution only
make rawksd -j # RawkSD only
make riifs # RiiFS server
```

See the [automated build scripts](./.github/workflows/build.yml) for reference and further examples.

### Docker

The [devkitpro/devkitppc](https://hub.docker.com/r/devkitpro/devkitppc) Docker image can be used:

```shell
docker run --interactive --tty --rm --mount type=bind,source=$PWD,destination=/rawk devkitpro/devkitppc

dpkg --add-architecture i386 # for dollz3
dpkg --add-architecture i386
apt-get update && apt-get install -y --no-install-recommends g++ libgcc1:i386 zlib1g:i386 python3 python3-yaml
# optional: dkp-pacman -Syyu
# dkp-pacman -Syyu

make -C /rawk -j
```

### Debian / Ubuntu

Following [the example from the devkitpro docker image](https://github.com/devkitPro/docker/blob/master/toolchain-base/Dockerfile)...

```shell
dpkg --add-architecture i386
apt-get update
apt-get install --no-install-recommends curl gdebi-core zip unzip libgcc1:i386 zlib1g:i386 python3 python3-yaml g++
curl -O https://github.com/devkitPro/pacman/releases/latest/download/devkitpro-pacman.amd64.deb
gdebi -n devkitpro-pacman.amd64.deb
dkp-pacman -Sy wii-dev ppc-portlibs wii-portlibs devkitARM

make -j
```

### Windows

devkitPro needs an MSYS2 environment, which uses pacman for package management:

```shell
pacman -S zip unzip python python-yaml

make -j
```
2 changes: 2 additions & 0 deletions launcher/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \

export OUTPUT := $(CURDIR)/$(TARGET)

export PATH := $(PATH):$(DEVKITPPC)/bin:$(DEVKITPRO)/tools/bin

ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
Expand Down

0 comments on commit 36d3b79

Please sign in to comment.