-
Notifications
You must be signed in to change notification settings - Fork 0
Packaging
Tensor Planner includes distribution scripts for POSIX shells and PowerShell:
build.sh
build.ps1
Both scripts build native libraries and stage selected binding/package outputs.
sh ./build.sh -release -target unity cpp sharp jai -o ./distPowerShell on Windows:
pwsh ./build.ps1 -release -os windows -target unity cpp sharp jai -o ./distArguments:
-release Build Release artifacts. Default.
-debug Build Debug artifacts.
-os One or more target OS values: linux windows.
-target One or more targets: unity cpp sharp jai.
-o Output directory. Defaults to ./dist.
-no-clean Keep build-process files after packaging.
Command snippets:
sh ./build.sh -release -os linux -target unity cpp sharp jai -o ./dist
sh ./build.sh -release -os windows -target unity cpp sharp -o ./dist
sh ./build.sh -target unity cpp -os linux windows -o ./distpwsh ./build.ps1 -release -os windows -target unity cpp sharp jai -o ./dist
pwsh ./build.ps1 -target unity cpp -os windows -o ./dist
pwsh ./build.ps1 -debug -target cpp sharp -o ./dist -no-cleanSupported values:
linuxwindows
Linux builds use the host C++ toolchain through CMake.
Native Windows builds from build.ps1 use the host CMake toolchain. Install a
C++ toolchain supported by CMake, such as Visual Studio Build Tools.
Windows cross-builds from Linux require:
x86_64-w64-mingw32-g++
Stages:
dist/cpp/
├── include/
│ ├── tensor_planner.h
│ └── tensor_planner.hpp
└── lib/
└── libtensor_planner.so or tensor_planner.dll
When building multiple OS targets, output is split by OS:
dist/cpp/linux/
dist/cpp/windows/
Stages the .NET wrapper assembly and native runtime assets:
dist/sharp/
├── lib/netstandard2.1/TensorPlanner.dll
└── runtimes/
├── linux-x64/native/libtensor_planner.so
└── win-x64/native/tensor_planner.dll
Stages a Unity package folder:
dist/unity/dev.nick.tensor-planner/
├── package.json
├── Runtime/
│ ├── TensorPlanner.cs
│ └── Plugins/x86_64/...
Stages a Jai module folder:
dist/jai/Tensor_Planner/
The script stages native libraries under:
dist/jai/Tensor_Planner/lib/<os>/
Current note: verify Jai packaging when adding platform-specific generated Jai binding files. The source module currently includes the Linux generated binding.
By default, each distribution script removes build-process files after staging outputs:
- per-OS CMake build directories,
- C#
bin/<Configuration>, - C#
obj.
Use -no-clean to inspect intermediate files:
sh ./build.sh -debug -target cpp sharp -o ./dist -no-cleanpwsh ./build.ps1 -debug -target cpp sharp -o ./dist -no-cleanThe CMake project installs headers, library, and CMake package config files:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
cmake --install build --prefix ./installInstalled headers:
include/tensor_planner.h
include/tensor_planner.hpp