diff --git a/.gitmodules b/.gitmodules index f51a327..5c6fd3c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "Ecdar-GUI-Web"] path = Ecdar-GUI-Web - url = https://github.com/ECDAR-AAU-SW-P5/Ecdar-GUI-Web.git + url = https://github.com/ECDAR-AAU-SW-P5/Ecdar-GUI-Web + branch = main diff --git a/Ecdar-GUI-Web b/Ecdar-GUI-Web index 7b93e3f..b6ee55b 160000 --- a/Ecdar-GUI-Web +++ b/Ecdar-GUI-Web @@ -1 +1 @@ -Subproject commit 7b93e3f8f03a538fb992c86fcbe53eafda5deed2 +Subproject commit b6ee55b5a0f07178335b7e463c71ba9776fa676b diff --git a/README.md b/README.md index 99c3e0d..27b0e62 100644 --- a/README.md +++ b/README.md @@ -2,55 +2,65 @@ A native implementation of Ecdar-GUI-Web -## Compile -Be shure to be in the root folder of the project and follow these steps -### Install Dependencies +### Install dependencies +Install `node`, `protobuf`, and `cargo` +#### Linux + +###### Debian ``` -$ git clone https://github.com/ECDAR-AAU-SW-P5/Ecdar-GUI-Web.git +sudo apt install cargo nodejs protobuf-compiler ``` -#### Linux - -Install `node`, `npm` and `cargo` ###### Arch ``` -$ sudo pacman -S cargo nodejs npm +sudo pacman -S cargo nodejs protobuf ``` -###### Debian +#### Mac ``` -$ sudo apt install cargo node npm +brew install protobuf node ``` -#### Mac +Install [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) #### Windows +Install [Protoc](https://www.geeksforgeeks.org/how-to-install-protocol-buffers-on-windows/) + +Install [Node](https://nodejs.org/en/download) + +Install [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) + -### Npm Dependencies -``` -$ npm i -g vite -$ cd Ecdar-GUI-WEB -$ npm install -$ cd .. -``` ### Cargo dependencies +To run tauri applications, some need to install tauri cli ``` -$ cargo install tauri-cli +cargo install tauri-cli +``` + +### Git dependencies +To install and initialize all submodules, run ``` +git submodule update --init --recursive +``` + +### Ecdar-GUI-Web dependencies +Open the `Ecdar-GUI-Web` submodule, and follow its installation instructions to ensure that it can compile itself. + ### Run +How to run Ecdar-GUI-Native #### Dev ``` -$ cargo tauri dev +cargo tauri dev ``` #### Release ``` -$ cargo tauri build +cargo tauri build ``` - +In release the executable can be found at ###### Mac/Linux -The executable can be found at `./src-tauri/target/release/ecdar` +```./target/release/ecdar``` ###### Windows -The executable can be found at `.\src-tauri\target\release\ecdar.exe` +```.\target\release\ecdar.exe``` diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 26a966a..3b87857 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "build": { - "beforeBuildCommand": "yarn --cwd=./Ecdar-GUI-Web/ build", - "beforeDevCommand": "yarn --cwd=./Ecdar-GUI-Web/ dev", + "beforeBuildCommand": "git submodule update --init --recursive && yarn --cwd=./Ecdar-GUI-Web install && yarn --cwd=./Ecdar-GUI-Web/ build", + "beforeDevCommand": "git submodule update --init --recursive && yarn --cwd=./Ecdar-GUI-Web install && yarn --cwd=./Ecdar-GUI-Web/ dev", "devPath": "http://localhost:5173", "distDir": "../Ecdar-GUI-Web/build/", "withGlobalTauri" : true