Command-line Inform 7: how to use ni, inform6, and cBlorb by CLI for 9.3/6M62

[ Note: for Inform 7 10.1 and above, see the Inform 7 v10 command-line usage docs. Once you’ve compiled Inform 7 source to Inform 6, the information below continues to be useful for compiling from I6 to glulx or z-code. I7-helpers offer some crude scripts for compilation. ]

If you’ve ever found yourself going through the cheesy Perl interface’s source again for how to compile Inform on the command-line (and I know I’m not completely alone in this), this goes out to you. It’s somewhat Linux-centered, but I’ve tried to accommodate OS X and Windows users where I thought I knew how. I expect there are any number of places where I’ve ascribed some behavior to “the IDE” that isn’t identical among them and other errors. If you see any, please post corrections in the thread and I’ll update.

tl;dr

-internal is a directory named Internal somewhere in your system’s Inform installation – it contains (among many other things) Extensions/Graham Nelson/Standard Rules.i7x

-external is the directory named Inform under your home directory or “My Documents” directory

In the following examples, my-game.inform is a specific Inform project directory containing at least uuid.txt and Source/story.ni and we’ll use Linux’s default location for Internal.

First step: ni (compiles Inform 7 code to Inform 6 code)

glulx:

ni -noprogress -internal /usr/local/share/inform7/Internal -external "$HOME/Inform" -project "$HOME/Inform/my-game.inform"

zcode:

ni -noprogress -format=z8 -internal /usr/local/share/inform7/Internal -external "$HOME/Inform" -project "$HOME/Inform/my-game.inform"

In either case, add -release if building for release, e.g.,

ni -release -noprogress -internal /usr/local/share/inform7/Internal -external "$HOME/Inform" -project "$HOME/Inform/my-game.inform"

Second step: inform6 (compiles Inform 6 code to either glulx or zcode)

As of this writing, the most recent release was 6.36 on 2022-01-25. The Inform 7 packages on inform7.com include 6.33N. The IF Archive has an Inform 6 6.36 Binary for Windows or one can build one’s own from the Inform 6 source code.

glulx, testing:

inform6 -E2wSDG "$HOME/Inform/my-game.inform/Build/auto.inf" "$HOME/Inform/my-game.inform/Build/output.ulx"

zcode, testing:

inform6 -E2wSDv8 "$HOME/Inform/my-game.inform/Build/auto.inf" "$HOME/Inform/my-game.inform/Build/output.z8"

glulx, release:

inform6 -E2w~S~DG "$HOME/Inform/my-game.inform/Build/auto.inf" "$HOME/Inform/my-game.inform/Build/output.ulx"

zcode, release:

inform6 -E2w~S~Dv8 "$HOME/Inform/my-game.inform/Build/auto.inf" "$HOME/Inform/my-game.inform/Build/output.z8"

Third step: cBlorb (packages your gamefile along with cover art or other materials into a gblorb or zblorb file)

glulx:

cBlorb -unix "$HOME/Inform/my-game.inform/Release.blurb" "$HOME/Inform/my-game.inform/Build/output.gblorb"

zcode: (this will write to “$HOME/Inform/my-game.inform/Build/output.zblorb”)

cBlorb -unix -project "$HOME/Inform/my-game.inform"

Windows users should use -windows instead of -unix. Mac users should omit -unix (there’s an -osx switch, but that’s the default).

Unless you’re using images or sound and want to verify that everything blorbs up ok, it seems safe to skip this during development. For release you’ll probably want to make a blorb with at least a cover image.

wait, where do I find these commands?

If you used install-inform7.sh on Linux, by default they’re all symlinked from /usr/local/libexec ; if you specified something else at installation time with the -prefix switch look for libexec under that. You might like to add something like export PATH="/usr/local/libexec:$PATH" to your .bashrc or other shell init file of choice.

On a Mac, it’ll be something like “/Applications/Local Apps/Inform-7/Inform-168-1.app/Contents/MacOS”; on Windows, “Program Files\Inform 7\Compilers”.

10 Likes

