Commit 56d90628 authored by Yuki's avatar Yuki
Browse files

Publish work

parents
Pipeline #1 canceled with stages
./fmodstudioapi11014linux/**
!./fmodstudioapi11014linux/api/lowlevel/lib/armhf/libfmodL.so.10.14
!./fmodstudioapi11014linux/api/studio/lib/armhf/libfmodstudioL.so.10.14
!./fmodstudioapi11014linux/api/lowlevel/inc/fmod.h
!./fmodstudioapi11014linux/api/lowlevel/inc/fmod_codec.h
!./fmodstudioapi11014linux/api/lowlevel/inc/fmod_common.h
!./fmodstudioapi11014linux/api/lowlevel/inc/fmod_dsp.h
!./fmodstudioapi11014linux/api/lowlevel/inc/fmod_dsp_effects.h
!./fmodstudioapi11014linux/api/lowlevel/inc/fmod_errors.h
!./fmodstudioapi11014linux/api/lowlevel/inc/fmod_output.h
!./fmodstudioapi11014linux/api/studio/inc/fmod_studio.h
!./fmodstudioapi11014linux/api/studio/inc/fmod_studio_common.h
game/Mono.Posix.dll
game/Mono.Security.dll
game/mscorlib.dll
game/System.Configuration.dll
game/System.Core.dll
game/System.Data.dll
game/System.dll
game/System.Drawing.dll
game/System.Numerics.dll
game/System.Runtime.Serialization.dll
game/System.Security.dll
game/System.Xml.dll
game/System.Xml.Linq.dll
game/lib
game/lib64
game/Celeste.exe.config
game/**
!game/.gitkeep
fmodstudioapi11014linux/**
!fmodstudioapi11014linux/.gitkeep
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="fmod" os="linux" target="libfmod.so.10"/>
<dllmap dll="fmodstudio">
<dllentry os="linux" dll="libfmod_SDL.so" name="FMOD_Studio_System_Create"/>
<dllentry os="linux" dll="libfmodstudio.so.10"/>
</dllmap>
</configuration>
FROM arm32v7/debian:bullseye AS builder
ARG MAKE_JOBS=6
ARG MOJOSHADER_COMMIT=5887634ea695
COPY patches/patch-mojoshader_opengl_c /usr/src/mojoshader-patches/patch-mojoshader_opengl_c
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
mercurial \
git \
libsdl2-dev \
re2c
RUN hg clone https://hg.icculus.org/icculus/mojoshader /usr/src/mojoshader \
&& cd /usr/src/mojoshader \
&& hg checkout ${MOJOSHADER_COMMIT} \
&& patch < /usr/src/mojoshader-patches/patch-mojoshader_opengl_c \
&& mkdir -p /usr/src/mojoshader/build \
&& cd /usr/src/mojoshader/build \
&& cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_SHARED=ON \
-DDEPTH_CLIPPING=ON \
-DFLIP_VIEWPORT=ON \
.. \
&& make -j${MAKE_JOBS}
COPY ./fmodstudioapi11014linux/api/lowlevel/inc/fmod.h /usr/include/fmod.h
COPY ./fmodstudioapi11014linux/api/lowlevel/inc/fmod_codec.h /usr/include/fmod_codec.h
COPY ./fmodstudioapi11014linux/api/lowlevel/inc/fmod_common.h /usr/include/fmod_common.h
COPY ./fmodstudioapi11014linux/api/lowlevel/inc/fmod_dsp.h /usr/include/fmod_dsp.h
COPY ./fmodstudioapi11014linux/api/lowlevel/inc/fmod_dsp_effects.h /usr/include/fmod_dsp_effects.h
COPY ./fmodstudioapi11014linux/api/lowlevel/inc/fmod_errors.h /usr/include/fmod_errors.h
COPY ./fmodstudioapi11014linux/api/lowlevel/inc/fmod_output.h /usr/include/fmod_output.h
COPY ./fmodstudioapi11014linux/api/studio/inc/fmod_studio.h /usr/include/fmod_studio.h
COPY ./fmodstudioapi11014linux/api/studio/inc/fmod_studio_common.h /usr/include/fmod_studio_common.h
RUN git clone https://github.com/flibitijibibo/FMOD_SDL /usr/src/fmod_sdl \
&& cd /usr/src/fmod_sdl \
&& ln -sv /usr/include/fmod.h /usr/src/fmod_sdl/fmod.h \
&& ln -sv /usr/include/fmod_codec.h /usr/src/fmod_sdl/fmod_codec.h \
&& ln -sv /usr/include/fmod_common.h /usr/src/fmod_sdl/fmod_common.h \
&& ln -sv /usr/include/fmod_dsp.h /usr/src/fmod_sdl/fmod_dsp.h \
&& ln -sv /usr/include/fmod_dsp_effects.h /usr/src/fmod_sdl/fmod_dsp_effects.h \
&& ln -sv /usr/include/fmod_errors.h /usr/src/fmod_sdl/fmod_errors.h \
&& ln -sv /usr/include/fmod_output.h /usr/src/fmod_sdl/fmod_output.h \
&& ln -sv /usr/include/fmod_studio.h /usr/src/fmod_sdl/fmod_studio.h \
&& ln -sv /usr/include/fmod_studio_common.h /usr/src/fmod_sdl/fmod_studio_common.h \
&& make preload
FROM arm32v7/debian:bullseye
RUN apt-get update \
&& apt-get install -y \
mono-complete \
fontconfig \
libfontconfig1 \
alsa-utils \
mesa-utils \
libsdl2-2.0-0 \
libsdl2-image-2.0-0 \
libpng16-16 \
&& apt-get clean
COPY game /usr/game
COPY ./fmodstudioapi11014linux/api/lowlevel/lib/armhf/libfmodL.so.10.14 /usr/lib/libfmod.so.10
COPY ./fmodstudioapi11014linux/api/studio/lib/armhf/libfmodstudioL.so.10.14 /usr/lib/libfmodstudio.so.10
COPY --from=builder /usr/src/mojoshader/build/libmojoshader.so /usr/lib/libmojoshader.so
COPY --from=builder /usr/src/fmod_sdl/libfmod_SDL.so /usr/lib/libfmod_SDL.so
RUN ln -sv /usr/lib/libfmod.so.10 /usr/lib/libfmodL.so.10
COPY ./Celeste.exe.config /usr/game/Celeste.exe.config
# Celeste armhf Docker image
This is an attempt at making Celeste run on arm64 by setting up an
armhf Docker image with all of the required native libraries.
Currently, this project is met with a heavy roadblock where sound
system initialization just fails and ended up getting the process
killed due to an illegal instruction (SIGILL). I haven't looked into
the cause of the SIGILL itself but judging by the stacktrace returned,
it is likely because of FMOD Studio native libraries.
Because of this, I decided to publish what I have for now and may be
in the future myself or someone else will have enough interest to get
this running with sound and music since IMO, this game absolutely
unplayable without them.
## Prerequisites
* Copy of Celeste for Linux
* I only have tested the itch.io version since that's the one I have
and I prefer not having to deal with additional DRM (i.e
steamworks) screwing everything up.
* FMOD Studio v1.10.14
* To obtain this, you need to sign up on fmod.com and download the
archive for Linux.
## How to build
1. Copy the game files to the `game` folder.
2. Extract the FMOD Studio archive into the `fmodstudioapi11014linux`
folder without the leading root directory
(`fmodstudioapi11014linux`).
3. Run `docker build -t celeste .`.
4. You should have a Docker image called `celeste:latest`.
## How to run
1. Allow non-network local connections to your X Server by runnning
`xhost local:root`.
2. Launch a shell inside the container by running the following
command:
```shell
docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=$DISPLAY --device /dev/snd --device /dev/dri celeste bash
```
3. Inside the container, simply navigate to `/usr/game` and launch the
game with `mono Celeste.exe`.
```shell
root@151faa592a22:/# cd /usr/game
root@151faa592a22:/# mono Celeste.exe
```
## Credits
Thanks to Thomas Frohwein (thfr) for the patch to readd the missing
`glProgramViewportFlip` to recent versions of mojoshader.
The usage of Docker image to run games that only work on armhf is
inspired by
[xash3d-docker-pbp](https://github.com/gira93/xash3d-docker-pbp) by
gira93.
## Notice
Since the Docker image contains the content of the game and the
propriertary FMOD libraries, the image in its binary form cannot be
distributed freely.
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>
$OpenBSD: patch-mojoshader_opengl_c,v 1.1 2019/09/19 16:36:07 thfr Exp $
re-add MOJOSHADER_glProgramViewportFlip() for backwards compatibility.
Was removed by upstream in changeset 1210
(https://hg.icculus.org/icculus/mojoshader/rev/c586d4590241)
Index: mojoshader_opengl.c
--- mojoshader_opengl.c.orig
+++ mojoshader_opengl.c
@@ -2657,6 +2657,27 @@ void MOJOSHADER_glDestroyContext(MOJOSHADER_glContext
ctx = ((current_ctx == _ctx) ? NULL : current_ctx);
} // MOJOSHADER_glDestroyContext
+#ifdef MOJOSHADER_FLIP_RENDERTARGET
+
+
+void MOJOSHADER_glProgramViewportFlip(int flip)
+{
+ assert(ctx->bound_program->vs_flip_loc != -1);
+
+ /* Some compilers require that vpFlip be a float value, rather than int.
+ * However, there's no real reason for it to be a float in the API, so we
+ * do a cast in here. That's not so bad, right...?
+ * -flibit
+ */
+ if (flip != ctx->bound_program->current_flip)
+ {
+ ctx->glUniform1f(ctx->bound_program->vs_flip_loc, (float) flip);
+ ctx->bound_program->current_flip = flip;
+ } // if
+}
+
+#endif
+
#ifdef MOJOSHADER_EFFECT_SUPPORT
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment