diff --git a/.travis.yml b/.travis.yml index cc07101..5eeaf17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,65 +1,23 @@ -language: cpp - -os: linux -sudo: false -dist: trusty - -env: - global: - - DEVKITPRO=/opt/devkitpro - - WUT_ROOT=/opt/devkitpro/wut - - DEVKITPPC=/opt/devkitpro/devkitPPC - - PORTLIBREPOS=$HOME/portlibrepos - -cache: - directories: - - "$HOME/.local" - - "$DEVKITPRO" - +sudo: required +branches: + only: + - wups +services: +- docker addons: apt: packages: - 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: - - cd $TRAVIS_BUILD_DIR/ - +- git clone https://github.com/Maschell/controller_patcher_configs.git +- docker build . -t hidtovpadwups-builder script: -- make -j8 +- docker run -it --rm -v ${PWD}:/project hidtovpadwups-builder make before_deploy: - mkdir -p "wiiu/plugins" - 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)" - cp hidtovpad.mod wiiu/plugins/ - chmod +x gitrev.sh @@ -83,4 +41,4 @@ deploy: on: repo: Maschell/hid_to_vpad tags: false - all_branches: true \ No newline at end of file + all_branches: false \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cc713ab --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index 128ece5..17a86c3 100644 --- a/README.md +++ b/README.md @@ -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. +### 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 - A big thanks goes out to dimok 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 FIX94 who initally created his gc-to-vpad. Helped me a lot! Thanks!