retroforth/doc/book/Building-Windows

56 lines
1.3 KiB
Text
Raw Normal View History

# Building RETRO on Windows
It is possible to build RETRO on Windows, though a few of the
extensions are not supported:
- no `unix:` words
- no `gopher:` words
## Process
This is currently more difficult than on a Unix host. If you have
Windows 10 and WSL, it may be better to build under that (using
the Linux instructions).
### Setup TCC
Go to http://download.savannah.gnu.org/releases/tinycc/
Download the *winapi-full* and *tcc-xxxx-bin* packages for your
system. Decompress them, copy the headers from the winapi
package into the tcc directory.
### Prepare Source
You'll need to comment out (or remove) some things before RETRO
will build.
In *rre.c*:
- remove includes for unistd.h, sys/sockets.h, netinet/in.h
netdb.h, errno.h, sys/wait.h, signal.h
- remove the #define USE_TERMIOS line
- change the #define NUM_DEVICES to 6
- remove io_unix_handler and io_gopher_handler from IO_deviceHandlers
- remove io_unix_query and io_gopher_query from IO_queryHandlers
In *image-functions.c*:
- remove includes for unistd.h
In *image-functions.h*:
- remove includes for unistd.h
In *io\io_filesystem.c*:
- remove includes for unistd.h
In *io\io_floatingpoint.c*:
- remove includes for unistd.h
### Build
\path\to\tcc rre.c image-functions.c io\io_filesystem.c io\io_floatingpoint.c -o retro.exe