Using version control systems with Kanzi¶
When you add your Kanzi projects to a version control system, do not add these files and directories:
.kzproj_N.proj.kzm_N.lock.autosave.userassetsbuild_vs2022compressedcubemapsgenmipmapsoutputlibthumbnails
Note
The cubemaps and mipmaps directories excluded above hold the generated faces and roughness mipmaps of image-based lighting cubemap textures. Kanzi Studio regenerates them from the source image when they are missing, such as after a fresh clone. Therefore, also add to version control the source hdr or exr image from which you created each image-based lighting cubemap texture. Without that image Kanzi Studio cannot regenerate the content. Kanzi Studio reports the reason in the Log window and opens the project with that content missing. See Using image-based lighting cubemap textures.
Moving referenced projects out of another project’s directory¶
When you open a project that stores a referenced project inside the directory that holds another project’s project file, Kanzi Studio asks to move that referenced project out to a sibling directory, and saves every project whose paths the move changes. This changes the directory layout of your working copy, and you cannot undo it.
Check the project file of the project you open, and the project file of every project it references, out of version control first. Kanzi Studio cancels the open when it finds a read-only project file, because it cannot save it after the move. It also cancels the open when one of those projects is open in another Kanzi Studio instance.
The move also removes the directories it leaves empty, so your working copy loses directories as well as gaining them.
Kanzi Studio updates only the paths it owns. Update the paths in your version control configuration, in
.gitignore or its equivalent, and in your build scripts yourself. See
Where to store a referenced project and
Kanzi 4.1.1 migration guide.
Merging projects using version control tools¶
After configuring your version control tool you can use the Kanzi merge tool for Kanzi project updating and merging. For the integration Kanzi requires a version control tool that provides the necessary parameters to the Kanzi merge tool.
Example of parameter types |
Description |
|---|---|
MINE |
The parameter for the source project. |
THEIRS |
The parameter for the target project. |
BASE |
The parameter for the base project. |
MERGED |
The parameter for the merged project. |
Integrating the Kanzi merge tool with a version control tool¶
To integrate the Kanzi merge tool with a version control tool:
Configure your version control tool to use the Kanzi merge tool (
<KanziInstallation>/Studio/Bin/KanziMergeTool.bat) for .kzproj files.Pass to your version control tool the absolute path to the
KanziStudio.exe. For example,C:\Program Files\Rightware\Kanzi\Studio\Bin\KanziStudio.exe.Set the version control tool parameters for the Kanzi merge tool. For example, these parameters can be called MINE, THEIRS, BASE, MERGED.
Integrating the Kanzi merge tool with SVN version control software¶
To integrate the Kanzi merge tool with SVN version control software, add Kanzi merge tool as an external program for merging files with the .kzproj extension.
For example, if you are using Tortoise SVN, in TortoiseSVN select SVN > Settings > External Programs > Merge Tool > Advanced and set:
Filename, extension or mime-type to .kzproj
External program to
<KanziInstallation>/Studio/Bin/KanziMergeTool.bat "<KanziInstallation>/Studio/Bin/KanziStudio.exe" %mine %theirs %base %merged
For example, if your installation of Kanzi is in
C:\Program Files\Rightware\Kanzi, useC:\Program Files\Rightware\Kanzi\Studio\Bin\KanziMergeTool.bat "C:\Program Files\Rightware\Kanzi\Studio\Bin\KanziStudio.exe" %mine %theirs %base %merged