Custom Compiler GUI

From Valve Developer Community
Jump to: navigation, search
Custom Compiler GUI
Author UltimateSniper
Size 55.5 KiB
Date 6 Oct 2011
Current Version 0.9 (Pre-Release)
Prerequisites .NET Framework 4.0
Download

Custom Compiler GUI Custom Compiler GUI is a Graphical User Interface (GUI) for a/set of compiler(s). Essentially, it allows users to change the settings for the compiler(s) they wish to run, but it is configurable for any (set of) compiler(s). It allows a developer to generate a configuration file, which contains information about the compiler(s). This is used by the program to display options to the user.

This tool is aimed mainly at mappers & modellers, who require compiler set-ups for more than one (set of) compiler(s) (eg. studiomdl for modelling, and the map compilers for mapping). Although, it can be used by anyone, for pretty much any program with a "standardoutput" (same message output as console command-line applications), and returns a non-zero exit code on erroring.

Features

Main Window

CustomCompilerGUI09 1.png

  • Compile Options — In the case of more than one compiler program, this tab has a list of the compilers at the top of the tab, with the properties/settings of the selected compiler on display underneath. Only the compilers that are ticked in the list will be used when "Compile" is clicked. In the case of one compiler, only the properties/options of that compiler are permanently on display.
  • File Options — This tab only appears in the case of the config containing options to copy/move/delete files after the compile process. It allows users to select which of those options they wish to be performed.
  • Compile — Runs the selected compilers with the chosen settings, then performs the selected file options (if any).


Toolbar:

  • Settings => Save Settings — Saves the current settings for this configuration.
  • Settings => Open Settings — Opens settings for this configuration.
  • Settings => Reset Settings — Resets the settings to their default values.
  • Paths — Allows users to edit the paths to the compiler programs, and to folders used by the file options.
  • Tools => Create Shortcut — Creates a custom shortcut to start the program with the chosen configuration file (basically, a shortcut to a different compiler set-up).
  • Tools => Create/Edit Config — Opens the Config Editor, which allows a "modder" to edit or create a configuration file, defining the argument(s), and their respective variable type(s) and default(s), of the compiler(s).
Note.pngNote:To open settings: Settings file must have been saved with the same configuration as the one that's currently loaded. (You can't import model compiler settings for a map compiler!)

Config Editor

CustomCompilerGUI09 2.png

  • Open — Open a configuration file to start modifying.
  • Save — Save the current configuration.
Note.pngNote:Beware of closing the window: The configuration will not automatically be saved, and you will loose any unsaved editing!


There are 4 top-level items in the tree-view (on the left):

Generic

Generic settings for the configuration, has 2 properties:

  • FileFilter — The filter for browsing the source file for the first compiler.
  • Name — The name of the configuration.

Compilers

Collection of compiler definitions/settings. To add settings for a new compiler, select "Compilers" in the tree-view, and click "Add" (to remove, select the compiler and click "Remove"). The new compiler's properties should then be displayed, which are as follows:

  • CompilerName — File name of the compiler.
  • Format — (Read-only) Example of the command line format given to the compiler.
  • InputType — (Optional) The ending of the file name of the input file for this compiler (leave blank for first compiler).
  • Messages — Whether the GUI console should be shown and the compiler window hidden, or compiler window shown, or the user can decide.
  • Name — The displayed name of the compiler (must be unique).

Each compiler has a collection of arguments. To add an argument, select the compiler in the tree-view and click "Add" (to remove, select the argument and click "Remove"). The new argument's properties should then be displayed, which are as follows:

  • Category — (Optional) An arbitrary category (group) name this argument belongs to.
  • Description — A description for the argument that users see.
  • Editor — The editor users can use to modify the argument's variable(s). After selecting an editor, it must be expanded (click on the ">" on the left) to be modified.
  • Format — (Read-only) Example of the command line segment made by this argument.
  • Name — The displayed name of the argument (must be unique within the compiler).
  • Parameter — The command-line parameter (eg. -random).
  • ReadOnly — Whether users are blocked from modifying the variable(s) of this argument.
  • Variables — The collection of variables for this argument. To modify, click on the browse (...) button.

Each argument has a collection of variables, whose names are only important if there is more than 1 in the argument. If the argument is a boolean (on/off) argument (ie. with no actual value), there must be 1 variable of the "Boolean" type (this is the default). Once selected in the list on the collection window, the variable's properties are shown on the right-side of the window, which are as follows:

  • Name — The displayed name of the variable (only important/visible to users when more than 1 variable).
  • Value — The type of variable. After selecting a type, it must be expanded (click on the ">" on the left) to access type properties.

The types of variable are as follows:

  • String — String type, has a default value.
  • Char — Char type, has a default value.
  • Boolean — Boolean type, has a default value.
  • Choice — Choice type, has a collection of choices and the index of the default choice.
  • Byte, SByte, UShort, Short, UInt, Int, ULong, Long, Single, Double — Numeric types, have default value and maximum & minimum values.

Folders

Collection of folder definitions/settings. To add settings for a new folder, select "Folders" in the tree-view, and click "Add" (to remove, select the folder and click "Remove"). The new folder's properties should then be displayed, which are as follows:

  • Description — A description for the folder that users see.
  • Name — The displayed name of the folder, also used by file options to reference it, must be unique (among compilers, too).

File Options

Collection of defined file operations. To add a new option for users, select "File Options" in the tree-view, and click "Add" (to remove, select the file option and click "Remove"). The new option's properties should then be displayed, which are as follows:

  • DefaultSelected — Whether the option will be enabled by default.
  • File — The ending of the file name for the file which will be operated on.
  • FileAction — Whether the file should be copied, moved or deleted.
  • ToFolder — The folder to copy/move the file to (should be null when FileAction is set to delete).

Version History

  • 0.9.0 — Pre-release (no icon) for public testing.

External links