mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
Merge pull request #149 from 01e9/master
Replaced outdated docker/ with script in readme
This commit is contained in:
@@ -19,6 +19,12 @@ Note that CodeBlocks or other IDEs may have issues running the programs due to p
|
||||
|
||||
Running `ls $LOGL_ROOT_PATH` should list, among other things, this README file and the resources direcory.
|
||||
|
||||
### Linux building in Docker
|
||||
Using [this project](https://github.com/01e9/docker-ide) you can start IDE in docker:
|
||||
```
|
||||
.../docker-ide/ide cpp-gpu ~/.../clion/bin/clion.sh -x11docker "--gpu"
|
||||
```
|
||||
|
||||
## Mac OS X building
|
||||
Building on Mac OS X is fairly simple (thanks [@hyperknot](https://github.com/hyperknot)):
|
||||
```
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
**
|
||||
!Dockerfile
|
||||
@@ -1,18 +0,0 @@
|
||||
FROM ubuntu:18.04
|
||||
|
||||
ARG TINI_VERSION='0.18.0'
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
libgtk2.0-0 libcanberra-gtk-module libxext-dev libxrender-dev libxtst-dev libxslt-dev dmz-cursor-theme \
|
||||
build-essential cmake git \
|
||||
libglfw3-dev libassimp-dev libxinerama-dev libxcursor-dev mesa-utils mesa-utils-extra kmod \
|
||||
wget htop zip unzip nano \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini /tini
|
||||
RUN chmod +x /tini
|
||||
|
||||
ENTRYPOINT ["/tini", "--"]
|
||||
|
||||
CMD ["sleep", "infinity"]
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ -n "$(which x11docker)" ] \
|
||||
|| { echo "x11docker is required https://github.com/mviereck/x11docker"; exit 1; }
|
||||
|
||||
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
|
||||
PROJECT_DIR=$(dirname ${SCRIPT_DIR})
|
||||
|
||||
CMD=${@}
|
||||
[ -n "${CMD}" ] \
|
||||
|| { echo "Command is required"; exit 1; }
|
||||
|
||||
IMAGE=learnopengl
|
||||
|
||||
[ -n "$(docker images -q --filter=reference="${IMAGE}")" ] \
|
||||
|| docker build -t ${IMAGE} ${SCRIPT_DIR}
|
||||
|
||||
x11docker \
|
||||
--gpu \
|
||||
--hostdisplay \
|
||||
--homedir ${HOME} \
|
||||
--clipboard \
|
||||
--stdout --stderr \
|
||||
--cap-default \
|
||||
--workdir ${PROJECT_DIR} \
|
||||
-- "--cap-add=SYS_PTRACE" \
|
||||
${IMAGE} \
|
||||
${CMD}
|
||||
Reference in New Issue
Block a user