-
Notifications
You must be signed in to change notification settings - Fork 0
Build Code
Brett Loewen edited this page Oct 9, 2024
·
13 revisions
Note
If you don't have access to a required resource you can reach out to us
- Install Visual studio 2022
- Install MySql community https://dev.mysql.com/downloads/mysql/
- If the DB username and password need to be changed in the project, SailDBContext.cs and appsettings.json should be updated accordingly
- Pull the latest release from the Project Repo (Please note that we have 2 repos. you do not want to use the admin repo)
- open SailMapper in visual studio /comp4350-project/backend/SailMapper.sln
- In the solution explorer tab, right click SailMapper and open a terminal
- Run:
dotnet restore,dotnet tool install --global dotnet-ef, thendotnet ef database update - At the top of visual studio ensure that "SailMapper" is the startup item and "https" is the startup project, click run
- To run tests, in the terminal
dotnet test - To run Linting, in the terminal
dotnet format SailMapper.sln
If at any point there is an error message requesting which project some code should be ran against, you must be in the /SailMapper folder and append SailMapper.sln to the command
- If you don't already have Node.js, download and install it from https://nodejs.org/en and confirm it setup correctly by running
node --version - Pull the latest release from the Project Repo (Please note that we have 2 repos. you do not want to use the admin repo)
- Navigate to the frontend/react folder in the project
- Run
npm installin a terminal - Run
npm run devin a terminal and go to http://localhost:5173/ in a browser to access the running website - Run
npm run testin a terminal to run the tests- You can also run
npm run test:uito get the test results listed out in a browser window
- You can also run
Warning
For the student(s) who are Building & Running our project
Unless you are working in a similar environment complete Flutter last.
If you follow Flutter's Start building Flutter Android apps on Windows, with default settings, (plus any optional suggestions that you may receive from your IDE or tutorial) you will have nearly an identical setup to mine.
The following point(s) may not be reasonable for you to reproduce:
- Windows 11 environment
- VS Code
- Version: 1.77 (or later)
- VS Code Extensions:
- Flutter (For Mobile Client)
- Version: 3.24.3
- Dart (For Flutter)
- Version: 3.5.3 (Flutter handles)
- Android Studio
- Android Emulator
- Phone: Pixel 7a
- Version: Android 15
- API Level: 35
- Android Emulator
- Everything above
- Grab Files
- Pull the latest release from the Project Repo (Please note that we have 2 repos. you do not want to use the admin repo)
- Install Emulator
- Start your emulator
- Open Android Studio
- Click "More Actions"
- Click "Virtual Device Manager"
- Press the play button
- Open your repo copy in VS Code
- Navigate to the Flutter root,
cd frontend/flutter_client(assuming you are in the project root) - On the sidebar for VS Code click the Bug on the Play button.
- At the top there is now a green arrow with a drop-down menu
- Select your emulator
- Click the green arrow. (this lints, compiles, CI tests, and more, all in one click)
- You did it 🥳
- Wrapping up
- The emulator may take a few minutes to start up each time
- You may need to relaunch the emulator twice, I found it unstable on my system
- A common problem is your PATH variables are not set up correctly
- More info can be found on our Wiki, (Not exhaustive)
- The VS Code sidebar contains more info for Building. In the order below
- Run and Debug:
- Testing: To see your CI testing results
- Flutter: Dev Tools and Debugging
- Sailing Race Analyzer
- Features
- Web App
- Mobile App
- Repo
- Issue Tracking
- Branching
- Dev Tools & Programs
- Architecture
- Database Structure
- Network
- Sequence Diagrams
- Backend
- REACT
- Flutter