Skip to content

Add Dockerfile for Windows cross compilation#1

Open
edubart wants to merge 1 commit into
masterfrom
feature/windows-cross-compile
Open

Add Dockerfile for Windows cross compilation#1
edubart wants to merge 1 commit into
masterfrom
feature/windows-cross-compile

Conversation

@edubart

@edubart edubart commented Nov 21, 2025

Copy link
Copy Markdown
Collaborator

Steps to build

  1. Build the windows toolchain image and open a shell for it:
make build TARGET=windows
make run TARGET=windows
  1. Inside the shell compile 2dcg-src
cd host/2dcg-src
make \
    PKG=x86_64-w64-mingw32-pkg-config \
    CC=x86_64-w64-mingw32-gcc \
    CXX=x86_64-w64-mingw32-g++ \
    LUA_INC="-DRVG_LUAPP" \
    LUA_LIB=-llua \
    B64_INC= \
    B64_LIB=-lb64 \
    SOLDFLAGS="-shared -fPIC" \
    QT6_MOC=/usr/lib/qt6/moc \
    vg_build_qt5=no \
    vg_build_hyphenate=no \
    all -j$(nproc)
  1. Create a windows distribution containing all 2dcg dependencies:
mkdir -p windows
cp /usr/x86_64-w64-mingw32/bin/lua.exe windows/
cp /usr/x86_64-w64-mingw32/bin/*.dll windows/
cp -R /usr/x86_64-w64-mingw32/lib/qt6/plugins/* windows/
cp -R /usr/x86_64-w64-mingw32/lib/qt6/qml/* windows/
  1. Inside a windows machine, clone 2dcg-src (so you have process.lua) and copy windows to it, then test it:
cd 2dcg-src
export LUA_PATH_5_3="?.lua;;" LUA_CPATH_5_3="?.so;;" WINEDEBUG=-all
wine windows/lua.exe process.lua svg 2dcg-rvgs/triangle1.rvg
wine windows/lua.exe rvgv.lua 2dcg-rvgs/triangle1.rvg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant