Initial commit.

This commit is contained in:
Matt Harlum 2025-03-25 21:57:25 +13:00
commit 1512158f0d
5 changed files with 54 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
license.lic
*.tar.gz

41
Dockerfile Normal file
View File

@ -0,0 +1,41 @@
FROM ubuntu:focal
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && \
apt-get -y install \
vim \
make \
git \
curl \
python3 \
python3-pip \
libgl1 \
libnss3 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
libxtst6 \
libxkbcommon0 \
libdbus-1-3 \
libglib2.0-0 \
libasound2 \
libfontconfig1 \
libfreetype6 \
x11-apps \
qt5-default \
kmod
ADD Gowin_V1.9.11.01_linux.tar.gz /opt/gowin
COPY gwlicense.ini /opt/gowin/IDE/bin/gwlicense.ini
RUN useradd -s /bin/bash -m ubuntu
ENV PATH=/opt/gowin/IDE/bin:/opt/gowin/Programmer/bin:$PATH
ENV QT_QPA_PLATFORM=xcb
ENV LD_LIBRARY_PATH=/opt/gowin/IDE/lib
USER ubuntu
WORKDIR /home/ubuntu

5
build.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
TAG=$(git rev-parse --short HEAD)
REPO=liv2/gowin
docker build -t ${REPO}:${TAG} .
docker tag ${REPO}:${TAG} ${REPO}:latest

3
gwlicense.ini Normal file
View File

@ -0,0 +1,3 @@
[license]
lic="/opt/gowin/license.lic"

3
run-gw.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
docker run --rm -it -e DISPLAY=$DISPLAY -v /dev/bus:/dev/bus --device-cgroup-rule='c *:* rmw' -v /tmp/.X11-unix:/tmp/.X11-unix --hostname gowin --mac-address ${MAC} -v ~/.Xauthority:/home/ubuntu/.Xauthority -e XAUTHORITY=/home/ubuntu/.Xauthority -v ${PWD}/license.lic:/opt/gowin/license.lic -it liv2/gowin