Add Dockerfile, update the readme, simplify travis script

This commit is contained in:
Maschell 2018-09-23 14:43:45 +02:00
parent 979b5d6f19
commit 01a8746627
3 changed files with 32 additions and 53 deletions

View File

@ -1,65 +1,23 @@
language: cpp sudo: required
branches:
os: linux only:
sudo: false - wups
dist: trusty services:
- docker
env:
global:
- DEVKITPRO=/opt/devkitpro
- WUT_ROOT=/opt/devkitpro/wut
- DEVKITPPC=/opt/devkitpro/devkitPPC
- PORTLIBREPOS=$HOME/portlibrepos
cache:
directories:
- "$HOME/.local"
- "$DEVKITPRO"
addons: addons:
apt: apt:
packages: packages:
- p7zip-full - p7zip-full
before_install:
- mkdir -p "${PORTLIBREPOS}"
- mkdir -p "${DEVKITPRO}"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb -O /tmp/devkitpro-pacman.deb; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo dpkg -i /tmp/devkitpro-pacman.deb; fi
- yes | sudo dkp-pacman -Syu devkitPPC --needed
- yes | sudo dkp-pacman -Syu general-tools --needed
- wget $(curl -s https://api.github.com/repos/decaf-emu/wut/releases/latest | grep 'browser_' | grep 'linux' | cut -d\" -f4)
install:
- 7z x -y $(ls | grep "linux") -o${WUT_ROOT}
- cd $PORTLIBREPOS
- git clone https://github.com/Maschell/WiiUPluginSystem.git
- git clone https://github.com/Maschell/controller_patcher_configs.git
- git clone https://github.com/Maschell/libutils.git -b wut
- git clone https://github.com/Maschell/controller_patcher.git -b wut
- cd WiiUPluginSystem
- make && make install
- cd $PORTLIBREPOS
- cd libutils
- mkdir build && cd build
- cmake -DCMAKE_TOOLCHAIN_FILE=$WUT_ROOT/share/wut.toolchain.cmake -DCMAKE_INSTALL_PREFIX=$WUT_ROOT ../
- make install
- cd $PORTLIBREPOS
- cd controller_patcher
- mkdir build && cd build
- cmake -DCMAKE_TOOLCHAIN_FILE=$WUT_ROOT/share/wut.toolchain.cmake -DCMAKE_INSTALL_PREFIX=$WUT_ROOT ../
- make install
before_script: before_script:
- cd $TRAVIS_BUILD_DIR/ - git clone https://github.com/Maschell/controller_patcher_configs.git
- docker build . -t hidtovpadwups-builder
script: script:
- make -j8 - docker run -it --rm -v ${PWD}:/project hidtovpadwups-builder make
before_deploy: before_deploy:
- mkdir -p "wiiu/plugins" - mkdir -p "wiiu/plugins"
- mkdir -p "wiiu/controller" - mkdir -p "wiiu/controller"
- cp $PORTLIBREPOS/controller_patcher_configs/*.ini ./wiiu/controller - cp controller_patcher_configs/*.ini ./wiiu/controller
- commit="$(git rev-parse --short=7 HEAD)" - commit="$(git rev-parse --short=7 HEAD)"
- cp hidtovpad.mod wiiu/plugins/ - cp hidtovpad.mod wiiu/plugins/
- chmod +x gitrev.sh - chmod +x gitrev.sh
@ -83,4 +41,4 @@ deploy:
on: on:
repo: Maschell/hid_to_vpad repo: Maschell/hid_to_vpad
tags: false tags: false
all_branches: true all_branches: false

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM wups/core-with-wut:0.1
# Get dependencies
COPY --from=wiiuwut/libutils:0.1 /artifacts $WUT_ROOT
COPY --from=wiiuwut/controller_patcher:0.1 /artifacts $WUT_ROOT
WORKDIR project

View File

@ -64,6 +64,20 @@ In order to build this application you need serval libs:
Install them (in this order) according to their README's. Don't forget the dependencies of the libs itself. Install them (in this order) according to their README's. Don't forget the dependencies of the libs itself.
### Building using the Dockerfile
It's possible to use a docker image for building. This way you don't need anything installed on your host system.
```
# Build docker image (only needed once
docker build . -t hidtovpadwups-builder
# make
docker run -it --rm -v ${PWD}:/project hidtovpadwups-builder make
# make clean
docker run -it --rm -v ${PWD}:/project hidtovpadwups-builder make clean
```
# Credits # Credits
- A big thanks goes out to <b>dimok</b> for creating the HBL, the dynamic libs and every stuff he made. The "environment" of this app is copied from ddd, turned out to be a "hello world" with useful extra stuff. - A big thanks goes out to <b>dimok</b> for creating the HBL, the dynamic libs and every stuff he made. The "environment" of this app is copied from ddd, turned out to be a "hello world" with useful extra stuff.
- Also huge thanks to <b>FIX94</b> who initally created his gc-to-vpad. Helped me a lot! Thanks! - Also huge thanks to <b>FIX94</b> who initally created his gc-to-vpad. Helped me a lot! Thanks!