summaryrefslogtreecommitdiff
path: root/INSTALL
blob: e91cf2d95af87a7ee274d7c3fe4017c57948b673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
               THE UR-QUAN MASTERS: BUILD INSTRUCTIONS
               ---------------------------------------

INSTALLING PREREQUISITES
------------------------

To build The Ur-Quan Masters, you must first install its
prerequisites: SDL2, PNG, Ogg Vorbis, and Zlib. How to do this will
depend on what operating system you are running:

On Debian or similar systems like Ubuntu, install the following packages:

  sudo apt-get install build-essential libogg-dev libpng-dev libsdl2-dev \
                       libvorbis-dev libz-dev

On Fedora or similar systems like CentOS, install these packages:
  sudo dnf install libogg-devel libpng-devel libvorbis-devel make SDL2-devel \
                   zlib-devel

On macOS, install Xcode from the App Store, and then install
"Additional components" when you run it for the first time. You can
then install brew from https://brew.sh and then use it to install your
requirements from the Terminal:

  brew install libogg libpng libvorbis sdl2

On Windows, you will need to use the MSYS2 system from
https://www.msys2.org -- after you install the base system, open an
"MSYS2 MSYS" window and update the system with the command

  pacman -Syuu

until there is nothing left to do. Aftr that you can install the
packages you will need to build the 32-bit version of UQM:

  pacman -S make pkg-config mingw-w64-i686-gcc mingw-w64-i686-libogg \
            mingw-w64-i686-libpng mingw-w64-i686-libsystre \
            mingw-w64-i686-libvorbis mingw-w64-i686-SDL2 mingw-w64-i686-zlib

Actually building UQM will need to be done from a "MSYS2 MinGW 32-bit"
window, not "MSYS2 MSYS".

BUILDING THE PROGRAM
--------------------

Building and configuration is managed by the "build.sh" script in the
same directory as this file. Ordinarily, you will only need the command

  ./build.sh uqm

To configure and build the system. Pass an argument like "-j5" for a
parallel build using 5 processes. To delete the current bulid and
reconfigure, issue the command

  ./build.sh uqm clean

And it will clear out all configuration choices.

The configuration process is interactive; for unattended or scripted
installs, consult the "config.state" file generated by the
configuration process and synthesize an equivalent as needed; builds
will then skip the configure step after that.

After the build completes, a binary named "uqm" or "uqm-debug" will be
created, and should be runnable out of this directory. To produce a
distributable or installable package that runs on any system, more
work is needed.

BUILDING AN INSTALLABLE PACKAGE
-------------------------------

LINUX: The UQM project does not officially maintain any installation
packages for any Linux distro, but other volunteers have often done
this already. In general, all that will be needed is to arrange
matters so that the uqm binary and the content directory are installed
into globally accessible locations, and that it is invoked with
arguments that properly identify those directories.

WINDOWS: An installable Windows build takes the UQM.EXE file created
by the build process and then correlates it with the prepackaged
content packs to produce an installer executable that will download
all other data from sourceforge. See INSTALL.win32 for the extra steps
required for this.

MAC: A redistributable package on macOS is an app bundle that contains
everything needed to run the program. Because of the way brew handles
system dependencies, the program must be built differently to be
redistributable. See INSTALL.macos for details on how to do this.