INSTALL 12.1 KB
Newer Older
1
DEPENDENCIES
2 3
============

4 5
    Required
    ========
6
    
7 8 9 10 11 12 13 14 15 16 17 18
        * Python 2.6, 2.7 or 3.x
        * The curses module. (Python bindings for curses.)
        * A screen size of at least 10 columns by 8 rows.
          (7 by 4 for non-hexagonal gametypes.)
        * A unix-like operating system or the argparse module.
    
    Recommended
    ===========
    
        * less(1) for the passwords is recommended.
        * A unix-like OS is recommended for systems with a multicore CPU
        * PyPy or another faster Python implementation can be used.
19
    
20
    NOTICE: Normal installation will only work on unix-like operating
21 22
    systems.
    
kultur's avatar
kultur committed
23
    On non unix-like systems you must specify the location of both
24 25
    configuration files, which is why the argparse module would
    be required on a non-nix platform.
kultur's avatar
kultur committed
26
    
27

Oskar Skog's avatar
0.5.4  
Oskar Skog committed
28
Mac OS X
29 30 31 32 33 34
========

    NOTICE:  This has not been tested.  Please report any issues to
    [email protected]
    
    You need to install as admin.
35 36
    You also need to have parts of Xcode installed, I believe they will
    automatically install on recent enough versions of OS X.
37 38 39 40 41 42 43 44 45 46 47 48 49 50
    
    Download and extract the archive and open a terminal window and
    navigate to the extracted directory with the `cd` command.
    
        cd Downloads/anonymine-*
    
    See this site for more information:
https://www.macworld.co.uk/feature/mac-software/how-use-terminal-on-mac-3608274/
    
    Then run the commands:
        ./configure -v
        make
        sudo make install
    
51

52 53
INSTALLATION
============
54

55 56
    NOTICE: This section only applies to unix-like systems.
    
57 58 59 60 61
    In the directory extracted from the tarball, run:
        ./configure
        make
        make install        # as root
    
62 63 64
    If you don't understand the above, go read
http://www.makeuseof.com/tag/compile-install-tar-gz-tar-bz2-files-ubuntu-linux/
    If you still don't understand, ask the nearest Linux user to help you
Oskar Skog's avatar
Oskar Skog committed
65
    and create a wiki page about the topic on my Gitlab repo.
66
    
67
    Use "./configure -v" to make the whole installation process verbose.
68 69 70 71
    
    The Makefile works with both GNU's make and BSD's make, but it does not
    work on Sun's make.  If `make` doesn't work, try using `gmake` instead.
    
72 73
    NOTICE:
        The system-wide configuration files for the game will only be created
74 75 76 77 78 79 80
        if they do not exist or if they have not been modified by the user.
        `make install` will fail if the format of the configuration has
        changed and incompatible configuration files that have been modified
        exist.
        
        If you don't modify the system-wide configuration files, installation
        will not fail because of this.
81 82 83 84
        
        To force an overwrite of the system-wide configuration files, run
        `make overwrite-cfg`.  If you do this because of a failed make install,
        run make install again.
85 86
    
    
87 88 89 90
    Anonymine will be installed as 'anonymine'.
    
    Run "make print-destinations" to find out where files will be installed.
    
91 92 93 94
    
    Important notes
    ===============
    
95 96
        * System wide configuration files, even if altered, will be deleted
          on uninstall.
97
        * The highscores file will be deleted on uninstall.
98
        * Anonymine expects to be run by "python", not "python2.7" etc.
99
        * Do not make any target that is not listed in the list of Makefile
100 101 102
          targets.  If you know what you're doing, it's okay.
        * ./configure and Makefile are not made with the GNU Autotools.
          The build system may behave unexpectedly.
103 104 105 106 107 108


Advanced installation
=====================

    NOTICE: This section only applies to unix-like systems.
109 110 111 112 113
    
    
    ./configure; make; make install
    ===============================
    
