diff --git a/ivette/INSTALL.md b/ivette/INSTALL.md index 243b80ae3468ca91adbad0195c8e95b4ff03ac69..f97dad5fdfa393365df4bf66b78cef32d7d480a6 100644 --- a/ivette/INSTALL.md +++ b/ivette/INSTALL.md @@ -5,18 +5,49 @@ Required package to be installed: - `pandoc` for generating the documentation; - `node` version 16.x (codename: gallium) +It is recommanded to use NVM to select a node 16.x version. + +## Linux + +```sh +$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash +$ nvm install 16 +$ nvm use 16 +$ npm install yarn +``` + +## macOS + +```sh +$ brew install yarn +$ brew install nvm # follow instructions +$ nvm install 16 +$ nvm use 16 +``` + # Installation From the `Frama-C` main directory, simply type: ``` $ make -C ivette dist +$ [sudo] make -C ivette install ``` 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. -Once finished, the Ivette application is available in `ivette/dist/<platform>` directory. +The first `make` command builds a binary distribution of Ivette for your +architecture in `ivette/dist/<arch>` ; the second `make` command installs it on +your system accordingly. + +## Linux + +> TODO + +## macOS + +> TODO # Developer Install diff --git a/ivette/Makefile b/ivette/Makefile index f6a0cf4f1f4d5e4dcfe9ea8b8e2687a5aca5909a..bf746b8c2a740824bc9c2fc72a7416fcc14113c6 100644 --- a/ivette/Makefile +++ b/ivette/Makefile @@ -37,7 +37,7 @@ all: pkg lint app app: dome-app dev: dome-dev -dist: dome-dist +dist: dist-dir dome-dist lint: dome-pkg dome-templ checkcase @echo "[Ivette] running typechecker & linter" @@ -148,3 +148,41 @@ $(NODEBIN)/%: # -------------------------------------------------------------------------- include $(DOME)/template/makefile # -------------------------------------------------------------------------- + +# -------------------------------------------------------------------------- +# --- Ivette Installation +# -------------------------------------------------------------------------- + +include ../share/Makefile.config + +dist-dir: + @echo "Cleaning dist" + @rm -fr dist + +IVETTE_DIST=$(wildcard dist/linux-unpacked dist/mac dist/mac-arm64) + +ifeq ($(IVETTE_DIST),dist/linux-unpacked) + +install: + @echo "Installing Ivette (Linux)" + @rm -fr $(LIBDIR)/ivette + @rm -f $(BINDIR)/ivette + @mv $(IVETTE_DIST) $(LIBDIR)/ivette + @ln -s $(LIBDIR)/ivette/Ivette $(BINDIR)/ivette + +else ifeq ($(IVETTE_DIST:-arm64=),dist/mac) + +install: + @echo "Installing Ivette (macOS)" + @rm -fr /Applications/Ivette.app + @mv $(IVETTE_DIST)/Ivette.app /Applications/ + @install ivette-macos.sh $(BINDIR)/ivette + +else + +install: + @echo "No distribution to install" + @echo "use 'make dist' and retry" + @exit 1 + +endif diff --git a/ivette/electron-builder.json b/ivette/electron-builder.json new file mode 100644 index 0000000000000000000000000000000000000000..8a9e8291fb56caa9a9b4b279dea6261fcf265645 --- /dev/null +++ b/ivette/electron-builder.json @@ -0,0 +1,4 @@ +{ + productName: "Ivette", + mac: { icon: "ivette.icns" } +} diff --git a/ivette/ivette-macos.sh b/ivette/ivette-macos.sh new file mode 100755 index 0000000000000000000000000000000000000000..8e11dedfccca2c9f3e64980f0ceb19444f8d3ffd --- /dev/null +++ b/ivette/ivette-macos.sh @@ -0,0 +1,3 @@ +#!/bin/zsh + +exec open -na Ivette.app --args --cwd $PWD $* diff --git a/ivette/ivette.icns b/ivette/ivette.icns new file mode 100644 index 0000000000000000000000000000000000000000..6e8ec524ac725709613bb0ea80900ea759b21fc5 Binary files /dev/null and b/ivette/ivette.icns differ