Skip to content

Commit 2f36e68

Browse files
shai-almogclaude
andcommitted
Windows cross-build/run: build hellocodenameone-common under Xvfb
The CN1 CSS compiler (codenameone-maven-plugin css goal) renders via CEF/AWT and threw java.awt.HeadlessException on the display-less Linux cross-build runner. Install xvfb and run the hellocodenameone-common Maven build under a virtual X server so the css/transcode rendering has a display. Core + port + LLVM 19 + xwin + WebView2 SDK fetch all succeeded before this point; this unblocks the actual suite cross-compile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bb9b42c commit 2f36e68

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/windows-cross-build-run.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ jobs:
5858
run: |
5959
set -e
6060
sudo apt-get update
61-
sudo apt-get install -y cmake ninja-build unzip
61+
# xvfb: the CN1 CSS compiler (codenameone-maven-plugin css goal) renders
62+
# via CEF/AWT and throws HeadlessException without a display, so the
63+
# hellocodenameone-common build below runs under a virtual X server.
64+
sudo apt-get install -y cmake ninja-build unzip xvfb
6265
wget -q https://apt.llvm.org/llvm.sh
6366
chmod +x llvm.sh
6467
sudo ./llvm.sh 19
@@ -136,6 +139,10 @@ jobs:
136139
run: |
137140
set -e
138141
export JAVA_HOME="$JDK_17_HOME"
142+
# Headful virtual display for the CSS compiler's CEF/AWT rendering.
143+
Xvfb :99 -screen 0 1600x1200x24 >/tmp/xvfb.log 2>&1 &
144+
export DISPLAY=:99
145+
sleep 2
139146
mkdir -p "$HOME/.codenameone"
140147
[ -f "$HOME/.codenameone/guibuilder.jar" ] || : > "$HOME/.codenameone/guibuilder.jar"
141148
mvn -B -f scripts/hellocodenameone/pom.xml -pl common -am install -DskipTests '-Dmaven.javadoc.skip=true'

0 commit comments

Comments
 (0)