README
author ali <ali@juiblex.co.uk>
Wed Oct 16 22:51:29 2013 +0100 (2013-10-16)
changeset 104 70cc629ec1e0
parent 19 05d082ebf685
permissions -rw-r--r--
Fix bug #28: Don't report ., as double punctuation after "etc" or "&c"
ali@5
     1
                                   bookloupe
ali@5
     2
                                   =========
ali@0
     3
ali@0
     4
General installation instructions can be found in INSTALL. The following
ali@0
     5
aim to give a quick overview and some help for specific systems. Documentation
ali@5
     6
for bookloupe itself can be found in doc/bookloupe.txt and for the test
ali@5
     7
framework in doc/loupe-test.txt.
ali@0
     8
ali@0
     9
Linux
ali@0
    10
-----
ali@0
    11
ali@0
    12
You should be able to use the standard:
ali@0
    13
ali@0
    14
% ./configure
ali@0
    15
% make
ali@0
    16
% sudo make install
ali@0
    17
ali@0
    18
If you get an error about no package 'glib-2.0' found, then you need to
ali@0
    19
install the development package for glib2. Under Fedora, RHEL and friends
ali@0
    20
that would be:
ali@0
    21
ali@0
    22
% sudo yum install gcc pkgconfig glib2-devel
ali@0
    23
ali@0
    24
Under Debian, Ubuntu and friends that would be:
ali@0
    25
ali@0
    26
% sudo apt-get install gcc pkgconfig glib2-devel
ali@0
    27
ali@0
    28
Microsoft Windows
ali@0
    29
-----------------
ali@0
    30
ali@19
    31
It should be possible to use either MSYS (http://www.mingw.org/wiki/MSYS)
ali@19
    32
or cygwin (http://www.cygwin.com/) to build on a Windows machine. You'll
ali@19
    33
need a copy of the development package for glib and its dependencies
ali@19
    34
from http://www.gtk.org/download/win32.php.
ali@0
    35
ali@0
    36
It's much easier to build using a cross-compiler from Linux, if you have
ali@0
    37
access to such a system. Under Fedora, RHEL and friends you can do this
ali@0
    38
with:
ali@0
    39
ali@0
    40
% sudo yum install mingw32-gcc pkgconfig mingw32-glib2-static \
ali@0
    41
  mingw32-gettext-static mingw32-iconv-static
ali@0
    42
% ./configure --host=i686-w64-mingw32 --disable-shared \
ali@5
    43
  --bindir=/bookloupe --datadir=/
ali@0
    44
% make
ali@0
    45
% mkdir build
ali@0
    46
% make install DESTDIR=`pwd`/build
ali@0
    47
ali@5
    48
The contents of the build/bookloupe directory can then be copied to a
ali@0
    49
Microsoft Windows machine.
ali@0
    50
ali@0
    51
Depending on the version of mingw32-gcc you use, you may need to specify a
ali@0
    52
different host type. If you're not sure look and see what the cross-compiler
ali@0
    53
is called (eg., i686-pc-mingw32-gcc) and use the prefix as the host type.
ali@0
    54
ali@0
    55
Mac
ali@0
    56
---
ali@0
    57
ali@95
    58
You will need the command line tools for any of the procedures described
ali@95
    59
below. If you don't already have them, install Xcode (it's a free download).
ali@95
    60
ali@95
    61
The simplest and least intrusive means to build on a Mac is to use Frau Sma's
ali@95
    62
Homebrew formula. However, Homebrew is not compatible with Fink so if you
ali@95
    63
have previously used Fink then you need an alternative solution, such as
ali@95
    64
MacPorts (see below).
ali@95
    65
ali@95
    66
It may also be possible to use Fink itself.
ali@95
    67
ali@95
    68
Mac using Frau Sma's Homebrew formula
ali@95
    69
-------------------------------------
ali@95
    70
ali@95
    71
https://github.com/frau-sma/homebrew-bookloupe
ali@95
    72
ali@95
    73
The README will be displayed by default. Follow its instructions to
ali@95
    74
install bookloupe on your Mac.
ali@95
    75
ali@95
    76
Creating statically linked binaries on a Mac using Homebrew
ali@95
    77
-----------------------------------------------------------
ali@95
    78
ali@95
    79
If you want to be able to distribute binaries of bookloupe to other Mac
ali@95
    80
users, then they need to be statically (rather than dynamically) linked.
ali@95
    81
Fundamentally this means that glib and its dependencies are included in
ali@95
    82
the binary rather than being linked into the program by the Operating
ali@95
    83
System each time it is run.
ali@0
    84
ali@10
    85
http://mxcl.github.com/homebrew/
ali@0
    86
ali@95
    87
Install Homebrew according to its instructions. If you already had Homebrew
ali@95
    88
before, make sure it's all up to date and “raring to brew.” For that, you
ali@95
    89
want to run:
ali@10
    90
ali@95
    91
$ brew update
ali@10
    92
ali@95
    93
and
ali@10
    94
ali@95
    95
$ brew doctor
ali@10
    96
ali@95
    97
from your terminal. Then you need to edit the formula for glib and each of its
ali@95
    98
dependencies (gettext and libffi at the time of writing) using something like:
ali@10
    99
ali@10
   100
$ brew edit gettext
ali@10
   101
ali@10
   102
Each time find the args statement which includes --prefix and insert
ali@10
   103
--disable-shared,for example change:
ali@10
   104
ali@10
   105
args = ["--disable-dependency-tracking", "--disable-rebuilds",
ali@10
   106
           "--prefix=#{prefix}",
ali@10
   107
           "--disable-dtrace"]
ali@10
   108
ali@10
   109
to
ali@10
   110
ali@10
   111
args = ["--disable-dependency-tracking", "--disable-rebuilds",
ali@10
   112
           "--disable-shared",
ali@10
   113
           "--prefix=#{prefix}",
ali@10
   114
           "--disable-dtrace"]
ali@10
   115
ali@10
   116
and then
ali@10
   117
ali@10
   118
$ brew install glib
ali@10
   119
ali@10
   120
before installing bookloupe as normal, but with the extra flag to configure:
ali@10
   121
ali@10
   122
$ ./configure --disable-shared
ali@10
   123
$ make
ali@10
   124
$ make install
ali@10
   125
ali@10
   126
Note that if you have previously used dynamic linking this may not work.
ali@10
   127
(Homebrew doesn't seem to create .la files in a form that libtool can use
ali@10
   128
when it is asked to prefer static libraries to dynamic ones.) Removing the
ali@10
   129
dynamic libraries first will solve this problem.
ali@10
   130
ali@95
   131
Mac using MacPorts
ali@95
   132
------------------
ali@95
   133
ali@95
   134
Install MacPorts from http://www.macports.org/.
ali@95
   135
ali@95
   136
Install pkgconfig (required to build glib) and then glib itself:
ali@95
   137
ali@95
   138
$ sudo port install pkgconfig
ali@95
   139
$ sudo port install glib2
ali@95
   140
ali@95
   141
Then install bookloupe as normal, telling configure where to find glib's
ali@95
   142
package configuration file:
ali@95
   143
ali@95
   144
$ ./configure PKG_CONFIG_PATH=/opt/local/lib/pkgconfig
ali@95
   145
$ make
ali@95
   146
$ make install