Debian Codegraph @

bypy/README.rst

raw
1 Build the calibre installers, including all dependencies from scratch
2 =======================================================================
3
4 This folder contains code to automate the process of building calibre,
5 including all its dependencies, from scratch, for all platforms that calibre
6 supports.
7
8 In general, builds proceed in two steps: first build all the dependencies, then
9 build the calibre installer itself.
10
11 Requirements
12 ---------------
13
14 Building *must* run on a Linux computer.
15
16 First create some empty top level directory and run the following commands::
17
18 git clone https://github.com/kovidgoyal/bypy.git
19 git clone https://github.com/kovidgoyal/calibre.git
20 cd calibre
21
22 Now we need to bootstrap calibre, for which all its Linux build dependencies
23 must have already been installed (see the `Dependencies
24 <https://calibre-ebook.com/download_linux>`_ section of the Linux installation
25 page for details). Once the dependencies are installed, run::
26
27 ./setup.py bootstrap
28
29 All building is done inside QEMU VMs. Linux VMs are auto-created as needed,
30 Windows and macOS VMs must be created manually. Instructions on
31 creating the VMs are in the bypy repo under :file:`virtual_machine/README.rst`.
32 Required software for the VMs is listed in :file:`bypy/windows.conf` and
33 :file:`bypy/macos.conf`.
34
35 Linux
36 -------
37
38 To build the Intel and ARM dependencies for calibre, run::
39
40 ./setup.py build_dep linux
41 ./setup.py build_dep linux-arm64
42
43 The output (after a very long time) will be in :literal:`bypy/b/linux/[32|64]`
44
45 Now you can build the calibre Linux tarballs with::
46
47 ./setup.py linux
48
49 The output will be in :file:`dist`
50
51
52 macOS
53 --------------
54
55 Name the QEMU VM using ``vm_name`` from :literal:`bypy/macos.conf`.
56 Make sure all software mentioned in :file:`bypy/macos.conf` is installed.
57 To build the dependencies for calibre, run::
58
59 ./setup.py build_dep macos
60
61 The output (after a very long time) will be in :literal:`bypy/b/macos`.
62 Now you can build the calibre ``.dmg`` with::
63
64 ./setup.py osx --dont-sign --dont-notarize
65
66 The output will be in :file:`dist`
67
68
69 Windows
70 -------------
71
72 Name the QEMU VM using ``vm_name`` from :file:`bypy/windows.conf`.
73 Make sure all software mentioned in :file:`bypy/windows.conf` is installed.
74
75 To build the dependencies for calibre, run::
76
77 ./setup.py build_dep windows
78
79 The output (after a very long time) will be in :literal:`bypy/b/windows/64`.
80 Now you can build the calibre Windows installers with::
81
82 ./setup.py win64 --dont-sign
83
84 The output will be in :file:`dist`