114 115
        NOTICE: ./configure is not made with GNU Autoconf.
    
116 117 118 119 120
        ./configure will accept variables with three different syntaxes:
            ./configure --name value
            ./configure --name=value
            ./configure name=value
        
121
        All variables require exactly one value/argument.
122 123 124
        All variables will also be stored in the Makefile.
        
        The value of a variable MAY be a Makefile variable/macro.
125
        Ex: `./configure 'bindir=$(prefix)/bin'`
126
        
127 128 129 130
        You can override the variables stored in Makefile, but avoid
        overriding srcdir and builddir, those two should only be sent
        to ./configure.
        
131 132 133 134 135 136 137 138 139
        The value entered on the command line will not be pre-expanded in the
        Makefile, except for "builddir" and "srcdir".  The exception is there
        to prevent issues when make is run from a different directory than
        configure.
            "srcdir" and "builddir" will automatically be converted to absolute
            paths.
        
        configure will also accept these short options:
            -f      Force; write the Makefile even if there were errors.
Oskar Skog's avatar
Oskar Skog committed
140
            -v      verbose; this also affects the Makefile
141
        
142 143
        The real "configure" script will handle these iff they are the ONLY
        argument to ./configure:
144 145 146 147 148 149
            ./configure -h
            ./configure -V
            ./configure --help
            ./configure --version
    
    
150
    Recognized variables
151 152 153 154 155 156
    ====================
    
        Variable                default and/or description
        --------                --------------------------
        
        prefix                  sys.prefix
Oskar Skog's avatar
Oskar Skog committed
157
        bindir                  $(prefix)/bin        # NOTE 1
158 159
        gamesdir                $(prefix)/games
        libdir                  $(prefix)/lib
Oskar Skog's avatar
Oskar Skog committed
160
        localstatedir           $(prefix)/var, /var
161
        sysconfdir              $(prefix)/etc, /etc
Oskar Skog's avatar
Oskar Skog committed
162
        vargamesdir             $(localstatedir)/games, $(localstatedir)
163
        
164 165
        python                  Path to the Python interpreter.
        
166 167 168
        EXECUTABLES             This program will be installed in $(gamesdir)
        MODULES                 See its own subsection
        
169 170 171
        INSTALL                 which install(8) utility to use.
                                (/usr/ucb/install on Solares)
        
172
        DESTDIR                 Pretend the root is here (staged installs)
173 174 175
        srcdir                  The directory extracted from the tarball.
        builddir                (Current working directory)
        
176 177
        freedesktop             'true' or 'false'; "Linux" desktop
        macosx                  'true' or 'false'; Mac OS X
Oskar Skog's avatar
Oskar Skog committed
178
        
Oskar Skog's avatar
Oskar Skog committed
179

180
        NOTE 1: gamesdir, bindir
Oskar Skog's avatar
Oskar Skog committed
181
            gamesdir will override bindir if possible, so setting bindir
182
            might have no effect.
Oskar Skog's avatar
Oskar Skog committed
183 184
        
        prefix, bindir and libdir, localstatedir, sysconfdir:
185 186
            http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
        
Oskar Skog's avatar
Oskar Skog committed
187 188 189 190 191
        sysconfdir
            Configuration files will be stored in $(sysconfdir)/anonymine/
        
        vargamesdir
            The highscores file is $(vargamesdir)/anonymine
192
        
193 194 195 196
        python
            Can be set to use a different version/implementation than what
            ./configure has chosen automatically.
        
197 198 199 200 201 202 203 204 205 206
        EXECUTABLES
        ===========
        
            This is the directory to which this game will be installed.
            
            It will be assigned to the first variable of [gamesdir, bindir]
            that expands into a path that exists in $PATH.
            
            As a consequence: The game will probably not be installed where
            you want it to if you specify bindir=somewhere-else as it installs
207
            to gamesdir rather than bindir whenever possible.
