From 9fce8bee25e1713d98ad8f886ca6aac5c605137c Mon Sep 17 00:00:00 2001 From: JinKim7 Date: Sun, 27 Aug 2023 19:09:16 -0700 Subject: [PATCH 1/4] Update Build Doc - Added install `make` instructions - reformatted a bit on the prereq/dependency section to make it a bit more uniform - Added emojis to titles - Replaced `cargo` with `make` commands for consistency. - Moved Building the Application to the bottom as it was weird being in the middle since it's building a release build. - Renamed "Building the Application" to be "Release Builds" to describe more accurately what this command is doing. --- src/build.md | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/src/build.md b/src/build.md index 1896a27..db784da 100644 --- a/src/build.md +++ b/src/build.md @@ -1,12 +1,17 @@ # Building from Source -## Dependencies +## 🔧 Prerequisites & Dependencies -Make sure you have setup the prerequisites for [tauri](https://tauri.app/v1/guides/getting-started/prerequisites). That should get you most of the way towards the requirements for building -spyglass. +Before diving into the build process, ensure you have all necessary tools and dependencies installed: +1. **make**: + - **macOS/Linux**: Use your package manager (like [Homebrew](https://brew.sh/) or `apt-get`) to install `make`. + - **Windows**: Either [download Make for Windows](https://gnuwin32.sourceforge.net/packages/make.htm) or use [Chocolatey](https://chocolatey.org/install) with `choco install make`. -Spyglass uses [TailwindCSS](https://tailwindcss.com) for styling within the application. Make sure you -have [NPM](https://docs.npmjs.com/getting-started) installed before starting the build. +2. **Tauri**: + - Follow the [prerequisites for Tauri](https://tauri.app/v1/guides/getting-started/prerequisites/) to set up your environment. + +3. **NPM & TailwindCSS**: + - Spyglass utilizes [TailwindCSS](https://tailwindcss.com/) for styling. Ensure you have [NPM](https://docs.npmjs.com/getting-started) set up. A quick check-list of things you should have installed before continuing. At the time of writing, you should be able to see similar versions below: @@ -21,33 +26,19 @@ cargo 1.61.0 (a028ae42f 2022-04-29) $> npm --version 8.10.0 ``` - > NOTE: `$>` represents your command line prompt. -Finally, let's setup the application dependencies. If you're running on Linux, run -this first for some linux specific system dependencies. +If you're on Linux, start by setting up system-specific dependencies: ``` bash $> make setup-dev-linux ``` And finally run these commands to setup the server/client dependencies. - ``` bash $> make setup-dev ``` -## Building the Application - -Run the following to build the application: - -``` bash -$> make build-release -``` - -This will kick off a release build for your platform. Depending on your OS, this -will produce a `dmg` (macos), `msi` (windows) or `appimage` (linux) file. - -## Development Builds +## 🏗️ Development Builds When running in development, it is best to have the spyglass client & backend running in two different terminal tabs/windows. Both will have their own logs that you'll @@ -55,12 +46,12 @@ need to watch. First, build & run the backend service: ``` bash -$> cargo run -p spyglass +$> make run-backend-dev ``` Second, build & run the client ``` bash -$> cargo tauri dev +$> make run-client-dev ``` If you're actively working on the theming of the application itself, it's best @@ -87,4 +78,15 @@ the plugins ``` $> make build-plugins-dev -``` \ No newline at end of file +``` + +## 🚀 Release Builds + +Run the following to build the application: + +``` bash +$> make build-release +``` + +This will kick off a release build for your platform. Depending on your OS, this +will produce a `dmg` (macos), `msi` (windows) or `appimage` (linux) file. From be4927e9dd042f7158c94f0b4623f803cc3b17ed Mon Sep 17 00:00:00 2001 From: JinKim7 Date: Sun, 27 Aug 2023 19:22:45 -0700 Subject: [PATCH 2/4] rename to be setup --- src/build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build.md b/src/build.md index db784da..77cba72 100644 --- a/src/build.md +++ b/src/build.md @@ -1,6 +1,6 @@ # Building from Source -## 🔧 Prerequisites & Dependencies +## 🔧 Setup Before diving into the build process, ensure you have all necessary tools and dependencies installed: 1. **make**: From 495269eb97bc799b9524b6bf46794d38d614fd65 Mon Sep 17 00:00:00 2001 From: JinKim7 Date: Fri, 1 Sep 2023 20:58:35 -0700 Subject: [PATCH 3/4] update title to be (make) specific --- src/build.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/build.md b/src/build.md index 77cba72..7457860 100644 --- a/src/build.md +++ b/src/build.md @@ -1,4 +1,4 @@ -# Building from Source +# Building from Source (make) ## 🔧 Setup @@ -41,8 +41,7 @@ $> make setup-dev ## 🏗️ Development Builds When running in development, it is best to have the spyglass client & backend running -in two different terminal tabs/windows. Both will have their own logs that you'll -need to watch. +in two different terminal tabs/windows. Both will have their own logs that you'll need to watch. First, build & run the backend service: ``` bash From e1d1587e6cc43ab1ff08288652887717975abd3a Mon Sep 17 00:00:00 2001 From: JinKim7 Date: Fri, 1 Sep 2023 20:59:07 -0700 Subject: [PATCH 4/4] add setup/run/build docs for using makefile.toml --- src/build-toml.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/build-toml.md diff --git a/src/build-toml.md b/src/build-toml.md new file mode 100644 index 0000000..ba00f0a --- /dev/null +++ b/src/build-toml.md @@ -0,0 +1,41 @@ +# Building from Source (cargo-make) + +## 📦 Using Makefile.toml +Spyglass can be built using either the traditional `Makefile` or the `Makefile.toml` with `cargo-make`. +This guide provides instructions for using `cargo-make`. + + +### 🔧 Prerequisite + +1. Install [Rust](https://www.rust-lang.org/tools/install) +2. Install [cargo-make](https://github.com/sagiegurari/cargo-make): + ```bash + cargo install cargo-make + ``` +3. Install Node(NPM): https://nodejs.org + + +### 🏗️ Setup + +```bash +cargo make setup +``` + +### 🚀 Run +To run both frontend and backend: +```bash +cargo make run +``` + +For running client only: +```bash +cargo make run-client +``` + +For running backend only: +```bash +cargo make run-backend +``` + +### 🎉 Bundle +[coming soon...] \ No newline at end of file