summaryrefslogtreecommitdiff
path: root/README
blob: 3c107e2554102aba4df00cbcad2db1549abfbf76 (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
90
91
92
93
94
LiberTI
=======

Libre TI-83 calculator emulator designed for [LibreCalc][1].

Build Instructions
------------------

You must first satisfy the build dependencies of LiberTI.

| Library/Tool               | Purpose                                       |
|----------------------------|-----------------------------------------------|
| GNU Autotools              | Automatic build scripts                       |
| C11 Compiler               | (Prefer GCC or Clang) Source compilation      |
| GNU Scientific Library     | Complex math calculations and data structures |
| Simple DirectMedia Layer 2 | Graphics and threading                        |
| SDL2 Image                 | Image loading support                         |
| Delwink's libpfxtree       | Keyword parsing for the encoder               |
| libconfig                  | Calculator states and configurations          |

On Debian GNU/Linux and derivatives, you can install these with the following
command:

    # apt-get install build-essential autoconf automake libgsl0-dev \
    libsdl2-dev libsdl2-image-dev libconfig-dev

For libpfxtree, download the latest stable source from [Delwink's site][3], and
build/install according to the README inside.

After the dependencies are installed, you can build LiberTI as follows:

    $ ./autogen.sh
    $ ./configure
    $ make

If you wish to install LiberTI to the system, you can run the following:

    # make install

Fonts
-----

The font files used in LiberTI are compiled statically into the program in
`font.c`. This was done to reduce the need for file IO at runtime (just one
more way the program can fail). However, some users might want to change the
fonts for one reason or another.

`font.png` at the root of this repository contains the primary font. If you
wish to modify it, you can take the following steps to include them in the
finished program:

Use your favorite hex dumping program to dump the changed file. With `xxd`:

    $ xxd -i font.png ti83.c

This will create a C file with the dumped bytes. For `font.png`, rename the
array to `FONT_PNG_DATA`. For both, change the length variable to a `#define`
as done in `font.c`, then paste the new array into place. Make sure to change
the length constants at the top of `font.c` to be the new lengths, or you will
get errors when running `liberti`.

The reason this was not added as part of the build script is because these
fonts are not supposed to change for the official release of LiberTI, and it
would be an extra dependency to add `xxd` which is part of `vim-common` just
for these hex dumps.

Disclaimer
----------

This project was created independently by David McMackins for Delwink, LLC as a
**replacement** for LibreCalc's existing TI emulator. LiberTI is not (yet)
officially endorsed or supported by LibreCalc.

Hacking
-------

We prefer the GNU coding style for C with a strict limit of 79 columns in the
source code. Indentations are two spaces, and tab characters are eight
spaces.

To submit a patch, [submit your diff to Delwink][2], or use GitHub's pull
request system.

License
-------

LiberTI is free (libre) software, released under the terms of version 3 of the
GNU Affero General Public License. You are free to copy, modify, and
redistribute this software and use it for whatever purpose. See
[COPYING](COPYING) for details.

[1]: http://www.librecalc.com/en/
[2]: mailto:contribute@delwink.com
[3]: http://delwink.com/software/libpfxtree.html