Compare commits

..

3 commits

View file

@ -1,6 +1,6 @@
# Jankboard # Jankboard
![build](https://github.com/couscousdude/jankboard/actions/workflows/main.yml/badge.svg) ![build](https://github.com/youwen5/jankboard/actions/workflows/main.yml/badge.svg)
[![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation) [![https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg](https://good-labs.github.io/greater-good-affirmation/assets/images/badge.svg)](https://good-labs.github.io/greater-good-affirmation)
This repository hosts the last version of the source code for the Jankboard This repository hosts the last version of the source code for the Jankboard
@ -17,9 +17,9 @@ vary by year.
Though this is a Team 1280 project, it's hosted on my GitHub account as I wrote Though this is a Team 1280 project, it's hosted on my GitHub account as I wrote
the vast majority of the code and retain rights to it via the the vast majority of the code and retain rights to it via the
[license](./LICENSE). A small portion of this codebase was contributed by [license](./LICENSE). A small portion of this codebase was contributed by
@quantum9innovation. I've released it as free and open source software under the [@quantum9innovation](https://github.com/quantum9Innovation/). I've released it
GPL v3, as permitted by Team 1280's policies for post-competition software as free and open source software under the GPL v3, as permitted by Team 1280's
stewardship. policies for post-competition software stewardship.
The Jankboard is a fully functional control interface designed to be used with The Jankboard is a fully functional control interface designed to be used with
our 2024 robot. It is intended to work alongside the FRC Game Tools application, our 2024 robot. It is intended to work alongside the FRC Game Tools application,
@ -66,6 +66,7 @@ rapidly build the application during our 6-week development period.
- [For developers](#for-developers) - [For developers](#for-developers)
- [Prerequisites](#prerequisites) - [Prerequisites](#prerequisites)
- [Installation steps](#installation-steps) - [Installation steps](#installation-steps)
- [Some notes:](#some-notes)
- [Troubleshooting common issues](#troubleshooting-common-issues) - [Troubleshooting common issues](#troubleshooting-common-issues)
- [Licensing](#licensing) - [Licensing](#licensing)
<!--toc:end--> <!--toc:end-->
@ -98,45 +99,44 @@ frontend and backend, which have been improved in almost every possible way.
## For developers ## For developers
If you would like to contribute to Jankboard, there's only a few simple steps to If you would like to contribute to Jankboard, there's only a few simple steps to
get the development build up and running. get the development build up and running. Please keep in mind that the following
is only necessary if you are building from source; the binaries have no external
dependencies.
### Prerequisites ### Prerequisites
- Rust and `cargo`. Check the [Rust docs](https://www.rust-lang.org/learn) for - Rust and `cargo`. Check the [Rust docs](https://www.rust-lang.org/learn) for
more information. We recommend you install Rust using `rustup`. Keep in mind more information.
that this is ONLY necessary for development, release binaries do not require
Rust.
- `pnpm`, for installing dependencies and the `vite` development server. - `pnpm`, for installing dependencies and the `vite` development server.
- NodeJS - NodeJS
### Installation steps ### Installation steps
1. Clone the repository. The `client` directory contains the vast majority of 1. Clone the repository using your preferred method.
the source code for the desktop app, while the `splash-screen` directory 2. Enter the `client` directory. This is where the majority of the app's source
contains the source code for the splash screen displayed before the app code lives.
loads. You don't have to touch anything in `splash-screen` unless you want to 3. Run `pnpm install` to download all required NPM dependencies.
modify it, in which case check the README in `splash-screen` for more 4. To create a production build, run `pnpm tauri build`. This will use Cargo to
fetch and build all the Rust dependencies, then compile the app and output an
executable for your platform in `target`.
5. To launch a developer build with hot reloading and convenient debugging
features, run `pnpm tauri dev`.
#### Some notes:
- The `client` directory contains the vast majority of the source code for the
desktop app, while the `splash-screen` directory contains the source code for
the splash screen displayed before the app loads. You don't have to touch
anything in `splash-screen` unless you want to modify it, in which case check
the [README](./splash-screen/README.md) in `splash-screen` for more
information. information.
2. `cd` into the `client` folder. The configuration files and `package.json`,
This is where stuff like `package.json` and configuration files for our - Tauri cross-compilation is still in beta, so you should build targeting the
various tooling are housed. The `client/src-tauri` directory contains the same OS you're currently running. For example, create Windows builds from
Rust source code and `cargo` configuration files for the backend that Windows. Check [the Tauri docs](https://tauri.app/v1/guides/building/) for
interfaces with the robot via Network Tables. more information. We also have some Github Actions set up to automatically
3. Run `pnpm install` to install dependencies. compile a production build for all platforms, but this is expensive (uses over
4. To run the desktop app in developer mode (with automatic hot stateful reload 30 minutes of our quota), and should only be used for publishing new major
and other useful features like error reporting), make sure you're in the
`client` directory and run `pnpm run tauri dev`. This will install and build
the Rust dependencies via `cargo` and initialize the `vite` development
server for the frontend. Note that since this is basically just running the
`vite` development server and then connecting the Tauri webview to it, there
may be slightly inconsistent behavior in dev mode versus production mode.
5. To create a production binary, run `pnpm run tauri build`. Tauri
cross-compilation is still in beta, so you should build targeting the same OS
you're currently running. For example, create Windows builds from Windows.
Check [the Tauri docs](https://tauri.app/v1/guides/building/) for more
information. We also have some Github Actions set up to automatically compile
a production build for all platforms, but this is expensive (uses over 30
minutes of our quota), and should only be used for publishing new major
releases. releases.
## Troubleshooting common issues ## Troubleshooting common issues
@ -145,16 +145,10 @@ get the development build up and running.
resolution, try opening your editor directly in the `client` directory so it resolution, try opening your editor directly in the `client` directory so it
picks up the `tsconfig.json` and uses the project's own TypeScript language picks up the `tsconfig.json` and uses the project's own TypeScript language
server. server.
- If you don't have access to a development environment that supports running
standalone executables (eg. Github Codespaces), you can try running
`pnpm run dev` instead of `pnpm run tauri dev`, which will open a development
server at `localhost:5173` with the frontend running in the web. However, app
behavior may be inconsistent and you will not get any features from the Rust
backend.
## Licensing ## Licensing
This project is released as free software under the This project is released as free software under the terms of the
[GNU General Public License](./LICENSE). What that entails for a developer [GNU General Public License](./LICENSE). What that entails for a developer
seeking to use portions of this codebase, or even the entirety of the codebase, seeking to use portions of this codebase, or even the entirety of the codebase,
for their own purposes, is the following: for their own purposes, is the following: