From 7ef150212550bcc9ea17d631cdb7804103cf0c3f Mon Sep 17 00:00:00 2001 From: Mitch Blaser Date: Mon, 8 Jan 2024 23:16:55 +1100 Subject: [PATCH] Update build instructions --- ...ment Environment and Build Instructions.md | 60 +++++++++++++++---- 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/docs/Development Environment and Build Instructions.md b/docs/Development Environment and Build Instructions.md index 1dca4c6..b84f5ec 100644 --- a/docs/Development Environment and Build Instructions.md +++ b/docs/Development Environment and Build Instructions.md @@ -6,23 +6,63 @@ parent: Docs ## Development Environment and Build Instructions -#### Server -For users who do not want or need to modify the source code, we recommend using a Prebuilt Release from our Downloads Page. +## Server -Building the Server from Source is relatively easy, as we've made a script that does it all for you. If you're using Linux, macOS or the Windows Subsystem for Linux, the build script should just work. +For users who do not want or need to modify the source code, we recommend using a Prebuilt Release from our Downloads Page. + +There are two release options - either a Docker image or raw Python 3 source files. + +#### Python Source Files + +This is the simplest way to run the Server, especially for development, or if you are dedicating an entire machine to run the application exclusively. + +It has a shorter setup time, and only depends on `python3` and `pip`. + +Simply run `python3 ./detective.py`, and answer the questions when prompted for the initial setup. This will initialise server files in `server/datastore/*`. + +#### Docker Image + +Currently building a Docker image using our prebuilt script is outdated, and will need updating to regain this functionality. + +A docker image is a little more complex to setup, although it has the advantage of being containerised, and highly stable. --- ->**For development systems running macOS or Linux, follow the instructions below. For Windows users, you will need to install the Windows Subsystem for Linux, and make sure you have python3, python3-pip, unzip and zip installed. If you are using WSL, don't install the Docker Engine through the package manager, but rather install the Windows version of Docker Desktop. It can be used through the command line the same way, and will produce less errors when you're trying to build.** -To build the source, you'll need to grab a few packages from python's `pip` package manager, and ensure you have either Docker Desktop (for macOS) or the Docker Engine (for Linux) installed. +> **For development systems running macOS or Linux, follow the instructions below. For Windows users, you will need to install the Windows Subsystem for Linux, and make sure you have python3, python3-pip, unzip and zip installed. If you are using WSL, don't install the Docker Engine through the package manager, but rather install the Windows version of Docker Desktop. It can be used through the command line the same way, and will produce less errors when you're trying to build.** -You can install all of the required packages by running the command `pip3 install flask flask-wtf flask-login flask-sqlalchemy flask-migrate flask-bootstrap email-validator waitress`. -To install Docker, read the instructions on their website here. +To build the source, you'll need to grab a few packages from python's `pip` package manager, and ensure you have either Docker Desktop or the Docker Engine installed. -Once you've installed the dependencies, cd to `FRCDetective/Server` (ensure you are in the server folder) and run `./productionbuild.sh` (not as root, but as your normal user). If prompted, enter your password. +You can install all of the required packages by running the command `python -m pip install -r ./server/requirements.txt`. +To install Docker, read the instructions on their website here. -*If you are still testing your code changes, you can run `python3 main.py -a 127.0.0.1` from the Server directory and test your code changes live on your system, outside of the container. Currently, upload and download of server files does not work outside of the Docker container, and we don't officially support this method of running the server application.* +Once you've installed the dependencies, cd to `server` and run `./productionbuild.sh` (not as root, but as your normal user). If prompted, enter your password. Once your build is complete, `cd ../../` (to the directory adjacent to your repository directory), and you'll see a new .zip file named `DetectiveServer-Release.zip`. To deploy this to another system, copy this file across now and follow the Installation Instructions on our other page. -If you're wanting to test on your development system, but inside of the Docker Container, you can follow the same instructions, however you shouldn't need to install any additional dependencies - what you've installed for development should be more than enough. \ No newline at end of file +If you're wanting to test on your development system, but inside of the Docker Container, you can follow the same instructions, however you shouldn't need to install any additional dependencies - what you've installed for development should be more than enough. + + + +## Client + +To build the Client application for Windows computers and/or Android devices, you will require a Windows development environment. To compile for iOS or MacOS, you will require a Mac computer for a complilation machine, as we will need to use Xcode. + +Firstly, install the following software... + +```markdown +- Git for Windows +- Visual Studio 2022 Community + - Desktop Development with C++ workload +- Android Studio 2022.3 or later + - Android SDK Platform, API 33.0.0 + - Android SDK Command-line Tools + - Android SDK Build-Tools + - Android SDK Platform-Tools + - Android Emulator +- Visual Studio Code + - Flutter extension for VS Code +``` + +Now, open VS Code and when prompted, click *Download SDK* for flutter. + +To be sure, run `flutter doctor`, and if all is well, you are able to press F5 to build. \ No newline at end of file