Longer

The first step: ni (Inform 7 → Inform 6)

You’ll need to know where your ‘Internal’ directory is. It has these subdirectories:

  • Documentation
  • Extensions
  • I6T
  • Languages
  • Miscellany
  • Templates

On Linux, it’ll be /usr/local/share/inform7/Internal (unless you specified differently with install-inform7.sh --prefix). On a Mac it’ll be something like “/Applications/Local Apps/Inform-7/Inform-168-1.app/Contents/Resources/Internal”; on Windows at “Program Files/Inform 7/Internal”.

In the following examples I’m going to assume you have it in an environment variable called INTERNAL.

export INTERNAL="/usr/local/share/inform7/Internal"

You’ll also need a project directory and you’ll want an “external” directory. By default, the IDE creates an Inform directory under $HOME on Linux or “My Documents/Inform” elsewhere; this is the external directory and it’s within this directory the IDE creates the directories for your individual projects. It includes the Extensions directory shared by your projects. The path of least resistance and most compatibility with the IDE is to imitate the IDE’s behavior, so that’s what this guide does.

So to create the “My Game” project, we’ll create a my-game.inform directory under $HOME/Inform and a Source directory underneath that and put a story.ni file in Source:

INFORM_DIR="$HOME/Inform"
GAME_PROJECT="my-game"
GAME_PROJECT_DIR="$INFORM_DIR/$GAME_PROJECT.inform"
mkdir -p "$GAME_PROJECT_DIR/Source"

Put a so-called game in Source/story.ni:

"My Game" by "Me".
Mine is a room.

We’ll create a uuid and put it in uuid.txt your project directory. Your program might be uuidgen or you might have to install something. You don’t want a newline; the file should be exactly 36 bytes. Don’t just do uuid > "$GAMEDIR/uuid.txt" or you’ll get a newline. This works:

echo -n `uuid` > "$GAMEDIR/uuid.txt"

Any of ni’s command-line switches can be specified with one or two hyphens, - or --. I’m going to use a single hyphen to reduce the chances of emdash conversion if I miss code-tagging something and, of course, to conserve our dwindling national hyphen reserve.

ni -noprogress -internal "$INTERNAL" -external "$INFORMDIR" -project "$GAMEDIR"

-noprogress is optional; it makes the output less noisy. You can add -release for a release version; by default the game offers SHOWME and other debugging commands as described in Inform’s docs.

By not specifying a format, you get the default, glulx. If you want zcode, you’ll have to specify -format=z8. One can say -format=ulx for glulx but it’s redundant. (Most of ni’s command-line switches forbid ‘=’; others require it.)

A lot happens when you run ni. It creates a my-game.materials directory (with a Release directory underneath it) if it didn’t already exist, and Build and Index subdirectories alongside your Source directory. If story.ni had an error you can see what it has to say about it in “Build/Debug log.txt” or “Build/Problems.html”. It’ll still make an Index directory with a headings.xml file and an empty Details directory. And it’ll make a zero-length “Build/auto.inf” file.

On success, you’ll still get the Debug log.txt and Problems.html files, but now affirming success. You’ll get a whole lot of stuff written under Index. And in my-game.inform itself you’ll get these files:

  • manifest.plist
  • Metadata.iFiction
  • Release.blurb

ni does not, however, automatically create an Extensions directory, so if you’re setting up a project manually you should probably also do:

mkdir -p "$INFORM_DIR/$GAME_PROJECT.materials/Extensions"

The second step: inform6 (Build/auto.inf in Inform 6 → Build/output.z8 or Build/output.ulx)

Good news: inform6 isn’t as mysterious as ni. It’ll even outright tell you what its command-line switches are:

inform6 -h2

I don’t know of a place they’re documented all together but between these you should be able to find them all:

These are the switches gnome-inform7 uses for release: -wxE2~S

