Skip to content

Instantly share code, notes, and snippets.

@Mystler
Last active April 23, 2021 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mystler/a0dfea4588665b3ebbb1b8197cf5e55e to your computer and use it in GitHub Desktop.
Save Mystler/a0dfea4588665b3ebbb1b8197cf5e55e to your computer and use it in GitHub Desktop.
Mystler's SimC VS Code Workspace Files
  1. I have simc.exe in my SimulationCraft folder. Inside I created a workspace folder.
  2. Put build.sh (requires shell tools, e.g. via Git, in the path) and config.simc (adjusted to your system) in side the workspace folder.
  3. Create a folder history in the workspace that is used for archived reports.
  4. Create a folder .vscode in the workspace and put tasks.json inside.
  5. Done! Now you can just do "Open with Code" on the workspace folder. If you bound "Run Build Task" in the keybinding, you can just use that shortcut to sim whatever file is open in the editor.

Might also be a good idea to install my SimulationCraft Extension for VS Code: https://marketplace.visualstudio.com/items?itemName=Mystler.simulationcraft

../simc.exe config.simc $1
start out.html
histname=$(echo "$1" | cut -f 1 -d '.')
cp out.html history/$(echo "$histname")_$(date +%d-%m-%Y-%H-%M-%S).html
cp out.log history/$(echo "$histname")_$(date +%d-%m-%Y-%H-%M-%S).log
cp out.json history/$(echo "$histname")_$(date +%d-%m-%Y-%H-%M-%S).json
threads=5
chart_show_relative_difference=1
html=out.html
output=out.log
json=out.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "simc",
"type": "shell",
"command": "./build.sh ${relativeFile}",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment