Files
Paradise/tools/rustlibs_tools/mapmanip.ps1
T
b066c95bfc port: Aurora mapmanip library for map templates, and documentation. (#26803)
* refactor: wrap MILLA in general Rust library

* port: Aurora mapmanip library and documentation.

* update CI libs and TGS build rule

* pass filename properly, raise map helper layer

* Update rust/src/mapmanip/core/mod.rs

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>

* add a bit more documentation

* make doc more para-centric

* these don't need to be images at all

---------

Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
2024-10-22 12:09:13 +00:00

42 lines
1.5 KiB
PowerShell

# if you want to run this script but it opens in notepad
# you may want to right click it and "run with powershell"
# script explanation
echo "*****"
echo "This script will run map manipulations on every `.dmm` map that has a `.jsonc` config file,"
echo "and write it to a `.mapmanipout.dmm` file in the same location."
echo "Make sure to not commit these files to the repo."
echo "This script will not show any error messages if map manipulations have failed."
echo "Should launch the actual server to get stacktraces and the like."
echo "*****"
# find path to rustlibs.dll
if (Test-Path "./rust/target/i686-pc-windows-msvc/release/rustlibs.dll") {
$BapiPath = "./rust/target/i686-pc-windows-msvc/release/rustlibs.dll"
}
elseif (Test-Path "./rust/target/i686-pc-windows-msvc/debug/rustlibs.dll") {
$BapiPath = "./rust/target/i686-pc-windows-msvc/debug/rustlibs.dll"
}
elseif (Test-Path "./rustlibs.dll") {
$BapiPath = "./rustlibs.dll"
}
else {
echo "Cannot find rustlibs."
}
# run ffi function from rustlibs.dll
echo "Executing..."
$BapiDllFunction = "all_mapmanip_configs_execute_ffi"
$BapiExecutionTime = Measure-Command {
# `rundll` runs a function from a dll
# the very sad limitation is that it does not give any output from that function
rundll32.exe $BapiPath, $BapiDllFunction
}
# done
echo "Done!"
echo ("Took {0} seconds, or {1} milliseconds in total." -f $BapiExecutionTime.Seconds, $BapiExecutionTime.Milliseconds)
echo "*****"
Read-Host -Prompt "Press Enter to exit..."