Skip to content
Snippets Groups Projects
Commit fb1d9dd2 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[ivette] installation guides

parent 126a64c4
No related branches found
No related tags found
No related merge requests found
## Coding Guidelines
# Emacs Configuration
- use `make app` (checked by GitLab-CI)
- per-directory `style.css` for CSS;
- caml-cased file names for typescript modules;
- indentation based on 2 spaces, no tabs;
- caml-case identifiers for exported members;
- no `export default` for libs, individual exports only;
- prefer use of `import * as AbcDef from '<path>/AbcDef'`;
## Makefile Targets
From the `./ivette` sub-directory of Frama-C main directory:
Emacs mode configuration can be setup with Typescript, Web-mode and Tide packages.
You can install them with `M-x package-install`:
```
$ make app // Builds desktop app
$ make dev // Launch development version with live code editing
$ make doc // Generate development documentation (static)
$ make serve // Serve the documentation (makes it searchable)
M-x package-refresh-contents ;; updates your index
M-x package-install web-mode
M-x package-install typescript-mode
M-x package-install tidse
```
Once build, the application can be launched from the command line
with `./bin/frama-c-gui`.
For configuring your `.emacs` accordingly,
please look at the `share/typescript-config.el` file.
It setup the Tide package to work with
`typescript-mode` for `*.ts` files (see also `tsfmt.json` config file)
and `web-mode` for `*.tsx` files.
Usefull commands:
The static documentation is available offline at `doc/html/index.html`.
However, searching the documentation does not work
with `file://` protocole, use `make serve` to use it.
```
M-. goto definition
M-, back to previous point
M-x tide-documentation-at-point
M-x tide-error-at-point
```
## Mirroring to Dome/Electron
# VS Code
**Warning:** not recommanded until all codebase has been moved to TypeScript.
VS Code has native support for Typescript (and JavaScript, of course), in terms
of code navigation, syntax highlighting and formatting, compiler errors and
warnings. The same holds for React development.
The content of ./src/dome shall be kept in sync with
the public repository for Dome. An experimental support
for automated synchronisation is available with:
- `make dome-pull` for pulling Dome updates into Ivette
- `make dome-push` for pushing local updates into Dome
Useful extensions:
- `ESlint` provides support for lint errors and warnings;
- `ES7 React/Redux/GraphQL/React-Native snippets` provides boilerplate snippets;
# Installation
# Dependencies
Required package to be installed:
- `yarn` for node and node pakage management;
- `yarn` for node pakage management;
- `pandoc` for generating the documentation;
# Emacs Configuration
# Installation
Emacs mode configuration can be setup with Typescript, Web-mode and Tide packages.
You can install them with `M-x package-install`:
From the `Frama-C` main directory, simply type:
```
M-x package-refresh-contents ;; updates your index
M-x package-install web-mode
M-x package-install typescript-mode
M-x package-install tidse
$ make -C ivette dist
```
For configuring your `.emacs` accordingly,
please look at the `share/typescript-config.el` file.
It setup the Tide package to work with
`typescript-mode` for `*.ts` files (see also `tsfmt.json` config file)
and `web-mode` for `*.tsx` files.
If this is the first time you compile `ivette`, this might take some time to download
all the necessary packages and Electron binaries from the web.
Usefull commands:
Once finished, the Ivette application is available in `ivette/dist/<platform>` directory.
```
M-. goto definition
M-, back to previous point
M-x tide-documentation-at-point
M-x tide-error-at-point
```
# Developer Install
# VS Code
Ivette can be compiled and used with different modes:
- `make dev` builds and start the development version with live-code-editing enabled. It uses
local binaries of Electron framework. This is _not_ a full packaged
application.
- `make app` pre-builds the production application. It is not _yet_ packaged and still
uses the local Electron binaries.
- `make dist` packages the pre-built application into a new application for the host
operating system.
VS Code has native support for Typescript (and JavaScript, of course), in terms
of code navigation, syntax highlighting and formatting, compiler errors and
warnings. The same holds for React development.
The development and production applications can be launched from the command line
with `Frama-C/ivette/bin/frama-c-gui` binary.
The generated `frama-c-gui` script will use the local `Frama-C/bin/frama-c` binary by default,
although you can change the default settings by using the following options:
```
frama-c-gui [ivette options] [frama-c command line]
--cwd <dir> change the working directory used by ivette & frama-c
--command <bin> set the frama-c server to be launched
--socket <socket> set the IPC socket name to be used for the frama-c server
```
Useful extensions:
- `ESlint` provides support for lint errors and warnings;
- `ES7 React/Redux/GraphQL/React-Native snippets` provides boilerplate snippets;
See also the [CONTRIBUTING] guide for editor configuration if you want to hack in Ivette
source code.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment