Install Qt for Open Source (LGPL)
Install Qt Creator and iOS libraries, or build them yourself. RiffTrax version 2.9 uses Qt 5.15.2. Get Qt here.
App Source Package
Download RiffTrax Sync package for iOS and decompress.
Build In Qt Creator
- Open base project file "RiffTraxApp.pro" in Qt Creator.
- Setup custom Qt version if you built it yourself.
- Configure iOS build for the appropriate version of Qt.
- Add environment variable USE_MAIN_LIB=1 to the Build Environment section of Build Settings.
- Edit "main_app/main_app.pro" and set QMAKE_DEVELOPMENT_TEAM to your iOS dev team ID.
- Add a new app bundle ID to your iOS dev account and edit "main_app/Info-ios.plist" to match.
- Build and run.
This custom version of the app is not able to make purchases.
Download/Install Tools for Re-packaging and Signing Android APKs
- apktool - Unpack and re-pack APK files.
- Java Development Kit (JDK) - Includes "keytool" and "jarsigner".
- keytool Documentation - Java tool for creating keys/certs. Comes with the JDK.
- jarsigner Documentation - Java tool for signing JAR/APK files. Comes with the JDK.
- Android SDK (only command line tools are required) - Includes "zipalign".
- zipalign Documentation - Archive alignment tool. Comes with the Android SDK.
Download Android App Package (APK)
Pick one:
64-bit APK
32-bit APK
Download Software For Building Qt (deprecated, we're now using stock Qt)
You only need to build Qt if you will be replacing Qt libraries.- OpenSSL 1.1.1: easiest method is to download pre-build libraries via Qt Creator. See Options/Settings -> Devices -> Android. Or build yourself from source.
- Download our Qt build script
- Get Qt source: https://github.com/qt.
-
Ensure that Perl is installed and install the "Mozilla::CA" module (required for Qt build script).
$ perl --version This is perl 5, version 18, subversion 4 (v5.18.4)...
Rebuild Steps
-
Download App
Download an APK from the list above (e.g. "rifftrax.apk") and decompress into a new directory:
$ mkdir rifftrax_app $ cd rifftrax_app -
Unpack App
Use "apktool" to unpack the APK into a new directory (e.g. "rifftrax"):
$ apktool d -r -s ../rifftrax.apk -
Optionally Build Qt and OpenSSL
If you want to use your own custom Qt libraries, then you may use our Android build script (see download above) and patch(es) to build from source. The build script requires several environment variables. Make the script executable. Run with "-help" to see the various options:
$ chmod 755 ../build_qt_android $ ../build_qt_android -help NAME build_qt_android -- build Qt Android libraries for use with the RiffTrax app ...We dynamically link OpenSSL libraries (libssl.so and libcrypto.so) into our Qt-Android build at runtime. See also Adding OpenSSL Support for Android. You must either download or build OpenSSL for Android and set the environment variable ANDROID_OPENSSL to its location. Pre-built libraries for the app are provided in "main_app/android_libs/...", but you are welcome to replace these with your own. See also the OpenSSL wiki for specifics. You must set required environment variables in order to use the Qt-Android build script:
$ export ANDROID_SDK_ROOT="$HOME/Dev/Android" $ export ANDROID_NDK_ROOT="$HOME/Dev/Android/android-ndk-r13b" $ export ANDROID_OPENSSL="$PWD/openssl-1.0.2s-NDKr13b-arm64bit" $ ./build_qt_android -64bit ... [ configuration displayed ] Please check the above configuration for correctness, make any final code changes and then hit Enter to configure -> make -> install. This will take a while:The script pauses at this point to allow you to make any code changes. Then press "Enter" to proceed with the build.
-
Overwrite Shared Libraries
Substitute any custom libraries you like by copying over those in the unpacked APK.
$ cp qt5-android-armeabi-v7a-LGPL_install/lib/libQt5Multimedia.so rifftrax/lib/armeabi-v7a/ -
Re-package App
Use "apktool" to rebuild the APK. Sign it with your own key. When generating a new key (see example below), information other than password is not necessary. Re-align the package, which is a zip file.
$ apktool b -f -d rifftrax $ mv rifftrax/dist/rifftrax.apk rifftrax-new.apk $ keytool -genkey -v -keystore rifftrax.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 $ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore rifftrax.keystore rifftrax-new.apk alias_name $ $ANDROID_SDK_ROOT/build-tools/26.0.3/zipalign -v 4 rifftrax-new.apk rifftrax-aligned.apk -
Test App
Install and run the new app.
$ adb install rifftrax-aligned.apk $ adb shell am start com.rifftrax.android/common.RiffTraxActivity