Comments (3)
I add Imagemagick
, Wine
, and Rcedit
to the docker.
Wine and RCEdit to integrate the icon, and imagemagick to generate it from a png image (as well as potentially generating the OSX icns with icnsutils, though I haven't gotten there yet)
I also generate inline a small script set-icon
, which takes a png path and a godot exported exe, and sets the icon on it
example usage:
set-icon path/to/icon.png $(pwd)/build/windows/$EXPORT_NAME.exe
Here's the dockerfile:
FROM ubuntu:bionic
LABEL author="[email protected]"
ARG GODOT_VERSION=3.2.3
USER root
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
git \
python \
python-openssl \
unzip \
wget \
zip \
wine-stable \
wine64 \
imagemagick \
icnsutils \
curl \
--fix-missing \
&& rm -rf /var/lib/apt/lists/*
ENV GODOT_VERSION=$GODOT_VERSION
ENV WINEDEBUG -all
RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip \
&& wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}/Godot_v${GODOT_VERSION}-stable_export_templates.tpz \
&& mkdir ~/.cache \
&& mkdir -p ~/.config/godot \
&& mkdir -p ~/.local/share/godot/templates/${GODOT_VERSION}.stable \
&& unzip Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip \
&& mv Godot_v${GODOT_VERSION}-stable_linux_headless.64 /usr/local/bin/godot \
&& unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz \
&& mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.stable \
&& rm -f Godot_v${GODOT_VERSION}-stable_export_templates.tpz Godot_v${GODOT_VERSION}-stable_linux_headless.64.zip
RUN wget https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe \
&& mkdir -p /opt/rcedit \
&& mkdir -p /opt/rcedit/bin \
&& mv rcedit-x64.exe /opt/rcedit
RUN mkdir -p /opt/butler
RUN wget -O /opt/butler/butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
RUN unzip /opt/butler/butler.zip -d /opt/butler
RUN rm -rf /opt/butler/butler.zip
RUN ls /opt/butler
RUN chmod +x /opt/butler/butler
RUN /opt/butler/butler -V
RUN echo "convert \$1 -define icon:auto-resize=256,128,64,48,32,16 /tmp/icon.ico && wine /opt/rcedit/rcedit-x64.exe \$2 --set-icon /tmp/icon.ico" > /opt/rcedit/bin/set-icon
RUN chmod +x /opt/rcedit/bin/set-icon
ENV PATH="/opt/butler/:/opt/rcedit/bin/:${PATH}"
I have the Godot version as an arg, so you can build the docker this way:
sudo docker build -t xananax/godot-ci:3.2.3 --build-arg GODOT_VERSION=3.2.3 .
Is there any interest in a PR?
from godot-ci.
As a workaround to this issue, I added an extra step before the rest of the steps for Windows builds in the workflow file, that downloads and sets up WINE and recedit.
The instructions are these:
- name: Setup WINE and rcedit 🍷
run: |
dpkg --add-architecture i386 && apt-get update && apt-get install -y wine-stable && apt-get install -y wine32
chown root:root -R ~
wget https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe
mkdir -v -p ~/.local/share/rcedit
mv rcedit-x64.exe ~/.local/share/rcedit
godot -q
echo 'export/windows/wine = "/usr/bin/wine"' >> ~/.config/godot/editor_settings-3.tres
echo 'export/windows/rcedit = "/github/home/.local/share/rcedit/rcedit-x64.exe"' >> ~/.config/godot/editor_settings-3.tres
It first downloads WINE. I'm not sure if wine-stable is needed, but if wine32 isn't installed, it complains. dpkg --add-architecture i386
is needed to download wine32. Then, it runs chown
to change the owner of the home (~) directory. Otherwise WINE complains that ~ is not owned by us and refuses to create a configuration directory there.
It then downloads rcedit.x64 from GitHub, and places it in a new ~/.local/share/rcedit directory. I'm not sure if that's the best place for it to be, but it works.
godot -q
runs Godot and quits immediately. We do this in order to create the editor_settings-3.tres
file. And then we simply add the export/windows/wine
and export/windows/rcedit
paths to the editor settings.
This solution might not be the most optimized one, so feel free to suggest improvements. It does work properly though. You can see a full example here: https://github.com/Orama-Interactive/Pixelorama/blob/master/.github/workflows/dev-desktop-builds.yml
I tried writing these instructions inside a Dockerfile, but so far I didn't manage to make it work. The logic should be similar though. Is it best to do it in the workflow, or if this should be done in the Dockerfile itself?
from godot-ci.
this would be nice to have yes :)
from godot-ci.
Related Issues (20)
- Add an image with software OpenGL enabled (sample working Dockerfile included) HOT 2
- Tag 4.0.2 does not exist (anymore?) on docker hub HOT 2
- Windows build problems HOT 4
- Add blender support to godot4 HOT 7
- Include web export release templates HOT 23
- Cross origin requirements for godot 4 in the browser HOT 1
- Re-run 4.1.1 release HOT 5
- [question] Will be possible to use this images, or have a diferent one to run Gut in the pipeline? HOT 5
- 4.1.1 has an issue with /github/home/ vs /root
- Godot Version 3.5.3 Support? HOT 8
- Unclaimed string names HOT 4
- fixed godot 4.1.3 pipeline
- Docker godot mono 4.1.3 image not working - .NET not initalized HOT 7
- 4.2 support?
- Exported Games with Godot-CI and C# are not recognizing the connected events HOT 1
- Unable to load any resources (4.2.1) HOT 10
- ".../" in export command was causing issue in web build HOT 1
- Does jdk needs an update? HOT 1
- `No export template found at expected path` HOT 3
- [3.5.2] Build hanging after failing to load resources HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot-ci.