-
Notifications
You must be signed in to change notification settings - Fork 0
Build Instructions
-
Clone mingw-cross-env from my branch. From here on out, supposing that you cloned it to
/home/rpavlik/src/third-party/mingw-cross-env
(for example), we will use$PREFIX
to mean/home/rpavlik/src/third-party/mingw-cross-env/usr
- a directory that will be created once you run a "make" command in mingw-cross-env. It places Linux installations of tools (for example, your cross-compiling GCC, a cross-compiling pkg-config wrapper, etc) in this prefix, and installs Windows libraries, etc. to$PREFIX/$TARGET
(where$TARGET=i686-pc-mingw32
) -
In mingw-cross-env directory, run
make gcc xorg-util-macros libXaw libXfont xtrans libXau libXdmcp pixman libgcrypt xorg-xcmiscproto xorg-renderproto xorg-scrnsaverproto xorg-resourceproto xorg-xineramaproto libxkbfile xkbcomp
to build all the dependencies for xorg-server. This will take a little bit of time. -
Add
$PREFIX/bin
to your PATH, if you haven't already. mingw-cross-env does this for its own builds, but you'll want this in your.profile
or.bashrc
Clone this repository, and check out the most recently committed branch. At the time of this writing, that is the patched-1.11-branch
. This should be the default branch on GitHub, so this command should just do the trick in one step:
$ git clone git://github.com/rpavlik/Xserver.git xorg-server
In that repository directory, configure the build by running these commands, which you may wish to put in a shell script (I called mine doconfigure.sh
):
PREFIX=/home/rpavlik/src/third-party/mingw-cross-env/usr
TARGET=i686-pc-mingw32
export ACLOCAL="`which aclocal` -I${PREFIX}/${TARGET}/share/aclocal"
./autogen.sh \
--host="${TARGET}" \
--disable-shared \
--prefix="${PREFIX}/${TARGET}" \
--disable-dmx \
--disable-kdrive \
--disable-xephyr \
--disable-xfake \
--disable-xfbdev \
--disable-xorg \
--disable-xnest \
--disable-xvfb \
--enable-xwin \
--disable-config-hal \
--disable-config-udev \
--disable-dri \
--disable-dri2 \
--disable-install-setuid \
--enable-windowswm \
--disable-xf86bigfont \
--disable-xf86vidmode \
--disable-xv \
--disable-xvmc \
--disable-glx-tls \
--disable-unit-tests \
--with-sha1=libgcrypt \
--disable-aiglx \
--disable-glx \
--disable-mitshm \
LIBS='-lgpg-error -lpthread -lkernel32'
In the xorg-server
directory, this script will build and install XWin to your mingw-cross-env prefix, then copy the executables and supporting files to a reorganized, Windows-centric tree (taking advantage of RELOCATE_PROJECTROOT
) in XWin-MinGW
that you can copy to a Windows machine as-is and run. Again, you might want to put these commands in a script file (I called mine dobuild.sh
) for easy repetition.
make install
INSTALLDIR="$(pwd)/XWin-MinGW"
mkdir -p "${INSTALLDIR}"
cp -R \
"${PREFIX}/${TARGET}/bin/XWin.exe" \
"${PREFIX}/${TARGET}/bin/xkbcomp.exe" \
"${PREFIX}/${TARGET}/share/X11/XErrorDB" \
"${PREFIX}/${TARGET}/lib/xorg/protocol.txt" \
"${PREFIX}/${TARGET}/share/X11/locale" \
"${PREFIX}/${TARGET}/share/X11/xkb" \
"${INSTALLDIR}"