From 8b274454585d9e26c9130ae8a079bb0e4ca36442 Mon Sep 17 00:00:00 2001 From: Sergey Stepanov Date: Wed, 17 Jun 2020 14:00:50 +0300 Subject: [PATCH] Integrate SDL2 into CI / Project --- .github/workflows/build.yml | 5 +++-- .github/workflows/release.yml | 5 +++-- Dockerfile | 2 ++ README.md | 29 +++++++++-------------------- 4 files changed, 17 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0eb1febf..8df1efa6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,12 +40,12 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install -y make pkg-config libvpx-dev libopus-dev libopusfile-dev + sudo apt-get install -y make pkg-config libvpx-dev libopus-dev libopusfile-dev libsdl2-dev - name: Get MacOS dev libraries and tools if: matrix.os == 'macos-latest' run: | - brew install libvpx pkg-config opus opusfile + brew install libvpx pkg-config opus opusfile sdl2 - name: Get Windows dev libraries and tools if: matrix.os == 'windows-latest' @@ -72,6 +72,7 @@ jobs: mingw-w64-x86_64-dlfcn mingw-w64-x86_64-libvpx mingw-w64-x86_64-opusfile + mingw-w64-x86_64-SDL2 msys2do make build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee038206..60ef1e9d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,12 +55,12 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install -y make pkg-config libvpx-dev libopus-dev libopusfile-dev + sudo apt-get install -y make pkg-config libvpx-dev libopus-dev libopusfile-dev libsdl2-dev - name: Get MacOS dev libraries and tools if: matrix.os == 'macos-latest' run: | - brew install libvpx pkg-config opus opusfile + brew install libvpx pkg-config opus opusfile sdl2 - name: Get Windows dev libraries and tools if: matrix.os == 'windows-latest' @@ -87,6 +87,7 @@ jobs: mingw-w64-x86_64-dlfcn mingw-w64-x86_64-libvpx mingw-w64-x86_64-opusfile + mingw-w64-x86_64-SDL2 msys2do make release RELEASE_DIR=${{ env.release-dir }} DLIB_SEARCH_PATTERN=/mingw.*dll CORE_EXT=dll diff --git a/Dockerfile b/Dockerfile index 16996c59..16ed2d59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ RUN apt-get update && apt-get install -y \ libvpx-dev \ libopus-dev \ libopusfile-dev \ + libsdl2-dev \ && rm -rf /var/lib/apt/lists/* # go deps layer @@ -32,6 +33,7 @@ RUN apt-get update && apt-get install -y \ libvpx5 \ libopus0 \ libopusfile0 \ + libsdl2-2.0-0 \ && rm -rf /var/lib/apt/lists/* COPY --from=build ${BUILD_PATH}/bin/ ./ diff --git a/README.md b/README.md index 433a672e..b2dd43d1 100644 --- a/README.md +++ b/README.md @@ -36,31 +36,18 @@ Direct play an existing game: **[Pokemon Emerald](http://cloudretro.io/?id=652e4 Install Golang https://golang.org/doc/install . Because the project uses GoModule, so it requires Go1.11 version. -### (Window only) Extra setup -Setup MSYS2 (MinGW) environment if you are using Windows: - * Please refer to the Libretro [doc](https://docs.libretro.com/development/retroarch/compilation/windows/#environment-configuration) for initial environment setup - * Add Golang installation path into your .bashrc - ``` - $ echo 'export PATH=/c/Go/bin:$PATH' >> ~/.bashrc - ``` - * Install dependencies as described down bellow - * Copy required [Libretro Core DLLs](http://buildbot.libretro.com/nightly/windows/x86_64/latest/) into the `cloud-game\assets\emulator\libretro\cores` folder and replace existing Linux SOs in the `cloud-game\pkg\config\config.go` EmulatorConfig object. - * Use `C:\msys64\mingw64.exe` for building - * To run the app use either MinGw terminal or copy: libdl.dll, libogg-0.dll, libopenal-1.dll, libopus-0.dll, libopusfile-0.dll, libvpx-1.dll - files from `C:\msys64\mingw64\bin` into the `./bin` folder and then run. - ### (All) Install Dependencies - * Install [libvpx](https://www.webmproject.org/code/), [libopus](http://opus-codec.org/), [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/) + * Install [libvpx](https://www.webmproject.org/code/), [libopus](http://opus-codec.org/), [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/), [sdl2](https://wiki.libsdl.org/Installation) ``` # Ubuntu / Windows (WSL2) -apt-get install -y pkg-config libvpx-dev libopus-dev libopusfile-dev +apt-get install -y pkg-config libvpx-dev libopus-dev libopusfile-dev libsdl2-dev # MacOS -brew install libvpx pkg-config opus opusfile +brew install libvpx pkg-config opus opusfile sdl2 # Windows (MSYS2) -pacman -Sy --noconfirm --needed git make mingw-w64-x86_64-{gcc,pkg-config,dlfcn,libvpx,opusfile} +pacman -Sy --noconfirm --needed git make mingw-w64-x86_64-{gcc,pkg-config,dlfcn,libvpx,opusfile,SDL2} ``` Because the coordinator and workers need to run simultaneously. Workers connect to the coordinator. @@ -107,9 +94,11 @@ Synchronize a game session on multiple devices

## Contribution -- The project cannot be possible without the contribution with those amazing people: -- [sergystepanov](https://github.com/sergystepanov/) for Front end refactor; Audio re-implementation; bilinear, nearest neighbor interpolation scaling; Window setup document; build workflow on multi-os. -- [sadlil](https://github.com/sadlil) for massive code structure reogranization; log and monitor server introduction. +We are very much thankful to everyone who contributes to the project: + +- [88hcsif](https://github.com/88hcsif) +- [sadlil](https://github.com/sadlil) +- [sergystepanov](https://github.com/sergystepanov/) ## Credits