~S disable strict checking. Use -S to include it for development and test builds.
-w disable strict warnings at compile-time (otherwise you get a huge number of irrelevant warnings)
-E2 Mac OS style error messages instead of the default, E0: Archimedes style. There’s also E1, Microsoft style. [Edited: the error message styles are demonstrated below.]
-x produce compilation progress message (the IDEs like to show noisy output; on the command-line you probably don’t want it)

The IDE also uses ~D but it’s redundant. Debugging is off by default. For development/testing, turn it on with -D. This determines whether test commands like showme are available (independent of whether ni was invoked with -release, so be sure to omit -D or include ~Dfor release.) If you’re an inform 6 hacker you may want to use -k which creates gameinfo.dbg, a verbose debugging log and turns on -D.

And you need either -G to compile to glulx or -v8 to compile to z8. All together, for dev/test, that’s -E2wSDG for glulx and -E2wSDv8 for zcode and for release it’s -E2w~S~DG for glulx or -E2w~S~Dv8 for zcode.

You don’t have to specify an output file; if you don’t, it gets written to the filename’s basename (i.e., without the .inf) plus either .z8 or .ulx.

It’s worth noting that Inform 6 as included in at least some Inform 7 packages does not include the Inform 6 Standard Library and so you couldn’t use it to compile Inform 6 source that relies on it. But you can specify the library directory with + on the command line, e.g.,

inform6 -E2w~S~DG +/usr/local/share/inform6lib my-game.inf

cBlorb: output.z8 or output.ulx → output.zblorb or output.gblorb

Another pleasantly open book: the cBlorb manual.

Note that the Blorb specification was updated to 2.0.4 on 2014-03-02. As of this writing, all of the dedicated cBlorb repos on Github or Gitlab I know of have code that predate the changes for 2.0.4. So far as I see, the only public up-to-date cBlorb source is within the gnome-inform7 repo. (They all call themselves version 1.2; up-to-date versions mention rdes_record in “Chapter 2/Blorb Writer.w”.) If you want to build from source, use this one; otherwise, use the binary from a current Inform 7 package.

4 Likes

Too Long

Shocking reveals aplenty as I confess to the many lies and omissions above!

When things changed

In 6L02, -format was -extension, -project was -package, -internal was -rules, and -external was -extensions, so if you see any references to those they were for 6L02 or earlier.

Despite the level of detail of Inform’s change logs, 6L38’s doesn’t mention any of this.

Settings.plist, lack thereof

Maybe you’ve noticed I haven’t mentioned Settings.plist, a file the IDEs create in every project directory, even cheesy Perl. And that’s because none of ni, inform6, or cBlorb acknowledge it. Settings.plist is by and for the IDEs to store settings about how they should run these tools.

external and census

You don’t need to specify an -external directory. But on every invocation of ni, it takes a census of available extensions and writes about it to the external directory’s Documentation and Telemetry directories (creating them as necessary). So if you don’t have a $HOME/Inform directory and run ni without specifying -external, it will:

  • create “$HOME/Inform” for you because it needs someplace to write its extension census data
  • look for extensions and not find any beyond the Internal ones
  • create Documentation and Telemetry directories to report

It’s going to write all that somewhere; if you don’t want it writing to “$HOME/Inform”, you have to give it something. But saying -external "$HOME/Inform" is redundant since it’s the default. For IDE compatibility, you’re best off accepting the default.

(Despite the redundancy, I’ve included it throughout because I think it’d do more harm than good to promote the idea that -external is optional. Someone who copy-pasted an example with just -project and -internal who was struggling with why things are failing wouldn’t have a lot to work with. I’m hoping -external would give them a chance.)

It’s possible to steer where ni looks for the external directory without explicitly specifying -external by changing $HOME, but that’s both less flexible and less clear.

There’s one case in which you can run ni without specifying a -project: if you specify -census. This goes through the process above; the intent is that IDEs do it after a user installs or uninstalls extensions via the IDE. For a build script, doing it explicitly after pulling the whole Friends of I7 Extensions repo would make some sense. But since ni also checks for changes to the census on every run, there’s not a lot of point to command-line users running it manually.

project directory naming

It doesn’t have to end in .inform. Surprise!

