calculator: add screenshots to the README
[nit.git] / examples / calculator / README.md
1 Portable calculator built using _app.nit_
2
3 # Project structure
4
5 * `calculator_logic` defines `CalculatorContext` with all the business logic of a calculator.
6   It takes as input operations and numbers, and outputs the text to display.
7 * `calculator` implements the portable graphical interface using the _app.nit_ framework
8 * `scientific_calculator` refines `calculator` to add scientific operations.
9 * `android_calculator` refines `calculator` to get a nicer aesthetic on Android.
10 * `ios_calculator` refines `calculator` to get a nicer aesthetic on iOS.
11 * `calculator_test` test `CalculatorContext` as a black box.
12
13 # Compilation
14
15 * Compile and run on the desktop (GNU/Linux and OS X) with:
16
17         ~~~
18         make
19         bin/calculator
20         ~~~
21
22 * Compile for Android and install on a device or emulator with:
23
24         ~~~
25         make bin/android.apk
26         adb install -r bin/calculator.apk
27         ~~~
28
29 * Compile for iOS and run on the simulator with:
30
31         ~~~
32         make bin/android.app
33         ios-sim launch bin/calculator.app
34         ~~~
35
36 # Screenshots
37
38 ![Scientific calculator on Linux with GTK+](doc/linux-scientific.png)
39
40 ![Scientific calculator on Android](doc/android-scientific.png)
41
42 ![Scientific calculator on iOS](doc/ios-scientific.png)