From 26e49b3db531be6a32100ff069f3a83e5b33308d Mon Sep 17 00:00:00 2001 From: Manuel Date: Wed, 12 May 2021 07:43:19 +0200 Subject: [PATCH 1/2] Add dlang image --- languages/d/Dockerfile | 6 ++++++ languages/d/run.sh | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 languages/d/Dockerfile create mode 100644 languages/d/run.sh diff --git a/languages/d/Dockerfile b/languages/d/Dockerfile new file mode 100644 index 0000000..4bb50e1 --- /dev/null +++ b/languages/d/Dockerfile @@ -0,0 +1,6 @@ +FROM alpine +LABEL author="SunRed" + +RUN apk add --no-cache musl-dev gcc ldc + +COPY run.sh /var/run/ diff --git a/languages/d/run.sh b/languages/d/run.sh new file mode 100644 index 0000000..ae18bab --- /dev/null +++ b/languages/d/run.sh @@ -0,0 +1,2 @@ +cat > program.d +ldc2 program.d -of program && ./program From 5858e89fabff9e75ce8966cb832f75c2f4ef425a Mon Sep 17 00:00:00 2001 From: Manuel Date: Wed, 12 May 2021 07:43:41 +0200 Subject: [PATCH 2/2] Add setlX image --- languages/setlx/Dockerfile | 17 ++++++++++ languages/setlx/run.sh | 2 ++ languages/setlx/setlX | 65 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 languages/setlx/Dockerfile create mode 100644 languages/setlx/run.sh create mode 100644 languages/setlx/setlX diff --git a/languages/setlx/Dockerfile b/languages/setlx/Dockerfile new file mode 100644 index 0000000..ff541cd --- /dev/null +++ b/languages/setlx/Dockerfile @@ -0,0 +1,17 @@ +FROM openjdk:17-alpine +LABEL author="SunRed" + +COPY setlX /usr/local/bin/ +COPY run.sh /var/run/ + +RUN apk add --no-cache curl unzip bash && \ + curl -O https://download.randoom.org/setlX/pc/setlX_v2-7-2.binary_only.zip && \ + unzip -d setlx setlX_v2-7-2.binary_only.zip && \ + rm -f setlX_v2-7-2.binary_only.zip && \ + mkdir -p /usr/local/setlX && \ + mv setlx/setlX*.jar /usr/local/setlX && \ + mkdir -p /usr/local/setlXlibrary && \ + mv setlx/setlXlibrary/* /usr/local/setlXlibrary && \ + chmod +x /usr/local/bin/setlX && \ + rm -rf setlx && \ + apk del --no-cache curl unzip diff --git a/languages/setlx/run.sh b/languages/setlx/run.sh new file mode 100644 index 0000000..b8c4ec3 --- /dev/null +++ b/languages/setlx/run.sh @@ -0,0 +1,2 @@ +cat > program.stlx +bash /usr/local/bin/setlX ./program.stlx diff --git a/languages/setlx/setlX b/languages/setlx/setlX new file mode 100644 index 0000000..67a8e00 --- /dev/null +++ b/languages/setlx/setlX @@ -0,0 +1,65 @@ +#!/bin/bash +# +# +# launcher script for the setlX interpreter on Unix-like systems +# +# + +# insert path to the folder where you copied the jar files here +setlXJarDirectory="/usr/local/setlX/" + +# insert full path to library location here +setlXlibraryPath="/usr/local/setlXlibrary/" + +############################## additional options ############################## +javaParameters="" + +# uncomment to force execution in 64 bit mode +#javaParameters="$javaParameters -d64" + +# uncomment to execute with increased memory size (6GB) (>2GB needs 64 Bit mode!) +#javaParameters="$javaParameters -Xmx6144m" + +# uncomment to execute with increased stack size +#javaParameters="$javaParameters -Xss48m" + +################################################################################ + +if [ -n "$OVERRIDE_setlXJarDirectory" ] + then + setlXJarDirectory="$OVERRIDE_setlXJarDirectory" +fi +if [ -n "$OVERRIDE_setlXjavaParameters" ] + then + javaParameters="$OVERRIDE_setlXjavaParameters" +fi +if [ -z "$SETLX_LIBRARY_PATH" ] + then + export SETLX_LIBRARY_PATH="$setlXlibraryPath" +fi + +java_call="java" + +if [[ -z "$INSIDE_EMACS" && $(which rlwrap > /dev/null 2>&1; echo $?) -eq 0 ]] + then + java_call="rlwrap -C $(basename $0) $java_call" +fi + +jarFiles="" +while read -r -d $'\0' jarname + do + if [ -n "$jarFiles" ] + then + jarFiles="$jarFiles:" + fi + jarFiles="$jarFiles${jarname#./}" +done < <( find "$setlXJarDirectory" -maxdepth 1 -name "*.jar" -print0 ) + +if [ -n "$jarFiles" ] + then + $java_call -cp "$jarFiles:$CLASSPATH" $javaParameters org.randoom.setlx.pc.ui.SetlX "$@" + exit $? +else + echo "The setlX jar files cannot be found!" + exit 1 +fi