If it doesn’t, ni will create a Release directory under your project directory instead of creating an exact analog of the materials directory. And it’ll look for extensions in an Extensions directory under the project directory instead of in my-game.materials/Extensions. When Release.blurb is generated, this is taken into account so cBlorb’ll be just fine with it too. This only works for the non-.inform-named case: Release and Extensions directories under your project directory are ignored otherwise.

But the IDE simply won’t recognize a project directory whose name doesn’t end with .inform. You wouldn’t be able to open it. If you go back and forth between the command-line and the IDE, stick to its scheme. In fact, if you want to ever use the IDE with a project, stick to creating the project in the IDE or it’ll get cranky about the lack of a Settings.plist.

By default the IDE offers to put your project directories under the same directory it made to be your external directory, but there’s no essential relationship. This works (so long as you have relevant write permissions on /opt):

ni -noprogress -internal /usr/local/share/inform7/Internal -external /tmp -project /opt/my-game.inform

uuid.txt

Nothing breaks if you don’t have a uuid.txt. cBlorb will report an error, but it’ll build a blorb anyway. VERSION in your game would result in ‘Identification number: ////’.

But do you want the casualties of the conflict that the Treaty of Babel finally ended to have died in vain? Do you want IFDB’s archivists to declare a vendetta? (They never forget.) Don’t omit uuid.txt.

For anything you’re letting out the door. If in private during development you keep deleting them and churn through dozens, or go without some of the time? Eh.

But seriously, by the time you have testers, have one and stick to it.

noindex

If you don’t care about creating the Index, you can add the -noindex flag. This will save a lot of disk space for large games. You’ll still get Index/headings.xml and an empty Index/Details dir as with the failed compile case, but that’s around 350K. Even a minimal game gets a 3.4M Index. Counterfeit Monkey’s Index takes 29M. In my wholly unscientific comparison of two data points, -noindex on CM also saved 3 seconds of time. That sounds like a lot until you consider that it was the difference between 31 and 34 seconds.

The Index isn’t particularly usable outside the IDE… without a bunch of munging I won’t try to describe now. So you might opt to skip making it while you’re working on the command-line. My guess is that the IDE might get confused if the source and index are out of sync because you’ve been building your project with -noindex outside of the IDE – if nothing else, the Index’s links to specific lines of your story would be wrong. But all that should be cleared up on the next compile without -noindex.

backup & cleanup

By default, a lot of stuff is left lying around your project directory. Provided you haven’t added other stuff manually, then so far as I know, story.ni, uuid.txt, and everything under the materials directory (with the exception of any generated .eps files) are the only things you need to keep. You could literally delete the Build and Index directories and they and everything in them would just be reproduced next time you compile. But this is at your own risk: if for some weird reason you can’t reproduce the build environment or you don’t have a working set of extensions on hand for the project, you could lose your only run-able copy of the game.

I mentioned above that on failed compilation ni left a 0-length Build/auto.inf file. This happens whether or not there was already an auto.inf there; it simply clobbers any existing one. So in the normal course of things, you would find out that you can no longer create a working auto.inf at the same time you lose your only copy. But hey, at least you’d still have output.ulx.

format

You can still specify -format=z5 or -format=z6 and ni will run just fine. But on even the minimal 1-room game inform6 will then choke if you try to compile the resultant auto.inf to a z5 or z6 game. (Maybe you could get something to work by twiddling constants, but I’m drawing a line on how much experimentation I do for this post.)

(Also, you don’t have to specify a format to run inform6. But without one, it defaults to v5 which isn’t much help to Inform 7 users.)

randomness

ni has an -rng switch that turns pseudo-randomness into actual-determinism for testing purposes. Basically the same behavior as including the Inform 7 phrase “Seed the random-number generator with 12” (or any other integer greater than zero). Well, same behavior as in pseudo-randomness turns to determinism. Different actual results. Unless you strike on the same seed -rng uses. I assume this is what you get when you turn off randomness in the IDE.

scoring

