Sublime Text 3 - minimal build instruction

Here is how i build handmade using sublime text 3, which doesn't use a startup script. It's a bit more minimal than the other instruction, and you can build anywhere inside 'handmade' folder.

do once:
- unzip and copy attached build script 'handmade.sublime-build' to 'C:\Users\[user]\AppData\Roaming\Sublime Text 3\Packages\User'
- rename root folder to 'handmade'

do each time you open cmd:
- run 'misc/shell.bat'
- run 'subl .' in 'handmade' folder or just 'subl' if already open
- select 'Tools->Build System->handmade' (only first time you open project in subl)
- press 'ctrl b' to build

[attachment=3]handmade.zip[/attachment]

Edited by Erlend on
Just a note for any sublime users, if you don't want to have to launch sublime text from an already created shell, you can edit the build command to call shell each time. It will make the process a bit slower (due to re-running vcvarsall) but it will also let you use other shortcuts you might already have.

Just go into the .sublime-build file and in the value for "shell_cmd", prepend:

1
/Path/To/shell.bat &&


so that the entire line looks like:

1
"shell_cmd": "/Path/To/shell.bat && /Path/To/build.bat"


Also, a tip: You can add build variants like "Run" if you want to streamline the testing process. Here's what mine looks like:

1
2
3
4
5
6
7
	"variants":
	[
		{
			"name": "Run",
			"shell_cmd": "cd C:/dev/test/hero && C:/dev/test/hero/build.bat && C:/dev/test/hero/build/x64/win32_handmade.exe"
		}
	]

(be sure you add a comment on the line above this so the JSON is still valid)

Sublime will automatically bind build variants called "Run" to Ctrl+Shift+B, which is nice for quickly running things. You don't get VS debugging, but that is simple enough to launch the old fashioned way.