Thes template works fully with packages that can be installed via the debian repositories (tested on current stable Debian 9 stretch). For maximum portability
the chosen architectures are x86 (Linux, Windows) and armeabi-v7a (Linux, Android). More architectures may be added in future.
How to use¶
Automatically install dependencies¶
To automatically install all needed Debian packages following command can be used:
Setup new project¶
Navigate to the root directory and execute following command:
./setup.sh setup MyProject
"MyProject" should match your project name. A new folder will be created containing following structure:
- include - include files of external libs
- lib - (will be created when dependencies are built) contains external libs compiled for different architectures
- tools - (will be created when dependencies are built) contains tools (i.e. fluid)
- packages - sourcecode packages of external libraries (including fltk)
- scripts - helper scripts to create install packages for linux/windows.
- src - contains MVC template sourcecode, should be used as project base
The project is controlled via Multiple Makefiles. Every sourcecode package features a Makefile to build the package for different architectures and copies back the include files and binaries to the root project lib and include folder.
The root Makefile builds all dependencies, the main project (src folder) and creates installable packages.
The Makefile of the main project (src directory) sets up the environment and has many different targets to build the sourcecode for Linux/Windows/Android.
Create a custom keystore to sign your apk against¶
$ mkdir ~/.android
$ cd ~/.android
$ keytool -genkey -v -keystore [name].keystore -storepass [myStorePass] -alias [keystoreName] -keypass [myKeyPass] -keyalg RSA -keysize 2048 -validity 10000
If you want to sign the app against a different keystore you have to edit following Makefile variables in src/Makefile:
ANDROID_KEYSTORE_PATH= ANDROID_KEYSTORE_NAME= ANDROID_KEYSTORE_PW=
(these steps are executed by the setup.sh install_deps option)
$ sudo dpkg --add-architecture i386
$ sudo dpkg --add-architecture armhf
$ sudo apt update
$ sudo apt install rename
Linux Compiler Packages¶
$ sudo apt install -y build-essential gcc-multilib g++-multilib libasound2-dev:i386 libx11-dev:i386 libxext-dev:i386 libao-dev:i386
Linux ARM Compiler Packages¶
$ sudo apt install -y crossbuild-essential-armhf libasound2-dev:armhf libx11-dev:armhf libxext-dev:armhf libao-dev:armhf qemu-user-static
Windows Cross Compile Packages¶
$ sudo apt install -y mingw-w64 binutils-mingw-w64 p7zip-full
Additional steps (Allow executing of windows unit tests):
$ sudo apt install -y wine wine32 wine64 libwine libwine:i386 fonts-wine wine-binfmt
$ sudo update-binfmts --import /usr/share/binfmts/wine
Android Cross Compile Packages¶
$ sudo apt install -y android-sdk google-android-ndk-installer android-sdk-platform-23