Initial commit.
commit
f6f8f4e83b
|
@ -0,0 +1,4 @@
|
||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
|
.git*
|
||||||
|
*.md
|
|
@ -0,0 +1,53 @@
|
||||||
|
FROM ubuntu:yakkety
|
||||||
|
|
||||||
|
ARG GMAD_GIT_URL="https://github.com/garrynewman/gmad.git"
|
||||||
|
ARG GMAD_VERSION="377f3458bf1ecb8a1a2217c2194773e3c2a2dea0"
|
||||||
|
ARG BOOTIL_GIT_URL="https://github.com/garrynewman/bootil.git"
|
||||||
|
ARG BOOTIL_VERSION="1d3e321fc2be359e2350205b8c7f1cad2164ee0b"
|
||||||
|
COPY bootil-patches/ /usr/src/bootil-patches/
|
||||||
|
RUN \
|
||||||
|
apt-get update \
|
||||||
|
&& apt-get install -y \
|
||||||
|
premake4 \
|
||||||
|
g++ \
|
||||||
|
make \
|
||||||
|
git \
|
||||||
|
&& apt-mark auto \
|
||||||
|
premake4 \
|
||||||
|
g++ \
|
||||||
|
make \
|
||||||
|
git \
|
||||||
|
\
|
||||||
|
&& git config --global user.email "docker@localhost" \
|
||||||
|
&& git config --global user.name "Docker" \
|
||||||
|
\
|
||||||
|
&& git clone "${BOOTIL_GIT_URL}" /usr/src/bootil \
|
||||||
|
&& (cd /usr/src/bootil \
|
||||||
|
&& git checkout "${BOOTIL_VERSION}" \
|
||||||
|
&& git apply /usr/src/bootil-patches/* \
|
||||||
|
&& cd projects \
|
||||||
|
&& premake4 gmake \
|
||||||
|
&& cd linux/gmake \
|
||||||
|
&& make \
|
||||||
|
) \
|
||||||
|
\
|
||||||
|
&& git clone "${GMAD_GIT_URL}" /usr/src/gmad \
|
||||||
|
&& (cd /usr/src/gmad \
|
||||||
|
&& git checkout "${GMAD_VERSION}" \
|
||||||
|
&& premake4 \
|
||||||
|
--outdir="/usr/local/bin/" \
|
||||||
|
--bootil_lib="/usr/src/bootil/lib/linux/gmake/" \
|
||||||
|
--bootil_inc="/usr/src/bootil/include/" \
|
||||||
|
gmake \
|
||||||
|
&& make -j$(nproc) \
|
||||||
|
) \
|
||||||
|
\
|
||||||
|
&& apt-get autoremove --purge -y \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf \
|
||||||
|
/tmp/* \
|
||||||
|
/var/tmp/* \
|
||||||
|
/var/lib/apt/lists/* \
|
||||||
|
/usr/src/*
|
||||||
|
|
||||||
|
ENTRYPOINT ["gmad"]
|
|
@ -0,0 +1,31 @@
|
||||||
|
# GMAD Docker image
|
||||||
|
|
||||||
|
This image includes a static build of GMAD, the GMod Addon creation and
|
||||||
|
extraction tool that is usually shipped with Garry's Mod.
|
||||||
|
The entrypoint is configured to point directly at the binary so it is possible
|
||||||
|
to use `docker run` on this image just as if you would use GMAD directly on your
|
||||||
|
system.
|
||||||
|
|
||||||
|
## Available tags
|
||||||
|
|
||||||
|
All available tags are always listed [in Docker Hub](https://hub.docker.com/r/icedream/gmad/tags),
|
||||||
|
the list below explains the maintained tags:
|
||||||
|
|
||||||
|
- `latest`, `1`, `1.1`: Latest stable version.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
### Creating an addon
|
||||||
|
|
||||||
|
Creating an addon from the current directory and saving the newly generated
|
||||||
|
add-on file to `example.gma`:
|
||||||
|
|
||||||
|
docker run --rm -it -v "$(pwd):/src" -w /src icedream/gmad \
|
||||||
|
create -folder . -out example.gma
|
||||||
|
|
||||||
|
### Extracting an addon
|
||||||
|
|
||||||
|
Extracting an addon `example.gma` to the current directory:
|
||||||
|
|
||||||
|
docker run --rm -it -v "$(pwd):/src" -w /src icedream/gmad \
|
||||||
|
extract -file example.gma -out .
|
|
@ -0,0 +1,24 @@
|
||||||
|
From 51b3af93a29ad39514698d9263b9685d0e8f5eea Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carl Kittelberger <icedream@icedream.pw>
|
||||||
|
Date: Mon, 17 Apr 2017 22:45:26 +0200
|
||||||
|
Subject: [PATCH 1/2] Add missing #include for wait() method.
|
||||||
|
|
||||||
|
---
|
||||||
|
src/Bootil/Platform/Platform_LINUX.cpp | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/Bootil/Platform/Platform_LINUX.cpp b/src/Bootil/Platform/Platform_LINUX.cpp
|
||||||
|
index 35b7e98..3157e81 100644
|
||||||
|
--- a/src/Bootil/Platform/Platform_LINUX.cpp
|
||||||
|
+++ b/src/Bootil/Platform/Platform_LINUX.cpp
|
||||||
|
@@ -15,6 +15,7 @@
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
+#include <sys/wait.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/select.h>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.10.0.windows.1
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
From 5edfb090a3632c26e6d3f1e60ed30e7bd3ea11ca Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carl Kittelberger <icedream@icedream.pw>
|
||||||
|
Date: Mon, 17 Apr 2017 22:57:57 +0200
|
||||||
|
Subject: [PATCH 2/2] Add missing parameter in wait() call.
|
||||||
|
|
||||||
|
---
|
||||||
|
src/Bootil/Platform/Platform_LINUX.cpp | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/Bootil/Platform/Platform_LINUX.cpp b/src/Bootil/Platform/Platform_LINUX.cpp
|
||||||
|
index 3157e81..bb927e0 100644
|
||||||
|
--- a/src/Bootil/Platform/Platform_LINUX.cpp
|
||||||
|
+++ b/src/Bootil/Platform/Platform_LINUX.cpp
|
||||||
|
@@ -221,8 +221,10 @@ namespace Bootil
|
||||||
|
{
|
||||||
|
bool isOk = ( pid > 0 );
|
||||||
|
|
||||||
|
+ int status;
|
||||||
|
+
|
||||||
|
if ( isOk && AndWait )
|
||||||
|
- { wait(); }
|
||||||
|
+ { wait(&status); }
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.10.0.windows.1
|
||||||
|
|
Loading…
Reference in New Issue