From 34684e9dab22ac7e4986b000d57e7e93d881a425 Mon Sep 17 00:00:00 2001 From: Drexel2k <13720303+Drexel2k@users.noreply.github.com> Date: Mon, 7 Jul 2025 13:54:20 +0200 Subject: [PATCH] Updated GettingStarted docs. --- GettingStarted.md | 65 +++++++++++++++++++++++++---------------------- README.md | 5 ++-- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/GettingStarted.md b/GettingStarted.md index fe5dc2e4f..ea67b9869 100644 --- a/GettingStarted.md +++ b/GettingStarted.md @@ -1,46 +1,51 @@ -# Getting Started +# Getting started +## Android development with Windows 11 +This IDE setup ist tested on Windows 11. + For setup first you need the following things: -- Flutter Version 3.27.1 +- Android SDK and Android Emulator +- Flutter - IDE like Android Studio or VS Code with Flutter Plugin installed. -## Steps to run App -1.⁠ ⁠Clone the repository with Git +Use paths for SDKs without spaces and sepcial characers. -```git clone https://github.com/simonoppowa/OpenNutriTracker.git``` +### Setup Android SDK and Emulator +1. Download Android Studio from https://developer.android.com/studio and install. Keep "Android Virtual Device" checked. Start Android Studio after installation. -2.⁠ ⁠Get Dependencies +2. Install the Android SDK when asked. -```flutter pub get``` +3. After finishing the SDK installation you should the "Welcome to Android Studio" Screen. Click on "More Actions" -> "SDK Manager", switch to "SDK Tools" tab and check "Android SDK Command-line Tools (latest)", click "OK" and install the tools. -3.⁠ ⁠Run Build Runner to generate Files +4. Check under "More Actions" -> "Virtual Device Manager" if a virtual phone was set up, if not create one, e.g. a Medium Phone with Default Settings. -```flutter pub run build_runner build``` +5. Close Android Studio. + +### Setup Flutter SDK +1. Download Flutter 3.27.1 from https://docs.flutter.dev/install/archive and extract. + +2. Add the bin folder in the folder where you extracted Flutter to the Path variable in "Advanced System Settings" -> "Environement Variables..." -> "System variables" -> "Path" + +### Setup the Workspace in Visual Studio Code (VSC) +1. Create a new folder, open the folder in VSC. -4.⁠ ⁠Run App +2. Configure the Android SDK path for Flutter: -```flutter run lib/main.dart``` +```flutter config --android-sdk "e:\path\to\androidSDK"``` -## Running the Application +3.⁠ ⁠Clone the repository with git in a VSC terminal (make sure the active folder in the terminal is your created folder from step 1): -The application can be run on multiple platforms. Here are the commands for each: +```git clone https://github.com/simonoppowa/OpenNutriTracker.git .``` -### Web (Chrome) -```bash -flutter run -d chrome -``` +4.⁠ ⁠Get Dependencies. + +```flutter pub get``` + +5.⁠ ⁠Run Build Runner to generate Files. + +```flutter pub run build_runner build``` -### iOS -```bash -open -a Simulator -flutter run -``` +At the best revert all the visible generated files now, only env.g.dart is needed, it is not checked in because it is in .gitignore. -### macOS -```bash -flutter run -d macos -``` +6.⁠ ⁠Restart VSC, VSC detects now that this is a flutter project. On the Bottom Right "No Device" ist displayed, click on it, then select "Start Medium Phone" on the command Palette on the top. Wait for the phone to boot up. -### Android -```bash -flutter run -d android -``` +7. Press F5 to start a debug session (may taka a while on the first time). Keep the virtual phone running all the time, just start and stop Debugging. \ No newline at end of file diff --git a/README.md b/README.md index 6af9a5ecc..17292301e 100644 --- a/README.md +++ b/README.md @@ -56,10 +56,9 @@ See [Data Protection](https://www.iubenda.com/privacy-policy/53501884) ## Contribution Contributions to OpenNutriTracker are welcome! If you find any issues or have suggestions for new features, please open an issue or submit a pull request. Make sure to follow the project's code style and guidelines. -## Getting Started +### Getting Started With Development See the [Getting Started](GettingStarted.md) file for more information. - ## Disclaimer OpenNutriTracker is not a medical application. All data provided is not validated and should be used with caution. Please maintain a healthy lifestyle and consult a professional if you have any problems. Use during illness, pregnancy or lactation is not recommended. @@ -78,4 +77,4 @@ For questions, suggestions, or collaborations, feel free to contact the project Simon Oppowa - GitHub: [@simonoppowa](https://github.com/simonoppowa) -- Email: [opennutritracker-dev@pm.me](mailto:opennutritracker-dev@pm.me) +- Email: [opennutritracker-dev@pm.me](mailto:opennutritracker-dev@pm.me) \ No newline at end of file