commit 226c065562e9585e164a3fc0c8410ed54ed7608a Author: jolheiser Date: Thu Apr 21 14:40:40 2022 -0500 Initial commit Signed-off-by: jolheiser diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..62c8935 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ \ No newline at end of file diff --git a/.run/Dockerfile.run.xml b/.run/Dockerfile.run.xml new file mode 100644 index 0000000..72290f2 --- /dev/null +++ b/.run/Dockerfile.run.xml @@ -0,0 +1,25 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..40741e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM i386/alpine + +LABEL com.jojodev.image.authors="john.olheiser@gmail.com" + +RUN apk update && \ + apk add wine xvfb xvfb-run wget && \ + winecfg && \ + mkdir -p /app/compiler && \ + mkdir /app/bin && \ + wget --no-check-certificate https://autohotkey.com/download/1.1/Ahk2Exe112401.zip -O /tmp/ahk.zip && \ + unzip /tmp/ahk.zip -d /app/compiler + +COPY compile.sh /app/compile.sh + +ENTRYPOINT ["/bin/sh", "/app/compile.sh"] \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ec2045e --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2022 John Olheiser + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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 OR COPYRIGHT HOLDERS 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b0b2879 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# woodpecker-ahk + +A [woodpecker](https://woodpecker-ci.org) plugin to compile [AHK](https://www.autohotkey.com/) scripts to executables. + +## Settings + +- `script`: The path to the script to compile. +- `icon`: The path to the icon for the executable. +- `out`: The output path for the executable (remember to add the `.exe` suffix). + +## License + +[MIT](LICENSE) \ No newline at end of file diff --git a/compile.sh b/compile.sh new file mode 100644 index 0000000..706bdb9 --- /dev/null +++ b/compile.sh @@ -0,0 +1,5 @@ +if [ -z "$PLUGIN_ICON" ]; then + xvfb-run -a wine /app/compiler/Ahk2Exe.exe /in ${PLUGIN_SCRIPT} /out ${PLUGIN_OUT} +else + xvfb-run -a wine /app/compiler/Ahk2Exe.exe /in ${PLUGIN_SCRIPT} /icon ${PLUGIN_ICON} /out ${PLUGIN_OUT} +fi \ No newline at end of file