In 6L02, Inform 7 switched to ‘use no scoring’ by default. ni’s -scoring command-line switch makes the default ‘use scoring’ again. But it’s just the default; ‘use no scoring’ in the source will trump it, like you’d expect.

The Debugging Log

Your reward for making it all the way to the bottom is something actually kinda useful. Way up top I made a passing reference to “Build/Debug Log.txt”. It includes the parameters with which ni was invoked.

Inform called as: /usr/libexec/gnome-inform7/ni -internal /usr/share/gnome-inform7 -format=ulx -project /home/user/Inform/my-game.inform

This may not sound like much now, but I’m guessing that’s how 6L02 users saw how the IDEs were doing it and knew how to change from -rules and -package. And if the next release of Inform massively invalidates the contents of this post, that’ll be the first place to look.

And at the bottom, it gives you instructions on how to customize it!

Its contents were as follows, and can be changed by placing
text like 'Include property creations in the debugging log.'
or 'Omit everything from the debugging log.' in the source.

Included:
  debugging log contents  debugging log inclusions
Omitted:
  action creations   action pattern compilation  action pattern parsing  assemblies    assertions    case insensitive filehandling
  conditions    constructed past participles  constructed plurals   description compilation   excerpt meanings   excerpt parsing 
  [many more elided...] 

You can get a more readable form of the options by adding -log=list to a ni invocation. It has to be a legit use of ni with the usual requirements, e.g.,

ni -noprogress -internal /usr/local/share/inform7/Internal -external "$HOME/Inform" -project "$HOME/Inform/my-game.inform" -log=list

If you don’t have a convenient project lying around, this could be another case for -census. Anyway, the log aspects are

  • action-creations
  • action-pattern-compilation
  • action-pattern-parsing
  • assemblies
  • assertions
  • case-insensitive-filehandling
  • conditions
  • constructed-past-participles
  • constructed-plurals
  • debugging-log-contents
  • debugging-log-inclusions
  • description-compilation
  • excerpt-meanings
  • excerpt-parsing
  • expressions
  • extensions-census
  • figure-creations
  • grammar
  • grammar-construction
  • headings
  • implications
  • inferences
  • kind-changes
  • kind-checking
  • kind-creations
  • lexical-output
  • local-variables
  • matching
  • meaning-list-allocation
  • memory-allocation
  • noun-resolution
  • object-compilation
  • object-creations
  • object-tree
  • phrase-comparisons
  • phrase-compilation
  • phrase-creations
  • phrase-registration
  • phrase-usage
  • predicate-calculus
  • predicate-calculus-workings
  • pronouns
  • property-creations
  • property-provision
  • property-translations
  • relation-definitions
  • rule-attachments
  • rulebook-compilation
  • spatial-map
  • spatial-map-workings
  • specification-permissions
  • specification-usage
  • specificities
  • table-construction
  • template-reading
  • text-substitutions
  • time-periods
  • variable-creations
  • verifications
  • vocabulary

So Inform 7 offers a ludicrous amount of detail about what it’s doing during compilation if you know how to ask for it. I won’t try to describe them. Some of them are obvious… and I couldn’t tell you what the ones that aren’t obvious are. You can turn them on on the command line:

ni -noprogress -internal /usr/local/share/inform7/Internal -external "$HOME/Inform" -project "$HOME/Inform/my-game.inform" -log=pronouns -log=constructed-plurals

Two things are on by default, debugging-log-contents and debugging-log-inclusions. I don’t know whether it’s possible to turn them off by command-line switch. You can in your Inform 7 source.

Omit debugging-log-inclusions from the debugging log. 

Or you can turn things on:

Include pronouns and constructed-plurals in the debugging log. 

It’s even possible to say

Include everything in the debugging log.

But that’s 46M of detail for the minimal case.

The debugging log itself appears to be the only source of documentation on the debugging log. (The change log makes a couple of passing references to its existence.)

and the rest

I’m going to go out on a limb and guess that -gdb and -gdball are relevant to debugging ni itself and not relevant to anyone not developing ni.

