You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This set the Assets and Source folders, and uses the default configuration for other options.
Adding Assets
Basic
Set the Assets folder:
project.addAssets('Assets/**');
Advanced
khamake will flatten your directory structure during preprocessing.
Suppose you have some non-unique files like map.txt in folder1 and folder2.
Using the basic version will actually give you an error during preprocessing, as khamake will try to create kha.Assets.blobs.map_txt twice. To fix that, specify some patterns to actually keep the folder structure in the generated sources.
Do not create files with names that are haxe keywords (default.png is bad, _default.png is fine).
Add a Custom Icon
Add the icon.png file to the root project directory to use it as a new icon. The desired resolution is 512x512 or 1024x1024 for high-dpi monitors. You can also set custom path:
project.icon='path/icon.png';
Add a Source folder
project.addSources('Sources');
You can use multiple source folders, including external folders.
Add a library to the project
project.addLibrary('Kha2D');
The library needs to be in a folder called 'Libraries' in the root of your project, or can be a haxelib library.
You may also define your own libraries folder with:
project.localLibraryPath='libs';
Add a Subproject
awaitproject.addProject(pathToProject);
khamake can integrate other Kha projects, it will parse their khafiles and include all sources, shaders and assets. Be aware that addProject is asynchronous - use await to synchronize execution.
constandroid=project.targetOptions.android;android.package='com.example.app';android.versionCode=1;android.versionName='1.0';// https://developer.android.com/guide/topics/manifest/activity-element.html#screenandroid.screenOrientation='portrait';android.permissions=['android.permission.VIBRATE'];// https://developer.android.com/guide/topics/manifest/manifest-element#installandroid.installLocation="internalOnly";// https://developer.android.com/guide/topics/manifest/meta-data-elementandroid.metadata=[];// same as <meta-data android:name="disableStickyImmersiveMode" android:value="true"/>android.disableStickyImmersiveMode=true;android.globalBuildGradlePath='data/android/build.gradle';android.buildGradlePath='data/android/app/build.gradle';android.proguardRulesPath='data/android/app/proguard-rules.pro';// for files in Android Studio project-level dirandroid.customFilesPath='data/android/files';