diff --git a/docs/CROWDIN/cs/Getting-Started/CompatiblesCgms.md b/docs/CROWDIN/cs/Getting-Started/CompatiblesCgms.md index 613fea73edd5..f860f17b17ae 100644 --- a/docs/CROWDIN/cs/Getting-Started/CompatiblesCgms.md +++ b/docs/CROWDIN/cs/Getting-Started/CompatiblesCgms.md @@ -9,22 +9,22 @@ This section provides a brief overview of all compatible **CGMs/FGMs** with **AA * [xDrip+Settings](../CompatibleCgms/xDrip.md) * [Nightscout as BG Source](../CompatibleCgms/CgmNightscoutUpload.md): While it's possible to use Nightscout as a BG source for closed-loop insulin delivery, **this method is not recommended** due to its reliance on stable mobile data or Wi-Fi connectivity. This means your **CGM** data would only be received by **AAPS** when you have an online connection to your Nightscout site. For a more reliable set up, using a CGM with local broadcast from the receiver (as listed below) to **AAPS**, is a much better option. -| CGM | Available [BG Sources](../SettingUpAaps/ConfigBuilder.md#bg-source) | -| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | xDrip+, DiaKEM app or [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | -| [Dexcom ONE+ and Stelo](../CompatibleCgms/DexcomG7.md) | xDrip+ | -| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | xDrip+ or BYODA | -| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | xDrip+ | -| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | xDrip+ | -| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](https://www.juggluco.nl/Juggluco/libre3/) (with or without xDrip+) | -| [Libre 2/2+](../CompatibleCgms/Libre2.md) | xDrip+ (EU only) or [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) (with or without xDrip+) | -| [Libre 1](../CompatibleCgms/Libre1.md) | xDrip+, Glimp, Tomato or Diabox. Need a transmitter | -| [Eversense](../CompatibleCgms/Eversense.md) | xDrip+ or ESEL/Eversense patched App | -| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | xDrip+ or MM640g + 600SeriesAndroidUploader App | -| [Poctech](../CompatibleCgms/PocTech.md) | Poctech | -| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | -| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | -| Sibionics CGM | [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | +| CGM | Available [BG Sources](../SettingUpAaps/ConfigBuilder.md#bg-source) | +| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | +| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md), DiaKEM app or [Juggluco](../CompatibleCgms/Juggluco.md) | +| [Dexcom ONE+ and Stelo](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) or BYODA | +| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 2/2+](../CompatibleCgms/Libre2.md) | [xDrip+](../CompatibleCgms/xDrip.md) (EU only) or [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 1](../CompatibleCgms/Libre1.md) | [xDrip+](../CompatibleCgms/xDrip.md), Glimp, Tomato or Diabox. Need a transmitter | +| [Eversense](../CompatibleCgms/Eversense.md) | [xDrip+](../CompatibleCgms/xDrip.md) or ESEL/Eversense patched App | +| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | [xDrip+](../CompatibleCgms/xDrip.md) or MM640g + 600SeriesAndroidUploader App | +| [Poctech](../CompatibleCgms/PocTech.md) | Poctech | +| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | +| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | +| Sibionics CGM | [Juggluco](../CompatibleCgms/Juggluco.md) | (GettingStarted-TrustedBGSource)= @@ -36,12 +36,12 @@ In order for **AAPS** to correctly identify them, the app sending **BG** reading Trusted data sources allow **SMB** delivery, all the time. -| Sensor | CGM app | -| --------------------- |:-----------------------------------------:| -| Dexcom G5/G6 | BYODA, xDrip+ (Direct, Native) | -| Dexcom G7 | DiaKEM, xDrip+ (Direct, Native), Juggluco | -| Dexcom ONE/ONE+/Stelo | xDrip+ (Direct, Native) | -| Libre 2/2+ (EU) | xDrip+, Juggluco (with or without xDrip+) | -| Libre 2/2+/3/3+ | Juggluco (with or without xDrip+) | +| Sensor | CGM app | +| --------------------- |:----------------------------------------------------------------------------------------------------------------------:| +| Dexcom G5/G6 | BYODA, xDrip+ (**Direct, Native**) | +| Dexcom G7 | DiaKEM, xDrip+ (**Direct, Native**),
Juggluco (**xDrip broadcast** without xDrip+) | +| Dexcom ONE/ONE+/Stelo | xDrip+ (**Direct, Native**) | +| Libre 2/2+ (EU) | xDrip+ (OOP2 **no calibration**),
Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | +| Libre 2/2+/3/3+ | Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | -Note: xDrip+ Companion app and Followers are not trusted data sources. +**Note: xDrip+ Companion apps and Follower modes (includes 640G/Eversense) are not trusted data sources.** diff --git a/docs/CROWDIN/cs/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/cs/SettingUpAaps/BrowserBuild.md index ca40a2de2ac9..673a609a65c5 100644 --- a/docs/CROWDIN/cs/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/cs/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/cs/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/cs/SettingUpAaps/BuildingAaps.md index c6a134652661..7d75a0752378 100644 --- a/docs/CROWDIN/cs/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/cs/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Specifikace hardware a softwaru pro vytvoření AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. Pokud to uděláte, dokončení procesu sestavení může trvat dlouho, ale jakmile začnete, můžete ho nechat bez dozoru. - -## Pomoc a podpora během procesu sestavení - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Návod k sestavení aplikace AAPS krok za krokem - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Postup instalace Gitu - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Jakákoliv nedávná verze Gitu by měla fungovat, vyberte správnou verzi pro váš systém, ať je to Mac, Windows nebo Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. Pokud instalujete git přes homebrew, není třeba měnit žádné předvolby. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. Bude se jednat o cestu jako "C:\Program Files\Git\cmd\git.exe". - -* V průběhu instalace Gitu jen přijměte všechny výchozí možnosti. - -* Po instalaci, pokud jste si zapomněli poznamenat cestu k instalaci Gitu, najdete program takto: napište "git" do vyhledávacího panelu Windows, klikněte pravým tlačítkem myši na "Git bash", vyberte "open file location" a přejeďte myší na ikonu "Git bash", která pak odhalí, kde je instalována. - -* Před dalším krokem restartujte počítač. - -(Building-APK-install-android-studio)= -### Instalace Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Stažení zdrojového kódu AAPS - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -Nyní řekneme Android Studiu, odkud kód získat: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* Zvolte "Adresa URL úložiště" (výchozí) vlevo (1). -* Ve výchozím nastavení by měl být vybrán verzovací systém „Git“ (2). -* Nyní zkopírujte tuto adresu URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - a vložte ji do textového pole URL (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Nyní spusťte klonování kódu kliknutím na tlačítko "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -Nyní uvidíte obrazovku s informací, že se repozitář klonuje: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Klikněte na "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Pouze pro uživatele Windows: Pokud firewall požaduje oprávnění, udělte mu je: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -Po úspěšném dokončení klonování repozitáře otevře Android Studio naklonovaný projekt. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Sestavení "podepsaného" APK aplikace AAPS - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Vyberte variantu „APK“ namísto předvybrané „Android App Bundle“ a klikněte na „Next“: - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -Na další obrazovce zkontrolujte, že "Module" je nastavený na "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Kliknutím na "Create new..." (2) začnete vytvářet váš "keystore" soubor (úložiště klíčů). - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. Tento soubor je zašifrovaný a chráněný heslem. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - Heslo ke keystore souboru a uloženým klíčům nemusí být složité. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* Výchozí alias (3) pro váš klíč je "key0", ponechte to beze změny. - -* Teď potřebujete heslo k vašemu klíči. Pro zjednodušení, pokud chcete, můžete použít stejné heslo jako k vašemu keystore souboru. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Pro pokračování klikněte na "OK" (8): - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Klikněte na tlačítko "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Nyní můžete sledovat proces sestavování: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Po dokončení sestavení aplikace zobrazí Android Studio informaci "BUILD SUCCESSFUL". Můžete vidět vyskakovací okno na kterém můžete kliknout na text "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -V oznámení klikněte na modrý odkaz "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/cs/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/cs/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..db3995710b7f --- /dev/null +++ b/docs/CROWDIN/cs/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Vyrobte si místo stažení + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. Je legální vytvořit aplikaci pro své vlastní použití, ale nesmíte dát kopii ostatním!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Specifikace hardware a softwaru pro vytvoření AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. Pokud to uděláte, dokončení procesu sestavení může trvat dlouho, ale jakmile začnete, můžete ho nechat bez dozoru. + +## Pomoc a podpora během procesu sestavení + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Návod k sestavení aplikace AAPS krok za krokem + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Postup instalace Gitu + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Jakákoliv nedávná verze Gitu by měla fungovat, vyberte správnou verzi pro váš systém, ať je to Mac, Windows nebo Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. Pokud instalujete git přes homebrew, není třeba měnit žádné předvolby. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. Bude se jednat o cestu jako "C:\Program Files\Git\cmd\git.exe". + +* V průběhu instalace Gitu jen přijměte všechny výchozí možnosti. + +* Po instalaci, pokud jste si zapomněli poznamenat cestu k instalaci Gitu, najdete program takto: napište "git" do vyhledávacího panelu Windows, klikněte pravým tlačítkem myši na "Git bash", vyberte "open file location" a přejeďte myší na ikonu "Git bash", která pak odhalí, kde je instalována. + +* Před dalším krokem restartujte počítač. + +(Building-APK-install-android-studio)= +### Instalace Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Stažení zdrojového kódu AAPS + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +Nyní řekneme Android Studiu, odkud kód získat: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* Zvolte "Adresa URL úložiště" (výchozí) vlevo (1). +* Ve výchozím nastavení by měl být vybrán verzovací systém „Git“ (2). +* Nyní zkopírujte tuto adresu URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + a vložte ji do textového pole URL (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Nyní spusťte klonování kódu kliknutím na tlačítko "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +Nyní uvidíte obrazovku s informací, že se repozitář klonuje: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Klikněte na "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Pouze pro uživatele Windows: Pokud firewall požaduje oprávnění, udělte mu je: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +Po úspěšném dokončení klonování repozitáře otevře Android Studio naklonovaný projekt. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Sestavení "podepsaného" APK aplikace AAPS + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Vyberte variantu „APK“ namísto předvybrané „Android App Bundle“ a klikněte na „Next“: + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +Na další obrazovce zkontrolujte, že "Module" je nastavený na "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Kliknutím na "Create new..." (2) začnete vytvářet váš "keystore" soubor (úložiště klíčů). + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. Tento soubor je zašifrovaný a chráněný heslem. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + Heslo ke keystore souboru a uloženým klíčům nemusí být složité. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* Výchozí alias (3) pro váš klíč je "key0", ponechte to beze změny. + +* Teď potřebujete heslo k vašemu klíči. Pro zjednodušení, pokud chcete, můžete použít stejné heslo jako k vašemu keystore souboru. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Pro pokračování klikněte na "OK" (8): + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Klikněte na tlačítko "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Nyní můžete sledovat proces sestavování: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Po dokončení sestavení aplikace zobrazí Android Studio informaci "BUILD SUCCESSFUL". Můžete vidět vyskakovací okno na kterém můžete kliknout na text "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +V oznámení klikněte na modrý odkaz "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/cs/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/de/Getting-Started/CompatiblesCgms.md b/docs/CROWDIN/de/Getting-Started/CompatiblesCgms.md index 7e1fd3c4e532..c3c43c6b3c7e 100644 --- a/docs/CROWDIN/de/Getting-Started/CompatiblesCgms.md +++ b/docs/CROWDIN/de/Getting-Started/CompatiblesCgms.md @@ -9,22 +9,22 @@ Dieser Abschnitt gibt einen kurzen Überblick über alle mit **AAPS** kompatible * [xDrip+Einstellungen](../CompatibleCgms/xDrip.md) * [Nightscout als BZ-Quelle](../CompatibleCgms/CgmNightscoutUpload.md): Auch wenn Nightscout als BZ-Quelle für die Insulinabgabe im Closed-Loop genutzt werden kann, **wird diese Methode nicht empfohlen**, da sie zwingend auf eine stabile (mobile) Datenverbindung oder eine WLAN-Verbindung angewiesen ist. Das bedeutet, dass Deine **CGM**-Daten nur dann von **AAPS** empfangen werden, wenn Du eine Online-Verbindung zu Deiner Nightscout-Website hast. Für ein zuverlässigeres Setup ist der Einsatz eines CGM mit lokaler Übertragung vom Receiver an **AAPS** die bessere Option. -| CGM | Verfügbare [BZ-Quellen](../SettingUpAaps/ConfigBuilder.md#bg-source) | -| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | -| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | xDrip+, DiaKEM App oder [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | -| [Dexcom ONE+ und Stelo](../CompatibleCgms/DexcomG7.md) | xDrip+ | -| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | xDrip+ oder BYODA | -| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | xDrip+ | -| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | xDrip+ | -| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](https://www.juggluco.nl/Juggluco/libre3/) (mit oder ohne xDrip+) | -| [Libre 2/2+](../CompatibleCgms/Libre2.md) | xDrip+ (nur EU) oder [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) (mit oder ohne xDrip+) | -| [Libre 1](../CompatibleCgms/Libre1.md) | xDrip+, Glimp, Tomato oder Diabox. Transmitter erforderlich | -| [Eversense](../CompatibleCgms/Eversense.md) | xDrip+ oder ESEL/Eversense patched App | -| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | xDrip+ oder MM640g + 600SeriesAndroidUploader-App | -| [PocTech](../CompatibleCgms/PocTech.md) | PocTech | -| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | -| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | -| Sibionics CGM | [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | +| CGM | Verfügbare [BZ-Quellen](../SettingUpAaps/ConfigBuilder.md#bg-source) | +| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | +| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md), DiaKEM app or [Juggluco](../CompatibleCgms/Juggluco.md) | +| [Dexcom ONE+ und Stelo](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) or BYODA | +| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 2/2+](../CompatibleCgms/Libre2.md) | [xDrip+](../CompatibleCgms/xDrip.md) (EU only) or [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 1](../CompatibleCgms/Libre1.md) | [xDrip+](../CompatibleCgms/xDrip.md), Glimp, Tomato or Diabox. Transmitter erforderlich | +| [Eversense](../CompatibleCgms/Eversense.md) | [xDrip+](../CompatibleCgms/xDrip.md) or ESEL/Eversense patched App | +| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | [xDrip+](../CompatibleCgms/xDrip.md) or MM640g + 600SeriesAndroidUploader App | +| [PocTech](../CompatibleCgms/PocTech.md) | PocTech | +| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | +| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | +| Sibionics CGM | [Juggluco](../CompatibleCgms/Juggluco.md) | (GettingStarted-TrustedBGSource)= @@ -36,12 +36,12 @@ Damit **AAPS** diese korrekt identifizieren kann, muss die App, die die **Glukos Mit einer vertrauenswürdigen Datenquelle ist es durchgehend möglich **SMB**s abzugeben. -| Sensor | CGM-App | -| --------------------- |:----------------------------------------:| -| Dexcom G5/G6 | BYODA, xDrip+ (Direkt, Nativ) | -| Dexcom G7 | DiaKEM, xDrip+ (Direkt, Nativ), Juggluco | -| Dexcom ONE/ONE+/Stelo | xDrip+ (Direkt, Nativ) | -| Libre 2/2+ (EU) | xDrip+, Juggluco (mit oder ohne xDrip+) | -| Libre 2/2+/3/3+ | Juggluco (mit oder ohne xDrip+) | +| Sensor | CGM-App | +| --------------------- |:----------------------------------------------------------------------------------------------------------------------:| +| Dexcom G5/G6 | BYODA, xDrip+ (**Direct, Native**) | +| Dexcom G7 | DiaKEM, xDrip+ (**Direct, Native**),
Juggluco (**xDrip broadcast** without xDrip+) | +| Dexcom ONE/ONE+/Stelo | xDrip+ (**Direct, Native**) | +| Libre 2/2+ (EU) | xDrip+ (OOP2 **no calibration**),
Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | +| Libre 2/2+/3/3+ | Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | -Hinweis: xDrip+ Companion App und Followers sind keine vertrauenswürdige Datenquellen. +**Note: xDrip+ Companion apps and Follower modes (includes 640G/Eversense) are not trusted data sources.** diff --git a/docs/CROWDIN/de/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/de/SettingUpAaps/BrowserBuild.md index c6c86f6ea75d..e13ec9ed4e64 100644 --- a/docs/CROWDIN/de/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/de/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/de/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/de/SettingUpAaps/BuildingAaps.md index 8db95ad848b5..65c077f7be97 100644 --- a/docs/CROWDIN/de/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/de/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ Zu den Details schaue bitte auf die [FAQ-Seite](../UsefulLinks/FAQ.md). +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer- und Software-Spezifikationen für das "Bauen" von AAPS +### Build with a browser -* Um die APK zu erstellen ist möglicherweise eine bestimmte **[Android Studio](https://developer.android.com/studio/)**-Version erforderlich. Siehe Tabelle unten: +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS-Version | Empfohlene
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ------------------------------------------------------- | -------------------------------------------------------- | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | bis zu Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | bis zu Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | bis zu Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -Die „empfohlene Version“ enthält im Paket bereits die entsprechende JVM-Version. Die empfohlene Version ist gleichzeitig auch die Mindestversion, die Du zum Erstellen von **AAPS** nutzen kannst. Mit einer älteren Version als der, die unter „empfohlen“ aufgeführt ist, wirst Du **NICHT** in der Lage sein, AAPS zu erstellen. Solltest Du eine andere Version verwenden, kann es aufgrund der JVM-Version zu Problemen kommen. Schaue auf den Seiten zur [Fehlerbehebung für Android Studio](#troubleshooting_androidstudio-uncommitted-changes) nach, um diese Probleme zu lösen. Wenn Deine aktuelle Android Studio Version nicht in der Tabelle aufgeführt ist, musst Du sie zuerst aktualisieren. +---- -Die Gradle-Version ist mit dem Quellcode verknüpft. Wenn Du den Quellcode herunterlädst oder aktualisierst, bekommst Du automatisch die richtige Gradle-Version. Das wird hier rein zu Deiner Information erwähnt. Du brauchst nichts machen. - -* Android Studio unterstützt keine [Windows 32-Bit-Systeme](#troubleshooting_androidstudio-unable-to-start-daemon-process). Bitte beachte, dass sowohl eine **64-Bit-CPU als auch ein 64-Bit-Betriebssystem zwingend erforderlich sind**. Wenn Dein System diese Bedingung nicht erfüllt, musst Du die entsprechende Hardware, Software oder das ganze System ersetzen. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Betriebssystem (nur 64 Bit)Windows 8 oder höherMac OS 10.14 oder höherJedes Linux unterstützt Gnome, KDE oder Unity DE;  GNU C Library 2.31 oder höher

CPU (nur 64 Bit)

x86_64-CPU-Architektur Intel Core der 2. Generation oder neuer oder AMD-CPU mit Unterstützung für
Windows Hypervisor-Framework
ARM-basierte Chips oder Intel Core der 2. Generation oder neuer mit Unterstützung für
Hypervisor-Framework
x86_64 CPU Architektur; Intel Core der zweiten Generation oder neuer, alternativ AMD Prozessor mit Unterstützung für AMD Virtualization (AMD-V) und SSSE3

RAM

16GB or more

Festplatte

Mind. 30 GB freier Speicherplatz. SSD wird empfohlen.

Bildschirmauflösung

min. 1280 x 800

Internet

Breitband

- -**Es wird dringend empfohlen eine SSD (Solid State Disk) anstelle einer HDD (Hard Disk Drive) zu verwenden, da damit weniger Zeit benötigt wird, um die AAPS-apk-Datei zu erstellen**. Es ist aber auch möglich eine Festplatte (HDD) zum Erstellen der **AAPS**-apk-Datei zu nutzen. Wenn du dies tust, kann es lange dauern, bis der Bau der App abgeschlossen ist, aber sobald er begonnen hat, kann man ihn unbeaufsichtigt lassen. - -## Hilfe und Unterstützung während des Erstellungsprozesses - -Solltest Du Probleme beim Erstellen der **AAPS**-App haben, kannst Du im Abschnitt [**Fehlerbehebung für Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) einiges an Hilfestellung finden. - -Wenn Du den Eindruck hast, dass in der Anleitung Schritte falsch, fehlend oder missverständlich sind, oder Du trotzdem noch Probleme hast, wende Dich über [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) oder [Discord](https://discord.gg/4fQUWHZ4Mw) an andere **AAPS**-Nutzende. Wenn Du selbst etwas ändern möchtest (z.B. Screenshots aktualisieren _etc_), erstelle einen entsprechenden [Pull-Request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Schritt-für-Schritt Anleitung zum Erstellen der AAPS-App - -```{admonition} WARNING -:class: warnung -Wenn Du AAPS in der Vergangenheit bereits einmal erstellt hast, musst Du nicht alle der folgenden Schritte noch einmal durchlaufen. -Bitte springe direkt zur [Update-Anleitung](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -Diese Anleitung enthält _beispielhafte_ Screenshots zum Erstellen der **AAPS**-APK-Datei. Weil **Android Studio** - die Software, die wir zum Erstellen der **AAPS**-APK verwenden - regelmäßig aktualisiert wird, sind diese Screenshots vielleicht nicht mit Deiner Installation identisch. Sie sollten trotzdem ausreichen durch den Prozess zu kommen. - -Da **Android Studio** auf Windows, Mac OS X und Linux Plattformen läuft, kann es auch kleinere Unterschiede in den Schritten zwischen den verschiedenen Plattformen geben. - -(install-git-if-you-dont-have-it)= -### Git installieren - -```{admonition} Why Git? -:class: dropdown - -Git ist ein „_Versioning Control System_“ (VCS). -Git ist ein Programm, das es Dir erlaubt Änderungen im Code zu verfolgen und mit anderen zusammenzuarbeiten. Du wirst Git dazu nutzen, eine Kopie des **AAPS** Quellcodes von der Github Webseite auf Deinem lokalen Computer zu erstellen. Anschließend wirst Du Git auf Deinem Computer verwenden, um die **AAPS** Anwendung (apk) zu erstellen. -``` - -(BuildingAaps-steps-for-installing-git)= -#### Schritte zur Installation von Git - -1. Überprüfe, ob Du **Git** nicht bereits installiert hast. Du überprüfst es, indem Du „git“ in die Windows-Suchleiste eingibst. Wenn **„Git bash“** oder eine andere Form von Git gefunden wird, ist es bereits installiert und Du kannst direkt zur [Installation von Android Studio](#install-android-studio) weitergehen: - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. Sollte Git noch nicht installiert sein, lade die neueste Version für Dein System aus dem „Download“-Bereich [**hier**](https://git-scm.com/downloads) herunter und installiere sie. Jede aktuelle Git-Version sollte funktionieren, wähle die richtige Version nach deinem System, entweder Mac, Windows oder Linux. - -**Hinweis für Mac-Benutzer:** Die Git-Webseite schlägt vor, ein zusätzliches Programm namens "Homebrew" zu installieren, um die Installation zu unterstützen. Wenn Du git über homebrew installierst, musst Du keine Einstellungen ändern. - -(Make_a_note_of_Git_path)= - -* Bei der Installation wirst Du nach einer „destination location“ (einem Zielordner) gefragt werden. Notiere Dir bitte _den Ort_ an dem Git installiert wird (den **Installationspfad**). Du wirst dort im nächsten Schritt etwas überprüfen müssen. Der Installationspfad wird in in etwa so aussehen: "C:\Program Files\Git\cmd\git.exe" - -* Akzeptptiere in den verschiedenen Schritten der Git-Installation die voreingestellten Optionen. - -* Falls Du nach der Installtion vergessen hast (oder Du Dir keinen Notiz gemacht hast), in welchem Verzeichnis Git installiert wurde, kannst Du es auch auf folgendem Weg herausfinden: Gib in der Windows-Suchleiste unten "git"ein, klicke mit der rechten Maustaste auf "Git Bash", "Dateispeicherort öffnen". Damit öffnet sich der Installationspfad. - -* Starte vor dem nächsten Schritt Deinen Computer bitte neu. - -(Building-APK-install-android-studio)= -### Android Studio installieren - -- **Du musst durchgängig online sein, da Android Studio verschiedene Updates herunterladen wird** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio ist ein Programm, dass auf Deinem Computer läuft. Es erlaubt Dir Quellcode, mit Hilfe von Git, aus dem Internet herunterzuladen und dann daraus Smartphone- (und Smartwatch)-Apps zu erstellen. Die aktuell auf Deinem Smartphone laufende Loop-Version von **AAPS** kannst Du durch das Erstellen einer neuen oder aktualisierten Version auf Deinem PC mit Android Studio nicht beschädigen oder gar zerstören. Es sind zwei voneinander völlig unabhängige Prozesse. -``` - -Einer der wichtigsten Punkte bei der Installation von Android Studio ist: **Geduldig sein!** Während der Installation und Einrichtung lädt Android Studio sehr viele Daten nach und das braucht seine Zeit. - -```{admonition} Different UI -:class: warning -Wichtige Anmerkung: Android Studio hat seine Benutzeroberfläche (UI) seit den letzten Versionen geändert. Diese Anleitung zeigt Dir die Schritte in dem *neuen UI* „Ladybug“. Nutzt Du noch eine ältere Version der Benutzeroberfläche, dann solltest Du Android Studio als Erstes auf das neue Design umstellen. Wie das funktioniert ist [hier beschrieben](NewUI). -``` - -Die Android-Studio-Version ist sehr wichtig. Schaue Dir die [Anleitung oben](#Building-APK-recommended-specification-of-computer-for-building-apk-file) an, um die richtige Android Studio Version auszuwählen. - -Lade Dir die [aktuelle Version des Android Studio](https://developer.android.com/studio) oder eine ältere Version aus dem [**Archiv**](https://developer.android.com/studio/archive) herunter und akzeptiere dabei die Download-Vereinbarungen. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Sobald der Download abgeschlossen ist, starte die heruntergeladene Anwendung, um sie auf Deinem Computer zu installieren. Eventuell musst Du einige Windows-Warnungen zu heruntergeladenen Apps akzeptieren/bestätigen! - -Installiere Android Studio, indem Du, wie in den folgenden Screenshots gezeigt, auf "Weiter" (Next) klickst. Du musst **keine** Einstellungen ändern! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -Wenn Du Festplattenplatz sparen möchtest, kannst Du Option Android Virtual Device deaktivieren: Diese wird nicht zum Erstellen von **AAPS** genutzt. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Klicke nun auf "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Sobald die Installation abgeschlossen ist, klicke auf "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -Im letzten Schritt klicke auf "Finished" (dt. Fertig), um Android Studio erstmalig zu starten. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -Du wirst danach gefragt, ob Du bei der Verbesserung des Android Studios helfen möchtest. Wähle die Option, die Dir am meisten zusagt. Das hat keinen Einfluss auf die Folgeschritte. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -Der Willkommensbildschirm begrüßt Dich zur Installation des Android Studios. Klicke "Next" (dt. Weiter). - -![Willkommen](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Wähle "Standard" als Installationstyp aus. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Überprüfe die Einstellungen, indem Du erneut auf "Next" (dt. Weiter) klickst. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Jetzt musst Du die Lizenzvereinbarungen akzeptieren. Du hast auf der linken Seite zwei Abschnitte (1 + 3) die Du einen nach dem anderen auswählst und mit "Accept" (2 + 4) auf der rechten Seite bestätigst. - -Danach kannst Du auf "Finish" (5) klicken. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Einige der Android-Pakete werden nun heruntergeladen und installiert. Habe Geduld und warte ab. - -Nach dem Abschluss siehst Du den folgenden Bildschirm, auf dem Du erneut "Finish" klickst. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -Du wirst jetzt Android Studios Willkommens-Bildschirm sehen. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### AAPS-Code herunterladen - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -Beim ersten **AAPS**-Download wird Android Studio sich übers Internet mit der Github-Webseite verbinden und von dort den **AAPS**-Quellcode herunterladen. Das sollte etwa eine Minute dauern. - -Android Studio wird dann mit **Gradle** (einem Entwicklungswerkzeug für Android Studio) andere erforderliche Komponenten identifizieren, die zusätzlich installiert werden müssen. -``` - -Überprüfe auf dem Begrüßungsbildschirm von Android Studio, ob „**Projects**“ (1) auf der linken Seite hervorgehoben ist. - -Klick dann rechts auf „**Clone Repository**“ (2): - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -Wir werden Android Studio nun sagen, wo es den Code herunterladen soll: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository-URL" (voreingestellt) sollte auf der linken Seite ausgewählt werden (1). -* "Git" (standardmäßig) sollte als Version Control ausgewählt werden (2). -* Kopiere nun diese URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - und füge sie in das URL-Textfeld (3) ein. - -* Prüfe, ob das (Standard)-Verzeichnis zum Speichern des geklonten Codes nicht bereits auf Deinem Computer existiert (4). You can change it to some directory, but please remember where you stored it! -* Klicke nun auf "Clone" (5). - -```{admonition} INFORMATION -:class: information -Notiere Dir das Verzeichnis. Das ist die Stelle, an der Dein Quellcode gespeichert ist! -``` - -Du wirst jetzt einen Screen sehen, der Dir sagt, dass das Repository geklont wurde: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -Irgendwann wird sich Android Studio schließen und neu starten. Du wirst gefragt, ob Du dem Projekt vertrauen willst. Klicke auf "Trust project": - - ![Projekt vertrauen](../images/Building-the-App/035_TrustProject.png) - - -Nur für Windows-Benutzer: Wenn Deine Firewall um Erlaubnis bittet, lasse den Zugriff zu: - - ![Java-Firewall-Berechtigung](../images/AndroidStudio361_18.png) - -Nachdem das Projektarchiv erfolgreich geklont wurde, wird Android Studio das geklonte Projekt öffnen. - -(NewUI)= -```{admonition} New UI -:class: Informationen -Android Studios Benutzeroberfläche wurde kürzlich geändert. Neue Installationen des Android Studio verwenden standardmäßig die neue Benutzeroberfläche! - -Nur wenn Dein Android Studio anders aussieht, musst Du möglicherweise auf das neue UI umschalten: -Klicke oben links auf das Hamburger-Menü und wähle dann **Settings** (oder bei Apple-Rechnern auf **Preferences**). -Im Menü **Appearance & Behaviour**, gehe auf **New UI** und aktiviere dort **Enable new UI**. Starte Android Studio danach neu, damit die Änderungen aktiv werden. - -Wenn Du die Option **New UI** nicht findest, mache Dir keine Sorgen: Du nutzt sie dann schon! -``` - - -Wenn Android Studio wieder gestartet ist, warte ab (das kann einige Minuten dauern), und vor allem, anders als es das Popup vorschlägt, **aktualisiere** das Projekt <0>nicht. - -Android Studio startet automatisch einen "Gradle project sync", der einige Minuten dauert. Du siehst, dass es (noch) läuft: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio wird unter Umständen vorschlagen das Gradle-System zu aktualisieren. **Mache niemals ein Gradle-Update!** Dies wird sonst zu Folgeproblemen führen. -``` - -Nur für Windows-Rechner: Es kann sein, dass Du Benachrichtigungen darüber, dass Windows Defender läuft, erhältst: Klicke auf **Automatically** und bestätige es. Der Build-Prozess wird damit schneller laufen! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -Du kannst den Gradle Sync laufen lassen während Du Dich schon um die folgenden Schritte kümmerst. - -(Building-APK-set-git-path-in-preferences)= -### Pfad zu Git in den Einstellungen von Android Studio festlegen - -Sage Android Studio nun, wo Git, das Du [vorher](#install-git-if-you-dont-have-it) installiert hast, zu finden ist. - -* Nur für Windows-Rechner: Starte Deinen Rechner nach der [Git-Installation](#install-git-if-you-dont-have-it) auf jeden Fall neu. Falls nicht, starte jetzt neu und öffne Android Studio dann erneut - -Öffne in der linken oberen Ecke des **Android Studio** das Hamburger-Menü und navigiere zu **File** > **Settings** (Windows) oder **Android Studio** > **Preferences** (Mac). Damit öffnet sich das folgende Fenster. Klicke auf das Dropdown-Menü **Version Control** (1), um es aufzuklappen und wähle **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Klicke auf den Button „Test“ (1), um zu prüfen, ob **Android Studio** den **Pfad zur ausführbaren Datei git.exe** automatisch ermitteln kann: - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -Wenn die automatische Erkennung funktioniert, wird die **Git**-Version in der Nähe des Pfads angezeigt. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -Wenn **git.exe** nicht automatisch gefunden wird oder wenn Du nach dem Klicken auf „Test“ eine Fehlermeldung erhältst (1), kannst Du entweder -* den Pfad, den Du [vorher](#BuildingAaps-steps-for-installing-git) gespeichert hast, manuell eingeben oder -* auf das Ordnersymbol (1) klicken und manuell zum Verzeichnis, in dem **git.exe** [vorher](#BuildingAaps-steps-for-installing-git) installiert wurde, navigieren. -* Überprüfe die Einstellungen mit dem **Test**-Button! - - ![Git wurde nicht gefunden](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Signierte AAPS APK erstellen - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android fordert, dass jede App _signiert_ wird, um sicherzustellen, dass sie später nur aus derselben vertrauenswürdigen Quelle, aus der auch die orginale App stammt, aktualisiert werden kann. Für weitere Informationen zu diesem Thema folge [diesem Link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -Für unsere Zwecke bedeutet das nur, dass wir eine Signatur- oder "Keystore"-Datei generieren und diese beim Erstellen der **AAPS**-App verwenden. -``` - - -**Wichtig: Achte darauf, dass der Gradle Sync erfolgreich abgeschlossen ist, bevor Du weiter machst!** - - -Klicke oben links auf das Hamburger-Menü, um die Menüleiste zu öffnen. Wähle **Build** (1) und dann **Generate Signed App Bundle / APK** (2) aus - -![Apk erstellen](../images/Building-the-App/040_GenerateSignedAPK.png) - -Wähle "APK" anstelle von "Android App Bundle" aus und klicke auf "Next": - -![APK statt Bundle](../images/Building-the-App/041_APK.png) - -In der nächsten Ansicht muss "Modul" auf "AAPS.app" (1) eingestellt sein/werden. - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -Wenn Du die APK für Deine Smartwatch erstellen möchtest, musst Du jetzt AAPS.wear auswählen! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Klicke auf "Create new..." (2), um mit der Erzeugung Deines Keystore zu beginnen. - -```{admonition} INFORMATION! -:class: information -Der Keystore muss nur einmal erstellt werden. -Wenn Du AAPS schon einmal erstellt (gebaut) hast, erstelle KEINEN neuen Keystore, sondern wähle den bestehenden und gib dessen Passwörter ein! -``` - -**_Hinweis:_** Der Keystore ist eine Datei, in der die Informationen zum Signieren der App gespeichert sind. Die Datei ist verschlüsselt und passwortgeschützt. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Klicke auf das Ordner-Symbol, um den Pfad Deines Keystore auf Deinem Computer auszuwählen. - - Nimm **nicht** das Verzeichnis, in dem Du Deinen Quellcode gespeichert hast, sondern ein Verzeichnis, das Du auch auf einen neuen Computer übertragen würdest. - -```{admonition} WARNING! -:class: warning -Schreib Dir auf, wo Dein Keystore gespeichert wird. Du wirst es für Dein nächstes AndroidAPS-Update brauchen! -``` - -* Wähle jetzt ein einfaches Passwort (und notiere es Dir), gib es in das Passwortfeld (2) ein und bestätige es (2). - - Die Passwörter für Keystore und Key müssen nicht sehr anspruchsvoll sein. Solltest Du Dein Passwort verlieren, lies dazu bitte den Abschnitt[Verlorener Keystore](#troubleshooting_androidstudio-lost-keystore). - -* Der Standard-Alias (3) für den Key lautet "key0". Lass ihn unverändert. - -* Jetzt brauchst Du ein Passwort für Deinen Key. Wenn Du es einfach halten willst, nimmst Du das selbe Passwort, das Du auch für Deinen Keystore oben verwendet hast. Gib ein Passwort (4) ein und bestätige es. - -```{admonition} WARNING! -:class: warning -Notiere Dir diese Passwörter! Du wirst sie für Dein nächstes AAPS-Update brauchen! -``` - -* Standardmäßig sind sie 25 Jahre gültig. Lass es unverändert. - -* Gib Deinen Vor- und Nachnamen ein (5). Es müssen keine weiteren Informationen hinzugefügt werden, aber Du kannst es dennoch tun, wenn Du möchtest (6-7). - -* Drücke auf "OK" (8) um fortzufahren: - - -Auf der Seite **Generate signed App Bundle or APK** wird jetzt der Pfad zu Deinem Keystore angezeigt. Gib jetzt erneut das Keystore-Password (1) und das Key-Password (2) ein, und hake die Box "remember password" an (3), sodass Du es beim nächsten Erstellen der APK (z.B. bei der nächsten AAPS-Aktualisierung) nicht noch einmal eingeben brauchst. Klicke auf "Next" (4): - -![Passwörter speichern](../images/Building-the-App/044_RememberPwd.png) - - -Auf der nächsten Seite wähle die Build-Variante "fullRelease" (2) aus und klicke auf "Create" (3). Merke Dir das Verzeichnis, das in (1) angezeigt wird, da dort später die Build-APK-Datei zu finden sein wird! - - ![Build-Variante auswählen](../images/Building-the-App/045_BuildPath.png) - -Android Studio wird jetzt die **AAPS**-APK erstellen. Es wird unten rechts "Gradle Build running" (2) angezeigt. Der Vorgang dauert je nach Computer und Internetverbindung einige Zeit, **Gedulde Dich!** Wenn Du den Fortschritt des „Builds“ mitverfolgen möchtest, klicke auf den kleinen Hammer „Build“ (1) unten im Android Studio: - -![Gradle läuft](../images/Building-the-App/046_BuildRunning.png) - -Jetzt kannst Du den Build-Fortschritt verfolgen: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Sobald der Build abgeschlossen ist, wird Android Studio "BUILD SUCCESSFUL" anzeigen. Möglicherweise erscheint eine Popup-Benachrichtigung auf der Du "locate" anklicken kannst. Wenn Du diesen Moment verpasst haben solltest, klicke ganz unten auf dem Bildschirm auf das Benachrichtigungs-Symbol (1) und dann auf **locate** (2), um die Benachrichtigungen anzeigen zu lassen: - -![Build abgeschlossen](../images/Building-the-App/049_ReopenNotification.png) - -**_Wenn der „Build“ fehlgeschlagen ist, lies bitte den Abschnitt [Fehlerbehebung für Android Studio](../GettingHelp/TroubleshootingAndroidStudio)._** - -Klicke im Benachrichtigungsfeld auf den blauen Link "locate": - -![Build finden](../images/Building-the-App/048_BuildFinished.png) Der Dateimanager öffnet sich und zeigt Dir die gerade von Dir erzeugte APK-Datei an. - - ![Datei-Speicherort apk](../images/Building-the-App/050_LocateAPK.png) - -Glückwunsch! Du hast die **AAPS**-APK-Datei erstellt. Du wirst diese Datei im nächsten Abschnitt der Dokumentation auf Dein Smartphone übertragen. - -```{tip} -Wenn Du darüber nachdenkst, zukünftig eine Android Wear-Smartwatch zu nutzen, ist jetzt genau der richtige Zeitpunkt die AAPS Wear-APK zu erstellen, um so sicherzustellen, dass diese mit der AAPS-APK zusammenpasst. -``` - -Gehe jetzt zum nächsten Schritt [**AAPS** auf Dein Smartphone übertragen und installieren](../SettingUpAaps/TransferringAndInstallingAaps.md) weiter. +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/de/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/de/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..0fbe456f1e36 --- /dev/null +++ b/docs/CROWDIN/de/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Kein Download möglich - APK muss selbst erstellt werden + +**Die AAPS-App (eine apk-Datei) ist aufgrund der Vorschriften rund um medizinische Geräte nicht zum Download verfügbar. Es ist zulässig, die App für den eigenen Gebrauch zu erstellen, aber du darfst keine Kopie an andere weitergeben!** + +Zu den Details schaue bitte auf die [FAQ-Seite](../UsefulLinks/FAQ.md). + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer- und Software-Spezifikationen für das "Bauen" von AAPS + +* Um die APK zu erstellen ist möglicherweise eine bestimmte **[Android Studio](https://developer.android.com/studio/)**-Version erforderlich. Siehe Tabelle unten: + +| AAPS-Version | Empfohlene
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ------------------------------------------------------- | -------------------------------------------------------- | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | bis zu Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | bis zu Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | bis zu Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +Die „empfohlene Version“ enthält im Paket bereits die entsprechende JVM-Version. Die empfohlene Version ist gleichzeitig auch die Mindestversion, die Du zum Erstellen von **AAPS** nutzen kannst. Mit einer älteren Version als der, die unter „empfohlen“ aufgeführt ist, wirst Du **NICHT** in der Lage sein, AAPS zu erstellen. Solltest Du eine andere Version verwenden, kann es aufgrund der JVM-Version zu Problemen kommen. Schaue auf den Seiten zur [Fehlerbehebung für Android Studio](#troubleshooting_androidstudio-uncommitted-changes) nach, um diese Probleme zu lösen. Wenn Deine aktuelle Android Studio Version nicht in der Tabelle aufgeführt ist, musst Du sie zuerst aktualisieren. + +Die Gradle-Version ist mit dem Quellcode verknüpft. Wenn Du den Quellcode herunterlädst oder aktualisierst, bekommst Du automatisch die richtige Gradle-Version. Das wird hier rein zu Deiner Information erwähnt. Du brauchst nichts machen. + +* Android Studio unterstützt keine [Windows 32-Bit-Systeme](#troubleshooting_androidstudio-unable-to-start-daemon-process). Bitte beachte, dass sowohl eine **64-Bit-CPU als auch ein 64-Bit-Betriebssystem zwingend erforderlich sind**. Wenn Dein System diese Bedingung nicht erfüllt, musst Du die entsprechende Hardware, Software oder das ganze System ersetzen. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Betriebssystem (nur 64 Bit)Windows 8 oder höherMac OS 10.14 oder höherJedes Linux unterstützt Gnome, KDE oder Unity DE;  GNU C Library 2.31 oder höher

CPU (nur 64 Bit)

x86_64-CPU-Architektur Intel Core der 2. Generation oder neuer oder AMD-CPU mit Unterstützung für
Windows Hypervisor-Framework
ARM-basierte Chips oder Intel Core der 2. Generation oder neuer mit Unterstützung für
Hypervisor-Framework
x86_64 CPU Architektur; Intel Core der zweiten Generation oder neuer, alternativ AMD Prozessor mit Unterstützung für AMD Virtualization (AMD-V) und SSSE3

RAM

16GB or more

Festplatte

Mind. 30 GB freier Speicherplatz. SSD wird empfohlen.

Bildschirmauflösung

min. 1280 x 800

Internet

Breitband

+ +**Es wird dringend empfohlen eine SSD (Solid State Disk) anstelle einer HDD (Hard Disk Drive) zu verwenden, da damit weniger Zeit benötigt wird, um die AAPS-apk-Datei zu erstellen**. Es ist aber auch möglich eine Festplatte (HDD) zum Erstellen der **AAPS**-apk-Datei zu nutzen. Wenn du dies tust, kann es lange dauern, bis der Bau der App abgeschlossen ist, aber sobald er begonnen hat, kann man ihn unbeaufsichtigt lassen. + +## Hilfe und Unterstützung während des Erstellungsprozesses + +Solltest Du Probleme beim Erstellen der **AAPS**-App haben, kannst Du im Abschnitt [**Fehlerbehebung für Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) einiges an Hilfestellung finden. + +Wenn Du den Eindruck hast, dass in der Anleitung Schritte falsch, fehlend oder missverständlich sind, oder Du trotzdem noch Probleme hast, wende Dich über [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) oder [Discord](https://discord.gg/4fQUWHZ4Mw) an andere **AAPS**-Nutzende. Wenn Du selbst etwas ändern möchtest (z.B. Screenshots aktualisieren _etc_), erstelle einen entsprechenden [Pull-Request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Schritt-für-Schritt Anleitung zum Erstellen der AAPS-App + +```{admonition} WARNING +:class: warnung +Wenn Du AAPS in der Vergangenheit bereits einmal erstellt hast, musst Du nicht alle der folgenden Schritte noch einmal durchlaufen. +Bitte springe direkt zur [Update-Anleitung](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +Diese Anleitung enthält _beispielhafte_ Screenshots zum Erstellen der **AAPS**-APK-Datei. Weil **Android Studio** - die Software, die wir zum Erstellen der **AAPS**-APK verwenden - regelmäßig aktualisiert wird, sind diese Screenshots vielleicht nicht mit Deiner Installation identisch. Sie sollten trotzdem ausreichen durch den Prozess zu kommen. + +Da **Android Studio** auf Windows, Mac OS X und Linux Plattformen läuft, kann es auch kleinere Unterschiede in den Schritten zwischen den verschiedenen Plattformen geben. + +(install-git-if-you-dont-have-it)= +### Git installieren + +```{admonition} Why Git? +:class: dropdown + +Git ist ein „_Versioning Control System_“ (VCS). +Git ist ein Programm, das es Dir erlaubt Änderungen im Code zu verfolgen und mit anderen zusammenzuarbeiten. Du wirst Git dazu nutzen, eine Kopie des **AAPS** Quellcodes von der Github Webseite auf Deinem lokalen Computer zu erstellen. Anschließend wirst Du Git auf Deinem Computer verwenden, um die **AAPS** Anwendung (apk) zu erstellen. +``` + +(BuildingAaps-steps-for-installing-git)= +#### Schritte zur Installation von Git + +1. Überprüfe, ob Du **Git** nicht bereits installiert hast. Du überprüfst es, indem Du „git“ in die Windows-Suchleiste eingibst. Wenn **„Git bash“** oder eine andere Form von Git gefunden wird, ist es bereits installiert und Du kannst direkt zur [Installation von Android Studio](#install-android-studio) weitergehen: + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. Sollte Git noch nicht installiert sein, lade die neueste Version für Dein System aus dem „Download“-Bereich [**hier**](https://git-scm.com/downloads) herunter und installiere sie. Jede aktuelle Git-Version sollte funktionieren, wähle die richtige Version nach deinem System, entweder Mac, Windows oder Linux. + +**Hinweis für Mac-Benutzer:** Die Git-Webseite schlägt vor, ein zusätzliches Programm namens "Homebrew" zu installieren, um die Installation zu unterstützen. Wenn Du git über homebrew installierst, musst Du keine Einstellungen ändern. + +(Make_a_note_of_Git_path)= + +* Bei der Installation wirst Du nach einer „destination location“ (einem Zielordner) gefragt werden. Notiere Dir bitte _den Ort_ an dem Git installiert wird (den **Installationspfad**). Du wirst dort im nächsten Schritt etwas überprüfen müssen. Der Installationspfad wird in in etwa so aussehen: "C:\Program Files\Git\cmd\git.exe" + +* Akzeptptiere in den verschiedenen Schritten der Git-Installation die voreingestellten Optionen. + +* Falls Du nach der Installtion vergessen hast (oder Du Dir keinen Notiz gemacht hast), in welchem Verzeichnis Git installiert wurde, kannst Du es auch auf folgendem Weg herausfinden: Gib in der Windows-Suchleiste unten "git"ein, klicke mit der rechten Maustaste auf "Git Bash", "Dateispeicherort öffnen". Damit öffnet sich der Installationspfad. + +* Starte vor dem nächsten Schritt Deinen Computer bitte neu. + +(Building-APK-install-android-studio)= +### Android Studio installieren + +- **Du musst durchgängig online sein, da Android Studio verschiedene Updates herunterladen wird** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio ist ein Programm, dass auf Deinem Computer läuft. Es erlaubt Dir Quellcode, mit Hilfe von Git, aus dem Internet herunterzuladen und dann daraus Smartphone- (und Smartwatch)-Apps zu erstellen. Die aktuell auf Deinem Smartphone laufende Loop-Version von **AAPS** kannst Du durch das Erstellen einer neuen oder aktualisierten Version auf Deinem PC mit Android Studio nicht beschädigen oder gar zerstören. Es sind zwei voneinander völlig unabhängige Prozesse. +``` + +Einer der wichtigsten Punkte bei der Installation von Android Studio ist: **Geduldig sein!** Während der Installation und Einrichtung lädt Android Studio sehr viele Daten nach und das braucht seine Zeit. + +```{admonition} Different UI +:class: warning +Wichtige Anmerkung: Android Studio hat seine Benutzeroberfläche (UI) seit den letzten Versionen geändert. Diese Anleitung zeigt Dir die Schritte in dem *neuen UI* „Ladybug“. Nutzt Du noch eine ältere Version der Benutzeroberfläche, dann solltest Du Android Studio als Erstes auf das neue Design umstellen. Wie das funktioniert ist [hier beschrieben](NewUI). +``` + +Die Android-Studio-Version ist sehr wichtig. Schaue Dir die [Anleitung oben](#Building-APK-recommended-specification-of-computer-for-building-apk-file) an, um die richtige Android Studio Version auszuwählen. + +Lade Dir die [aktuelle Version des Android Studio](https://developer.android.com/studio) oder eine ältere Version aus dem [**Archiv**](https://developer.android.com/studio/archive) herunter und akzeptiere dabei die Download-Vereinbarungen. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Sobald der Download abgeschlossen ist, starte die heruntergeladene Anwendung, um sie auf Deinem Computer zu installieren. Eventuell musst Du einige Windows-Warnungen zu heruntergeladenen Apps akzeptieren/bestätigen! + +Installiere Android Studio, indem Du, wie in den folgenden Screenshots gezeigt, auf "Weiter" (Next) klickst. Du musst **keine** Einstellungen ändern! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +Wenn Du Festplattenplatz sparen möchtest, kannst Du Option Android Virtual Device deaktivieren: Diese wird nicht zum Erstellen von **AAPS** genutzt. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Klicke nun auf "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Sobald die Installation abgeschlossen ist, klicke auf "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +Im letzten Schritt klicke auf "Finished" (dt. Fertig), um Android Studio erstmalig zu starten. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +Du wirst danach gefragt, ob Du bei der Verbesserung des Android Studios helfen möchtest. Wähle die Option, die Dir am meisten zusagt. Das hat keinen Einfluss auf die Folgeschritte. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +Der Willkommensbildschirm begrüßt Dich zur Installation des Android Studios. Klicke "Next" (dt. Weiter). + +![Willkommen](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Wähle "Standard" als Installationstyp aus. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Überprüfe die Einstellungen, indem Du erneut auf "Next" (dt. Weiter) klickst. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Jetzt musst Du die Lizenzvereinbarungen akzeptieren. Du hast auf der linken Seite zwei Abschnitte (1 + 3) die Du einen nach dem anderen auswählst und mit "Accept" (2 + 4) auf der rechten Seite bestätigst. + +Danach kannst Du auf "Finish" (5) klicken. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Einige der Android-Pakete werden nun heruntergeladen und installiert. Habe Geduld und warte ab. + +Nach dem Abschluss siehst Du den folgenden Bildschirm, auf dem Du erneut "Finish" klickst. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +Du wirst jetzt Android Studios Willkommens-Bildschirm sehen. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### AAPS-Code herunterladen + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +Beim ersten **AAPS**-Download wird Android Studio sich übers Internet mit der Github-Webseite verbinden und von dort den **AAPS**-Quellcode herunterladen. Das sollte etwa eine Minute dauern. + +Android Studio wird dann mit **Gradle** (einem Entwicklungswerkzeug für Android Studio) andere erforderliche Komponenten identifizieren, die zusätzlich installiert werden müssen. +``` + +Überprüfe auf dem Begrüßungsbildschirm von Android Studio, ob „**Projects**“ (1) auf der linken Seite hervorgehoben ist. + +Klick dann rechts auf „**Clone Repository**“ (2): + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +Wir werden Android Studio nun sagen, wo es den Code herunterladen soll: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository-URL" (voreingestellt) sollte auf der linken Seite ausgewählt werden (1). +* "Git" (standardmäßig) sollte als Version Control ausgewählt werden (2). +* Kopiere nun diese URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + und füge sie in das URL-Textfeld (3) ein. + +* Prüfe, ob das (Standard)-Verzeichnis zum Speichern des geklonten Codes nicht bereits auf Deinem Computer existiert (4). You can change it to some directory, but please remember where you stored it! +* Klicke nun auf "Clone" (5). + +```{admonition} INFORMATION +:class: information +Notiere Dir das Verzeichnis. Das ist die Stelle, an der Dein Quellcode gespeichert ist! +``` + +Du wirst jetzt einen Screen sehen, der Dir sagt, dass das Repository geklont wurde: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +Irgendwann wird sich Android Studio schließen und neu starten. Du wirst gefragt, ob Du dem Projekt vertrauen willst. Klicke auf "Trust project": + + ![Projekt vertrauen](../images/Building-the-App/035_TrustProject.png) + + +Nur für Windows-Benutzer: Wenn Deine Firewall um Erlaubnis bittet, lasse den Zugriff zu: + + ![Java-Firewall-Berechtigung](../images/AndroidStudio361_18.png) + +Nachdem das Projektarchiv erfolgreich geklont wurde, wird Android Studio das geklonte Projekt öffnen. + +(NewUI)= +```{admonition} New UI +:class: Informationen +Android Studios Benutzeroberfläche wurde kürzlich geändert. Neue Installationen des Android Studio verwenden standardmäßig die neue Benutzeroberfläche! + +Nur wenn Dein Android Studio anders aussieht, musst Du möglicherweise auf das neue UI umschalten: +Klicke oben links auf das Hamburger-Menü und wähle dann **Settings** (oder bei Apple-Rechnern auf **Preferences**). +Im Menü **Appearance & Behaviour**, gehe auf **New UI** und aktiviere dort **Enable new UI**. Starte Android Studio danach neu, damit die Änderungen aktiv werden. + +Wenn Du die Option **New UI** nicht findest, mache Dir keine Sorgen: Du nutzt sie dann schon! +``` + + +Wenn Android Studio wieder gestartet ist, warte ab (das kann einige Minuten dauern), und vor allem, anders als es das Popup vorschlägt, **aktualisiere** das Projekt <0>nicht. + +Android Studio startet automatisch einen "Gradle project sync", der einige Minuten dauert. Du siehst, dass es (noch) läuft: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio wird unter Umständen vorschlagen das Gradle-System zu aktualisieren. **Mache niemals ein Gradle-Update!** Dies wird sonst zu Folgeproblemen führen. +``` + +Nur für Windows-Rechner: Es kann sein, dass Du Benachrichtigungen darüber, dass Windows Defender läuft, erhältst: Klicke auf **Automatically** und bestätige es. Der Build-Prozess wird damit schneller laufen! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +Du kannst den Gradle Sync laufen lassen während Du Dich schon um die folgenden Schritte kümmerst. + +(Building-APK-set-git-path-in-preferences)= +### Pfad zu Git in den Einstellungen von Android Studio festlegen + +Sage Android Studio nun, wo Git, das Du [vorher](#install-git-if-you-dont-have-it) installiert hast, zu finden ist. + +* Nur für Windows-Rechner: Starte Deinen Rechner nach der [Git-Installation](#install-git-if-you-dont-have-it) auf jeden Fall neu. Falls nicht, starte jetzt neu und öffne Android Studio dann erneut + +Öffne in der linken oberen Ecke des **Android Studio** das Hamburger-Menü und navigiere zu **File** > **Settings** (Windows) oder **Android Studio** > **Preferences** (Mac). Damit öffnet sich das folgende Fenster. Klicke auf das Dropdown-Menü **Version Control** (1), um es aufzuklappen und wähle **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Klicke auf den Button „Test“ (1), um zu prüfen, ob **Android Studio** den **Pfad zur ausführbaren Datei git.exe** automatisch ermitteln kann: + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +Wenn die automatische Erkennung funktioniert, wird die **Git**-Version in der Nähe des Pfads angezeigt. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +Wenn **git.exe** nicht automatisch gefunden wird oder wenn Du nach dem Klicken auf „Test“ eine Fehlermeldung erhältst (1), kannst Du entweder +* den Pfad, den Du [vorher](#BuildingAaps-steps-for-installing-git) gespeichert hast, manuell eingeben oder +* auf das Ordnersymbol (1) klicken und manuell zum Verzeichnis, in dem **git.exe** [vorher](#BuildingAaps-steps-for-installing-git) installiert wurde, navigieren. +* Überprüfe die Einstellungen mit dem **Test**-Button! + + ![Git wurde nicht gefunden](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Signierte AAPS APK erstellen + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android fordert, dass jede App _signiert_ wird, um sicherzustellen, dass sie später nur aus derselben vertrauenswürdigen Quelle, aus der auch die orginale App stammt, aktualisiert werden kann. Für weitere Informationen zu diesem Thema folge [diesem Link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +Für unsere Zwecke bedeutet das nur, dass wir eine Signatur- oder "Keystore"-Datei generieren und diese beim Erstellen der **AAPS**-App verwenden. +``` + + +**Wichtig: Achte darauf, dass der Gradle Sync erfolgreich abgeschlossen ist, bevor Du weiter machst!** + + +Klicke oben links auf das Hamburger-Menü, um die Menüleiste zu öffnen. Wähle **Build** (1) und dann **Generate Signed App Bundle / APK** (2) aus + +![Apk erstellen](../images/Building-the-App/040_GenerateSignedAPK.png) + +Wähle "APK" anstelle von "Android App Bundle" aus und klicke auf "Next": + +![APK statt Bundle](../images/Building-the-App/041_APK.png) + +In der nächsten Ansicht muss "Modul" auf "AAPS.app" (1) eingestellt sein/werden. + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +Wenn Du die APK für Deine Smartwatch erstellen möchtest, musst Du jetzt AAPS.wear auswählen! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Klicke auf "Create new..." (2), um mit der Erzeugung Deines Keystore zu beginnen. + +```{admonition} INFORMATION! +:class: information +Der Keystore muss nur einmal erstellt werden. +Wenn Du AAPS schon einmal erstellt (gebaut) hast, erstelle KEINEN neuen Keystore, sondern wähle den bestehenden und gib dessen Passwörter ein! +``` + +**_Hinweis:_** Der Keystore ist eine Datei, in der die Informationen zum Signieren der App gespeichert sind. Die Datei ist verschlüsselt und passwortgeschützt. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Klicke auf das Ordner-Symbol, um den Pfad Deines Keystore auf Deinem Computer auszuwählen. + + Nimm **nicht** das Verzeichnis, in dem Du Deinen Quellcode gespeichert hast, sondern ein Verzeichnis, das Du auch auf einen neuen Computer übertragen würdest. + +```{admonition} WARNING! +:class: warning +Schreib Dir auf, wo Dein Keystore gespeichert wird. Du wirst es für Dein nächstes AndroidAPS-Update brauchen! +``` + +* Wähle jetzt ein einfaches Passwort (und notiere es Dir), gib es in das Passwortfeld (2) ein und bestätige es (2). + + Die Passwörter für Keystore und Key müssen nicht sehr anspruchsvoll sein. Solltest Du Dein Passwort verlieren, lies dazu bitte den Abschnitt[Verlorener Keystore](#troubleshooting_androidstudio-lost-keystore). + +* Der Standard-Alias (3) für den Key lautet "key0". Lass ihn unverändert. + +* Jetzt brauchst Du ein Passwort für Deinen Key. Wenn Du es einfach halten willst, nimmst Du das selbe Passwort, das Du auch für Deinen Keystore oben verwendet hast. Gib ein Passwort (4) ein und bestätige es. + +```{admonition} WARNING! +:class: warning +Notiere Dir diese Passwörter! Du wirst sie für Dein nächstes AAPS-Update brauchen! +``` + +* Standardmäßig sind sie 25 Jahre gültig. Lass es unverändert. + +* Gib Deinen Vor- und Nachnamen ein (5). Es müssen keine weiteren Informationen hinzugefügt werden, aber Du kannst es dennoch tun, wenn Du möchtest (6-7). + +* Drücke auf "OK" (8) um fortzufahren: + + +Auf der Seite **Generate signed App Bundle or APK** wird jetzt der Pfad zu Deinem Keystore angezeigt. Gib jetzt erneut das Keystore-Password (1) und das Key-Password (2) ein, und hake die Box "remember password" an (3), sodass Du es beim nächsten Erstellen der APK (z.B. bei der nächsten AAPS-Aktualisierung) nicht noch einmal eingeben brauchst. Klicke auf "Next" (4): + +![Passwörter speichern](../images/Building-the-App/044_RememberPwd.png) + + +Auf der nächsten Seite wähle die Build-Variante "fullRelease" (2) aus und klicke auf "Create" (3). Merke Dir das Verzeichnis, das in (1) angezeigt wird, da dort später die Build-APK-Datei zu finden sein wird! + + ![Build-Variante auswählen](../images/Building-the-App/045_BuildPath.png) + +Android Studio wird jetzt die **AAPS**-APK erstellen. Es wird unten rechts "Gradle Build running" (2) angezeigt. Der Vorgang dauert je nach Computer und Internetverbindung einige Zeit, **Gedulde Dich!** Wenn Du den Fortschritt des „Builds“ mitverfolgen möchtest, klicke auf den kleinen Hammer „Build“ (1) unten im Android Studio: + +![Gradle läuft](../images/Building-the-App/046_BuildRunning.png) + +Jetzt kannst Du den Build-Fortschritt verfolgen: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Sobald der Build abgeschlossen ist, wird Android Studio "BUILD SUCCESSFUL" anzeigen. Möglicherweise erscheint eine Popup-Benachrichtigung auf der Du "locate" anklicken kannst. Wenn Du diesen Moment verpasst haben solltest, klicke ganz unten auf dem Bildschirm auf das Benachrichtigungs-Symbol (1) und dann auf **locate** (2), um die Benachrichtigungen anzeigen zu lassen: + +![Build abgeschlossen](../images/Building-the-App/049_ReopenNotification.png) + +**_Wenn der „Build“ fehlgeschlagen ist, lies bitte den Abschnitt [Fehlerbehebung für Android Studio](../GettingHelp/TroubleshootingAndroidStudio)._** + +Klicke im Benachrichtigungsfeld auf den blauen Link "locate": + +![Build finden](../images/Building-the-App/048_BuildFinished.png) Der Dateimanager öffnet sich und zeigt Dir die gerade von Dir erzeugte APK-Datei an. + + ![Datei-Speicherort apk](../images/Building-the-App/050_LocateAPK.png) + +Glückwunsch! Du hast die **AAPS**-APK-Datei erstellt. Du wirst diese Datei im nächsten Abschnitt der Dokumentation auf Dein Smartphone übertragen. + +```{tip} +Wenn Du darüber nachdenkst, zukünftig eine Android Wear-Smartwatch zu nutzen, ist jetzt genau der richtige Zeitpunkt die AAPS Wear-APK zu erstellen, um so sicherzustellen, dass diese mit der AAPS-APK zusammenpasst. +``` + +Gehe jetzt zum nächsten Schritt [**AAPS** auf Dein Smartphone übertragen und installieren](../SettingUpAaps/TransferringAndInstallingAaps.md) weiter. + + + diff --git a/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/de/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/el/Getting-Started/CompatiblesCgms.md b/docs/CROWDIN/el/Getting-Started/CompatiblesCgms.md index ec199fad7e3c..5253fce5cd34 100644 --- a/docs/CROWDIN/el/Getting-Started/CompatiblesCgms.md +++ b/docs/CROWDIN/el/Getting-Started/CompatiblesCgms.md @@ -9,22 +9,22 @@ This section provides a brief overview of all compatible **CGMs/FGMs** with **AA * [xDrip+Settings](../CompatibleCgms/xDrip.md) * [Nightscout as BG Source](../CompatibleCgms/CgmNightscoutUpload.md): While it's possible to use Nightscout as a BG source for closed-loop insulin delivery, **this method is not recommended** due to its reliance on stable mobile data or Wi-Fi connectivity. This means your **CGM** data would only be received by **AAPS** when you have an online connection to your Nightscout site. For a more reliable set up, using a CGM with local broadcast from the receiver (as listed below) to **AAPS**, is a much better option. -| CGM | Available [BG Sources](../SettingUpAaps/ConfigBuilder.md#bg-source) | -| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | xDrip+, DiaKEM app or [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | -| [Dexcom ONE+ and Stelo](../CompatibleCgms/DexcomG7.md) | xDrip+ | -| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | xDrip+ or BYODA | -| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | xDrip+ | -| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | xDrip+ | -| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](https://www.juggluco.nl/Juggluco/libre3/) (with or without xDrip+) | -| [Libre 2/2+](../CompatibleCgms/Libre2.md) | xDrip+ (EU only) or [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) (with or without xDrip+) | -| [Libre 1](../CompatibleCgms/Libre1.md) | xDrip+, Glimp, Tomato or Diabox. Need a transmitter | -| [Eversense](../CompatibleCgms/Eversense.md) | xDrip+ or ESEL/Eversense patched App | -| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | xDrip+ or MM640g + 600SeriesAndroidUploader App | -| [PocTech](../CompatibleCgms/PocTech.md) | PocTech | -| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | -| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | -| Sibionics CGM | [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | +| CGM | Available [BG Sources](../SettingUpAaps/ConfigBuilder.md#bg-source) | +| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | +| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md), DiaKEM app or [Juggluco](../CompatibleCgms/Juggluco.md) | +| [Dexcom ONE+ and Stelo](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) or BYODA | +| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 2/2+](../CompatibleCgms/Libre2.md) | [xDrip+](../CompatibleCgms/xDrip.md) (EU only) or [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 1](../CompatibleCgms/Libre1.md) | [xDrip+](../CompatibleCgms/xDrip.md), Glimp, Tomato or Diabox. Need a transmitter | +| [Eversense](../CompatibleCgms/Eversense.md) | [xDrip+](../CompatibleCgms/xDrip.md) or ESEL/Eversense patched App | +| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | [xDrip+](../CompatibleCgms/xDrip.md) or MM640g + 600SeriesAndroidUploader App | +| [PocTech](../CompatibleCgms/PocTech.md) | PocTech | +| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | +| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | +| Sibionics CGM | [Juggluco](../CompatibleCgms/Juggluco.md) | (GettingStarted-TrustedBGSource)= @@ -36,12 +36,12 @@ In order for **AAPS** to correctly identify them, the app sending **BG** reading Trusted data sources allow **SMB** delivery, all the time. -| Sensor | CGM app | -| --------------------- |:-----------------------------------------:| -| Dexcom G5/G6 | BYODA, xDrip+ (Direct, Native) | -| Dexcom G7 | DiaKEM, xDrip+ (Direct, Native), Juggluco | -| Dexcom ONE/ONE+/Stelo | xDrip+ (Direct, Native) | -| Libre 2/2+ (EU) | xDrip+, Juggluco (with or without xDrip+) | -| Libre 2/2+/3/3+ | Juggluco (with or without xDrip+) | +| Sensor | CGM app | +| --------------------- |:----------------------------------------------------------------------------------------------------------------------:| +| Dexcom G5/G6 | BYODA, xDrip+ (**Direct, Native**) | +| Dexcom G7 | DiaKEM, xDrip+ (**Direct, Native**),
Juggluco (**xDrip broadcast** without xDrip+) | +| Dexcom ONE/ONE+/Stelo | xDrip+ (**Direct, Native**) | +| Libre 2/2+ (EU) | xDrip+ (OOP2 **no calibration**),
Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | +| Libre 2/2+/3/3+ | Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | -Note: xDrip+ Companion app and Followers are not trusted data sources. +**Note: xDrip+ Companion apps and Follower modes (includes 640G/Eversense) are not trusted data sources.** diff --git a/docs/CROWDIN/el/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/el/SettingUpAaps/BrowserBuild.md index fb3afabc3172..525d1808b1a2 100644 --- a/docs/CROWDIN/el/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/el/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/el/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/el/SettingUpAaps/BuildingAaps.md index 9b3e471bcb4c..5989cf3fd8b9 100644 --- a/docs/CROWDIN/el/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/el/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Εγκατάσταση του Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/el/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/el/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..15a32d2983bf --- /dev/null +++ b/docs/CROWDIN/el/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Φτιάξτε το μόνοι σας, αντί να το κατεβάσετε + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Εγκατάσταση του Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/el/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/es/Getting-Started/CompatiblesCgms.md b/docs/CROWDIN/es/Getting-Started/CompatiblesCgms.md index eaf410255b34..5ba123a2ea49 100644 --- a/docs/CROWDIN/es/Getting-Started/CompatiblesCgms.md +++ b/docs/CROWDIN/es/Getting-Started/CompatiblesCgms.md @@ -9,22 +9,22 @@ This section provides a brief overview of all compatible **CGMs/FGMs** with **AA * [xDrip+Settings](../CompatibleCgms/xDrip.md) * [Nightscout as BG Source](../CompatibleCgms/CgmNightscoutUpload.md): While it's possible to use Nightscout as a BG source for closed-loop insulin delivery, **this method is not recommended** due to its reliance on stable mobile data or Wi-Fi connectivity. This means your **CGM** data would only be received by **AAPS** when you have an online connection to your Nightscout site. For a more reliable set up, using a CGM with local broadcast from the receiver (as listed below) to **AAPS**, is a much better option. -| MCG | Available [BG Sources](../SettingUpAaps/ConfigBuilder.md#bg-source) | -| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | xDrip+, DiaKEM app or [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | -| [Dexcom ONE+ and Stelo](../CompatibleCgms/DexcomG7.md) | xDrip+ | -| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | xDrip+ or BYODA | -| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | xDrip+ | -| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | xDrip+ | -| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](https://www.juggluco.nl/Juggluco/libre3/) (with or without xDrip+) | -| [Libre 2/2+](../CompatibleCgms/Libre2.md) | xDrip+ (EU only) or [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) (with or without xDrip+) | -| [Libre 1](../CompatibleCgms/Libre1.md) | xDrip+, Glimp, Tomato or Diabox. Need a transmitter | -| [Eversense](../CompatibleCgms/Eversense.md) | xDrip+ or ESEL/Eversense patched App | -| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | xDrip+ or MM640g + 600SeriesAndroidUploader App | -| [PocTech](../CompatibleCgms/PocTech.md) | PocTech | -| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | -| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | -| Sibionics CGM | [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | +| MCG | Available [BG Sources](../SettingUpAaps/ConfigBuilder.md#bg-source) | +| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | +| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md), DiaKEM app or [Juggluco](../CompatibleCgms/Juggluco.md) | +| [Dexcom ONE+ and Stelo](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) or BYODA | +| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 2/2+](../CompatibleCgms/Libre2.md) | [xDrip+](../CompatibleCgms/xDrip.md) (EU only) or [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 1](../CompatibleCgms/Libre1.md) | [xDrip+](../CompatibleCgms/xDrip.md), Glimp, Tomato or Diabox. Need a transmitter | +| [Eversense](../CompatibleCgms/Eversense.md) | [xDrip+](../CompatibleCgms/xDrip.md) or ESEL/Eversense patched App | +| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | [xDrip+](../CompatibleCgms/xDrip.md) or MM640g + 600SeriesAndroidUploader App | +| [PocTech](../CompatibleCgms/PocTech.md) | PocTech | +| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | +| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | +| Sibionics CGM | [Juggluco](../CompatibleCgms/Juggluco.md) | (GettingStarted-TrustedBGSource)= @@ -36,12 +36,12 @@ In order for **AAPS** to correctly identify them, the app sending **BG** reading Trusted data sources allow **SMB** delivery, all the time. -| Sensor | CGM app | -| --------------------- |:-----------------------------------------:| -| Dexcom G5/G6 | BYODA, xDrip+ (Direct, Native) | -| Dexcom G7 | DiaKEM, xDrip+ (Direct, Native), Juggluco | -| Dexcom ONE/ONE+/Stelo | xDrip+ (Direct, Native) | -| Libre 2/2+ (EU) | xDrip+, Juggluco (with or without xDrip+) | -| Libre 2/2+/3/3+ | Juggluco (with or without xDrip+) | +| Sensor | CGM app | +| --------------------- |:----------------------------------------------------------------------------------------------------------------------:| +| Dexcom G5/G6 | BYODA, xDrip+ (**Direct, Native**) | +| Dexcom G7 | DiaKEM, xDrip+ (**Direct, Native**),
Juggluco (**xDrip broadcast** without xDrip+) | +| Dexcom ONE/ONE+/Stelo | xDrip+ (**Direct, Native**) | +| Libre 2/2+ (EU) | xDrip+ (OOP2 **no calibration**),
Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | +| Libre 2/2+/3/3+ | Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | -Note: xDrip+ Companion app and Followers are not trusted data sources. +**Note: xDrip+ Companion apps and Follower modes (includes 640G/Eversense) are not trusted data sources.** diff --git a/docs/CROWDIN/es/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/es/SettingUpAaps/BrowserBuild.md index dd24a4a96c46..97a47bdd8b27 100644 --- a/docs/CROWDIN/es/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/es/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/es/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/es/SettingUpAaps/BuildingAaps.md index 575952a10c68..074775982d70 100644 --- a/docs/CROWDIN/es/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/es/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Instalar Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/es/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/es/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..11957cde9fea --- /dev/null +++ b/docs/CROWDIN/es/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Construyela tú mismo en lugar de descargarla + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Instalar Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/es/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/fr/Getting-Started/CompatiblesCgms.md b/docs/CROWDIN/fr/Getting-Started/CompatiblesCgms.md index ba842b051c31..d194522bf35d 100644 --- a/docs/CROWDIN/fr/Getting-Started/CompatiblesCgms.md +++ b/docs/CROWDIN/fr/Getting-Started/CompatiblesCgms.md @@ -9,22 +9,22 @@ This section provides a brief overview of all compatible **CGMs/FGMs** with **AA * [xDrip+Settings](../CompatibleCgms/xDrip.md) * [Nightscout as BG Source](../CompatibleCgms/CgmNightscoutUpload.md): While it's possible to use Nightscout as a BG source for closed-loop insulin delivery, **this method is not recommended** due to its reliance on stable mobile data or Wi-Fi connectivity. This means your **CGM** data would only be received by **AAPS** when you have an online connection to your Nightscout site. For a more reliable set up, using a CGM with local broadcast from the receiver (as listed below) to **AAPS**, is a much better option. -| MGC | Available [BG Sources](../SettingUpAaps/ConfigBuilder.md#bg-source) | -| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | xDrip+, DiaKEM app or [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | -| [Dexcom ONE+ and Stelo](../CompatibleCgms/DexcomG7.md) | xDrip+ | -| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | xDrip+ or BYODA | -| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | xDrip+ | -| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | xDrip+ | -| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](https://www.juggluco.nl/Juggluco/libre3/) (with or without xDrip+) | -| [Libre 2/2+](../CompatibleCgms/Libre2.md) | xDrip+ (EU only) or [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) (with or without xDrip+) | -| [Libre 1](../CompatibleCgms/Libre1.md) | xDrip+, Glimp, Tomato or Diabox. Need a transmitter | -| [Eversense](../CompatibleCgms/Eversense.md) | xDrip+ or ESEL/Eversense patched App | -| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | xDrip+ or MM640g + 600SeriesAndroidUploader App | -| [PocTech](../CompatibleCgms/PocTech.md) | PocTech | -| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | -| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | -| Sibionics CGM | [Juggluco](https://www.juggluco.nl/Jugglucohelp/introhelp.html) | +| MGC | Available [BG Sources](../SettingUpAaps/ConfigBuilder.md#bg-source) | +| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | +| [Dexcom G7](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md), DiaKEM app or [Juggluco](../CompatibleCgms/Juggluco.md) | +| [Dexcom ONE+ and Stelo](../CompatibleCgms/DexcomG7.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G6](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) or BYODA | +| [Dexcom ONE](../CompatibleCgms/DexcomG6.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Dexcom G5](../CompatibleCgms/DexcomG5.md) | [xDrip+](../CompatibleCgms/xDrip.md) | +| [Libre 3/3+](../CompatibleCgms/Libre3.md) | [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 2/2+](../CompatibleCgms/Libre2.md) | [xDrip+](../CompatibleCgms/xDrip.md) (EU only) or [Juggluco](../CompatibleCgms/Juggluco.md) (with or without xDrip+) | +| [Libre 1](../CompatibleCgms/Libre1.md) | [xDrip+](../CompatibleCgms/xDrip.md), Glimp, Tomato or Diabox. Need a transmitter | +| [Eversense](../CompatibleCgms/Eversense.md) | [xDrip+](../CompatibleCgms/xDrip.md) or ESEL/Eversense patched App | +| [Enlite (MM640G/MM630G)](../CompatibleCgms/MM640g.md) | [xDrip+](../CompatibleCgms/xDrip.md) or MM640g + 600SeriesAndroidUploader App | +| [PocTech](../CompatibleCgms/PocTech.md) | PocTech | +| [Ottai](../CompatibleCgms/OttaiM8.md) | Ottai | +| [Syai Tag](../CompatibleCgms/SyaiTagX1.md) | Syai Tag | +| Sibionics CGM | [Juggluco](../CompatibleCgms/Juggluco.md) | (GettingStarted-TrustedBGSource)= @@ -36,12 +36,12 @@ In order for **AAPS** to correctly identify them, the app sending **BG** reading Trusted data sources allow **SMB** delivery, all the time. -| Sensor | CGM app | -| --------------------- |:-----------------------------------------:| -| Dexcom G5/G6 | BYODA, xDrip+ (Direct, Native) | -| Dexcom G7 | DiaKEM, xDrip+ (Direct, Native), Juggluco | -| Dexcom ONE/ONE+/Stelo | xDrip+ (Direct, Native) | -| Libre 2/2+ (EU) | xDrip+, Juggluco (with or without xDrip+) | -| Libre 2/2+/3/3+ | Juggluco (with or without xDrip+) | +| Sensor | CGM app | +| --------------------- |:----------------------------------------------------------------------------------------------------------------------:| +| Dexcom G5/G6 | BYODA, xDrip+ (**Direct, Native**) | +| Dexcom G7 | DiaKEM, xDrip+ (**Direct, Native**),
Juggluco (**xDrip broadcast** without xDrip+) | +| Dexcom ONE/ONE+/Stelo | xDrip+ (**Direct, Native**) | +| Libre 2/2+ (EU) | xDrip+ (OOP2 **no calibration**),
Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | +| Libre 2/2+/3/3+ | Juggluco (**xDrip broadcast** without xDrip+, or **Patched Libre** with xDrip+) | -Note: xDrip+ Companion app and Followers are not trusted data sources. +**Note: xDrip+ Companion apps and Follower modes (includes 640G/Eversense) are not trusted data sources.** diff --git a/docs/CROWDIN/fr/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/fr/SettingUpAaps/BrowserBuild.md index ec279cef8e2e..ef8b06c33126 100644 --- a/docs/CROWDIN/fr/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/fr/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/fr/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/fr/SettingUpAaps/BuildingAaps.md index 512a426faa9a..4015249c0ff8 100644 --- a/docs/CROWDIN/fr/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/fr/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Prérequis matériels et logiciels pour la compilation de AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. Si vous le faites, le processus de compilation peut prendre beaucoup de temps avant de se terminer, mais une fois lancé, vous pouvez le laisser tourner sans surveillance. - -## Aide et support pour le processus de compilation - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Guide pas à pas pour compiler l'application AAPS - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Étapes pour l'installation de Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). N'importe quelle version récente de Git devrait fonctionner, sélectionnez la version correspondant à votre système d'exploitation : Mac, Windows ou Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. Si vous installez Git via homebrew, vous n'avez pas besoin de modifier la configuration. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. Ca devrait ressembler à "C:\Program Files\Git\cmd\git.exe" - -* Au fur et à mesure que vous avancez sur les différentes étapes de l'installation de Git, validez simplement en gardant les options par défaut. - -* Après l'installation, si vous avez oublié de noter l'endroit où Git a été installé, vous pouvez le trouver comme suit : tapez "git" dans la barre de recherche du PC, cliquez avec le bouton droit sur "Git bash", sélectionnez "Ouvrir l'emplacement du fichier", survolez l'icône "Git bash" avec votre souris, ce qui vous indiquera alors où il est installé. - -* Redémarrez votre ordinateur avant de continuer. - -(Building-APK-install-android-studio)= -### Installer Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Télécharger le code source AAPS - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -Nous allons maintenant indiquer à Android Studio où aller chercher le code : - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL/URL du dépôt" devrait être sélectionné (par défaut) à gauche (1). -* "Git" devrait être sélectionné (par défaut) comme système de contrôle de version (2). -* Copiez maintenant cette URL : - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - et collez-la dans la zone de texte de l'URL (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Cliquez sur le bouton "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -Vous allez alors voir un écran vous indiquant que le dépôt est en train d'être cloné (cloning repository) : - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Cliquez sur "Trust project/Faire confiance au projet" : - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Pour les utilisateurs de Windows : Si votre pare-feu demande la permission, autorisez l'accès : - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -Une fois le dépôt cloné avec succès, Android Studio ouvrira le projet en question. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Compilez l'APK AAPS signé - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Sélectionnez "APK" au lieu de "Android App Bundle" et cliquez sur "Next" : - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -Sur l'écran suivant, vérifiez que le "Module" sélectionné est bien "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Cliquez sur "Create new.../Créer nouveau..." (2) pour commencer la création de votre fichier de clés. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. Il est crypté et les informations sont sécurisées avec un mot de passe. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - Les mots de passe du fichier de clés et de la clé n'ont pas besoin d'être très complexes. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* L'alias par défaut (3) de votre clé est "key0", laissez-le tel quel. - -* Il vous faut maintenant un mot de passe pour la clé. Pour simplifier, vous pouvez si vous le souhaitez, utiliser le même mot de passe que pour le fichier de clés au-dessus. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Cliquez sur "OK" (8) pour continuer : - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Cliquez sur "Next/Suivant" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Vous pouvez maintenant voir la compilation en cours : - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Le message "BUILD SUCCESSFUL / COMPILATION RÉUSSIE" s'affiche quand la génération est terminée. Vous verrez peut-être une notification sur laquelle vous pouvez cliquer "locate/localiser". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -Dans la fenêtre des notifications, cliquez sur le lien bleu "locate/trouver" : - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Félicitations ! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/fr/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/fr/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..fcacd1646c70 --- /dev/null +++ b/docs/CROWDIN/fr/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Construire vous-même au lieu de télécharger + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. Il est légal de construire l'application pour votre usage personnel, mais vous ne devez en aucun cas donner une copie à d'autres personnes !** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Prérequis matériels et logiciels pour la compilation de AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. Si vous le faites, le processus de compilation peut prendre beaucoup de temps avant de se terminer, mais une fois lancé, vous pouvez le laisser tourner sans surveillance. + +## Aide et support pour le processus de compilation + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Guide pas à pas pour compiler l'application AAPS + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Étapes pour l'installation de Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). N'importe quelle version récente de Git devrait fonctionner, sélectionnez la version correspondant à votre système d'exploitation : Mac, Windows ou Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. Si vous installez Git via homebrew, vous n'avez pas besoin de modifier la configuration. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. Ca devrait ressembler à "C:\Program Files\Git\cmd\git.exe" + +* Au fur et à mesure que vous avancez sur les différentes étapes de l'installation de Git, validez simplement en gardant les options par défaut. + +* Après l'installation, si vous avez oublié de noter l'endroit où Git a été installé, vous pouvez le trouver comme suit : tapez "git" dans la barre de recherche du PC, cliquez avec le bouton droit sur "Git bash", sélectionnez "Ouvrir l'emplacement du fichier", survolez l'icône "Git bash" avec votre souris, ce qui vous indiquera alors où il est installé. + +* Redémarrez votre ordinateur avant de continuer. + +(Building-APK-install-android-studio)= +### Installer Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Télécharger le code source AAPS + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +Nous allons maintenant indiquer à Android Studio où aller chercher le code : + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL/URL du dépôt" devrait être sélectionné (par défaut) à gauche (1). +* "Git" devrait être sélectionné (par défaut) comme système de contrôle de version (2). +* Copiez maintenant cette URL : + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + et collez-la dans la zone de texte de l'URL (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Cliquez sur le bouton "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +Vous allez alors voir un écran vous indiquant que le dépôt est en train d'être cloné (cloning repository) : + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Cliquez sur "Trust project/Faire confiance au projet" : + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Pour les utilisateurs de Windows : Si votre pare-feu demande la permission, autorisez l'accès : + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +Une fois le dépôt cloné avec succès, Android Studio ouvrira le projet en question. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Compilez l'APK AAPS signé + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Sélectionnez "APK" au lieu de "Android App Bundle" et cliquez sur "Next" : + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +Sur l'écran suivant, vérifiez que le "Module" sélectionné est bien "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Cliquez sur "Create new.../Créer nouveau..." (2) pour commencer la création de votre fichier de clés. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. Il est crypté et les informations sont sécurisées avec un mot de passe. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + Les mots de passe du fichier de clés et de la clé n'ont pas besoin d'être très complexes. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* L'alias par défaut (3) de votre clé est "key0", laissez-le tel quel. + +* Il vous faut maintenant un mot de passe pour la clé. Pour simplifier, vous pouvez si vous le souhaitez, utiliser le même mot de passe que pour le fichier de clés au-dessus. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Cliquez sur "OK" (8) pour continuer : + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Cliquez sur "Next/Suivant" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Vous pouvez maintenant voir la compilation en cours : + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Le message "BUILD SUCCESSFUL / COMPILATION RÉUSSIE" s'affiche quand la génération est terminée. Vous verrez peut-être une notification sur laquelle vous pouvez cliquer "locate/localiser". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +Dans la fenêtre des notifications, cliquez sur le lien bleu "locate/trouver" : + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Félicitations ! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/fr/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/he/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/he/SettingUpAaps/BrowserBuild.md index f9cc9bdb4898..d09d8cdf8a37 100644 --- a/docs/CROWDIN/he/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/he/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/he/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/he/SettingUpAaps/BuildingAaps.md index d2b0cb93efa8..ea73db89bbfb 100644 --- a/docs/CROWDIN/he/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/he/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### התקנת Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -מזל טוב! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/he/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/he/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..883cdb6821c0 --- /dev/null +++ b/docs/CROWDIN/he/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## בנייה עצמית במקום הורדה + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. בנייה עצמית של היישום לשימוש אישי הינה חוקית אך אסור לתת את היישום לאחרים!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### התקנת Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +מזל טוב! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/he/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/ko/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/ko/SettingUpAaps/BrowserBuild.md index 3a3d7e82c38c..10307201c517 100644 --- a/docs/CROWDIN/ko/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/ko/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/ko/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/ko/SettingUpAaps/BuildingAaps.md index ab945133e133..195a8f3037de 100644 --- a/docs/CROWDIN/ko/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/ko/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Install Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/ko/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/ko/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..9e6707127abf --- /dev/null +++ b/docs/CROWDIN/ko/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## 다운로드 대신에 당신 스스로 빌드하세요 + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Install Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/ko/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/lt/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/lt/SettingUpAaps/BrowserBuild.md index b7bcb13976ba..866a63ad7cee 100644 --- a/docs/CROWDIN/lt/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/lt/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/lt/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/lt/SettingUpAaps/BuildingAaps.md index 422c5493f665..de235042c554 100644 --- a/docs/CROWDIN/lt/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/lt/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Android Studio įdiegimas - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/lt/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/lt/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..363fdb64e8d3 --- /dev/null +++ b/docs/CROWDIN/lt/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Kurti sau, o ne parsisiųsti + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Android Studio įdiegimas + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/lt/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/nl/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/nl/SettingUpAaps/BrowserBuild.md index 81a463469c01..190b14ceecbd 100644 --- a/docs/CROWDIN/nl/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/nl/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/nl/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/nl/SettingUpAaps/BuildingAaps.md index 7d215422a4fa..2aa06619889f 100644 --- a/docs/CROWDIN/nl/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/nl/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Installeer Git + Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/nl/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/nl/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..e931102a53e4 --- /dev/null +++ b/docs/CROWDIN/nl/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Zelf bouwen, in plaats van downloaden + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Installeer Git + Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/nl/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/pb/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/pb/SettingUpAaps/BrowserBuild.md index bb629e0992df..a3ad592f33dc 100644 --- a/docs/CROWDIN/pb/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/pb/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/pb/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/pb/SettingUpAaps/BuildingAaps.md index f3d3f5fb5f5c..aa95e0cf7c3a 100644 --- a/docs/CROWDIN/pb/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/pb/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Install Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/pb/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/pb/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..538b15d992af --- /dev/null +++ b/docs/CROWDIN/pb/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Build yourself instead of download + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Install Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/pb/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/pl/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/pl/SettingUpAaps/BrowserBuild.md index bb629e0992df..a3ad592f33dc 100644 --- a/docs/CROWDIN/pl/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/pl/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/pl/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/pl/SettingUpAaps/BuildingAaps.md index f3d3f5fb5f5c..aa95e0cf7c3a 100644 --- a/docs/CROWDIN/pl/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/pl/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Install Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/pl/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/pl/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..538b15d992af --- /dev/null +++ b/docs/CROWDIN/pl/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Build yourself instead of download + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Install Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/pl/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/pt/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/pt/SettingUpAaps/BrowserBuild.md index 7614893d3cbd..1fc8d4d178ed 100644 --- a/docs/CROWDIN/pt/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/pt/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/pt/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/pt/SettingUpAaps/BuildingAaps.md index 91ba2aec1ee9..72ad00ea6671 100644 --- a/docs/CROWDIN/pt/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/pt/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Instalar o Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/pt/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/pt/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..696a39107d88 --- /dev/null +++ b/docs/CROWDIN/pt/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Construa você em vez de fazer download + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Instalar o Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/pt/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/ro/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/ro/SettingUpAaps/BrowserBuild.md index bb629e0992df..a3ad592f33dc 100644 --- a/docs/CROWDIN/ro/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/ro/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/ro/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/ro/SettingUpAaps/BuildingAaps.md index f3d3f5fb5f5c..aa95e0cf7c3a 100644 --- a/docs/CROWDIN/ro/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/ro/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Install Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/ro/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/ro/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..538b15d992af --- /dev/null +++ b/docs/CROWDIN/ro/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Build yourself instead of download + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Install Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/ro/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/ru/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/ru/SettingUpAaps/BrowserBuild.md index 12292b0c1a21..37284a729d14 100644 --- a/docs/CROWDIN/ru/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/ru/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/ru/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/ru/SettingUpAaps/BuildingAaps.md index 96dcdce30f12..bafa701fa0dd 100644 --- a/docs/CROWDIN/ru/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/ru/SettingUpAaps/BuildingAaps.md @@ -6,422 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Рекомендуемые спецификации компьютеров для сборки файла apk)= -## Технические характеристики компьютера и программного обеспечения для построения AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. Процесс сборки приложения при этом может занять много времени, но после начала можно оставить его без присмотра. - -## Помощь и поддержка в процессе сборки - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Пошаговое руководство по созданию приложения AAPS - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Шаги по установке Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Любая новая версия Git должна работать, выбирайте версию в соответствии с вашей системой - Mac, Windows или Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. Если вы устанавливаете Git через homebrew, то нет необходимости изменять настройки. - -(Запомните_путь_к_Git)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. Это будет что-то вроде "C:\Program Files\Git\cmd\git.exe" - -* По мере прохождения нескольких шагов установки Git, принимайте все параметры по умолчанию. - -* После установки, если вы забыли место установкин Git, вы можете найти его следующим образом: введите "git" в строке поиска ПК, щелкните правой кнопкой мыши на "Git bash", выберите "открыть местоположение файла", наведите курсор мыши на значок "Git bash"., который затем покажет, где он установлен. - -* Перезагрузите компьютер перед следующим шагом. - -(Сборка-APK-установка-android-studio)= -### Установите Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Сборка-APK-загрузка-AAPS-кода)= -### Загрузите код AAPS - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -Теперь мы скажем программе Android Studio, откуда получить код: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* Должен быть выбран "URL репозитория" (по умолчанию) слева (1). -* В качестве системы управления версиями должен быть выбран "Git" (по умолчанию) (2). -* Теперь скопируйте URL-адрес: - ``` - https://github.com/nightscout/AndroidAPS.git - -Context | Edit Context - ``` - и вставьте его в текстовое поле URL (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Теперь нажмите кнопку "Клонировать" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -Теперь вы увидите экран, сообщающий, что репозиторий клонируется: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Нажмите на "Доверять проекту": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Только для пользователей Windows: Если ваш брандмауэр запрашивает разрешение, предоставьте доступ: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -После успешного клонирования репозитория, Android Studio откроет клонированный проект. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Сборка-APK-задать-путь-к-git-в-настройках) = -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Сборка-APK-генерировать-подписанный-apk)= -### Построение подписанного приложения AAPS apk - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Выберите "APK" вместо "Android App Bundle" и нажмите "Далее": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -На следующем экране убедитесь, что "Module" установлен в "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Нажмите "Создать новый..." (2) для создания хранилища ключей. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. Он зашифрован и информация защищена паролями. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - Примечание: Пароли для хранилища ключей и ключей не должны быть сложными. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* По умолчанию псевдоним (3) для вашего ключа это "key0", оставьте его без изменений. - -* Теперь вам нужен пароль для ключа. Для простоты можете использовать тот же пароль, что и для хранилища ключей выше. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Нажмите "OK" (8), чтобы продолжить: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Нажмите "Далее" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Теперь вы можете наблюдать за ходом построения приложения: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -После завершения сборки Android Studio выведет сообщение "СБОРКА ЗАВЕРШЕНА УСПЕШНО.". Вы увидите всплывающее уведомление, на которое можете нажать, чтобы найти файл ("locate"). If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -В окне Уведомления нажмите на синюю ссылку "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Поздравляем! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/ru/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/ru/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..05555e5aafbd --- /dev/null +++ b/docs/CROWDIN/ru/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,431 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Постройте сами вместо скачивания + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. Построить приложение для собственного использования вполне законно, но передавать копию другим не разрешается!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Рекомендуемые спецификации компьютеров для сборки файла apk)= +## Технические характеристики компьютера и программного обеспечения для построения AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. Процесс сборки приложения при этом может занять много времени, но после начала можно оставить его без присмотра. + +## Помощь и поддержка в процессе сборки + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Пошаговое руководство по созданию приложения AAPS + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Шаги по установке Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Любая новая версия Git должна работать, выбирайте версию в соответствии с вашей системой - Mac, Windows или Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. Если вы устанавливаете Git через homebrew, то нет необходимости изменять настройки. + +(Запомните_путь_к_Git)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. Это будет что-то вроде "C:\Program Files\Git\cmd\git.exe" + +* По мере прохождения нескольких шагов установки Git, принимайте все параметры по умолчанию. + +* После установки, если вы забыли место установкин Git, вы можете найти его следующим образом: введите "git" в строке поиска ПК, щелкните правой кнопкой мыши на "Git bash", выберите "открыть местоположение файла", наведите курсор мыши на значок "Git bash"., который затем покажет, где он установлен. + +* Перезагрузите компьютер перед следующим шагом. + +(Сборка-APK-установка-android-studio)= +### Установите Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Сборка-APK-загрузка-AAPS-кода)= +### Загрузите код AAPS + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +Теперь мы скажем программе Android Studio, откуда получить код: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* Должен быть выбран "URL репозитория" (по умолчанию) слева (1). +* В качестве системы управления версиями должен быть выбран "Git" (по умолчанию) (2). +* Теперь скопируйте URL-адрес: + ``` + https://github.com/nightscout/AndroidAPS.git + +Context | Edit Context + ``` + и вставьте его в текстовое поле URL (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Теперь нажмите кнопку "Клонировать" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +Теперь вы увидите экран, сообщающий, что репозиторий клонируется: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Нажмите на "Доверять проекту": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Только для пользователей Windows: Если ваш брандмауэр запрашивает разрешение, предоставьте доступ: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +После успешного клонирования репозитория, Android Studio откроет клонированный проект. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Сборка-APK-задать-путь-к-git-в-настройках) = +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Сборка-APK-генерировать-подписанный-apk)= +### Построение подписанного приложения AAPS apk + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Выберите "APK" вместо "Android App Bundle" и нажмите "Далее": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +На следующем экране убедитесь, что "Module" установлен в "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Нажмите "Создать новый..." (2) для создания хранилища ключей. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. Он зашифрован и информация защищена паролями. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + Примечание: Пароли для хранилища ключей и ключей не должны быть сложными. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* По умолчанию псевдоним (3) для вашего ключа это "key0", оставьте его без изменений. + +* Теперь вам нужен пароль для ключа. Для простоты можете использовать тот же пароль, что и для хранилища ключей выше. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Нажмите "OK" (8), чтобы продолжить: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Нажмите "Далее" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Теперь вы можете наблюдать за ходом построения приложения: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +После завершения сборки Android Studio выведет сообщение "СБОРКА ЗАВЕРШЕНА УСПЕШНО.". Вы увидите всплывающее уведомление, на которое можете нажать, чтобы найти файл ("locate"). If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +В окне Уведомления нажмите на синюю ссылку "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Поздравляем! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/ru/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/sk/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/sk/SettingUpAaps/BrowserBuild.md index bb629e0992df..a3ad592f33dc 100644 --- a/docs/CROWDIN/sk/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/sk/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/sk/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/sk/SettingUpAaps/BuildingAaps.md index f3d3f5fb5f5c..aa95e0cf7c3a 100644 --- a/docs/CROWDIN/sk/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/sk/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Install Android Studio - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/sk/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/sk/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..538b15d992af --- /dev/null +++ b/docs/CROWDIN/sk/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Build yourself instead of download + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. It is legal to build the app for your own use, but you must not give a copy to others!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Install Android Studio + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Congratulations! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/sk/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/tr/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/tr/SettingUpAaps/BrowserBuild.md index 72fa2eedb71b..aca228053b3e 100644 --- a/docs/CROWDIN/tr/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/tr/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/tr/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/tr/SettingUpAaps/BuildingAaps.md index 732d5e22ff03..cfabef8a8ab2 100644 --- a/docs/CROWDIN/tr/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/tr/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ See [FAQ page](../UsefulLinks/FAQ.md) for details. +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## Computer and software specifications for building AAPS +### Build with a browser -* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | -| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. +---- -The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. - -* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

- -**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. - -## Help and support during the building process - -If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. - -If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). - -## Step-by-step guide to building the AAPS app - -```{admonition} WARNING -:class: warning -If you have built AAPS before, you don't need to take all the following steps again. -Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. - -Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. - -(install-git-if-you-dont-have-it)= -### Install Git - -```{admonition} Why Git? -:class: dropdown - -Git is known as a “_Versioning Control System_” (VCS).\ -Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). -``` - -(BuildingAaps-steps-for-installing-git)= -#### Steps for Installing Git - -1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. - -**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. - -(Make_a_note_of_Git_path)= - -* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" - -* As you proceed through several steps of the Git installation, just accept all the default options. - -* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. - -* Reboot your computer before the next step. - -(Building-APK-install-android-studio)= -### Android Studio'yu yükleyin - -- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. -``` - -One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. - -```{admonition} Different UI -:class: warning -Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). -``` - -The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. - -Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! - -Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -Now click on "Install": - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -Once it's completed, press "Next" - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -In the last step, click on "Finished" to start Android Studio for the first time. - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -The welcome screen greets you to the installation of Android Studio. Press "Next". - -![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -Select "Standard" as installation type. - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -Verify the settings by clicking "Next" again. - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. - -Then the "Finish" (5) button can be clicked. - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -Some Android packages will now be downloaded and installed. Be patient and wait. - -When it's finished, you will find the following screen where you can select "Finish" again. - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -You will now see the Welcome screen of Android Studio. - -![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### Download the AAPS code - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. - -Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. -``` - -On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. - -Then click "**Clone Repository**" (2) on the right: - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -We will now tell Android Studio where to get the code from: - -![Get from Version Control](../images/Building-the-App/033_CloneGit.png) - -* "Repository URL" should be selected (by default) on the left (1). -* "Git" should be selected (by default) as version control (2). -* Now copy this URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - and paste it into the URL textbox (3). - -* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! -* Now click the button "Clone" (5). - -```{admonition} INFORMATION -:class: information -Make a note of the directory. It is where your sourcecode is stored! -``` - -You will now see a screen telling you that the repository is being cloned: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": - - ![Trust project](../images/Building-the-App/035_TrustProject.png) - - -Only for Windows users: If your firewall asks for permission, grant access: - - ![Firewall permission java](../images/AndroidStudio361_18.png) - -After the repository is cloned successfully, Android Studio will open the cloned project. - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! - -Only if your Android Studio looks different, you might need to switch to the new UI: -Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). -In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. - -If you don't find the option **New UI** don't worry: you are already using it! -``` - - -When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. - -Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. -``` - -Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -You can leave the gradle sync running and follow the next steps already. - -(Building-APK-set-git-path-in-preferences)= -### Set Git path in Android Studio preferences - -Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). - -* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio - -In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -If the automatic setting is successful, your current version of **Git** will be displayed next to the path. - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either -* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or -* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) -* Verify your settings with the **Test** button! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### Build the AAPS "signed" APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). - -For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. -``` - - -**Important: Make sure the gradle sync is finished successfully before proceeding!** - - -Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -Select "APK" instead of "Android App Bundle" and click "Next": - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -In the next screen, make sure that "Module" is set to "AAPS.app" (1). - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -If you want to create the apk for your watch, you now need to select AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -Click "Create new..." (2) to start creating your key store. - -```{admonition} INFORMATION! -:class: information -You will only need to create the keystore once. -If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! -``` - -**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* Click the "folder" symbol (1) to select a path on your computer for your key store. - - Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. - -```{admonition} WARNING! -:class: warning -Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! -``` - -* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). - - The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). - -* The default alias (3) for your key is "key0", leave this unchanged. - -* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. - -```{admonition} WARNING! -:class: warning -Note down these passwords! You will need them when you build the next AAPS update! -``` - -* The validity is 25 years by default, leave it as it is. - -* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). - -* Click "OK" (8) to continue: - - -On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -Now you can watch the building progress: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** - -In the Notifications box, click on the blue link "locate": - -![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -Tebrikler! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. - -```{tip} -If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. -``` - -Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/tr/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/tr/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..1697e7884cc5 --- /dev/null +++ b/docs/CROWDIN/tr/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## Programı İndirmek yerine kendiniz oluşturun... + +**The AAPS app (an apk file) is not available for download, due to regulations around medical devices. Uygulamayı kendi kullanımınız için oluşturmak yasaldır, ancak bir kopyasını başkasına vermemelisiniz!** + +See [FAQ page](../UsefulLinks/FAQ.md) for details. + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## Computer and software specifications for building AAPS + +* A specific **[Android Studio](https://developer.android.com/studio/)** version may be required to build the apk. See table below : + +| AAPS Version | Preferred
Android Studio
Version | Alternative
Android Studio
Version | Gradle | JVM | +| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------ | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug Feature Drop (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +The "preferred version" is packaged with the appropriate JVM version. The preferred version is also the minimal version you can use to build **AAPS**. You will **NOT** be able to build on a version older than the "preferred" one. If using a different version, you may encounter issues related to JVM version. See the [Troubleshooting Android Studio](#troubleshooting_androidstudio-uncommitted-changes) page to help solve these issues. If your current Android Studio version is not listed in the table, you must update it first. + +The Gradle version is linked to the source code, you will always get the correct Gradle version when downloading / updating the source code. It is mentioned here for reference only, you don't have to take action on it. + +* [Windows 32-bit systems](#troubleshooting_androidstudio-unable-to-start-daemon-process) are not supported by Android Studio. Please keep in mind that both **64 bit CPU and 64 bit OS are mandatory condition.** If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OS (Only 64 bit)Windows 8 or higherMac OS 10.14 or higherAny Linux supports Gnome, KDE, or Unity DE;  GNU C Library 2.31 or later

CPU (Only 64 bit)

x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a
Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for
Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3

RAM

16GB or more

Disk

At least 30GB free space. SSD is recommended.

Resolution

1280 x 800 Minimum

Internet

Broadband

+ +**It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file.** You can still use a HDD when you are building the **AAPS** apk file. If you do, the building process may take a long time to complete, but once it has started, you can leave it running unattended. + +## Help and support during the building process + +If you run into difficulties in the process of building the **AAPS** app, there is a dedicated [**troubleshooting Android Studio**](../GettingHelp/TroubleshootingAndroidStudio) section, please consult that first. + +If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other **AAPS** users group on [Facebook](https://www.facebook.com/groups/AndroidAPSUsers) or [Discord](https://discord.gg/4fQUWHZ4Mw). If you want to change something yourself (updating screenshots _etc_), please submit a [pull request (PR)](../SupportingAaps/HowToEditTheDocs.md). + +## Step-by-step guide to building the AAPS app + +```{admonition} WARNING +:class: warning +If you have built AAPS before, you don't need to take all the following steps again. +Please jump directly to the [update guide](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +In this guide you will find _example_ screenshots of building of **AAPS** apk file. Because **Android Studio** - the software which we use to build the **AAPS** apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow. + +Since **Android Studio** runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms. + +(install-git-if-you-dont-have-it)= +### Install Git + +```{admonition} Why Git? +:class: dropdown + +Git is known as a “_Versioning Control System_” (VCS).\ +Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the **AAPS** source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the **AAPS** application (apk). +``` + +(BuildingAaps-steps-for-installing-git)= +#### Steps for Installing Git + +1. Check that you don’t already have **Git** installed. You can do this by typing “git” in the Windows search bar – if you see **“Git bash”** or some other form of Git, it is already installed and you can go straight to [installing Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. If you don’t have Git installed, download and install the latest version for your system from the "Download" section on [**here**](https://git-scm.com/downloads). Any recent Git version should work, select the correct version according to your system, either Mac, Windows and Linux. + +**Note for Mac users:** the Git webpage will also guide you to install an additional program called "homebrew" to aid the installation. If you install Git via homebrew, there is no need to change any preferences. + +(Make_a_note_of_Git_path)= + +* During the installation, when you are asked to "select destination location" make a note of _where_ Git is being installed (the "**installation path**") you will need to check it in the next step. It will be something similar to "C:\Program Files\Git\cmd\git.exe" + +* As you proceed through several steps of the Git installation, just accept all the default options. + +* After the install, if you forgot to make a note of the where Git was installed, you can find it as follows: type "git" into the PC search bar, right click on "Git bash", select "open file location" hover over the "Git bash" icon with your mouse, which will then reveal where it is installed. + +* Reboot your computer before the next step. + +(Building-APK-install-android-studio)= +### Android Studio'yu yükleyin + +- **You have to be online all of the time during the following steps, as Android Studio downloads several updates** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot "break" a current, looping version of **AAPS** which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes. +``` + +One of the most important things when installing Android Studio is **be patient!** During installation and setup, Android Studio is downloading a lot of stuff which will take time. + +```{admonition} Different UI +:class: warning +Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the *new UI* in "Ladybug". If you still use the older UI, you might want to change Android Studio to the new UI first following [these instructions](NewUI). +``` + +The Android studio version is very important. See the [instructions above](#Building-APK-recommended-specification-of-computer-for-building-apk-file) to pick the proper version of Android Studio. + +Download the [current version of Android Studio](https://developer.android.com/studio) or an older version from the [**Archives**](https://developer.android.com/studio/archive) and accept the download agreements. + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows! + +Install Android Studio by clicking "Next", as shown in the following screenshots. You do **not** need to change any settings! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +If you want to save hard disk space, your you can uncheck Android Virtual Device: it is not used for building **AAPS**. + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +Now click on "Install": + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +Once it's completed, press "Next" + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +In the last step, click on "Finished" to start Android Studio for the first time. + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won't make any difference for the following steps. + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +The welcome screen greets you to the installation of Android Studio. Press "Next". + +![Welcome](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +Select "Standard" as installation type. + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +Verify the settings by clicking "Next" again. + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select "Accept" (2 + 4) on the right side. + +Then the "Finish" (5) button can be clicked. + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +Some Android packages will now be downloaded and installed. Be patient and wait. + +When it's finished, you will find the following screen where you can select "Finish" again. + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +You will now see the Welcome screen of Android Studio. + +![Welcome_to_Android_Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### Download the AAPS code + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +The first time **AAPS** is downloaded, Android Studio will connect over the internet to the Github website to download the source code for **AAPS**. This should take about 1 minute. + +Android Studio will then use **Gradle** (a development tool for Android apps) to identify other components needed to build these items on your computer. +``` + +On the Android Studio Welcome screen, check that "**Projects**" (1) is highlighted on the left. + +Then click "**Clone Repository**" (2) on the right: + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +We will now tell Android Studio where to get the code from: + +![Get from Version Control](../images/Building-the-App/033_CloneGit.png) + +* "Repository URL" should be selected (by default) on the left (1). +* "Git" should be selected (by default) as version control (2). +* Now copy this URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + and paste it into the URL textbox (3). + +* Check the (default) directory for saving the cloned code does not already exist on your computer (4). You can change it to some directory, but please remember where you stored it! +* Now click the button "Clone" (5). + +```{admonition} INFORMATION +:class: information +Make a note of the directory. It is where your sourcecode is stored! +``` + +You will now see a screen telling you that the repository is being cloned: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Click on "Trust project": + + ![Trust project](../images/Building-the-App/035_TrustProject.png) + + +Only for Windows users: If your firewall asks for permission, grant access: + + ![Firewall permission java](../images/AndroidStudio361_18.png) + +After the repository is cloned successfully, Android Studio will open the cloned project. + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio changed its UI recently. New installations of Android Studio use the new UI by default! + +Only if your Android Studio looks different, you might need to switch to the new UI: +Click on the hamburger menu on the top left, then select **Settings** (or **Preferences** on Apple computers). +In **Appearance & Behaviour**, go to **New UI** and tick **Enable new UI**. Then restart Android Studio to start using it. + +If you don't find the option **New UI** don't worry: you are already using it! +``` + + +When Android Studio opened, wait patiently (this may take a few minutes), and particularly, **do not** update the project as suggested in the pop-up. + +Android Studio will start a "Gradle project sync" automatically, which will take a couple of minutes to finish. You can see it (still) running: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio might recommend updating the gradle system. **Never update gradle!** This will lead to difficulties. +``` + +Only on windows computers: You might get a notification about windows defender running: Click on **Automatically** and confirm, it will make the build run faster! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +You can leave the gradle sync running and follow the next steps already. + +(Building-APK-set-git-path-in-preferences)= +### Set Git path in Android Studio preferences + +Now we will tell Android studio where to find Git, which you installed [earlier](#install-git-if-you-dont-have-it). + +* Windows users only: Make sure you have restarted your computer after [installing Git](#install-git-if-you-dont-have-it). If not, restart now and re-open Android Studio + +In the top left corner of **Android Studio**, open the hamburger menu and navigate to **File** > **Settings** (on Windows) or **Android Studio** > **Preferences** (on Mac). This opens the following window, click to expand the dropdown called **Version Control** (1) and select **Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +Check if **Android Studio** can automatically locate the correct **Path to Git executable** automatically by clicking the button "Test" (1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +If the automatic setting is successful, your current version of **Git** will be displayed next to the path. + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +If you find that **git.exe** is not found automatically, or that clicking "Test" results in an error (1), you can either +* manually enter the path which you saved [earlier](#BuildingAaps-steps-for-installing-git), or +* click on the folder icon (1) and manually navigating to the directory where **git.exe** was installed [earlier](#BuildingAaps-steps-for-installing-git) +* Verify your settings with the **Test** button! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### Build the AAPS "signed" APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android requires each app to be _signed_, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow [this link](https://developer.android.com/studio/publish/app-signing.html#generate-key). + +For our purposes, this just means that we generate a signing or "keystore" file and use it when we build the **AAPS** app. +``` + + +**Important: Make sure the gradle sync is finished successfully before proceeding!** + + +Click the hamburger menu on the top left to open the menu bar. Select **Build** (1), then select **Generate Signed App Bundle / APK** (2) + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +Select "APK" instead of "Android App Bundle" and click "Next": + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +In the next screen, make sure that "Module" is set to "AAPS.app" (1). + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +If you want to create the apk for your watch, you now need to select AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +Click "Create new..." (2) to start creating your key store. + +```{admonition} INFORMATION! +:class: information +You will only need to create the keystore once. +If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords! +``` + +**_Note:_** The key store is a file in which the information for signing the app is stored. It is encrypted, and the information is secured with passwords. + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* Click the "folder" symbol (1) to select a path on your computer for your key store. + + Do **not** use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer. + +```{admonition} WARNING! +:class: warning +Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update! +``` + +* Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2). + + The passwords for key store and key do not have to be sophisticated. If you lose your password in the future, see [troubleshooting for lost key store](#troubleshooting_androidstudio-lost-keystore). + +* The default alias (3) for your key is "key0", leave this unchanged. + +* You now need a password for your key. To keep it simple, if you want, you can use the same password you used for your keystore, above. Enter a password (4) and confirm it. + +```{admonition} WARNING! +:class: warning +Note down these passwords! You will need them when you build the next AAPS update! +``` + +* The validity is 25 years by default, leave it as it is. + +* Enter your first and last name (5). No other information needs to be added but you are free to do (6-7). + +* Click "OK" (8) to continue: + + +On the **Generate signed App Bundle or APK** page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don't have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Click "Next" (4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +On the next screen, select build variant "fullRelease" (2) and click "Create" (3). You should remember the directory displayed at (1), as later you will find your built apk file there! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio will now build the **AAPS** apk. It will show "Gradle Build running" (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so **be patient!** If you want to watch the progress of the build, click on the small hammer "build" (1) at the bottom of Android Studio: + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +Now you can watch the building progress: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +Android Studio will display the information "BUILD SUCCESSFUL" after build is finished. You may see a popup notification which you can click to select "locate". If you miss this, click on the notification icon (1) and then on **locate** (2) at the very bottom of the screen to bring up the Notifications: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_If the build was not successful, refer to the [Android Studio Troubleshooting section](../GettingHelp/TroubleshootingAndroidStudio)._** + +In the Notifications box, click on the blue link "locate": + +![Locate build](../images/Building-the-App/048_BuildFinished.png) Your file manager will open and show you the build apk file that you have just built. + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +Tebrikler! Now you have built the **AAPS** apk file, you will be transferring this file to your smartphone in the next section of the docs. + +```{tip} +If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk. +``` + +Move to the next stage of [Transferring and Installing **AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md). + + + diff --git a/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/tr/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/zh_CN/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/zh_CN/SettingUpAaps/BrowserBuild.md index 6b090eccdc46..82aa0f15d39d 100644 --- a/docs/CROWDIN/zh_CN/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/zh_CN/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # Browser build -(browser-build)= - Building AAPS with GitHub Actions. **Minimum AAPS version supported is 3.3.2.1.** @@ -65,14 +63,17 @@ GitHub now displays your personal copy of AndroidAPS. Leave this web browser tab ## 2. Preparation Steps - If you are building from an Android device, install [File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager) from the Google Play store. +- Download the preparation file from here: + ```{eval-rst} .. raw:: html -
-      • Download the preparation file from here
-    
+       aaps-ci-preparation.html ```
+
+
+ AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): @@ -90,8 +91,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option1)= ### AAPS-CI Option 1 – Generate JKS - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Compatible with Android +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -108,7 +111,8 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` - Compatible with iOS (using iPad as an example) +(aaps-ci-ios-ipad)= + - Compatible with iOS (using iPad as an example) ```{eval-rst} .. raw:: html @@ -125,6 +129,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -132,6 +175,10 @@ The AAPS app will be saved in your Google Cloud drive once built: (aaps-ci-option2)= ### AAPS-CI Option 2 – Upload Existing JKS - Suitable for users who already have a JKS and know the JKS password and alias. + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -148,6 +195,45 @@ The AAPS app will be saved in your Google Cloud drive once built: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - As described in the video, please copy it to the corresponding field. ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -166,6 +252,10 @@ The AAPS app will be saved in your Google Cloud drive once built: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Customizations are usually not necessary. This is for your information ony. +``` + (github-build-apk)= ## AAPS-CI GitHub Actions to Build the AAPS APK - Suitable for general users. @@ -218,10 +308,6 @@ The AAPS app will be saved in your Google Cloud drive once built: -------- -```{warning} -Customizations are usually not necessary. This is for your information ony. -``` - (github-cherry-pick)= ## If you want to add a specific commit to your branch, please use cherry-pick. diff --git a/docs/CROWDIN/zh_CN/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/zh_CN/SettingUpAaps/BuildingAaps.md index def234878a7c..7166591ba934 100644 --- a/docs/CROWDIN/zh_CN/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/zh_CN/SettingUpAaps/BuildingAaps.md @@ -6,417 +6,21 @@ 详情请参阅[常见问题页面](../UsefulLinks/FAQ.md)。 +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## 构建AAPS所需的计算机和软件规格。 +### Build with a browser -* 构建APK可能需要特定版本的**[Android Studio](https://developer.android.com/studio/)**。 请参考下方表格: +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS 版本 | 推荐
Android Studio
版本 | 备选
Android Studio
版本 | Gradle | JVM | -| ----------------------- | ---------------------------------------- | ---------------------------------------- | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug 功能更新包 (2024.2.2) | up to Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -推荐版本是已内置适配的JVM版本。 推荐版本同时也是构建**AAPS**的最低可用版本。 若使用低于"推荐"的版本将**无法**完成构建。 若选用其他版本,可能遭遇与JVM版本相关的兼容性问题。 请参考[Android Studio问题排查指南](#troubleshooting_androidstudio-uncommitted-changes)解决。 若您当前的Android Studio版本未在下表中列出,则需先升级至支持版本。 +---- -Gradle版本由源代码仓库锁定,在拉取/更新代码时将自动获取正确版本。 此处列出仅作参考,无需手动干预。 - -* Android Studio 不支持 [Windows 32位系统](#troubleshooting_androidstudio-unable-to-start-daemon-process)。 请牢记,**64位CPU和64位操作系统是必要条件**。 如果您的系统不满足这一条件,您需要更换相应的硬件、软件或整个系统。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
操作系统 (仅限 64 位)Windows 8 或更新版Mac OS 10.14 或更新版任何支持Gnome、KDE或Unity桌面环境的Linux系统;  GNU C库2.31或更高版本。

CPU(仅限64位)

x86_64 CPU架构;第二代Intel Core或更新版本,或支持
Windows Hypervisor的AMD CPU。
基于ARM的芯片,或第二代Intel Core或更新版本(需支持
Hypervisor.Framework)。
x86_64 CPU架构;第二代Intel Core或更新版本,或支持AMD虚拟化(AMD-V)和SSSE3的AMD处理器。

内存(RAM)

16GB or more

硬盘

至少30GB的可用空间。 建议使用SSD(固态硬盘)。

分辨率

至少1280 x 800

网络连接

宽带

- -**强烈建议(非强制)使用固态硬盘(SSD)而非机械硬盘(HDD),因为这将减少你构建AAPS apk文件所需的时间。**不过,在构建**AAPS** apk文件时,你仍然可以使用机械硬盘。 如果使用机械硬盘,构建过程可能会需要很长时间才能完成,但是一旦开始,你就可以让它无人值守地运行。 - -## 构建过程中的帮助和支持 - -如果在构建**AAPS**应用的过程中遇到困难,有一个专门的[**Android Studio故障排除**](../GettingHelp/TroubleshootingAndroidStudio)部分,请先参考该部分。 - -如果你认为构建说明中有错误、遗漏或令人困惑的地方,或者你仍然在努力解决问题,请联系[Facebook](https://www.facebook.com/groups/AndroidAPSUsers)或[Discord](https://discord.gg/4fQUWHZ4Mw)上的其他**AAPS**用户组。 如果你想自己更改某些内容(如更新截图_等_),请提交一个[拉取请求(PR)](../SupportingAaps/HowToEditTheDocs.md)。 - -## 构建AAPS应用的逐步指南。 - -```{admonition} WARNING -:class:警告 -如果你之前已经构建过AAPS,则无需再次执行以下所有步骤。 -请直接跳转到[更新指南](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -在本指南中,您将看到构建**AAPS** apk文件的_示例_截图。 由于我们用于构建**AAPS** apk的软件**Android Studio**会定期更新,这些截图可能与您的安装界面不完全一致,但您仍然可以按照它们进行操作。 - -**Android Studio**可在Windows、Mac OS X和Linux平台上运行,因此不同平台的步骤可能会存在细微差异。 - -(install-git-if-you-dont-have-it)= -### Git安装步骤 - -```{admonition} Why Git? -:class: 下拉菜单(dropdown?) -Git是一个“_版本控制系统_”(VCS)。\ -Git是一个程序,允许您跟踪代码中的更改并与他人协作。 您将使用Git从GitHub网站将**AAPS**源代码的副本复制到您的本地计算机。 然后,您将在计算机上使用Git来构建**AAPS**应用程序(apk)。 -``` - -(BuildingAaps-steps-for-installing-git)= -#### 安装Git的步骤 - -1. 检查**Git**是否已安装 **Settings**(Windows上)或**Android Studio** > **Preferences**(Mac上)。 这将打开以下窗口,点击展开名为**Version Control**(1)的下拉菜单,然后选择**Git** - -![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) - -检查**Android Studio**是否可以自动定位正确的**Git可执行文件路径**,方法是点击“Test”按钮(1): - -![Git Executable](../images/Building-the-App/039_GitTest.png) - - -如果自动设置成功,你当前版本的**Git**将显示在路径旁边。 - - ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) - - -如果你发现**git.exe**没有自动找到,或者点击“Test”导致错误(1),你可以要么 -* 手动输入你[之前](#BuildingAaps-steps-for-installing-git)保存的路径,要么 -* 点击文件夹图标(1),然后手动导航到之前[已安装](#BuildingAaps-steps-for-installing-git)**git.exe**的目录。 -* 使用Test按钮验证你的设置! - - ![Git not found](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### 构建AAPS的“签名版”APK文件 - -```{admonition} Why does the AAPS app need to be "signed"? -:class:下拉菜单(dropdown?) -Android要求每个应用都必须被_签名_,以确保它只能在以后从发布原始应用的同一可信来源更新。 有关此主题的更多信息,请访问[这个链接] -(https://developer.android.com/studio/publish/app-signing.html#generate-key). - -这意味着我们生成一个签名或“keystore”文件,并在构建**AAPS**应用时使用它。 -``` - - -**重要提示:在进行下一步之前,请确保Gradle同步已成功完成!** - - -点击左上角的汉堡菜单以打开菜单栏。 选择**Build**(1),然后选择**Generate Signed App Bundle / APK**(2)。 - -![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -选择“APK”而不是“Android App Bundle”,然后点击“下一步”: - -![APK instead of bundle](../images/Building-the-App/041_APK.png) - -在下一个屏幕中,确保“模块”设置为“AAPS.app”(1)。 - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: 信息 -如果您要为手表创建APK,现在需要选择AAPS.wear! -``` -![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) - -点击“创建新的...” (2)以开始创建您的密钥库。 - -```{admonition} INFORMATION! -:class: information -您只需要创建一次keystore。 -如果您之前已经构建过AAPS,请不要创建新的keystore,而是选择您现有的keystore并输入其密码! -``` - -**_注意:_** keystore是一个文件,用于存储签名应用的信息。 它是加密的,并且信息通过密码保护。 - -![Create key store](../images/Building-the-App/043_Keystore.png) - -* 点击“文件夹”图标(1)以选择您计算机上的一个路径来保存您的密钥库。 - - **不要**使用存储源代码的目录,而是选择您也会转移到新计算机上的某个目录。 - -```{admonition} WARNING! -:class:警告 -请务必记下您的keystore存储位置。 在构建下一个AndroidAPS更新时,您将需要它! -``` - -* 现在选择一个简单的密码(并记下它),在密码框(2)中输入它,并确认密码(2)。 - - 密钥库和密钥的密码不需要非常复杂。 如果您将来丢失了密码,请参阅[丢失keystore的故障排除](#troubleshooting_androidstudio-lost-keystore)。 - -* 默认的密钥别名(3)是“key0”,请保持不变。 - -* 现在您需要为您的密钥设置一个密码。 为了简单起见,如果您愿意,可以使用与上面设置的密钥库相同的密码。 输入密码(4)并确认它。 - -```{admonition} WARNING! -:class:警告 -记下这些密码! 在构建下一个AAPS更新时,您将需要它们! -``` - -* 有效期默认为25年,保持不变。 - -* 输入您的名字和姓氏(5)。 其他信息无需填写,但您可以根据需要自行添加(6-7)。 - -* 点击“确定”(8)以继续: - - -在**Generate signed App Bundle or APK**页面上,现在将显示您的keystore的路径。 现在重新输入密钥库密码(1)和密钥密码(2),并勾选方框(3)以记住密码,这样您在下次构建APK时(例如,更新到新的AAPS版本时)就不用再次输入这些密码。 点击“下一步”(4): - -![Remember passwords](../images/Building-the-App/044_RememberPwd.png) - - -在下一个屏幕中,选择构建变量“完全版本(fullRelease)”(2),然后点击“创建”(3)。 您应该记住在(1)处显示的目录,因为之后您可以在那里找到构建好的APK文件! - - ![Select build variant](../images/Building-the-App/045_BuildPath.png) - -Android Studio现在将构建AAPS apk。 在右下角会显示“Gradle 构建运行中”(2)。 此过程需要一些时间,具体取决于您的计算机和互联网连接,因此**请耐心等待!**如果您想查看构建进度,请点击Android Studio底部的“build”小锤子图标(1): - -![Gradle Running](../images/Building-the-App/046_BuildRunning.png) - -现在您可以查看构建进度: - -![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) - -构建完成后,Android Studio 将显示“构建成功”的信息。 您可能会看到一个弹出通知,您可以点击它以选择“定位”。 如果您错过了这个通知,请点击通知图标(1),然后在屏幕最底部点击**locate**(2)以打开通知列表: - -![Build finished](../images/Building-the-App/049_ReopenNotification.png) - -**_如果构建不成功,请参阅[Android Studio故障排除部分](../GettingHelp/TroubleshootingAndroidStudio)。_** - -在通知框中,点击蓝色链接“定位”: - -![Locate build](../images/Building-the-App/048_BuildFinished.png) 构建成功后,您将收到通知,并可以通过点击通知中的链接来定位您的apk文件。 - - ![File location apk](../images/Building-the-App/050_LocateAPK.png) - -恭喜! 现在您已经构建了AAPS apk文件,接下来您将把这个文件传输到您的智能手机上。 - -```{tip} -如果您认为将来可能会使用Android Wear智能手表,那么现在是构建AAPS Wear apk的最佳时机,以确保它与您的AAPS apk同步。 -``` - -接下来,请转到下一阶段[传输和安装**AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md)。 +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/zh_CN/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/zh_CN/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..1309234325f7 --- /dev/null +++ b/docs/CROWDIN/zh_CN/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,426 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## 自行构建而非下载 + +**由于医疗器械相关法规的限制,AAPS应用(一个apk文件)无法提供下载。 构建该应用供自己使用是合法的,但不得将副本提供给他人** + +详情请参阅[常见问题页面](../UsefulLinks/FAQ.md)。 + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## 构建AAPS所需的计算机和软件规格。 + +* 构建APK可能需要特定版本的**[Android Studio](https://developer.android.com/studio/)**。 请参考下方表格: + +| AAPS 版本 | 推荐
Android Studio
版本 | 备选
Android Studio
版本 | Gradle | JVM | +| ----------------------- | ---------------------------------------- | ---------------------------------------- | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | up to Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog (2023.1.1) | up to Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug 功能更新包 (2024.2.2) | up to Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +推荐版本是已内置适配的JVM版本。 推荐版本同时也是构建**AAPS**的最低可用版本。 若使用低于"推荐"的版本将**无法**完成构建。 若选用其他版本,可能遭遇与JVM版本相关的兼容性问题。 请参考[Android Studio问题排查指南](#troubleshooting_androidstudio-uncommitted-changes)解决。 若您当前的Android Studio版本未在下表中列出,则需先升级至支持版本。 + +Gradle版本由源代码仓库锁定,在拉取/更新代码时将自动获取正确版本。 此处列出仅作参考,无需手动干预。 + +* Android Studio 不支持 [Windows 32位系统](#troubleshooting_androidstudio-unable-to-start-daemon-process)。 请牢记,**64位CPU和64位操作系统是必要条件**。 如果您的系统不满足这一条件,您需要更换相应的硬件、软件或整个系统。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
操作系统 (仅限 64 位)Windows 8 或更新版Mac OS 10.14 或更新版任何支持Gnome、KDE或Unity桌面环境的Linux系统;  GNU C库2.31或更高版本。

CPU(仅限64位)

x86_64 CPU架构;第二代Intel Core或更新版本,或支持
Windows Hypervisor的AMD CPU。
基于ARM的芯片,或第二代Intel Core或更新版本(需支持
Hypervisor.Framework)。
x86_64 CPU架构;第二代Intel Core或更新版本,或支持AMD虚拟化(AMD-V)和SSSE3的AMD处理器。

内存(RAM)

16GB or more

硬盘

至少30GB的可用空间。 建议使用SSD(固态硬盘)。

分辨率

至少1280 x 800

网络连接

宽带

+ +**强烈建议(非强制)使用固态硬盘(SSD)而非机械硬盘(HDD),因为这将减少你构建AAPS apk文件所需的时间。**不过,在构建**AAPS** apk文件时,你仍然可以使用机械硬盘。 如果使用机械硬盘,构建过程可能会需要很长时间才能完成,但是一旦开始,你就可以让它无人值守地运行。 + +## 构建过程中的帮助和支持 + +如果在构建**AAPS**应用的过程中遇到困难,有一个专门的[**Android Studio故障排除**](../GettingHelp/TroubleshootingAndroidStudio)部分,请先参考该部分。 + +如果你认为构建说明中有错误、遗漏或令人困惑的地方,或者你仍然在努力解决问题,请联系[Facebook](https://www.facebook.com/groups/AndroidAPSUsers)或[Discord](https://discord.gg/4fQUWHZ4Mw)上的其他**AAPS**用户组。 如果你想自己更改某些内容(如更新截图_等_),请提交一个[拉取请求(PR)](../SupportingAaps/HowToEditTheDocs.md)。 + +## 构建AAPS应用的逐步指南。 + +```{admonition} WARNING +:class:警告 +如果你之前已经构建过AAPS,则无需再次执行以下所有步骤。 +请直接跳转到[更新指南](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +在本指南中,您将看到构建**AAPS** apk文件的_示例_截图。 由于我们用于构建**AAPS** apk的软件**Android Studio**会定期更新,这些截图可能与您的安装界面不完全一致,但您仍然可以按照它们进行操作。 + +**Android Studio**可在Windows、Mac OS X和Linux平台上运行,因此不同平台的步骤可能会存在细微差异。 + +(install-git-if-you-dont-have-it)= +### Git安装步骤 + +```{admonition} Why Git? +:class: 下拉菜单(dropdown?) +Git是一个“_版本控制系统_”(VCS)。\ +Git是一个程序,允许您跟踪代码中的更改并与他人协作。 您将使用Git从GitHub网站将**AAPS**源代码的副本复制到您的本地计算机。 然后,您将在计算机上使用Git来构建**AAPS**应用程序(apk)。 +``` + +(BuildingAaps-steps-for-installing-git)= +#### 安装Git的步骤 + +1. 检查**Git**是否已安装 **Settings**(Windows上)或**Android Studio** > **Preferences**(Mac上)。 这将打开以下窗口,点击展开名为**Version Control**(1)的下拉菜单,然后选择**Git** + +![Version_control_Git](../images/Building-the-App/038_SettingsGit.png) + +检查**Android Studio**是否可以自动定位正确的**Git可执行文件路径**,方法是点击“Test”按钮(1): + +![Git Executable](../images/Building-the-App/039_GitTest.png) + + +如果自动设置成功,你当前版本的**Git**将显示在路径旁边。 + + ![Git_version_displayed](../images/Building-the-App/039_GitTestSuccess.png) + + +如果你发现**git.exe**没有自动找到,或者点击“Test”导致错误(1),你可以要么 +* 手动输入你[之前](#BuildingAaps-steps-for-installing-git)保存的路径,要么 +* 点击文件夹图标(1),然后手动导航到之前[已安装](#BuildingAaps-steps-for-installing-git)**git.exe**的目录。 +* 使用Test按钮验证你的设置! + + ![Git not found](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### 构建AAPS的“签名版”APK文件 + +```{admonition} Why does the AAPS app need to be "signed"? +:class:下拉菜单(dropdown?) +Android要求每个应用都必须被_签名_,以确保它只能在以后从发布原始应用的同一可信来源更新。 有关此主题的更多信息,请访问[这个链接] +(https://developer.android.com/studio/publish/app-signing.html#generate-key). + +这意味着我们生成一个签名或“keystore”文件,并在构建**AAPS**应用时使用它。 +``` + + +**重要提示:在进行下一步之前,请确保Gradle同步已成功完成!** + + +点击左上角的汉堡菜单以打开菜单栏。 选择**Build**(1),然后选择**Generate Signed App Bundle / APK**(2)。 + +![Build apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +选择“APK”而不是“Android App Bundle”,然后点击“下一步”: + +![APK instead of bundle](../images/Building-the-App/041_APK.png) + +在下一个屏幕中,确保“模块”设置为“AAPS.app”(1)。 + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: 信息 +如果您要为手表创建APK,现在需要选择AAPS.wear! +``` +![Create_key_store](../images/Building-the-App/042_CreateNewKey.png) + +点击“创建新的...” (2)以开始创建您的密钥库。 + +```{admonition} INFORMATION! +:class: information +您只需要创建一次keystore。 +如果您之前已经构建过AAPS,请不要创建新的keystore,而是选择您现有的keystore并输入其密码! +``` + +**_注意:_** keystore是一个文件,用于存储签名应用的信息。 它是加密的,并且信息通过密码保护。 + +![Create key store](../images/Building-the-App/043_Keystore.png) + +* 点击“文件夹”图标(1)以选择您计算机上的一个路径来保存您的密钥库。 + + **不要**使用存储源代码的目录,而是选择您也会转移到新计算机上的某个目录。 + +```{admonition} WARNING! +:class:警告 +请务必记下您的keystore存储位置。 在构建下一个AndroidAPS更新时,您将需要它! +``` + +* 现在选择一个简单的密码(并记下它),在密码框(2)中输入它,并确认密码(2)。 + + 密钥库和密钥的密码不需要非常复杂。 如果您将来丢失了密码,请参阅[丢失keystore的故障排除](#troubleshooting_androidstudio-lost-keystore)。 + +* 默认的密钥别名(3)是“key0”,请保持不变。 + +* 现在您需要为您的密钥设置一个密码。 为了简单起见,如果您愿意,可以使用与上面设置的密钥库相同的密码。 输入密码(4)并确认它。 + +```{admonition} WARNING! +:class:警告 +记下这些密码! 在构建下一个AAPS更新时,您将需要它们! +``` + +* 有效期默认为25年,保持不变。 + +* 输入您的名字和姓氏(5)。 其他信息无需填写,但您可以根据需要自行添加(6-7)。 + +* 点击“确定”(8)以继续: + + +在**Generate signed App Bundle or APK**页面上,现在将显示您的keystore的路径。 现在重新输入密钥库密码(1)和密钥密码(2),并勾选方框(3)以记住密码,这样您在下次构建APK时(例如,更新到新的AAPS版本时)就不用再次输入这些密码。 点击“下一步”(4): + +![Remember passwords](../images/Building-the-App/044_RememberPwd.png) + + +在下一个屏幕中,选择构建变量“完全版本(fullRelease)”(2),然后点击“创建”(3)。 您应该记住在(1)处显示的目录,因为之后您可以在那里找到构建好的APK文件! + + ![Select build variant](../images/Building-the-App/045_BuildPath.png) + +Android Studio现在将构建AAPS apk。 在右下角会显示“Gradle 构建运行中”(2)。 此过程需要一些时间,具体取决于您的计算机和互联网连接,因此**请耐心等待!**如果您想查看构建进度,请点击Android Studio底部的“build”小锤子图标(1): + +![Gradle Running](../images/Building-the-App/046_BuildRunning.png) + +现在您可以查看构建进度: + +![Android_Studio_building](../images/Building-the-App/047_BuildDetails.png) + +构建完成后,Android Studio 将显示“构建成功”的信息。 您可能会看到一个弹出通知,您可以点击它以选择“定位”。 如果您错过了这个通知,请点击通知图标(1),然后在屏幕最底部点击**locate**(2)以打开通知列表: + +![Build finished](../images/Building-the-App/049_ReopenNotification.png) + +**_如果构建不成功,请参阅[Android Studio故障排除部分](../GettingHelp/TroubleshootingAndroidStudio)。_** + +在通知框中,点击蓝色链接“定位”: + +![Locate build](../images/Building-the-App/048_BuildFinished.png) 构建成功后,您将收到通知,并可以通过点击通知中的链接来定位您的apk文件。 + + ![File location apk](../images/Building-the-App/050_LocateAPK.png) + +恭喜! 现在您已经构建了AAPS apk文件,接下来您将把这个文件传输到您的智能手机上。 + +```{tip} +如果您认为将来可能会使用Android Wear智能手表,那么现在是构建AAPS Wear apk的最佳时机,以确保它与您的AAPS apk同步。 +``` + +接下来,请转到下一阶段[传输和安装**AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md)。 + + + diff --git a/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/zh_CN/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ diff --git a/docs/CROWDIN/zh_TW/SettingUpAaps/BrowserBuild.md b/docs/CROWDIN/zh_TW/SettingUpAaps/BrowserBuild.md index 2720834b747d..1fd8b50a457f 100644 --- a/docs/CROWDIN/zh_TW/SettingUpAaps/BrowserBuild.md +++ b/docs/CROWDIN/zh_TW/SettingUpAaps/BrowserBuild.md @@ -1,7 +1,5 @@ # 瀏覽器建置 -(browser-build)= - 使用 GitHub Actions 建置 AAPS。 **最低支援 AAPS 版本為 3.3.2.1。** @@ -65,15 +63,19 @@ GitHub 現在顯示你個人的 AndroidAPS 副本。 請保持這個瀏覽器頁 ## 2. 準備步驟 - 如果你是從 Android 裝置建置,請先從 Google Play 商店安裝[File Manager Plus](https://play.google.com/store/apps/details?id=com.alphainventor.filemanager)。 +- Download the preparation file from here: + ```{eval-rst} -..
-       • 從這裡下載準備檔案
-
+.. raw:: html +       aaps-ci-preparation.html ```
+
+
+ -AndroidAPS 建置需要私有金鑰,這些金鑰儲存於 Java 金鑰庫(JKS): +AndroidAPS build requires private keys, that are stored in a Java KeyStore (JKS): - 如果這是你第一次建立 AAPS(或你沒有 Android Studio 的 JKS),請參考 [AAPS-CI 選項 1 – 產生 JKS](aaps-ci-option1) 來完成設定。 - 如果你想使用自己的 JKS(你在先前的 AAPS 建置中使用的那個 JKS),並且你知道它的密碼和別名(key0),請選擇 [AAPS-CI 選項 2 – 上傳現有的 JKS](aaps-ci-option2)。 @@ -82,15 +84,17 @@ AndroidAPS 建置需要私有金鑰,這些金鑰儲存於 Java 金鑰庫(JKS 使用 **選項 1** 建立 AAPS 將無法更新已安裝的 AAPS:你需要卸載它,重新安裝後,從你的手機恢復設定,並從 Nightscout 讀取資料。 ``` -AAPS 應用程式在建立後會保存在你的 Google 雲端硬碟中: +The AAPS app will be saved in your Google Cloud drive once built: - 同時執行 Google 雲端硬碟 [授權](aaps-ci-google-drive-auth) 以允許將建置保存到那裡。 (aaps-ci-option1)= ### AAPS-CI 選項 1 – 生成 JKS - - 適合首次使用者、沒有 JKS 的使用者或忘記密碼或別名的使用者。 + - Suitable for first-time users, or those without a JKS, or who have forgotten the password or alias. +- Here are examples using multiple platforms below. - Android 上的作法 +(aaps-ci-option1-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -107,7 +111,8 @@ AAPS 應用程式在建立後會保存在你的 Google 雲端硬碟中: ``` - iOS 上相容的作法(以 iPad 為例) +(aaps-ci-ios-ipad)= + - iOS 上相容的作法(以 iPad 為例) ```{eval-rst} .. raw:: html @@ -124,6 +129,45 @@ AAPS 應用程式在建立後會保存在你的 Google 雲端硬碟中: ``` +(aaps-ci-option1-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 1 minute 37 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - 如影片所示,請將他複製到對應的欄位中。 ![aaps_ci_pr_ci](../images/Building-the-App/CI/aaps_ci_option1.png) @@ -131,6 +175,10 @@ AAPS 應用程式在建立後會保存在你的 Google 雲端硬碟中: (aaps-ci-option2)= ### AAPS-CI 選項 2 – 上傳現有 JKS - 適合已經擁有 JKS 並且知道 JKS 密碼和別名的用戶。 + - Here are examples using multiple platforms below. + +(aaps-ci-option2-android)= + - Compatible with Android(The simplest, recommended as the first choice) ```{eval-rst} .. raw:: html @@ -147,6 +195,45 @@ AAPS 應用程式在建立後會保存在你的 Google 雲端硬碟中: ``` +(aaps-ci-option2-computer)= +- Use a computer (supports Windows/Mac/Linux) + + Open the webpage https://simplewebserver.org/download.html + + Install Simple HTTP Server If you are a Windows/Mac user, you can install it from the store. After clicking the link, you will be asked whether to allow opening it. Please choose Open Link. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_store.png) + + Example on Mac: + + - get → install → open ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server.png) + + - Click Get Started ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png) + + - Click Get Server ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png) + + - In Folder Path, select the folder where aaps-ci-preparation.html is located, and then click Create Server. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png) + + - Seeing this screen means the server has been started. ![simple_http_server](../images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png) + + - Do not close Simple HTTP Server. Please switch to your browser and open [http://127.0.0.1:8080/aaps-ci-preparation.html](http://127.0.0.1:8080/aaps-ci-preparation.html) + + - For the subsequent steps, please refer to the video below, starting from 2 minute 18 seconds. + +```{eval-rst} +.. raw:: html + + +
+
+ +
+
+``` + - 如影片所示,請將他複製到對應的欄位中。 ![aaps_ci_option2](../images/Building-the-App/CI/aaps_ci_option2.png) @@ -165,6 +252,10 @@ AAPS 應用程式在建立後會保存在你的 Google 雲端硬碟中: ![aaps_ci_gdrive_auth](../images/Building-the-App/CI/aaps_ci_gdrive_auth.png) +```{warning} +Google 雲端硬碟授權中的「自訂」欄位,適合熟悉Google Oauth2的人,並且想要使用自已的ClientID時使用。 僅供你參考。 +``` + (github-build-apk)= ## AAPS-CI GitHub Actions 以建置 AAPS APK - 適合一般使用者。 @@ -217,10 +308,6 @@ AAPS 應用程式在建立後會保存在你的 Google 雲端硬碟中: -------- -```{warning} -Google 雲端硬碟授權中的「自訂」欄位,適合熟悉Google Oauth2的人,並且想要使用自已的ClientID時使用。 僅供你參考。 -``` - (github-cherry-pick)= ## 如果你想將特定的提交添加到你的分支,請使用 cherry-pick。 diff --git a/docs/CROWDIN/zh_TW/SettingUpAaps/BuildingAaps.md b/docs/CROWDIN/zh_TW/SettingUpAaps/BuildingAaps.md index 14e88f538a45..01afc983edae 100644 --- a/docs/CROWDIN/zh_TW/SettingUpAaps/BuildingAaps.md +++ b/docs/CROWDIN/zh_TW/SettingUpAaps/BuildingAaps.md @@ -6,420 +6,21 @@ 詳細資訊請參閱 [FAQ 頁面](../UsefulLinks/FAQ.md)。 +--- +Two methods are available to build the AAPS app: -(Building-APK-recommended-specification-of-computer-for-building-apk-file)= -## 建置AAPS所需的電腦和軟體規格 +### Build with a browser -* 可能需要特定版本的 **[Android Studio](https://developer.android.com/studio/)** 來建立 apk。 見下表: +You can build the app with your smartphone using GitHub actions, and save it in your Google Drive. -| AAPS版本 | 首選
Android Studio
版本 | 替代
Android Studio
版本 | Gradle | JVM | -| ----------------------- | ---------------------------------------- | ---------------------------------------- | ------ |:--- | -| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | -| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | -| [3.1.0.3](#version3100) | 2020.3.1 | 最高支援到 Narwhal | 7.3.3 | 17 | -| [3.2.0.4](#version3204) | Hedgehog(2023.1.1) | 最高支援到 Narwhal | 8.2 | 17 | -| [3.3.1.3](#version3300) | Ladybug功能更新(2024.2.2) | 最高支援到 Narwhal | 8.10 | 21 | -| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | -| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | +**[Follow these instructions.](./BrowserBuild.md)** -"首選版本"已打包與適當的JVM版本。 首選版本也是你可以用來建立**AAPS**的最小版本。 你**無法**在比"首選"版本更舊的版本上建立。 如果使用不同的版本,你可能會遇到與JVM版本相關的問題。 請參閱 [Android Studio 問題排除](#troubleshooting_androidstudio-uncommitted-changes) 頁面以協助解決這些問題。 如果你當前的 Android Studio 版本未在表格中列出,你必須先更新它。 +---- -Gradle版本與源代碼相連結,下載/更新源代碼時,你將始終獲得正確的Gradle版本。 此處僅供參考,你不必採取行動。 - -* [Windows 32位系統](#troubleshooting_androidstudio-unable-to-start-daemon-process)不支援Android Studio。 請記住**64位中央處理器和64位作業系統是必要條件。** 如果你的系統不符合此條件,你必須更換受影響的硬體或軟體,或整個系統。 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
作業系統(僅限64位)Windows 8或更高版本Mac OS 10.14或更高版本任何支援Gnome、KDE或Unity DE的Linux;  GNU C Library 2.31或更新版本

CPU(僅限64位)

x86_64 CPU架構;第二代Intel Core或更新版本,或支援Windows Hypervisor的AMD CPUARM架構晶片,或支援Hypervisor.Framework的第二代Intel Core或更新版本x86_64 CPU架構;第二代Intel Core或更新版本,或支援AMD虛擬化(AMD-V)和SSSE3的AMD處理器

記憶體

16GB 或更多

硬碟

至少30GB的可用空間。 建議使用SSD。

解析度

1280 x 800 最小

網際網路

寬頻

- -**強烈建議(不是強制)使用SSD(固態硬碟)而非HDD(硬碟)因為在建置AAPS apk文件時將需要更少時間。** 在建置**AAPS** apk文件時仍可以使用HDD。 如果這樣做,建置過程可能需要很長時間才能完成,但開始後,你可以讓他無需監控地執行。 - -## 建置過程中的幫助與支援 - -如果在建置**AAPS**應用的過程中遇到困難,請參考專門的[**Android Studio問題排除**](../GettingHelp/TroubleshootingAndroidStudio)部分。 - -如果你認為建置說明中的內容有錯誤、缺失或令人困惑,或仍然感到困難,請與其他**AAPS**用戶群聯繫,群組可在[Facebook](https://www.facebook.com/groups/AndroidAPSUsers)或[Discord](https://discord.gg/4fQUWHZ4Mw)上找到。 如果你想自行更改某些內容(更新螢幕截圖_等_),請提交[拉取請求(PR)](../SupportingAaps/HowToEditTheDocs.md)。 - -## 建置AAPS應用程式的逐步指南 - -```{admonition} WARNING -:class: warning -如果你之前已經建立過AAPS,則不需要再次執行後續所有步驟。 -請直接跳轉到[更新指南](../Maintenance/UpdateToNewVersion.md)! -``` - -```{contents} The overall steps for building the **AAPS** apk file -:depth: 1 -:local: true -``` - -在本指南中,你將找到建置**AAPS** apk文件的_範例_螢幕截圖。 由於**Android Studio** - 我們用來建立**AAPS** apk的軟體 - 定期更新,這些螢幕截圖可能與你的安裝不完全相同,但仍然應該可以遵循。 - -由於**Android Studio**可以在Windows、Mac OS X和Linux平台上運行,因此不同平台的步驟可能會略有不同。 - -(install-git-if-you-dont-have-it)= -### 安裝Git - -```{admonition} Why Git? -:class: dropdown - -Git被稱為“_版本控制系統_”(VCS)。 -Git是一個可以讓你追蹤程式碼變更並與他人協作的程式。 你將使用Git從GitHub網站將**AAPS**的原始碼複製到你的本地電腦。 然後,你將在你的電腦上使用Git來建立**AAPS**應用程式(apk)。 -``` - -(BuildingAaps-steps-for-installing-git)= -#### 安裝Git的步驟 - -1. 檢查你是否已經安裝**Git**。 你可以在Windows搜尋欄中輸入“git”來檢查—如果你看到**“Git bash”**或其他形式的Git,那麼它已經安裝,並且你可以直接前往[安裝Android Studio](#install-android-studio): - - -![Git_installed](../images/Building-the-App/001_check_git_installed.png) - -2. 如果你沒有安裝Git,請從[**這裡**](https://git-scm.com/downloads)的“下載”部分下載並安裝最新版本。 任何最新的Git版本都應該可以使用,請根據你的系統選擇正確的版本,無論是Mac、Windows還是Linux。 - -**Mac使用者注意:**Git網頁會指導你安裝名為"homebrew"的附加程式來協助安裝。 如果你透過homebrew安裝Git,則無需更改任何偏好設定。 - -(Make_a_note_of_Git_path)= - -* 在安裝過程中,當系統要求你“選擇目的地位置”時,請注意_Git_正在被安裝的**安裝路徑**,你將在下一個步驟需要檢查它。 安裝路徑可能類似於“C:\Program Files\Git\cmd\git.exe” - -* 在進行Git安裝的幾個步驟時,只需接受所有的預設選項。 - -* 安裝完成後,如果你忘記紀錄Git的安裝位置,可以透過以下方式找到他:在PC的搜索欄中輸入“git”,右鍵點擊“Git bash”,選擇“打開檔案位置”,將滑鼠懸停在“Git bash”圖示上,這將顯示安裝位置。 - -* 在進行下一步之前,重新啟動你的電腦。 - -(Building-APK-install-android-studio)= -### 安裝Android Studio - -- **在接下來的步驟中,你必須始終保持聯網,因為Android Studio會下載多個更新。** - -```{admonition} What is Android Studio? -:class: dropdown -Android Studio是一個在你的電腦上運行的程式。 它允許你從網際網路(使用Git)下載原始碼並建立智慧型手機(和智慧型手錶)應用程式。 你不能通過在電腦上的Android Studio建立新或更新的應用程式來“破壞”你可能在智慧型手機上運行的當前循環版本的**AAPS**,這些都是完全獨立的過程。 -``` - -安裝Android Studio時最重要的事情之一是**請耐心等候!**在安裝和設置過程中,Android Studio正在下載大量內容,這將需要時間。 - -```{admonition} Different UI -:class: warning -匯入注意:在最近的更新中,Android Studio改變了其使用者介面。 本指南將向你展示在“Ladybug”中的*新介面*的步驟。 如果你仍在使用舊的介面,你可能需要先根據[這些指示](NewUI)將Android Studio切換到新的介面。 -``` - -Android Studio 版本非常重要。 請參閱 [上面的指示](#Building-APK-recommended-specification-of-computer-for-building-apk-file) 以選擇適合的 Android Studio 版本。 - -下載[當前版本的Android Studio](https://developer.android.com/studio)或從[**檔案庫**](https://developer.android.com/studio/archive)下載較舊版本,並接受下載協議。 - -![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) - -下載完成後,啟動下載的應用程序以在你的計算機上安裝它。 你可能需要接受/確認一些有關從 Windows 下載的應用程序的警告! - -透過點擊「下一步」來安裝 Android Studio,如以下屏幕截圖所示。 你**不**需要更改任何設定! - -![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) - -如果您希望節省硬碟空間,可以取消勾選 Android 虛擬設備:這不適用於建立 **AAPS**。 - -![Choose_components](../images/Building-the-App/012_InstallLadybug.png) - -![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) - -現在點擊「安裝」: - -![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) - -完成後,點擊「下一步」 - -![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) - -在最後一步,點擊「完成」來首次啟動 Android Studio。 - -![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) - -系統將詢問你是否希望幫助改善 Android Studio。 根據自己的喜好選擇選項,這不會影響接下來的步驟。 - -![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) - -歡迎畫面歡迎你安裝 Android Studio。 按「下一步」。 - -![歡迎](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) - -選擇「標準」作為安裝類型。 - -![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) - -通過再次點擊「下一步」來確認設定。 - -![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) - -現在你需要接受許可協議。 左側有兩個區域(1 + 3),你需要逐一選擇並在右側各選擇「接受」(2 + 4)。 - -然後可以點擊「完成」(5) 按鈕。 - -![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) - -某些 Android 套件現在將被下載和安裝。 請耐心等待。 - -當這一切完成後,你將看到以下畫面,可以再次選擇「完成」。 - -![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) - -你現在將看到 Android Studio 的歡迎畫面。 - -![歡迎來到Android Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) - - -(Building-APK-download-AAPS-code)= -### 下載AAPS程式碼 - -```{admonition} Why can it take a long time to download the AAPS code? -:class: dropdown - -第一次下載**AAPS**時,Android Studio將透過網際網路連接到Github網站以下載**AAPS**的原始碼。 這應該會花大約1分鐘的時間。 - -然後,Android Studio將使用**Gradle**(一種開發Android應用的工具)來識別在你的電腦上構建這些項目所需的其他元件。 -``` - -在Android Studio的歡迎畫面上,檢查左側的“**專案**” (1)是否高亮顯示。 - -點一下右側的"**Clone Repository**" (2) - -![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) - -我們現在將告訴Android Studio從哪裡獲取程式碼: - -![從版本控制獲取](../images/Building-the-App/033_CloneGit.png) - -* “倉庫URL”應該在左側(1)預設選擇。 -* “Git”應作為版本控制預設選擇(2)。 -* 現在複製這個URL: - ``` - https://github.com/nightscout/AndroidAPS.git - ``` - 然後將其粘貼到URL文本框中(3)。 - -* 檢查用於儲存複製程式碼的(預設)目錄是否已經存在於您的電腦上 (4)。 你可以將其更改為某個目錄,但請記得你放置的位置! -* 現在點擊“複製”按鈕(5)。 - -```{admonition} INFORMATION -:class: information -請記下該目錄。 它是你的原始碼儲存的位置! -``` - -你現在將看到一個螢幕,告訴你倉庫正在被複製: - -![cloning_repository](../images/Building-the-App/034_CloningProgress.png) - -在某個時候,Android Studio 將關閉並重新啟動。 系統可能會詢問你是否希望信任該專案。 點擊“信任專案”: - - ![信任專案](../images/Building-the-App/035_TrustProject.png) - - -僅限Windows用戶:如果你的防火牆要求許可,請授予存取權限: - - ![防火牆權限java](../images/AndroidStudio361_18.png) - -倉庫成功複製後,Android Studio將打開複製的專案。 - -(NewUI)= -```{admonition} New UI -:class: information -Android Studio最近改變了其UI。 新的Android Studio安裝預設使用新介面! - -只有當你的Android Studio外觀不同時,你才可能需要切換到新介面: -點擊左上角的漢堡選單,然後選擇**設定**(或Apple電腦上的**偏好設定**)。 -在**外觀與行為**中,前往**新介面**並勾選**啟用新介面**。 然後重新啟動 Android Studio 開始使用它。 - -如果你沒有找到選項 **新界面**,別擔心:你已經在使用它了! -``` - - -當 Android Studio 開啟時,請耐心等待(這可能需要幾分鐘),尤其是,**請不要**按照彈出視窗中的建議更新專案。 - -Android Studio 將自動開始進行 "Gradle 專案同步",這將需要幾分鐘才能完成。 你可以看到它(仍然)在運行: - -![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) - -```{admonition} NEVER UPDATE GRADLE! -:class: warning - -Android Studio 可能會建議更新 gradle 系統。 **切勿更新 gradle!** 這會導致困難。 -``` - -僅限於 Windows 電腦:你可能會收到通知發出 Windows 防護程式正在運行:點擊 **自動** 並確認,這將使建置速度更快! - -![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) - - -你可以讓 Gradle 同步運行,同時已經可以追蹤下一步。 - -(Building-APK-set-git-path-in-preferences)= -### 在 Android Studio 偏好設定中設置 Git 路徑 - -現在我們要告訴 Android Studio 在哪裡找到你之前安裝的 Git,[稍早](#install-git-if-you-dont-have-it)提到過。 - -* 僅限於 Windows 使用者:在 [安裝 Git](#install-git-if-you-dont-have-it) 後,請確保重新啟動你的電腦。 如果尚未重開電腦,請現在重啟並重新打開 Android Studio - -在**Android Studio** 的左上角,打開漢堡選單並導航到**檔案** > **設定**(在 Windows 上)或**Android Studio** > **偏好設定**(在 Mac 上)。 這將打開以下窗口,點擊展開名為**版本控制**(1)的下拉選單,然後選擇**Git** - -![版本控制_Git](../images/Building-the-App/038_SettingsGit.png) - -檢查**Android Studio** 是否能夠自動找到正確的**Git 可執行檔的路徑**,透過點擊 "測試" 按鈕(1): - -![Git 可執行檔](../images/Building-the-App/039_GitTest.png) - - -如果自動設置成功,你的當前**Git** 版本將顯示在路徑旁邊。 - - ![Git_版本顯示](../images/Building-the-App/039_GitTestSuccess.png) - - -如果你發現**git.exe** 無法自動找到,或者點擊 "測試" 出現錯誤(1),你可以選擇 -* 手動輸入你之前[儲存的路徑](#BuildingAaps-steps-for-installing-git),或 -* 點擊資料夾圖示(1),手動導航至**git.exe** 安裝的目錄[上面](#BuildingAaps-steps-for-installing-git) -* 用**測試**按鈕驗證你的設定! - - ![未找到 Git](../images/Building-the-App/039_GitTestError.png) - -(Building-APK-generate-signed-apk)= -### 建置AAPS“簽章”APK - -```{admonition} Why does the AAPS app need to be "signed"? -:class: dropdown - -Android 要求每個應用程式必須被 _簽署_,以確保它只能從同一位信任來源後續更新。 有關此主題的更多資訊,請遵循 [此連結](https://developer.android.com/studio/publish/app-signing.html#generate-key)。 - -對我們的用途而言,這意味著我們生成一個簽名或 "金鑰庫" 檔案,並在建置 **AAPS** 應用程式時使用它。 -``` - - -**重要:在進行下一步之前,請確保 gradle 同步已成功完成!** - - -點擊左上角的漢堡選單以打開選單欄。 選擇**建置**(1),然後選擇**生成簽署的應用包 / APK**(2) - -![建置 apk](../images/Building-the-App/040_GenerateSignedAPK.png) - -選擇“APK”而不是“Android App Bundle”,然後點擊“下一步”: - -![APK 而不是包](../images/Building-the-App/041_APK.png) - -在下一個螢幕上,確保“模組”設置為“AAPS.app”(1)。 - -(Building-APK-wearapk)= -```{admonition} INFORMATION! -:class: information -如果你想為你的手錶建立 APK,你現在需要選擇 AAPS.wear! -``` -![創建金鑰庫](../images/Building-the-App/042_CreateNewKey.png) - -點擊“建立新...” (2) 開始建立你的密鑰庫。 - -```{admonition} INFORMATION! -:class: information -你只需創建一次金鑰庫。 -如果你之前已經建置過 AAPS,請勿創建新的金鑰庫,而是選擇現有的金鑰庫並輸入其密碼! -``` - -**_注意:_**金鑰庫是存儲應用程式簽名資訊的檔案。 他是加密的,並且訊息透過密碼進行保護。 - -![創建金鑰庫](../images/Building-the-App/043_Keystore.png) - -* 點擊 "文件夾" 符號(1)以選擇你電腦上金鑰庫的路徑。 - - 請**不要**使用你儲存原始碼的目錄,而使用一些你也會轉移到新電腦的目錄。 - -```{admonition} WARNING! -:class: warning -請務必記下一個金鑰庫的位置。 當你建置下一個 AndroidAPS 更新時,將需要它! -``` - -* 現在選擇一個簡單的密碼(並記下來),在密碼框中輸入它(2),並確認(2)。 - - 密鑰庫和密鑰的密碼不必過於複雜。 如果將來遺失密碼,請參見[解決遺失金鑰庫的問題](#troubleshooting_androidstudio-lost-keystore). - -* 密鑰的預設別名(3)為“key0”,保持不變。 - -* 你現在需要為你的密鑰設置密碼。 為了簡單起見,你可以使用與上面密鑰庫相同的密碼。 輸入一個密碼(4)並確認之。 - -```{admonition} WARNING! -:class: warning -請記下這些密碼! 當你建置下一個 AAPS 更新時,將需要這些密碼! -``` - -* 預設有效期為 25 年,可以保持原樣。 - -* 輸入你的名字和姓氏(5)。 不需要添加其他任何資訊,但你可以自由地補充(6-7)。 - -* 點擊“確定”(8)繼續: - - -在**生成簽署的應用包或 APK**頁面上,現在將顯示金鑰庫的路徑。 現在重新輸入金鑰庫密碼(1)和密鑰密碼(2),並勾選方框(3)以記住密碼,這樣你在下次建構 APK 時(即升級到新的 AAPS 版本時)就不需要再次輸入。 點擊“下一步”(4): - -![記住密碼](../images/Building-the-App/044_RememberPwd.png) - - -在下一個螢幕上,選擇建構變體 "fullRelease"(2),然後點擊 "建立"(3)。 你應該記住在(1)顯示的目錄,因為稍後你會在那裡找到生成的 APK 檔案! - - ![選擇建置變體](../images/Building-the-App/045_BuildPath.png) - -Android Studio 現在將建置**AAPS**的 APK。 它會在右下角顯示 "Gradle 建構正在運行"(2)。 這個過程需要一些時間,根據你的電腦和網路連線,請**耐心等待!** 如果你想查看建置進度,請點擊在 Android Studio 底部的小錘子 "建置"(1): - -![Gradle 正在運行](../images/Building-the-App/046_BuildRunning.png) - -現在你可以查看建置進度: - -![Android_Studio_建置中](../images/Building-the-App/047_BuildDetails.png) - -Android Studio在建置完成後將顯示“BUILD SUCCESSFUL”的訊息。 你可能會看到一個彈出通知,你可以點擊選擇“查找”。 如果你錯過了這個訊息,請點擊通知圖示(1),然後在螢幕底部點擊**定位**(2)以顯示通知: - -![建置完成](../images/Building-the-App/049_ReopenNotification.png) - -**_如果建置不成功,請參考[Android Studio 問題排除部分](../GettingHelp/TroubleshootingAndroidStudio)。_** - -在通知欄中,點擊藍色連結“定位”: - -![定位建置](../images/Building-the-App/048_BuildFinished.png) 你的檔案管理器將開啟並顯示你剛剛建置的 apk 檔案。 - - ![檔案位置 apk](../images/Building-the-App/050_LocateAPK.png) - -恭喜! 現在你已經建置了**AAPS** apk 檔案,接下來你將把此檔案傳送到你的智慧型手機。 - -```{tip} -如果你認為未來可能想使用 Android Wear 智慧型手錶,現在正是建立 AAPS Wear apk 的最佳時機,以確保它與你的 AAPS apk 同步。 -``` - -移動到[傳送和安裝**AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md)的下一個階段。 +### Build with a computer +You can build the app with your computer using Android Studio. +**[Follow these instructions.](./ComputerBuild.md)** diff --git a/docs/CROWDIN/zh_TW/SettingUpAaps/ComputerBuild.md b/docs/CROWDIN/zh_TW/SettingUpAaps/ComputerBuild.md new file mode 100644 index 000000000000..c4b07472ab20 --- /dev/null +++ b/docs/CROWDIN/zh_TW/SettingUpAaps/ComputerBuild.md @@ -0,0 +1,429 @@ +# Computer Build + +This is the traditional method to build your AAPS app. + +You can build the app without a computer using the [Browser Build](#browser-build) method. + +## 自行建置,而不是下載 + +**AAPS 應用程式(apk檔案)因醫療設備相關法規而無法下載。 自行建置應用程式以供個人使用是合法的,但你不得將副本提供給他人!** + +詳細資訊請參閱 [FAQ 頁面](../UsefulLinks/FAQ.md)。 + +--- + +(Building-APK-recommended-specification-of-computer-for-building-apk-file)= +## 建置AAPS所需的電腦和軟體規格 + +* 可能需要特定版本的 **[Android Studio](https://developer.android.com/studio/)** 來建立 apk。 見下表: + +| AAPS版本 | 首選
Android Studio
版本 | 替代
Android Studio
版本 | Gradle | JVM | +| ----------------------- | ---------------------------------------- | ---------------------------------------- | ------ |:--- | +| 2.6.2 | 3.6.1 | | 5.6.4 | 11 | +| 2.8.2.1 | 4.1.1 | | 6.1.1 | 13 | +| [3.1.0.3](#version3100) | 2020.3.1 | 最高支援到 Narwhal | 7.3.3 | 17 | +| [3.2.0.4](#version3204) | Hedgehog(2023.1.1) | 最高支援到 Narwhal | 8.2 | 17 | +| [3.3.1.3](#version3300) | Ladybug功能更新(2024.2.2) | 最高支援到 Narwhal | 8.10 | 21 | +| [3.3.2](#version3300) | Meerkat (2024.3.1) | Narwhal | 8.11.1 | 21 | +| [3.3.2.1](#version3321) | Narwhal (2025.1.2) | | 8.13 | 21 | + +"首選版本"已打包與適當的JVM版本。 首選版本也是你可以用來建立**AAPS**的最小版本。 你**無法**在比"首選"版本更舊的版本上建立。 如果使用不同的版本,你可能會遇到與JVM版本相關的問題。 請參閱 [Android Studio 問題排除](#troubleshooting_androidstudio-uncommitted-changes) 頁面以協助解決這些問題。 如果你當前的 Android Studio 版本未在表格中列出,你必須先更新它。 + +Gradle版本與源代碼相連結,下載/更新源代碼時,你將始終獲得正確的Gradle版本。 此處僅供參考,你不必採取行動。 + +* [Windows 32位系統](#troubleshooting_androidstudio-unable-to-start-daemon-process)不支援Android Studio。 請記住**64位中央處理器和64位作業系統是必要條件。** 如果你的系統不符合此條件,你必須更換受影響的硬體或軟體,或整個系統。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
作業系統(僅限64位)Windows 8或更高版本Mac OS 10.14或更高版本任何支援Gnome、KDE或Unity DE的Linux;  GNU C Library 2.31或更新版本

CPU(僅限64位)

x86_64 CPU架構;第二代Intel Core或更新版本,或支援Windows Hypervisor的AMD CPUARM架構晶片,或支援Hypervisor.Framework的第二代Intel Core或更新版本x86_64 CPU架構;第二代Intel Core或更新版本,或支援AMD虛擬化(AMD-V)和SSSE3的AMD處理器

記憶體

16GB 或更多

硬碟

至少30GB的可用空間。 建議使用SSD。

解析度

1280 x 800 最小

網際網路

寬頻

+ +**強烈建議(不是強制)使用SSD(固態硬碟)而非HDD(硬碟)因為在建置AAPS apk文件時將需要更少時間。** 在建置**AAPS** apk文件時仍可以使用HDD。 如果這樣做,建置過程可能需要很長時間才能完成,但開始後,你可以讓他無需監控地執行。 + +## 建置過程中的幫助與支援 + +如果在建置**AAPS**應用的過程中遇到困難,請參考專門的[**Android Studio問題排除**](../GettingHelp/TroubleshootingAndroidStudio)部分。 + +如果你認為建置說明中的內容有錯誤、缺失或令人困惑,或仍然感到困難,請與其他**AAPS**用戶群聯繫,群組可在[Facebook](https://www.facebook.com/groups/AndroidAPSUsers)或[Discord](https://discord.gg/4fQUWHZ4Mw)上找到。 如果你想自行更改某些內容(更新螢幕截圖_等_),請提交[拉取請求(PR)](../SupportingAaps/HowToEditTheDocs.md)。 + +## 建置AAPS應用程式的逐步指南 + +```{admonition} WARNING +:class: warning +如果你之前已經建立過AAPS,則不需要再次執行後續所有步驟。 +請直接跳轉到[更新指南](../Maintenance/UpdateToNewVersion.md)! +``` + +```{contents} The overall steps for building the **AAPS** apk file +:depth: 1 +:local: true +``` + +在本指南中,你將找到建置**AAPS** apk文件的_範例_螢幕截圖。 由於**Android Studio** - 我們用來建立**AAPS** apk的軟體 - 定期更新,這些螢幕截圖可能與你的安裝不完全相同,但仍然應該可以遵循。 + +由於**Android Studio**可以在Windows、Mac OS X和Linux平台上運行,因此不同平台的步驟可能會略有不同。 + +(install-git-if-you-dont-have-it)= +### 安裝Git + +```{admonition} Why Git? +:class: dropdown + +Git被稱為“_版本控制系統_”(VCS)。 +Git是一個可以讓你追蹤程式碼變更並與他人協作的程式。 你將使用Git從GitHub網站將**AAPS**的原始碼複製到你的本地電腦。 然後,你將在你的電腦上使用Git來建立**AAPS**應用程式(apk)。 +``` + +(BuildingAaps-steps-for-installing-git)= +#### 安裝Git的步驟 + +1. 檢查你是否已經安裝**Git**。 你可以在Windows搜尋欄中輸入“git”來檢查—如果你看到**“Git bash”**或其他形式的Git,那麼它已經安裝,並且你可以直接前往[安裝Android Studio](#install-android-studio): + + +![Git_installed](../images/Building-the-App/001_check_git_installed.png) + +2. 如果你沒有安裝Git,請從[**這裡**](https://git-scm.com/downloads)的“下載”部分下載並安裝最新版本。 任何最新的Git版本都應該可以使用,請根據你的系統選擇正確的版本,無論是Mac、Windows還是Linux。 + +**Mac使用者注意:**Git網頁會指導你安裝名為"homebrew"的附加程式來協助安裝。 如果你透過homebrew安裝Git,則無需更改任何偏好設定。 + +(Make_a_note_of_Git_path)= + +* 在安裝過程中,當系統要求你“選擇目的地位置”時,請注意_Git_正在被安裝的**安裝路徑**,你將在下一個步驟需要檢查它。 安裝路徑可能類似於“C:\Program Files\Git\cmd\git.exe” + +* 在進行Git安裝的幾個步驟時,只需接受所有的預設選項。 + +* 安裝完成後,如果你忘記紀錄Git的安裝位置,可以透過以下方式找到他:在PC的搜索欄中輸入“git”,右鍵點擊“Git bash”,選擇“打開檔案位置”,將滑鼠懸停在“Git bash”圖示上,這將顯示安裝位置。 + +* 在進行下一步之前,重新啟動你的電腦。 + +(Building-APK-install-android-studio)= +### 安裝Android Studio + +- **在接下來的步驟中,你必須始終保持聯網,因為Android Studio會下載多個更新。** + +```{admonition} What is Android Studio? +:class: dropdown +Android Studio是一個在你的電腦上運行的程式。 它允許你從網際網路(使用Git)下載原始碼並建立智慧型手機(和智慧型手錶)應用程式。 你不能通過在電腦上的Android Studio建立新或更新的應用程式來“破壞”你可能在智慧型手機上運行的當前循環版本的**AAPS**,這些都是完全獨立的過程。 +``` + +安裝Android Studio時最重要的事情之一是**請耐心等候!**在安裝和設置過程中,Android Studio正在下載大量內容,這將需要時間。 + +```{admonition} Different UI +:class: warning +匯入注意:在最近的更新中,Android Studio改變了其使用者介面。 本指南將向你展示在“Ladybug”中的*新介面*的步驟。 如果你仍在使用舊的介面,你可能需要先根據[這些指示](NewUI)將Android Studio切換到新的介面。 +``` + +Android Studio 版本非常重要。 請參閱 [上面的指示](#Building-APK-recommended-specification-of-computer-for-building-apk-file) 以選擇適合的 Android Studio 版本。 + +下載[當前版本的Android Studio](https://developer.android.com/studio)或從[**檔案庫**](https://developer.android.com/studio/archive)下載較舊版本,並接受下載協議。 + +![DownloadAndroidStudio](../images/Building-the-App/010_DownloadLadybug.png) + +下載完成後,啟動下載的應用程序以在你的計算機上安裝它。 你可能需要接受/確認一些有關從 Windows 下載的應用程序的警告! + +透過點擊「下一步」來安裝 Android Studio,如以下屏幕截圖所示。 你**不**需要更改任何設定! + +![Welcome_to_Android_Studio_Setup](../images/Building-the-App/011_InstallLadybug.png) + +如果您希望節省硬碟空間,可以取消勾選 Android 虛擬設備:這不適用於建立 **AAPS**。 + +![Choose_components](../images/Building-the-App/012_InstallLadybug.png) + +![Configuration_Settings](../images/Building-the-App/013_InstallLadybug.png) + +現在點擊「安裝」: + +![Choose_start_Menu_Folder](../images/Building-the-App/014_InstallLadybug.png) + +完成後,點擊「下一步」 + +![Installation_Complete](../images/Building-the-App/015_InstallLadybug.png) + +在最後一步,點擊「完成」來首次啟動 Android Studio。 + +![Completing_Android_Studio_Setup](../images/Building-the-App/016_InstallLadybug.png) + +系統將詢問你是否希望幫助改善 Android Studio。 根據自己的喜好選擇選項,這不會影響接下來的步驟。 + +![Help_improve_Android_Studio](../images/Building-the-App/020_ImproveAS.png) + +歡迎畫面歡迎你安裝 Android Studio。 按「下一步」。 + +![歡迎](../images/Building-the-App/022_WelcomeAndroidStudioInstallation.png) + +選擇「標準」作為安裝類型。 + +![Install_Type](../images/Building-the-App/023_DefaultInstallation.png) + +通過再次點擊「下一步」來確認設定。 + +![Verify_Settings](../images/Building-the-App/024_DefaultInstallation.png) + +現在你需要接受許可協議。 左側有兩個區域(1 + 3),你需要逐一選擇並在右側各選擇「接受」(2 + 4)。 + +然後可以點擊「完成」(5) 按鈕。 + +![License_Agreement](../images/Building-the-App/025_LicenseAgreement.png) + +某些 Android 套件現在將被下載和安裝。 請耐心等待。 + +當這一切完成後,你將看到以下畫面,可以再次選擇「完成」。 + +![Downloading_Components](../images/Building-the-App/026_DownloadFinished.png) + +你現在將看到 Android Studio 的歡迎畫面。 + +![歡迎來到Android Studio](../images/Building-the-App/031_WelcomeAndroidStudio.png) + + +(Building-APK-download-AAPS-code)= +### 下載AAPS程式碼 + +```{admonition} Why can it take a long time to download the AAPS code? +:class: dropdown + +第一次下載**AAPS**時,Android Studio將透過網際網路連接到Github網站以下載**AAPS**的原始碼。 這應該會花大約1分鐘的時間。 + +然後,Android Studio將使用**Gradle**(一種開發Android應用的工具)來識別在你的電腦上構建這些項目所需的其他元件。 +``` + +在Android Studio的歡迎畫面上,檢查左側的“**專案**” (1)是否高亮顯示。 + +點一下右側的"**Clone Repository**" (2) + +![Get_from_VCS](../images/Building-the-App/032_GetVCS.png) + +我們現在將告訴Android Studio從哪裡獲取程式碼: + +![從版本控制獲取](../images/Building-the-App/033_CloneGit.png) + +* “倉庫URL”應該在左側(1)預設選擇。 +* “Git”應作為版本控制預設選擇(2)。 +* 現在複製這個URL: + ``` + https://github.com/nightscout/AndroidAPS.git + ``` + 然後將其粘貼到URL文本框中(3)。 + +* 檢查用於儲存複製程式碼的(預設)目錄是否已經存在於您的電腦上 (4)。 你可以將其更改為某個目錄,但請記得你放置的位置! +* 現在點擊“複製”按鈕(5)。 + +```{admonition} INFORMATION +:class: information +請記下該目錄。 它是你的原始碼儲存的位置! +``` + +你現在將看到一個螢幕,告訴你倉庫正在被複製: + +![cloning_repository](../images/Building-the-App/034_CloningProgress.png) + +在某個時候,Android Studio 將關閉並重新啟動。 系統可能會詢問你是否希望信任該專案。 點擊“信任專案”: + + ![信任專案](../images/Building-the-App/035_TrustProject.png) + + +僅限Windows用戶:如果你的防火牆要求許可,請授予存取權限: + + ![防火牆權限java](../images/AndroidStudio361_18.png) + +倉庫成功複製後,Android Studio將打開複製的專案。 + +(NewUI)= +```{admonition} New UI +:class: information +Android Studio最近改變了其UI。 新的Android Studio安裝預設使用新介面! + +只有當你的Android Studio外觀不同時,你才可能需要切換到新介面: +點擊左上角的漢堡選單,然後選擇**設定**(或Apple電腦上的**偏好設定**)。 +在**外觀與行為**中,前往**新介面**並勾選**啟用新介面**。 然後重新啟動 Android Studio 開始使用它。 + +如果你沒有找到選項 **新界面**,別擔心:你已經在使用它了! +``` + + +當 Android Studio 開啟時,請耐心等待(這可能需要幾分鐘),尤其是,**請不要**按照彈出視窗中的建議更新專案。 + +Android Studio 將自動開始進行 "Gradle 專案同步",這將需要幾分鐘才能完成。 你可以看到它(仍然)在運行: + +![AS_download_dependencies](../images/Building-the-App/036_GradleSyncing.png) + +```{admonition} NEVER UPDATE GRADLE! +:class: warning + +Android Studio 可能會建議更新 gradle 系統。 **切勿更新 gradle!** 這會導致困難。 +``` + +僅限於 Windows 電腦:你可能會收到通知發出 Windows 防護程式正在運行:點擊 **自動** 並確認,這將使建置速度更快! + +![Windows Defender](../images/Building-the-App/037_WindowsDefender.png) + + +你可以讓 Gradle 同步運行,同時已經可以追蹤下一步。 + +(Building-APK-set-git-path-in-preferences)= +### 在 Android Studio 偏好設定中設置 Git 路徑 + +現在我們要告訴 Android Studio 在哪裡找到你之前安裝的 Git,[稍早](#install-git-if-you-dont-have-it)提到過。 + +* 僅限於 Windows 使用者:在 [安裝 Git](#install-git-if-you-dont-have-it) 後,請確保重新啟動你的電腦。 如果尚未重開電腦,請現在重啟並重新打開 Android Studio + +在**Android Studio** 的左上角,打開漢堡選單並導航到**檔案** > **設定**(在 Windows 上)或**Android Studio** > **偏好設定**(在 Mac 上)。 這將打開以下窗口,點擊展開名為**版本控制**(1)的下拉選單,然後選擇**Git** + +![版本控制_Git](../images/Building-the-App/038_SettingsGit.png) + +檢查**Android Studio** 是否能夠自動找到正確的**Git 可執行檔的路徑**,透過點擊 "測試" 按鈕(1): + +![Git 可執行檔](../images/Building-the-App/039_GitTest.png) + + +如果自動設置成功,你的當前**Git** 版本將顯示在路徑旁邊。 + + ![Git_版本顯示](../images/Building-the-App/039_GitTestSuccess.png) + + +如果你發現**git.exe** 無法自動找到,或者點擊 "測試" 出現錯誤(1),你可以選擇 +* 手動輸入你之前[儲存的路徑](#BuildingAaps-steps-for-installing-git),或 +* 點擊資料夾圖示(1),手動導航至**git.exe** 安裝的目錄[上面](#BuildingAaps-steps-for-installing-git) +* 用**測試**按鈕驗證你的設定! + + ![未找到 Git](../images/Building-the-App/039_GitTestError.png) + +(Building-APK-generate-signed-apk)= +### 建置AAPS“簽章”APK + +```{admonition} Why does the AAPS app need to be "signed"? +:class: dropdown + +Android 要求每個應用程式必須被 _簽署_,以確保它只能從同一位信任來源後續更新。 有關此主題的更多資訊,請遵循 [此連結](https://developer.android.com/studio/publish/app-signing.html#generate-key)。 + +對我們的用途而言,這意味著我們生成一個簽名或 "金鑰庫" 檔案,並在建置 **AAPS** 應用程式時使用它。 +``` + + +**重要:在進行下一步之前,請確保 gradle 同步已成功完成!** + + +點擊左上角的漢堡選單以打開選單欄。 選擇**建置**(1),然後選擇**生成簽署的應用包 / APK**(2) + +![建置 apk](../images/Building-the-App/040_GenerateSignedAPK.png) + +選擇“APK”而不是“Android App Bundle”,然後點擊“下一步”: + +![APK 而不是包](../images/Building-the-App/041_APK.png) + +在下一個螢幕上,確保“模組”設置為“AAPS.app”(1)。 + +(Building-APK-wearapk)= +```{admonition} INFORMATION! +:class: information +如果你想為你的手錶建立 APK,你現在需要選擇 AAPS.wear! +``` +![創建金鑰庫](../images/Building-the-App/042_CreateNewKey.png) + +點擊“建立新...” (2) 開始建立你的密鑰庫。 + +```{admonition} INFORMATION! +:class: information +你只需創建一次金鑰庫。 +如果你之前已經建置過 AAPS,請勿創建新的金鑰庫,而是選擇現有的金鑰庫並輸入其密碼! +``` + +**_注意:_**金鑰庫是存儲應用程式簽名資訊的檔案。 他是加密的,並且訊息透過密碼進行保護。 + +![創建金鑰庫](../images/Building-the-App/043_Keystore.png) + +* 點擊 "文件夾" 符號(1)以選擇你電腦上金鑰庫的路徑。 + + 請**不要**使用你儲存原始碼的目錄,而使用一些你也會轉移到新電腦的目錄。 + +```{admonition} WARNING! +:class: warning +請務必記下一個金鑰庫的位置。 當你建置下一個 AndroidAPS 更新時,將需要它! +``` + +* 現在選擇一個簡單的密碼(並記下來),在密碼框中輸入它(2),並確認(2)。 + + 密鑰庫和密鑰的密碼不必過於複雜。 如果將來遺失密碼,請參見[解決遺失金鑰庫的問題](#troubleshooting_androidstudio-lost-keystore). + +* 密鑰的預設別名(3)為“key0”,保持不變。 + +* 你現在需要為你的密鑰設置密碼。 為了簡單起見,你可以使用與上面密鑰庫相同的密碼。 輸入一個密碼(4)並確認之。 + +```{admonition} WARNING! +:class: warning +請記下這些密碼! 當你建置下一個 AAPS 更新時,將需要這些密碼! +``` + +* 預設有效期為 25 年,可以保持原樣。 + +* 輸入你的名字和姓氏(5)。 不需要添加其他任何資訊,但你可以自由地補充(6-7)。 + +* 點擊“確定”(8)繼續: + + +在**生成簽署的應用包或 APK**頁面上,現在將顯示金鑰庫的路徑。 現在重新輸入金鑰庫密碼(1)和密鑰密碼(2),並勾選方框(3)以記住密碼,這樣你在下次建構 APK 時(即升級到新的 AAPS 版本時)就不需要再次輸入。 點擊“下一步”(4): + +![記住密碼](../images/Building-the-App/044_RememberPwd.png) + + +在下一個螢幕上,選擇建構變體 "fullRelease"(2),然後點擊 "建立"(3)。 你應該記住在(1)顯示的目錄,因為稍後你會在那裡找到生成的 APK 檔案! + + ![選擇建置變體](../images/Building-the-App/045_BuildPath.png) + +Android Studio 現在將建置**AAPS**的 APK。 它會在右下角顯示 "Gradle 建構正在運行"(2)。 這個過程需要一些時間,根據你的電腦和網路連線,請**耐心等待!** 如果你想查看建置進度,請點擊在 Android Studio 底部的小錘子 "建置"(1): + +![Gradle 正在運行](../images/Building-the-App/046_BuildRunning.png) + +現在你可以查看建置進度: + +![Android_Studio_建置中](../images/Building-the-App/047_BuildDetails.png) + +Android Studio在建置完成後將顯示“BUILD SUCCESSFUL”的訊息。 你可能會看到一個彈出通知,你可以點擊選擇“查找”。 如果你錯過了這個訊息,請點擊通知圖示(1),然後在螢幕底部點擊**定位**(2)以顯示通知: + +![建置完成](../images/Building-the-App/049_ReopenNotification.png) + +**_如果建置不成功,請參考[Android Studio 問題排除部分](../GettingHelp/TroubleshootingAndroidStudio)。_** + +在通知欄中,點擊藍色連結“定位”: + +![定位建置](../images/Building-the-App/048_BuildFinished.png) 你的檔案管理器將開啟並顯示你剛剛建置的 apk 檔案。 + + ![檔案位置 apk](../images/Building-the-App/050_LocateAPK.png) + +恭喜! 現在你已經建置了**AAPS** apk 檔案,接下來你將把此檔案傳送到你的智慧型手機。 + +```{tip} +如果你認為未來可能想使用 Android Wear 智慧型手錶,現在正是建立 AAPS Wear apk 的最佳時機,以確保它與你的 AAPS apk 同步。 +``` + +移動到[傳送和安裝**AAPS**](../SettingUpAaps/TransferringAndInstallingAaps.md)的下一個階段。 + + + diff --git a/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server.png b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server.png new file mode 100644 index 000000000000..95ac2d4eb443 Binary files /dev/null and b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server.png differ diff --git a/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png new file mode 100644 index 000000000000..78f52682b58d Binary files /dev/null and b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step1.png differ diff --git a/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png new file mode 100644 index 000000000000..c292ac667f63 Binary files /dev/null and b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step2.png differ diff --git a/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png new file mode 100644 index 000000000000..bd31cd0ffb3d Binary files /dev/null and b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step3.png differ diff --git a/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png new file mode 100644 index 000000000000..cc187ec72a14 Binary files /dev/null and b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_step4.png differ diff --git a/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png new file mode 100644 index 000000000000..4b157ca8d3d8 Binary files /dev/null and b/docs/CROWDIN/zh_TW/images/Building-the-App/CI/aaps_ci_simple_http_server_store.png differ