The -clock switch arrived in 6L02. -sigils goes way back. They don’t take parameters. -transient arrived with 6L38 and -case with 6M62. They do require a parameter.

There are still mysteries in this world.

5 Likes

And if I get to telling the story of munging the Index it’ll go here.

1 Like

Thanks for putting this together.

What it says. It affects the style in which I6 formats its error messages. In theory the IDE cares about this because it has to recognize error output and display it in the Results tab. I don’t know if it cares cares, though.

This is amazing! I was putting together an automated build system for a framework I have been building. Basically ripped apart Vorple and rebuilt its rendering engine in react, and wanted an automated inform build system for dev and production in my JavaScript environment. I scoured git repos to find someone else using some of these commands and managed to get to get it working. However I had so many questions about the different options I could pass to the commands and what the different parts did. This has answered so many questions and given the community a great reference!

My next step is to build out a continuous integration environment to compile my story in the cloud whenever I update my main branch.

Thanks!!!

It’s not too hard to make a CI script. Here’s Kerkerkruip’s

Hi, I can’t see a -format=xxxx parameter in your example command lines for invoking ni ?

PS I wish you’d posted this a day earlier- I went through my own personal battle to set this up yesterday so I could directly edit auto.inf for debugging purposes :roll_eyes: :laughing:

Please can you get this invaluable resource pinned? Or a link to it included in the list of I7 documentation post?

PPS- a few tips (gleaned from bitter experience) for invoking the compilers from Windows shortcuts rather than a batch file:

  1. If your paths contain spaces (which they typically will, e.g. C:\Program Files\Inform 7.…) then these need to be changed to short filenames/folder names in the target for your shortcut, e.g. C:\PROGRA~1\INFORM~1.… (enclosing in quotes doesn’t seem to work) You can find out what the short filenames/folder names are by navigating to the parent folder in the command line using cd xxxx then DIR /x. -EDIT ### This is not required if you follow the improved examples in the posts below ###

  2. You can keep the command prompt window open to view the output after invoking the compilers by making your shortcut target start by invoking cmd.exe with a /k switch, e.g. C:\Windows\System32\cmd.exe /k C:\Progra~1\Inform~1\Compilers\ni …

  3. You need to invoke the shortcut with Administrator rights, by ticking the box found under [Advanced] button on the Shortcut tab of the Properties dialog (right-click on your shortcut and choose Properties from the context menu) -EDIT ### This is not required if you follow the improved examples in the posts below ###

  4. To invoke the compiler from a particular start directory, in order to use relative filepaths (as in the Inform 6 example below) put the path to that directory in the Start in: text box in the Shortcut tab of the Properties dialog. e.g for the example below C:\Users\Peter\Documents\Inform\Projects\Test.inform\Build

eg:

C:\Windows\System32\cmd.exe /k C:\Progra~1\Inform~1\Compilers\ni -internal “C:\Progra~1\Inform~1\Internal” -external “$HOME/Inform” -project “C:\Users\Peter\Documents\Inform\Projects\Test.inform” -format=ulx

C:\Windows\System32\cmd.exe /k C:\Progra~1\Inform~1\Compilers\inform6 -wSDG +include_path=…\Source,.\ auto.inf output.ulx

EDIT- ### Don’t use these examples- see improved versions in the posts below ###

