Cygwin/X Contributor's Guide
Prev | Chapter 2. Programming | Next

# Native Compiling

## Compiling the Source Code

Change the current directory to your X Window System development directory:

    Username@CygwinHost ~
    $ cd ~/xserver

    Username@CygwinHost ~/xserver
    $ meson _build --prefix=/usr
    [lots of output]

    Username@CygwinHost ~/xserver
    $ ninja -C _build
    [lots more output]

The build is now complete.

> Note: You may wish to consult the .cygport file for the current configuration flags used in distributed packages

> Note: The unpacked source occupies approximately 30MB of disk space. Building the source requires approximately an additional 220MB. On my quad-core 3.4GHz i7-4770, a full build takes about 1 minute.

## Running a local build

Follow these steps to run the built X server:

1. Change the current directory to your X Window System development directory:

       Username@CygwinHost ~
       $ cd xserver
       Username@CygwinHost ~/xserver
       $

2. Invoke the hw/xwin/Xwin executable:

       Username@CygwinHost ~/xserver
       $ _build/hw/xwin/XWin

   The X server you have built will now attempt to run.

## Installing a local build

Installing a local build installs the built X server(s) and associated man pages.

1. Change the current directory to your X Window System development directory:

       Username@CygwinHost ~
       $ cd ~/xserver

       Username@CygwinHost ~/xserver
       $

2. Use the `install` target, which installs everything:

       Username@CygwinHost ~/xserver
       $ ninja -C _build install

Prev | Home | Next
Obtaining the Source Code | Up | Cross Compiling