Compile Inform 5 Source Code?

Possible to compiler Inform 5 game source code?

Operating system?

The source for various Inform 5 compilers and libraries is available on the Archive; you may need to build the compiler from source, but that shouldn’t be too hard if you have a C compiler.

1 Like

I did a quick check whether the Inform 6 compiler can still compile Inform 5 code. Turns out no – the I5 parser.h has a routine called Copy(), and copy is reserved as a property name in I6.

If you renamed the routine to CopyBuffer(), you might make it work, but I didn’t test that far.

2 Likes

I kept running into roadblocks. It was just an exercise for some old source I wanted to experiment with.

I6 is good. :slight_smile:

Thank you.

Hello,

I’ve used this version from ifarchive to compile three or four V3 games recently from a Powershell terminal on Windows 11.

I have a folder like this (with the i5 files from ifarchive):

- inform5
  - i5lib
    - grammar.h
    - parser.h
    - verblib.h
  - INFORM.EXE

Then I run this to compile “story.inf” to story.z3:

C:\USERS\KV\BIN\INFORM5\INFORM.EXE -v3 +C:\USERS\KV\BIN\INFORM5\I5LIB story

I needed to dive into the old manual for that version to figure out a few things which were slightly different from i6, but it’s not too bad, really. (It is pickier about spacing and such.)


EDIT: I’m sure you didn’t need me to explain 99% of that if you already use i6, but that 1% you needed should be in there somewhere, ha-ha.

2 Likes

KV,

I didn’t think to use the NT version on Windows.

That works on my Win 11 computer. Nice!

Still haven’t been able to compile the Inform 5 compiler source code on my RPi 5 but the Win 11 is good.

Thank you!

PS. Thanks all for the help. I managed to compile Zarf’s Lists game. Wahoo!

1 Like

To compile the Inform 5 compiler, it should suffice to grab the files from Index: if-archive/infocom/compilers/inform5/source ; replace #define GRAHAM in header.h with #define UNIX; then do

cc -w --std c89 -o inform5 *.c
4 Likes

That worked! Thank you very much!!!