diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 718f5927..ddeef63b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -102,7 +102,7 @@ RUN set -eux; \ cd /tmp ; \ git clone https://github.com/jtanx/libclipboard ; \ cd libclipboard ; \ - cmake -DBUILD_SHARED_LIBS=ON -DLIBCLIPBOARD_FORCE_X11=on -DLIBCLIPBOARD_ADD_SOVERSION=ON --prefix=/usr/local . ; \ + cmake . ; \ make -j4; \ make install; \ rm -rf /tmp/libclipboard diff --git a/Dockerfile b/Dockerfile index bc37bc8b..c482b2df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,28 +8,11 @@ ARG USERNAME=neko ARG USER_UID=1000 ARG USER_GID=$USER_UID -# -# install libclipboard -RUN set -eux; apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates git cmake pkg-config build-essential libx11-dev ; \ - cd /tmp ; \ - git clone https://github.com/jtanx/libclipboard ; \ - cd libclipboard ; \ - cmake -DBUILD_SHARED_LIBS=ON -DLIBCLIPBOARD_FORCE_X11=on -DLIBCLIPBOARD_ADD_SOVERSION=ON --prefix=/usr/local . ; \ - make -j4; \ - make install; \ - rm -rf /tmp/libclipboard ; \ - # - # clean up - apt-get autoremove -y git cmake pkg-config build-essential libx11-dev; \ - apt-get clean -y; \ - rm -rf /var/lib/apt/lists/* /var/cache/apt/* - # # install neko dependencies RUN set -eux; apt-get update; \ apt-get install -y --no-install-recommends wget ca-certificates pulseaudio openbox dbus-x11 xserver-xorg-video-dummy supervisor; \ - apt-get install -y --no-install-recommends libxrandr2 libxv1 libopus0 libvpx4; \ + apt-get install -y --no-install-recommends libxcb1 libxrandr2 libxv1 libopus0 libvpx4; \ # # create a non-root user groupadd --gid $USER_GID $USERNAME; \ diff --git a/server/internal/xorg/xorg.go b/server/internal/xorg/xorg.go index 5b7bbeaa..bc5c9e32 100644 --- a/server/internal/xorg/xorg.go +++ b/server/internal/xorg/xorg.go @@ -7,8 +7,8 @@ package xorg /* -#cgo linux CFLAGS: -I/usr/src -#cgo linux LDFLAGS: -L/usr/src -lX11 -lXtst -lXrandr -lclipboard +#cgo linux CFLAGS: -I/usr/src -I/usr/local/include/ +#cgo linux LDFLAGS: /usr/local/lib/libclipboard.a -L/usr/src -L/usr/local/lib -lX11 -lXtst -lXrandr -lxcb #include "xorg.h" */