doc: update Android building instructions

This commit is contained in:
Leandro Doctors
2021-03-25 22:58:15 -03:00
parent 2a39c917ee
commit 6dbc7e2704

View File

@@ -1,15 +1,15 @@
# Forge # Forge
Gitlab repo is found [here](https://git.cardforge.org/core-developers/forge). [Official GitLab repo](https://git.cardforge.org/core-developers/forge).
Dev instructions here: [Getting Started](https://www.slightlymagic.net/wiki/Forge:How_to_Get_Started_Developing_Forge) (Somewhat outdated) Dev instructions here: [Getting Started](https://www.slightlymagic.net/wiki/Forge:How_to_Get_Started_Developing_Forge) (Somewhat outdated)
Discord channel [here](https://discordapp.com/channels/267367946135928833/267742313390931968) Discord channel [here](https://discordapp.com/channels/267367946135928833/267742313390931968)
# Requirements / Tools ## Requirements / Tools
- Java IDE such as IntelliJ or Eclipse - you favourite Java IDE (IntelliJ, Eclipse, VSCodium, Emacs, Vi...)
- Java JDK 8 or later - Java JDK 8 or later (some IDEs such as Eclipse require JDK11+, whereas the Android build currently only works with JDK8)
- Git - Git
- Git client (optional) - Git client (optional)
- Maven - Maven
@@ -18,7 +18,7 @@ Discord channel [here](https://discordapp.com/channels/267367946135928833/267742
- Android SDK (optional: for Android releases) - Android SDK (optional: for Android releases)
- RoboVM (optional: for iOS releases) (TBD: Current status of support by libgdx) - RoboVM (optional: for iOS releases) (TBD: Current status of support by libgdx)
# Project Quick Setup ## Project Quick Setup
- Log in to gitlab with your user account and fork the project. - Log in to gitlab with your user account and fork the project.
@@ -26,11 +26,11 @@ Discord channel [here](https://discordapp.com/channels/267367946135928833/267742
- Go to the project location on your machine. Run Maven to download all dependencies and build a snapshot. Example for Windows & Linux: `mvn -U -B clean -P windows-linux install` - Go to the project location on your machine. Run Maven to download all dependencies and build a snapshot. Example for Windows & Linux: `mvn -U -B clean -P windows-linux install`
# Eclipse ## Eclipse
Eclipse includes Maven integration so a separate install is not necessary. For other IDEs, your mileage may vary. Eclipse includes Maven integration so a separate install is not necessary. For other IDEs, your mileage may vary.
## Project Setup ### Project Setup
- Follow the instructions for cloning from Gitlab. You'll need a Gitlab account setup and an SSH key defined. - Follow the instructions for cloning from Gitlab. You'll need a Gitlab account setup and an SSH key defined.
@@ -55,9 +55,9 @@ Eclipse includes Maven integration so a separate install is not necessary. For
- Once everything builds, all errors should disappear. You can now advance to Project launch. - Once everything builds, all errors should disappear. You can now advance to Project launch.
## Project Launch ### Project Launch
### Desktop #### Desktop
This is the standard configuration used for releasing to Windows / Linux / MacOS. This is the standard configuration used for releasing to Windows / Linux / MacOS.
@@ -65,7 +65,7 @@ This is the standard configuration used for releasing to Windows / Linux / MacOS
- The familiar Forge splash screen, etc. should appear. Enjoy! - The familiar Forge splash screen, etc. should appear. Enjoy!
### Mobile (Desktop dev) #### Mobile (Desktop dev)
This is the configuration used for doing mobile development using the Windows / Linux / MacOS front-end. Knowledge of libgdx is helpful here. This is the configuration used for doing mobile development using the Windows / Linux / MacOS front-end. Knowledge of libgdx is helpful here.
@@ -73,24 +73,24 @@ This is the configuration used for doing mobile development using the Windows /
- A view similar to a mobile phone should appear. Enjoy! - A view similar to a mobile phone should appear. Enjoy!
## Eclipse / Android SDK Integration ### Eclipse / Android SDK Integration
Google no longer supports Android SDK releases for Eclipse. That said, it is still possible to build and debug Android platforms. Google no longer supports Android SDK releases for Eclipse. That said, it is still possible to build and debug Android platforms.
### Android SDK #### Android SDK
Reference SO for obtaining a specific release: https://stackoverflow.com/questions/27043522/where-can-i-download-an-older-version-of-the-android-sdk Reference SO for obtaining a specific release: https://stackoverflow.com/questions/27043522/where-can-i-download-an-older-version-of-the-android-sdk
#### Windows ##### Windows
Download the following archived version of the Android SDK: http://dl-ssl.google.com/android/repository/tools_r25.2.3-windows.zip. Install it somewhere on your machine. This is referenced Download the following archived version of the Android SDK: http://dl-ssl.google.com/android/repository/tools_r25.2.3-windows.zip. Install it somewhere on your machine. This is referenced
in the following instructions as your 'Android SDK Install' path. in the following instructions as your 'Android SDK Install' path.
#### Linux / Mac OSX ##### Linux / Mac OSX
TBD TBD
### Android Plugin for Eclipse #### Android Plugin for Eclipse
Google's last plugin release does not work completely with target's running Android 7.0 or later. Download the ADT-24.2.0-20160729.zip plugin Google's last plugin release does not work completely with target's running Android 7.0 or later. Download the ADT-24.2.0-20160729.zip plugin
from: https://github.com/khaledev/ADT/releases from: https://github.com/khaledev/ADT/releases
@@ -98,25 +98,24 @@ from: https://github.com/khaledev/ADT/releases
In Eclipse go to: Help > Install New Software... > Add > Name: ADT Update, Click on the "Archive:" button and navigate to the downloaded ADT-24.2.0-20160729.zip file > Add. Install all "Developer Tools". Eclipse In Eclipse go to: Help > Install New Software... > Add > Name: ADT Update, Click on the "Archive:" button and navigate to the downloaded ADT-24.2.0-20160729.zip file > Add. Install all "Developer Tools". Eclipse
should restart and prompt you to run the SDK Manager. Launch it and continue to the next steps below. should restart and prompt you to run the SDK Manager. Launch it and continue to the next steps below.
### Android Platform #### Android Platform
In Eclipse, if the SDK Manager is not already running, go to Window > Android SDK Manager. Install the following options / versions: In Eclipse, if the SDK Manager is not already running, go to Window > Android SDK Manager. Install the following options / versions:
- Android SDK Build-tools 26.0.1 - Android SDK Build-tools 26.0.1
- Android 7.1.1 (API 25) SDK Platform - Android 8.0.0 (API 26) SDK Platform
- Google USB Driver 11 - Google USB Driver (in case your phone is not detected by ADB)
Note that this will populate additional tools in the Android SDK install path extracted above. Note that this will populate additional tools in the Android SDK install path extracted above.
### Proguard update #### Proguard update
The Proguard included with the Android SDK Build-tools is outdated and does not work with Java 1.8. Download Proguard 6.0.3 from https://sourceforge.net/projects/proguard/files/proguard/6.0/. The Proguard included with the Android SDK Build-tools is outdated and does not work with Java 1.8. Download Proguard 6.0.3 or later (last tested with 7.0.1) from https://github.com/Guardsquare/proguard
- Go to the Android SDK install path. Rename the tools/proguard/ path to tools/proguard-4.7/.
- Go to the Android SDK install path. Rename the tools/proguard/ path to tools/proguard4.7/. - Extract your Proguard version to the Android SDK install path under tools/. You will need to either rename the dir proguard-<your-version> to proguard/ or, if your filesystem supports it, use a symbolic link (the later is highly recommended), such as `ln -s proguard proguard-<your-version>`.
- Extract Proguard 6.0.3 to the Android SDK install path under tools/. You will need to rename the dir proguard6.0.3/ to proguard/. #### Android Build
### Android Build
The Eclipse plug-ins do NOT support building things for Android. They do however allow you to use the debugger so you can still set breakpoints and trace The Eclipse plug-ins do NOT support building things for Android. They do however allow you to use the debugger so you can still set breakpoints and trace
things out. The steps below show how to generate a debug Android build. things out. The steps below show how to generate a debug Android build.
@@ -135,7 +134,7 @@ things out. The steps below show how to generate a debug Android build.
Assuming you got this far, you should have an Android forge-android-[version].apk in the forge-gui-android/target path. Assuming you got this far, you should have an Android forge-android-[version].apk in the forge-gui-android/target path.
### Android Deploy #### Android Deploy
You'll need to have the Android SDK install path platform-tools/ path in your command search path to easily deploy builds. You'll need to have the Android SDK install path platform-tools/ path in your command search path to easily deploy builds.
@@ -149,14 +148,14 @@ You'll need to have the Android SDK install path platform-tools/ path in your co
- Install the new apk: `adb install forge-android-[version].apk` - Install the new apk: `adb install forge-android-[version].apk`
### Android Debugging #### Android Debugging
Assuming the apk is installed, launch it from the device. Assuming the apk is installed, launch it from the device.
In Eclipse, launch the DDMS. Window > Perspective > Open Perspective > Other... > DDMS. You should see the forge app in the list. Highlight the app, click on the green debug button and a In Eclipse, launch the DDMS. Window > Perspective > Open Perspective > Other... > DDMS. You should see the forge app in the list. Highlight the app, click on the green debug button and a
green debug button should appear next to the app's name. You can now set breakpoints and step through the source code. green debug button should appear next to the app's name. You can now set breakpoints and step through the source code.
## Windows / Linux SNAPSHOT build ### Windows / Linux SNAPSHOT build
SNAPSHOT builds can be built via the Maven integration in Eclipse. SNAPSHOT builds can be built via the Maven integration in Eclipse.
@@ -167,19 +166,19 @@ SNAPSHOT builds can be built via the Maven integration in Eclipse.
The resulting snapshot will be found at: forge-gui-desktop/target/forge-gui-desktop-[version]-SNAPSHOT The resulting snapshot will be found at: forge-gui-desktop/target/forge-gui-desktop-[version]-SNAPSHOT
# IntelliJ ## IntelliJ
Quick start guide for [setting up the Forge project within IntelliJ](https://git.cardforge.org/core-developers/forge/wikis/intellij-setup). Quick start guide for [setting up the Forge project within IntelliJ](https://git.cardforge.org/core-developers/forge/wikis/intellij-setup).
# Card Scripting ## Card Scripting
Visit [this page](https://www.slightlymagic.net/wiki/Forge_API) for information on scripting. Visit [this page](https://www.slightlymagic.net/wiki/Forge_API) for information on scripting.
Card scripting resources are found in the forge-gui/res/ path. Card scripting resources are found in the forge-gui/res/ path.
# General Notes ## General Notes
## Project Hierarchy ### Project Hierarchy
Forge is divided into 4 primary projects with additional projects that target specific platform releases. The primary projects are: Forge is divided into 4 primary projects with additional projects that target specific platform releases. The primary projects are:
@@ -196,35 +195,34 @@ The platform-specific projects are:
- forge-gui-mobile - forge-gui-mobile
- forge-gui-mobile-dev - forge-gui-mobile-dev
### forge-ai #### forge-ai
### forge-core #### forge-core
### forge-game #### forge-game
### forge-gui #### forge-gui
The forge-gui project includes the scripting resource definitions in the res/ path. The forge-gui project includes the scripting resource definitions in the res/ path.
### forge-gui-android #### forge-gui-android
Libgdx-based backend targeting Android. Requires Android SDK and relies on forge-gui-mobile for GUI logic. Libgdx-based backend targeting Android. Requires Android SDK and relies on forge-gui-mobile for GUI logic.
### forge-gui-desktop #### forge-gui-desktop
Java Swing based GUI targeting desktop machines. Java Swing based GUI targeting desktop machines.
Screen layout and game logic revolving around the GUI is found here. For example, the overlay arrows (when enabled) that indicate attackers and blockers, or the targets of the stack are defined and drawn by this. Screen layout and game logic revolving around the GUI is found here. For example, the overlay arrows (when enabled) that indicate attackers and blockers, or the targets of the stack are defined and drawn by this.
### forge-gui-ios #### forge-gui-ios
Libgdx-based backend targeting iOS. Relies on forge-gui-mobile for GUI logic. Libgdx-based backend targeting iOS. Relies on forge-gui-mobile for GUI logic.
### forge-gui-mobile #### forge-gui-mobile
Mobile GUI game logic utilizing [libgdx](https://libgdx.badlogicgames.com/) library. Screen layout and game logic revolving around the GUI for the mobile platforms is found here. Mobile GUI game logic utilizing [libgdx](https://libgdx.badlogicgames.com/) library. Screen layout and game logic revolving around the GUI for the mobile platforms is found here.
### forge-gui-mobile-dev #### forge-gui-mobile-dev
Libgdx backend for desktop development for mobile backends. Utilizes LWJGL. Relies on forge-gui-mobile for GUI logic. Libgdx backend for desktop development for mobile backends. Utilizes LWJGL. Relies on forge-gui-mobile for GUI logic.