AndroidTacticalAssaultKit-CIV
AndroidTacticalAssaultKit-CIV copied to clipboard
BUILDING doc issues
Just some errors in the BUILDING.md that will cause some confusion.
-
The doc says to fetch says to fetch stlsoft into the takengine/thirdparty directory. That directory does not exist. The "prebuild" script creates the directory and downloads stlsoft into root.
-
Additional tools required to install on Linux: dos2unix, tcl, autoconf, libtool, swig, ant. Perhaps some configure scripts could check for these as well? These are not normally installed on Ubuntu, even with "build-essential" and a JDK installed.
Why include non-Linux OSes for various libraries and tools if ATAK could only be effectively developed on Linux OS? It should contain different topics such as developing the entire ATAK or just building an ATAK plugin.
The BUILDING document should be tailored to inexperienced users, who may not understand how the Conan tool works, for example.
Is it possible to just create ATAK from WSL (with the Ubuntu OS subsystem installed)?
Ok, I skipped the first part in the current BUILDING.md document for the ATAK-CIV 4.4.0.0 since I have already installed Android Arctic Fox on my Windows 10 Pro 21H1 64-bit system.
Then, I open up the WSL with the Ubuntu-20.04 subsystem installed on my system.
From the Ubuntu-20.04 shell environment running in the Windows terminal, I install the Linux version of the following required libraries, binaries, and tools:
- NDK r12b (installed in /mnt/c/NDK-LINUX/)
- Conan (for this tool, I run the command:
sudo pip install conan
)
I execute the following command:
sudo apt install build-essential git openjdk-8-jdk dos2unix autoconf automake libtool patch make tcl8.6 cmake swig ant
I run the following command:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export ANDROID_NDK=/mnt/c/NDK-LINUX/android-ndk-r12b
I run the scripts/prebuild.sh and allowed everything in the script to finish.
Once everything above is done, I execute the following steps to successfully build the ATAK-CIV version 4.4 with Android Studio Arctic Fox running on Windows 10 system:
- Make sure JAVA_HOME refers to Java version 1.8 ( I used the one installed by the Android Studio)
- Export the default Java binaries path (java.exe, javah.exe) into the system PATH.
- Install the ninja build system for Windows 10 required by Android Studio https://github.com/ninja-build/ninja/releases
- Export the ninja path into the system PATH (for example "C:\ninja").
- Install MSYS2 MinGW x86/x64 for your Windows 10 arch from https://www.msys2.org/ and follow its suggested installation steps.
- Export MSYS2 MinGW x86/x64 binaries path into the system PATH (for example "C:\msys64\mingw64\bin"). This is to prepare for the Conan setup to detect any presence of the C/C++ compiler (in this case the GCC) in the Windows system.
- Install Conan for Windows from https://conan.io/downloads.html.
- Export Conan binaries path into the system PATH (for example "C:\Program Files\Conan\conan").
- Install CMAKE 3.14.7 for 32-bit or 64-bit Windows system: https://cmake.org/files/v3.14/cmake-3.14.7-win32-x86.zip or https://cmake.org/files/v3.14/cmake-3.14.7-win64-x64.zip.
- Export the CMAKE 3.14.7 binaries path into the system PATH (for example "C:\cmake-3.14.7-win64-x64\bin").
- Open and test from the Windows command prompt in the Windows terminal that each command below is working well and shows the correct/supported version:
java -version
javah -version
gcc --version
conan --version
cmake --version
ninja --version
- Download Android NDK r12b x86 or x64 version suitable for your Windows OS arch: https://dl.google.com/android/repository/android-ndk-r12b-windows-x86.zip or https://dl.google.com/android/repository/android-ndk-r12b-windows-x86_64.zip
- Extract with Zip archiver tool the file in step 12 into C:\NDK
- Execute from the Windows command prompt in the Windows Terminal the commands one by one from the scripts\prebuild.sh in the ATAK CIV installation folder
- Once all the commands from step 14 are completed, open the Android Studio Arctic Fox if it has been installed
- Go to File > Project Structure > SDK Location > JDK location was moved to Gradle Settings and set Gradle JDK to 1.8
- Create a new folder named "keystone" in atak\ATAK\app\ in the ATAK CIV installation folder
- Go to Build > Generate Signed Bundle/APK > APK > Next and create a new debug keystore (name it as debug.jks) and save it in the atak\ATAK\app\keystore with the debug keystore password, debug key alias and debug key password.
- Go to File > Open to open the ATAK-CIV app build.gradle from atak\ATAK\app in the ATAK CIV installation folder
- Edit the local.properties file in the ATAK-CIV app project's Gradle Scripts tree with the following entries
sdk.dir=C\:\\Users\\{your_username}\\AppData\\Local\\Android\\Sdk
ndk.dir=C\:\\NDK\\android-ndk-r12b
cmake.dir=C\:\\cmake-3.14.7-win64-x64
takDebugKeyFile=keystore/debug.jks
takDebugKeyFilePassword={your debug keystore password}
takDebugKeyAlias={your debug key alias}
takDebugKeyPassword={your debug key password}
takReleaseKeyFile=...
takReleaseKeyFilePassword=...
takReleaseKeyAlias=...
takReleaseKeyPassword=...
- Resync the ATAK-CIV app build.gradle
- if properly built, the Gradle tasks tree should at least have the following Gradle tasks: other/assembleCivDebug, install/installCivDebug
- Execute other/assembleCivDebug to build the ATAK-CIV app and install it into your supported Android device or AVD emulator.
That is a great write-up eclectice, thanks, but if the pre-reqs are built under WSL in the first few steps, then I do not understand why they are again built using sys2/mingw in steps 1-14 in apparently the same place.
Hello, can you help write a compilation document for 4.5.13?