
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
在Ubuntu Docker容器中为Windows目标进行交叉编译的构建脚本。
另请参见:我的博客
列出所有可用的构建脚本:
bashdocker run -it --rm mwaeckerlin/mingw -c 'ls /build-*.sh'
当前可用脚本:
查看构建脚本选项(以OpenSSL为例):
bashdocker run -it --rm mwaeckerlin/mingw /build-openssl.sh -h
在Windows上运行构建产物需要一些MinGW DLL。使用install-dll.sh脚本将它们安装到安装目录:
bashdocker run -it --rm -v /tmp/build:/workdir -u $(id -u) mwaeckerlin/mingw /install-dll.sh
MINGW:mingw参数(默认:从ARCH或x86_64-w64-mingw32检测)PREFIX:相对安装前缀(默认:usr)WORKSPACE:工作空间路径(默认:/workdir)TARGET:安装目标路径(默认:WORKSPACE)WINREQ:Windows所需库路径(默认:TARGET/PREFIX)BUILD_NUMBER:构建编号(默认:0)ARCH:架构(默认:从MINGW获取,MINGW默认值为x86_64)BINDIR:可执行文件安装目录(默认:PREFIX/exe)LIBDIR:DLL文件安装目录(默认:PREFIX/exe)WININC:Windows所需头文件路径(默认:WINREQ/include)WINLIB:Windows所需库文件路径(默认:WINREQ/exe)可构建基于Bootstrap Build Environment的任何项目,例如作者的项目:
bashmkdir -p /tmp/build docker run -it --rm -v /tmp/build:/workdir -u $(id -u) mwaeckerlin/mingw /build.sh -s https://dev.marc.waeckerlin.org/svn/mrw-c++/trunk -n mrw-c++ -z docker run -it --rm -v /tmp/build:/workdir -u $(id -u) mwaeckerlin/mingw /build.sh -s https://dev.marc.waeckerlin.org/svn/libxml-cxx/trunk -n libxml-cxx -z
构建完成后,每个库会生成一个zip文件,包含/tmp/build/usr目录中的安装内容。若不需要zip文件,仅保留目录,可省略-z选项。后续构建会包含依赖库,若需避免此行为,可通过Docker传递变量指定不同目录,例如:
bashdocker run -it --rm -v /tmp/build:/workdir -u $(id -u) -e PREFIX=otherdir mwaeckerlin/mingw /build.sh -s [...]
此时产物会在otherdir目录中,且zip文件不包含依赖库。
在当前工作目录编译最新版OpenSSL:
bashdocker run -it --rm -v /tmp/build:/workdir -u $(id -u) mwaeckerlin/mingw /build-openssl.sh -d
在当前工作目录构建ICU 57-1版本:
bashdocker run -it --rm -v /tmp/build:/workdir -u $(id -u) mwaeckerlin/mingw /build-icu.sh -d -v 57-1
/build-qt.sh -d/build-openssl.sh、build-icu.shbashmkdir -p /tmp/build/usr docker run -it --rm -v /tmp/build:/workdir -u $(id -u) mwaeckerlin/mingw /build-openssl.sh -d docker run -it --rm -v /tmp/build:/workdir -u $(id -u) mwaeckerlin/mingw /build-icu.sh -d docker run -it --rm -v /tmp/build:/workdir -u $(id -u) mwaeckerlin/mingw /build-qt.sh -d
构建完成后,在/tmp/build目录中会生成:
usr:所有构建目标的安装目录openssl-1.0.2k~windows.0_x86_64.zip:Windows版OpenSSL库(版本号可能不同)icu-57.1~windows.0_x86_64.zip:Windows版ICU库(版本号可能不同)...:Windows版Qt库(版本号可能不同)Configure summary: Building on: linux-g++ (x86_64, CPU features: mmx sse sse2) Building for: win32-g++ (x86_64, CPU features: mmx sse sse2) Configuration: cross_compile use_gold_linker sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl f16c largefile precompile_header shared release c++11 c++14 c++1z concurrent dbus no-pkg-config stl Build options: Mode ................................... release Building shared libraries .............. yes Using C++ standard ..................... C++1z Using gold linker ...................... yes Using precompiled headers .............. yes Using LTCG ............................. no Target compiler supports: SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX .................................. AVX AVX2 F16C AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI Build parts ............................ libs examples App store compliance ................... no Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... no Qt Gui ................................. yes Qt Network ............................. yes Qt Sql ................................. yes Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... no QML debugging .......................... yes udev ................................... no Using system zlib ...................... no Qt Core: DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... no iconv .................................. no ICU .................................... no Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no Using system PCRE2 ..................... no Qt Network: getaddrinfo() .......................... yes getifaddrs() ........................... no IPv6 ifname ............................ no libproxy ............................... no OpenSSL ................................ yes Qt directly linked to OpenSSL ........ no SCTP ................................... no Use system proxies ..................... yes Qt Sql: DB2 (IBM) .............................. no InterBase .............................. no MySql .................................. no OCI (Oracle) ........................... no ODBC ................................... yes PostgreSQL ............................. no SQLite2 ................................ no SQLite ................................. yes Using system provided SQLite ......... no TDS (Sybase) ........................... no Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ no HarfBuzz ............................... yes Using system HarfBuzz ................ no Fontconfig ............................. no Image formats: GIF .................................. yes ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... no PNG .................................. yes Using system libpng ................ no EGL .................................... no OpenVG ................................. no OpenGL: ANGLE ................................ no Desktop OpenGL ....................... yes Dynamic OpenGL ....................... no OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no Session Management ..................... yes Features used by QPA backends: evdev .................................. no libinput ............................... no mtdev .................................. no tslib .................................. no xkbcommon-evdev ........................ no QPA backends: DirectFB ............................... no EGLFS .................................. no LinuxFB ................................ no VNC .................................... no Mir client ............................. no Windows: Direct 2D ............................ no DirectWrite .......................... yes DirectWrite 2 ........................ no Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows WindowsXP WindowsVista Qt PrintSupport: CUPS ................................... no Qt SerialBus: Socket CAN ............................. no Socket CAN FD .......................... no QtXmlPatterns: XML schema support ..................... yes Qt QML: QML interpreter ........................ yes QML network support .................... yes Qt Quick: Direct3D 12 ............................ no AnimatedImage item ..................... yes Canvas item ............................ yes Support for Quick Designer ............. yes Flipable item .......................... yes GridView item .......................... yes ListView item .......................... yes Path support ........................... yes PathView item .......................... yes Positioner items ....................... yes ShaderEffect item ...................... yes Sprite item ............................ yes Qt Gamepad: SDL2 ................................... no Qt 3D: Assimp ................................. yes System Assimp .......................... no Qt 3D GeometryLoaders: Autodesk FBX ........................... no Qt Wayland Client ........................ no Qt Wayland Compositor .................... no Qt Bluetooth: BlueZ .................................. no BlueZ Low Energy ....................... no Linux *** API ....................... no Qt Sensors: sensorfw ............................... no Qt Multimedia: ALSA ................................... no GStreamer 1.0 .......................... no GStreamer 0.10 ......................... no Video for Linux ........................ no OpenAL ................................. no PulseAudio ............................. no Resource Policy (libresourceqt5) ....... no Windows Audio Services ................. no DirectShow ............................. yes Windows Media Foundation ............... no Media player backend ................... DirectShow Qt Quick Controls 2: Styles ................................. Default Material Universal Qt Quick Templates 2: Hover support .......................... yes Qt Location: Gypsy GPS Daemon ....................... no WinRT Geolocation API .................. no Qt WebEngine: Embedded build ......................... no Pepper Plugins ......................... yes Printing and PDF ....................... yes Proprietary Codecs ..................... no Spellchecker ........................... yes WebRTC ................................. yes Using system ninja ..................... no Note: Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。




来自真实用户的反馈,见证轩辕镜像的优质服务