README
author ali <ali@juiblex.co.uk>
Mon Jan 30 23:32:47 2012 +0000 (2012-01-30)
changeset 11 4a80c6053a66
parent 6 faab25d520dd
child 19 05d082ebf685
permissions -rw-r--r--
Use Unicode output on MS-Windows consoles
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@0
    31
It should be possible to use MSYS (http://www.mingw.org/wiki/MSYS) to build
ali@0
    32
on a Windows machine. You'll need a copy of the development package for
ali@0
    33
glib and its dependencies from http://www.gtk.org/download/win32.php.
ali@0
    34
ali@0
    35
It's much easier to build using a cross-compiler from Linux, if you have
ali@0
    36
access to such a system. Under Fedora, RHEL and friends you can do this
ali@0
    37
with:
ali@0
    38
ali@0
    39
% sudo yum install mingw32-gcc pkgconfig mingw32-glib2-static \
ali@0
    40
  mingw32-gettext-static mingw32-iconv-static
ali@0
    41
% ./configure --host=i686-w64-mingw32 --disable-shared \
ali@5
    42
  --bindir=/bookloupe --datadir=/
ali@0
    43
% make
ali@0
    44
% mkdir build
ali@0
    45
% make install DESTDIR=`pwd`/build
ali@0
    46
ali@5
    47
The contents of the build/bookloupe directory can then be copied to a
ali@0
    48
Microsoft Windows machine.
ali@0
    49
ali@0
    50
Depending on the version of mingw32-gcc you use, you may need to specify a
ali@0
    51
different host type. If you're not sure look and see what the cross-compiler
ali@0
    52
is called (eg., i686-pc-mingw32-gcc) and use the prefix as the host type.
ali@0
    53
ali@0
    54
Mac
ali@0
    55
---
ali@0
    56
ali@10
    57
The least intrusive means to build on a Mac is to use Homebrew:
ali@0
    58
ali@10
    59
http://mxcl.github.com/homebrew/
ali@0
    60
ali@10
    61
Install Homebrew according to its instructions.
ali@10
    62
ali@10
    63
If you are building bookloupe for your own use, you can use dynamic linking
ali@10
    64
like this:
ali@10
    65
ali@10
    66
$ brew install glib
ali@10
    67
ali@10
    68
and then install bookloupe using:
ali@10
    69
ali@10
    70
$ ./configure
ali@10
    71
$ make
ali@10
    72
$ make install
ali@10
    73
ali@10
    74
If you want to build bookloupe for other people to use, you will probably
ali@10
    75
want to link staticly. To do this you need to edit the formula for glib
ali@10
    76
and each of its dependencies (gettext and libffi) using something like:
ali@10
    77
ali@10
    78
$ brew edit gettext
ali@10
    79
ali@10
    80
Each time find the args statement which includes --prefix and insert
ali@10
    81
--disable-shared,for example change:
ali@10
    82
ali@10
    83
args = ["--disable-dependency-tracking", "--disable-rebuilds",
ali@10
    84
           "--prefix=#{prefix}",
ali@10
    85
           "--disable-dtrace"]
ali@10
    86
ali@10
    87
to
ali@10
    88
ali@10
    89
args = ["--disable-dependency-tracking", "--disable-rebuilds",
ali@10
    90
           "--disable-shared",
ali@10
    91
           "--prefix=#{prefix}",
ali@10
    92
           "--disable-dtrace"]
ali@10
    93
ali@10
    94
and then
ali@10
    95
ali@10
    96
$ brew install glib
ali@10
    97
ali@10
    98
before installing bookloupe as normal, but with the extra flag to configure:
ali@10
    99
ali@10
   100
$ ./configure --disable-shared
ali@10
   101
$ make
ali@10
   102
$ make install
ali@10
   103
ali@10
   104
Note that if you have previously used dynamic linking this may not work.
ali@10
   105
(Homebrew doesn't seem to create .la files in a form that libtool can use
ali@10
   106
when it is asked to prefer static libraries to dynamic ones.) Removing the
ali@10
   107
dynamic libraries first will solve this problem.
ali@10
   108
ali@10
   109
It may also be possible to use fink or macports.