nosoop / NinjaBuild-SMPlugin

Template to set up SourceMod plugin projects with Ninja
9 stars 2 forks source link

Preserve directory names with spaces in resulting build file #5

Closed sticks-stuff closed 2 years ago

sticks-stuff commented 2 years ago

It's a kinda hacky solution, but this fixes some problems where generated build files with fail as the command line arguments put into the file lack the quotes that the initial setup arguments had.

For example python3 configure.py --spcomp-dir "L:\tf2server\steamapps\common\Team Fortress 2 Dedicated Server\tf\addons\sourcemod\scripting" results in

configure_args = --spcomp-dir L:\tf2server\steamapps\common\Team Fortress 2 $
    Dedicated Server\tf\addons\sourcemod\scripting

being written to the build file, which will result in

FAILED: build.ninja
Configures the project.: error: unrecognized arguments: Fortress 2 Dedicated Server\tf\addons\sourcemod\scripting Fortress 2 Dedicated Server\tf\addons\sourcemod
nosoop commented 2 years ago

Thanks for the PR — I think there's a nicer solution that I'll use over the it though; let me know if you run into any issues with it.