-
Notifications
You must be signed in to change notification settings - Fork 0
/
Glulx.sublime-build
70 lines (70 loc) · 3.51 KB
/
Glulx.sublime-build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// "Glulx.sublime-build" v0.0.1 (2018-11-20)
// =============================================================================
// Glulx Build Systems
// =============================================================================
// All build systems require glulx-assemble binary to be on system Path!
{
// ---------------------------------------------------------------------------
// Default Build: Assemble
// ---------------------------------------------------------------------------
// Assemble current Glulx source file ("`*.ga`") via shell command:
//
// glulx-assemble <filename>.ga <filename>.ulx
// ---------------------------------------------------------------------------
"shell_cmd": "glulx-assemble \"$file\" \"$file_base_name.ulx\"",
"working_dir": "$file_path",
"selector": "source.glulx",
"file_patterns": [ "*.ag" ],
// ===========================================================================
// Build System Variants
// ===========================================================================
"variants":
[
{
// -----------------------------------------------------------------------
// Assemble & Run
// -----------------------------------------------------------------------
// Assemble the current Glulx source and then open the compiled "*.ulx"
// storyfile via shell command:
//
// glulx-assemble <filename>.ga <filename>.ulx && <filename>.ulx
//
// Requires the ".ulx" file extension to be associated with a Glulx terp!
// -----------------------------------------------------------------------
"name": "Assemble and Run",
"shell_cmd": "glulx-assemble \"$file\" \"$file_base_name.ulx\" && \"$file_base_name.ulx\"",
},
{
// -----------------------------------------------------------------------
// Assemble & Dump Debug
// -----------------------------------------------------------------------
// Assemble the current Glulx source with -dump-debug option and then open
// the generated "out_debug.txt" report via shell command:
//
// glulx-assemble -dump-debug <filename>.ga <filename>.ulx && subl out_debug.txt
//
// Requires the subl command line tool to be on system Path!
// -----------------------------------------------------------------------
"name": "Assemble with Dump Debug and Open Debug File in Sublime Text",
"shell_cmd": "glulx-assemble -dump-debug \"$file\" \"$file_base_name.ulx\" && subl \"$file_path/out_debug.txt\"",
},
{
// -----------------------------------------------------------------------
// Assemble with All Debug Options
// -----------------------------------------------------------------------
// Assemble the current Glulx source file with every debug option:
//
// -dump-labels -dump-patches -dump-pretokens -dump-tokens -dump-debug
//
// The following report files will be created in the source folder:
// out_debug.txt
// out_labels.txt
// out_patches.txt
// out_pretokens.txt
// out_tokens.txt
// -----------------------------------------------------------------------
"name": "Assemble with All Debug Options",
"shell_cmd": "glulx-assemble -dump-labels -dump-patches -dump-pretokens -dump-tokens -dump-debug \"$file\" \"$file_base_name.ulx\"",
},
]
}