+usage() {
+ echo "Usage: $0 [command] [args]"
+ echo "Commands:"
+ echo " build [module] Build a specific module"
+ echo " full Build all modules in src/ directory"
+ echo " design Build NUI Design module"
+ echo " xamlbuild Build NUI XamlBuild module"
+ echo " dummy Generate dummy assemblies of all modules"
+ echo " pack [version] Make a NuGet package with build artifacts"
+ echo " install [target] Install assemblies to the target device"
+ echo " clean Clean all artifacts"
+}
+
+prepare_solution() {
+ target=$1; [ -z "$target" ] && target="full"
+
+ dotnet new sln -n $SLN_NAME -o $SCRIPT_DIR --force
+ if [ "$target" == "public" -o "$target" == "full" ]; then
+ dotnet sln $SLN_FILE add $SCRIPT_DIR/src/*/*.csproj
+ fi
+ if [ "$target" == "internal" -o "$target" == "full" ]; then
+ dotnet sln $SLN_FILE add $SCRIPT_DIR/internals/src/*/*.csproj
+ fi
+ if [ "$target" == "design" ]; then
+ dotnet sln $SLN_FILE add $SCRIPT_DIR/src/*/*.Design.csproj
+ else
+ dotnet sln $SLN_FILE remove $SCRIPT_DIR/src/*/*.Design.csproj
+ fi
+ if [ "$target" == "xamlbuild" ]; then
+ dotnet sln $SLN_FILE add $SCRIPT_DIR/src/*/*.XamlBuild.csproj
+ else
+ dotnet sln $SLN_FILE remove $SCRIPT_DIR/src/*/*.XamlBuild.csproj
+ fi
+}