There’s nothing in the actual compilers that needs this … I suspect that this is just an artifact of the weirdness of cmd.exe’s command line handling. To get sensible quote handling out of cmd.exe you have to run it with the /s switch (see the help by running “cmd /?”, which has several paragraphs on this, but none very clear.

You really, really, REALLY shouldn’t need this! The Windows front-end doesn’t run the compiler elavated as administrator, and there should be no reason for it to be needed.

1 Like

Didn’t work for me without doing this- it’s to do with security permissions to the file system.

Fails with the message:

Inform 7 build 6M62 has started.
Failed to create folder <Inform>
Unable to create folders in local file system.

There may well be a less ‘nuclear’ option to fix this…?

That’s certainly true :wink: I’m no expert on the Windows command line- far from it- tried various things courtesy of Mr Google until found something that worked… I will look at the /s option, because this method is a pain.

OK, as you say the cmd.exe help information is as opaque as you’d expect, but after some imaginative interpretation and trial and error, one solution appears to be to put all pathnames containing spaces within their own pairs of double quotes then enclose the whole shooting match after the /k switch in yet another pair of double quotes:

C:\Windows\System32\cmd.exe /s /k ““C:\Program Files\Inform 7\Compilers\ni” -internal “C:\Program Files\Inform 7\Internal” -project “C:\Users\Peter\Documents\Inform\Projects\Test.inform” -format=ulx”

EDIT- ### see posts below for improved example format ###

Mr Gates, if you’re reading this- may your armpits be infested with the fleas of a thousand camels :grimacing:

1 Like

It was specified in the zcode example, but it’s optional and defaults to glulx so I omitted it elsewhere.

I just added a link to the documentation post.

I’m pretty sure $HOME is meaningless on Windows. Do you have an Inform folder at your disk’s root level now? You’ll need to specify -external differently as someplace you don’t need admin privileges to write to and then you should be fine.

1 Like

As Zed says, the problem here is that “$HOME” is meaningless on Windows. What the “-external” option should have is a path to your “Documents/Inform” directory, which will be something like

c:\Users\[username]\Documents\Inform

1 Like

Thanks for all the help guys. I didn’t grow up with MSDOS and hate all this stuff :roll_eyes:

I think these should be much better as example generic Windows command lines (assuming default file locations and 64-bit Inform installation - if 32-bit %ProgramFiles% would be %ProgramFiles(x86)%)

cmd.exe /s /k “”%ProgramFiles%\Inform 7\Compilers\ni" -internal “%ProgramFiles%\Inform 7\Internal” -external “%userprofile%\Documents\Inform” -project “%userprofile%\Documents\Inform\Projects\Test.inform” -format=ulx"

cmd.exe /s /k “”%ProgramFiles%\Inform 7\Compilers\inform6" -wSDG +include_path=…\Source,.\ auto.inf output.ulx"

cmd.exe /s /k “”%ProgramFiles%\Inform 7\Compilers\cBlorb" -windows “%userprofile%\Documents\Inform\Projects\Test.inform\Release.blurb” “%userprofile%\Documents\Inform\Projects\Test.inform\Build\output.gblorb”"

This

  1. no longer needs administrator rights

  2. works without the need to shorten filenames

  3. makes no assumptions about the name and location of the user folders and program files folder

  4. makes no assumption about the location of cmd.exe

NB I’ve got my WIPs in a Projects folder within the Documents\Inform\ folder- this may vary for your filesystem setup

2 Likes

Thank you so much for all this documentation! I did dig in the Perl source to get the arguments I needed for my VS Code extension, but I never went as far as you, so it’s good to have a reference now.

Unless I misunderstood, it’s also possible to know the arguments simply by looking in the sub-tab “Console” of the tab “Results” in the IDE.


Regarding Windows, wouldn’t the syntax be easier using Powershell instead of cmd.exe? I think it’s possible to use paths in Powershell without the pair of double quotes business.


And finally, a small addendum: it’s possible to use 2 dashes before arguments instead of only one (e.g. --internal instead of -internal). I prefer this style because it’s the convention used by other command line interfaces.


Once again, thank you for documenting all this!

My only dream now it to have a way to generate the index as data (in, say, a JSON file) instead of full HTML files, so that you can write custom front-ends for other IDEs. But I guess it won’t happen soon.

This was added in I6 release 6.35, mind you.

I was speaking about ni, though, not the Inform 6 compiler. It works at least 6L38 ; I haven’t tried on other versions.

There’s a lot about the IDE I continue to be naïve about. Took me a long time to realize that a bunch of things I was frustrated weren’t in the docs was because those things were very nicely and clearly available in the IDE.

That’s in there! I called out that I had chosen single.

It’s HTML 4.01, which means it’s valid XML, which means it’s straightforward to extract information from… for some value of straightforward.