208 209
        
        
210 211
        MODULES
        =======
212 213 214 215
            
            This game works with both versions of Python, and installs three
            modules that could be used by some other program.
            
216
            The modules will be copied to $(MODULES).
217 218 219 220 221
            
            $(major) and $(minor) are pre-expanded and do NOT exist in the
            Makefile.
    
    
222 223
        srcdir, builddir and DESTDIR
        ============================
224
        
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
            srcdir          Directory extracted from the tarball.
            
            builddir        Temporary storage;
                            directory for files from the build process.
            
            DESTDIR         Prepended to all paths on install and uninstall;
                            alternative root.  (For staged installations.)
            
            
            $(srcdir) is the directory that was extracted from the tarball.
            $(builddir) is the directory where make(1) is allowed to create
            "temporary" files when building (`make [all]`) the program.
            
            Both srcdir and builddir default to the current working directory.
            
            Sending builddir=foo to ./configure will create the Makefile
            inside builddir. You can cd to builddir and run
            `make && sudo make install` without specifiying any arguments
            to make.
            
            You should only send srcdir and builddir to ./configure, not to
            make.
            
            DESTDIR only affects make install, make uninstall, etc.  It has
            zero effect on ./configure.
250
    
251
    
252 253 254
    Targets in the Makefile
    =======================
    
255
        NOTICE:  DO NOT attempt to make any other target than what is
256 257
        listed here.  `make` will not remake Makefile if you try to build
        any other target.
258
        
259 260 261 262 263 264
        all (default)
            Fix the shebang line of the programs to be installed
        
        clean
            Remove stage files and bytecode.
        
Oskar Skog's avatar
0.3.4  
Oskar Skog committed
265 266 267 268
        distclean
            Like clean, but also remove the Makefile.
            rm $(builddir)Makefile
        
269 270 271 272
        print-destinations
            Print where things will be installed.
        
        install
273 274 275 276
            Altered configuration files will not be touched by this target.
            If the existing configuration file is incompatible but does not
            identify itself as unmodified, installation will fail and the
            configuration file must be manually edited.
277
        
278 279 280
        install-dirs
            Install the destination directories.
        
281
        uninstall
Oskar Skog's avatar
...  
Oskar Skog committed
282 283 284 285 286
            (Does not recreate Makefile.)
        
        nuke
            Uninstall. Removes highscores file and configuration files.
            (Does not recreate Makefile.)
287
        
288 289 290 291 292 293
        check-install-cfg
            Install system-wide configuration files, but do not overwrite
            user-modified files.  This target will fail if the existing
            configuration files have been modified and are not compatible
            with the new version of Anonymine.
        
294 295 296 297
        overwrite-cfg
            Force compatible configuration files to be installed.
            WARNING: User modified files will be overwritten.
        
298 299 300 301 302 303 304 305 306
        check
            Check that everything seems to work.
        
        release
            (You are me.)
        
        make dist
            'check' that I am not making an embarrassing release,
            make 'tarballs' and the 'zip' and 'release' them.
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
    
    
    Multiple Python versions or implementations
    ===========================================
    
        After having run "make", you can run
        "<python-implementation> symlinks install" in builddir,
        python-implementation is the command for the python implementation
        to which you want to install symlinks for the Anonymine modules.
        
        The "symlinks" script is generated during "make all".  If you want
        to use DESTDIR, you'll have to send DESTDIR to either `./configure`
        or `make`; you can't send it only to `make install`.
        
        "<python-implementation> symlinks unintstall" does what you should
        expect it to do.
        
        If the main version (the Python version to which the real files have
        been installed) has changed, run:
            ./configure -v # DESTDIR=foo
            make
            sudo make install
            oldpython symlinks install
            # (You need to install them before you uninstall them.)
            #oldpython symlinks uninstall
332 333 334 335 336


TL;DR
=====

kultur's avatar
kultur committed
337
    ./configure -v && make && sudo make install