nimble install happyx-nativeor via GitHub:
nimble install https://github.com/HapticX/happyx-native- Support for Chrome/Yandex/Edge browsers;
- Support for Android;
To init project you should use this command:
hpx-native init --name ProjectNameThis command will automatically initialize your project.
It also fetches ANDROID_SDK_ROOT from environment (need for android compilation).
To build your project you should move into project folder
cd ProjectNameand just build it!
hpx-native buildThis automatically builds your project for your OS as target platform.
To compile for other OS use
hpx-native build --target linuxPossible values:
| OS | value | aliases |
|---|---|---|
| Windows | windows | win |
| Linux | linux | unix |
| MacOS | macosx | mac, macos |
| Android | android | - |
You should have:
- Android Studio with SDK and NDK;
- Gradle >= 7.5;
- Nim >= 2.0.0;
By default hpx-native build --target android supports all android architectures.
If you want to disable some architectures then use:
hpx-native build --target android --no-x86_64Possible architectures
| Architecture | Disable Argument |
|---|---|
| x86 | --no-x86 |
| x86_64 | --no-x86_64 |
| armeabi-v7a | --no-armeabi-v7a |
| arm64-v8a | --no-arm64-v8a |
If you doesn't want to use gradle building then use
hpx-native build --target android --no-gradle
This command will build only .so libraries.
HappyX Native supports "building" assets - all resources from app directory (by default /assets) and all subdirectories are "sewn" into executable file.
This way you can distribute your application over the network with only one executable file.
This option can be disabled via
--no-build-assets
If you want choose other browser instead of default - use these flags:
| browser | flag |
|---|---|
| Default browser | uses by default |
| Chrome | -d:chrome |
| Edge | -d:edge |
| Yandex | -d:yandex |