Warning, /graphics/glaxnimate/README.md is written in an unsupported language. File is not indexed.

0001 Glaxnimate
0002 =======================================
0003 
0004 About
0005 ---------------------------------------
0006 
0007 A simple vector graphics animation program.
0008 
0009 
0010 Dependencies
0011 ---------------------------------------
0012 
0013 * C++17 compliant compiler
0014 * Qt5 >= 5.12
0015 * CMake >= 3.5
0016 * Python3
0017 * Potrace
0018 * libav (libavformat, libswscale, libavcodec, libavutil) >= 59
0019 * libarchive
0020 * KF5 or KF6
0021 
0022 
0023 Getting the Latest Code
0024 ---------------------------------------
0025 
0026 You can find the code on [GitLab](https://gitlab.com/mattbas/glaxnimate).
0027 
0028 To clone with git:
0029 
0030     git clone --recursive https://gitlab.com/mattbas/glaxnimate.git
0031 
0032 
0033 Building
0034 ---------------------------------------
0035 
0036 ### Generic Overview
0037 
0038 If you are building from git, ensure your submodules are up to date
0039 
0040     git submodule update --init --recursive
0041 
0042 Standard CMake build commands work
0043 
0044     mkdir build
0045     cd build
0046     cmake ..
0047     make -j 4 # This uses 4 cores to compile
0048 
0049 It will produce the executable `bin/glaxnimate` relative to the build directory
0050 
0051 
0052 ### Deb-based systems (Ubuntu, Debian, etc)
0053 
0054 Install the dependencies:
0055 
0056     apt-get install -y g++ cmake qtbase5-dev qttools5-dev libqt5svg5-dev \
0057     qt5-image-formats-plugins libpython3-dev libpotrace-dev \
0058     libarchive-dev libavformat-dev libswscale-dev libavcodec-dev libavutil-dev \
0059     libkf5coreaddons-dev libkf5crash-dev libkf5widgetsaddons-dev libkf5xmlgui-dev \
0060     libkf5archive-dev libkf5completion-dev
0061 
0062 The generic `cmake` commands listed above should work.
0063 
0064 
0065 ### Arch-based systems
0066 
0067 Install the dependencies:
0068 
0069     pacman -S git base-devel cmake python zlib hicolor-icon-theme \
0070     potrace ffmpeg qt5-base qt5-tools qt5-imageformats qt5-svg
0071 
0072 The generic `cmake` commands listed above should work.
0073 
0074 
0075 ### MacOS
0076 
0077 Install the dependencies with homebrew:
0078 
0079     brew install cmake qt python potrace ffmpeg libarchive
0080 
0081 Build with `cmake`, specifying the Qt installation path:
0082 
0083     mkdir build
0084     cd build
0085     cmake .. -DQt5_DIR="$(brew --prefix qt@5)/lib/cmake/Qt5" -DCMAKE_PREFIX_PATH="$(brew --prefix qt@5)/lib/cmake/Qt5Designer"
0086     make
0087 
0088 To simplify the build process, you can also use the provided scripts:
0089 
0090     ./deploy/mac_build.sh deps
0091     ./deploy/mac_build.sh configure
0092     ./deploy/mac_build.sh build
0093 
0094 
0095 ### Windows
0096 
0097 Install [MSYS2](https://www.msys2.org/), select "Mingw-w64 64 bit".
0098 
0099 To simplify the build process, you can use the provided scripts:
0100 
0101     ./deploy/win_build.sh deps
0102     ./deploy/win_build.sh configure
0103     ./deploy/win_build.sh build
0104     
0105 
0106 ### Android
0107 
0108 Note that these instructions have been tested on an Ubuntu host, on different
0109 systems things might vary.
0110 
0111 #### Setting up Java
0112 
0113 Ensure you have the JVM and JDK installed on your system.
0114 
0115     sudo apt install default-jdk
0116 
0117 #### Installing Qt
0118 
0119 See also <https://doc.qt.io/qt-5/android-getting-started.html>.
0120 
0121 Download the Qt Installer for the open source edition 
0122 <https://www.qt.io/download-open-source>.
0123 
0124 For some reason Qt wants you to have an account even if you install 
0125 the open source version so you might have to set that up;
0126 
0127 Install Qt Creator and Qt 5 Android. 
0128 Qt versions in the 5.12.* line should work, some newer Qt versions have issues with the
0129 android build tools so it's better to stick with 5.12.
0130 
0131 Select "Custom Installation", then on the following page check
0132 Qt > Qt 5.12.11 (or whatever version you prefer) > Android.
0133 You can also install additional components such as Qt for Desktop and such.
0134 
0135 Accept the licenses and proceed to install.
0136 
0137 #### Setting up Qt for Android
0138 
0139 Once Qt is installed, you can download and install the Android development tools
0140 from Qt Creator.
0141 
0142 You can follow the instructions from here:
0143 <https://doc.qt.io/qtcreator/creator-developing-android.html#specifying-android-device-settings>.
0144 
0145 From Qt Creator:
0146 
0147 * Tools > Options... > Devices > Android
0148 * Click "Setup SDK"
0149 * Install additional packages if prompted (you might need to accept some licenses)
0150 * Wait for everything to be downloaded and installed
0151 * Under "SDK Manager" (which is at the bottom of the dialog) 
0152     * click the "Install" checkbox for one of the available images
0153         (eg: Android 11 > Google API Atom x86 System Image)
0154     * click "Apply" on the side (not the one at the bottom that closes the dialog)
0155     * after it's downloaded, you can click OK to close the dialog
0156 
0157 #### Building
0158 
0159 You need to know the paths for Qt and Android stuff, or use `cmake_helper.py` to simplify the process
0160 
0161     mkdir build
0162     cd build
0163 
0164     ../src/android/tools/cmake_helper.py --abi x86 --qt 5.12.11 ..
0165     make -j8
0166 
0167 #### Running
0168 
0169 There are some utility `make` targets to run the apk
0170 
0171     # List available virtual devices (you need to create them separately)
0172     make android_avd_list
0173     # Start virtual device ("device" is from `make android_avd_list`)
0174     make android_avd_start DEVICE="device"
0175 
0176     # Build the APK
0177     make glaxnimate_apk -j8
0178     # Install and run the APK on the running AVD
0179     make android_install
0180     # Attach to the output
0181     make android_log
0182 
0183 Once you have an AVD running (or a debug phone connected) you can run a single line:
0184 
0185     make glaxnimate_apk -j8 && make android_install && make android_log
0186 
0187 #### Troubleshooting
0188 
0189 **Could not determine java version**
0190 
0191 Qt downloads an old version of `gradle`, so if you get an error that your
0192 Java version cannot be recognize find the file `gradle-wrapper.properties`
0193 and update it to version 5.1 or later.
0194 
0195 **Incompatible target / Undefined reference / Redefinition**
0196 
0197 Sometimes `qmake` messes up the build, the best option is to remove the build
0198 directory created by Qt Creator and rebuild.
0199 
0200 **Invalid MinSdkVersion**
0201 
0202 Depending on which version of the Android SDK you have, you might have to select 
0203 a different value in `src/android/android/AndroidManifest.xml`.
0204 
0205 
0206 **libc++.so not found**
0207 
0208 The Android toolkit stuff has some wrong paths, it can be fixed like this:
0209 
0210     sudo mkdir /opt/android 
0211     sudo ln -s $HOME/Android/Sdk/ndk/21.1.6352462/ /opt/android/android-ndk-r19c
0212     
0213 Where `$HOME/Android/Sdk/ndk/21.1.6352462/` is the directory that Qt creator 
0214 used to install the Android NDK, and `/opt/android/android-ndk-r19c` is the 
0215 directory mentioned in the error message.
0216 
0217 **Cannot set up Android, not building an APK / Application binary is not in output directory**
0218 
0219 Sometimes it does that, building again usually fixes it.
0220 
0221 
0222 ### Installation / Packaging
0223 
0224 Assuming you configured / compiled for your target system, to install
0225 to a specific directory, run the following commands:
0226 
0227 ```bash
0228 # Ensure the translations files are compiled
0229 make translations
0230 # Install under /installation/path
0231 make install DESTDIR=/installation/path
0232 ```
0233 
0234 If you want to just install on your system, you don't need to specify `DESTDIR`.
0235 
0236 
0237 Contacts
0238 ---------------------------------------
0239 
0240 * [Telegram (Chat)](https://t.me/Glaxnimate)
0241 * [GitLab (Code, Issues)](https://gitlab.com/mattbas/glaxnimate)
0242 * [User Manual](https://glaxnimate.mattbas.org)
0243 
0244 
0245 License
0246 ---------------------------------------
0247 
0248 GPLv3 or later, see COPYING.
0249 
0250 Copyright (C) 2020 Mattia Basaglia
0251 
0252 This program is free software: you can redistribute it and/or modify
0253 it under the terms of the GNU General Public License as published by
0254 the Free Software Foundation, either version 3 of the License, or
0255 (at your option) any later version.
0256 
0257 This program is distributed in the hope that it will be useful,
0258 but WITHOUT ANY WARRANTY; without even the implied warranty of
0259 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0260 GNU General Public License for more details.
0261 
0262 You should have received a copy of the GNU General Public License
0263 along with this program.  If not, see <http://www.gnu.org/licenses/>.