nitunit in jenkins did not test READMEs (cf #2313)
In order to test them, first fix them!
Signed-off-by: Jean Privat <jean@pryen.org>
This variation can show more models specified on the command line.
This variation can show more models specified on the command line.
bin/model_viewer [path_to_model ...]
~~~
bin/model_viewer [path_to_model ...]
~~~
* Compile and run on the desktop (GNU/Linux and OS X) with:
* Compile and run on the desktop (GNU/Linux and OS X) with:
make
bin/calculator
~~~
* Compile for Android and install on a device or emulator with:
make
bin/calculator
~~~
* Compile for Android and install on a device or emulator with:
make bin/android.apk
adb install -r bin/calculator.apk
~~~
* Compile for iOS and run on the simulator with:
make bin/android.apk
adb install -r bin/calculator.apk
~~~
* Compile for iOS and run on the simulator with:
make bin/android.app
ios-sim launch bin/calculator.app
~~~
make bin/android.app
ios-sim launch bin/calculator.app
~~~
module my_module is
app_name "My App"
app_namespace "org.example.my_app"
module my_module is
app_name "My App"
app_namespace "org.example.my_app"
* The mixin option (`-m module`) imports an additional module before compiling.
It can be used to load platform specific implementations of the _app.nit_ portable UI.
* The mixin option (`-m module`) imports an additional module before compiling.
It can be used to load platform specific implementations of the _app.nit_ portable UI.
# GNU/Linux version, using GTK
nitc calculator.nit -m linux
# GNU/Linux version, using GTK
nitc calculator.nit -m linux
Continuing with the calculator example, it is adapted for Android by the module `android_calculator.nit`.
This module imports both `calculator` and `android`, it can then use Android specific code.
Continuing with the calculator example, it is adapted for Android by the module `android_calculator.nit`.
This module imports both `calculator` and `android`, it can then use Android specific code.
module android_calculator
import calculator
module android_calculator
import calculator
To compile the _gamnit_ apps packaged with the Nit repository on GNU/Linux you need to install the dev version of a few libraries and some tools.
On Debian 8.2, this command should install everything needed:
To compile the _gamnit_ apps packaged with the Nit repository on GNU/Linux you need to install the dev version of a few libraries and some tools.
On Debian 8.2, this command should install everything needed:
apt-get install libgles2-mesa-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev inkscape
~~~
On Windows 64 bits, using msys2, you can install the required packages with:
apt-get install libgles2-mesa-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev inkscape
~~~
On Windows 64 bits, using msys2, you can install the required packages with:
pacman -S mingw-w64-x86_64-angleproject-git mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_mixer
~~~
While macOS isn't supported, it can create iOS apps.
You need to install and setup Xcode, and you may install the GLSL shader validation tool via `brew`:
pacman -S mingw-w64-x86_64-angleproject-git mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_mixer
~~~
While macOS isn't supported, it can create iOS apps.
You need to install and setup Xcode, and you may install the GLSL shader validation tool via `brew`:
redef fun ==(o) do return o isa SELF and partner_a == o.partner_a and partner_b == o.partner_b
redef fun hash do return partner_a.hash + 1024*partner_b.hash
end
redef fun ==(o) do return o isa SELF and partner_a == o.partner_a and partner_b == o.partner_b
redef fun hash do return partner_a.hash + 1024*partner_b.hash
end
~~~
### Scope of the `serialize` annotation
~~~
### Scope of the `serialize` annotation
* A module declaration annotated with `serialize` states that all its class definitions
and locally declared attributes are serializable.
* A module declaration annotated with `serialize` states that all its class definitions
and locally declared attributes are serializable.
module shared_between_clients is serialize
~~~
module shared_between_clients is serialize
~~~
two serialization services: `User::core_serialize_to` and
`Deserializer::deserialize_class`.
two serialization services: `User::core_serialize_to` and
`Deserializer::deserialize_class`.
module user_credentials
# User credentials for a website
module user_credentials
# User credentials for a website
The main implementations of these services are `JsonSerializer` and `JsonDeserializer`,
from the `json_serialization` module.
The main implementations of these services are `JsonSerializer` and `JsonDeserializer`,
from the `json_serialization` module.
import json
import user_credentials
import json
import user_credentials