UserTool: Open Sauce multifunctional command line tool
By TheFieryScythe
Usertool is a command line program that Open Sauce developers can use to provide a familar tool-like way to manipulate tags, or for any other purpose they may need.
Using UserTool:
If you know tool then you already know how to use it. Open up a command prompt and navigate to wherever usertool is located. Type 'usertool' and hit enter to list all of the commands that are available. If you are unsure as to what a particular command will do, type 'usertool *the command*' and it will print the command with a short description about what it does. Once you know what command you want to use type 'usertool *the command* *arguments*' and the command will do its stuff.
Developing for UserTool
Prerequisites:
- Boost C++ library - http://www.boost.org/
- Open Sauce V2 - http://www.modacity.net/forums/showthread.php?t=17758
- Latest DirectX redist - http://www.microsoft.com/downloads/d...displaylang=en
Obviously you will need to change the include directories to match your file setup.
I've tried to keep the coding for usertool as similar to OS code as I can so its simpler to switch between the two. To add a command to usertool you simply add your own namespace and then put the function that your command will call inside it. You then add a COMPONENT macro to the components array in Main.cpp and fill in the function, name, description, etc. sections.
There are a few namespaces included that handle some things for you:
- ErrorPool - holds a list of error strings that you add to when your code has a problem, which then get output to the console and saved to debug.txt before the program closes.
- DebugOutput - Use this to output messages to the console and to manually add messages to debug.txt.
- Direct3D - Use this namespace to create and destroy a Direct3D device should you need it.
As this is mainly intended for manipulating custom tags, i've put together a basic tag interface namespace that you used to build, load and save your tags. An example of which can be found in the shader_post_process tag included. There may be circumstances where it might not work with more complex tags but those bridges will be crossed when we jump off them.
Bookmarks