Switching from Mac to Windows - Please help!


I’m working on my first inform 7 game and I’m about 75% finished. I have been writing this game on a Mac. Unfortunately, I have to exchange the Mac for a Windows PC (why is a long story and isn’t important). I do not want to lose my work, but I can’t seem to find a way to convert my file into something that the Windows version of Inform 7 can read. I may be missing something obvious, but I can’t figure it out. I have both computers now, but will be limited to the Windows PC soon.

I have tried the following:

  1. Copying and pasting the source code into a text file on my Mac, which I then sent to the Windows machine. I opened it there and copied and pasted it into a “new project” in Inform. It was riddled with errors and spacing issues.

  2. “Releasing” the project with a source file on the Mac. Then, I basically did the same thing as above with the source.txt file, with the same results.

Basically, I need to know if there is any way to start writing a game on a Mac and then switch to writing it in Windows part way through.

I really hope someone can help!


Open the file in an editor that can convert from Unix format to Windows format. Like Notepad++. You can find it here:


There should be a conversion tool under “Edit->EOL”.

Note: Mac OS X uses Unix format, not Mac format. Mac format refers to the old, pre-OS X Mac OS.

I’m really surprised that the actual source files aren’t compatible!

I keep my Inform projects in a Dropbox folder and have no problems using the same projects on both Mac and Windows. My guess is that your copy-pasting screwed up the indentation somehow. Have you tried copying the entire Inform project to your PC?

Interesting–if it works with Dropbox, it’s probably not a line-ending issue (since Dropbox doesn’t convert that). You’re copying the source.ni file from one computer directly to the other? What does it look like when you then open it in Inform on your Windows machine?

I think what he is saying is that he is copying the source code text into a new text file, sending the text file to the PC, and copying the text into a new Inform project. Depending on the text editor used, that could easily mess with the indentation.

jmichael, you should try copying the story.ni file from the Source directory in the Inform project, instead of attempting to copy the text manually.

This can be non-trivial on the Mac; in order to do this you should:

  1. Find your Inform project file (myproject.inform or whatever)
  2. Right-click on it, or control-click if you have a one-button mouse
  3. Choose “Show Package Contents.” This will open up a finder window as if myproject.inform were a folder
  4. Open the folder labelled “Source.”
  5. Find the file labelled “story.ni” (this was the only file inside the “Source” folder when I checked just now)

Thank you all so much! I apologize for not commenting on your help sooner. My wife and I are in the process of moving, so we’ve been super busy. I’m going to try your advice today and see what happens. I’ll be touch!

Yes, that’s right.

Yeah, I thought of doing something like that, but I couldn’t find the file on the Mac. (More on that in a sec.)

Ok, I was able to get the story.ni file onto the Windows machine. Thanks! Unfortunately, I’m not sure what to do now. I tried clicking on the file and choosing “open with” Inform 7, but that didn’t work. It just opened Inform 7 normally without opening the file.

I feel like I am missing something really, really obvious. So, I apologize if I seem like I’m incompetent. My only defense is that my brain is pretty fried from selling a house, buying a house, moving and switching jobs all in the past couple of months.

So, what’s my next move? Do I need the other files that I saw when I chose to “Show Package Contents”?

story.ni is the important one.

Create a new Inform project. Save. Close Inform.

Then go to your Documents folder. There should be a folder inside it called Inform, then Projects, then [your project name].inform, then Source. There will be a blank story.ni file there. Copy the story.ni from the Mac into that folder, overwriting the file already there.

Now open Inform again. The new project you created should now contain the source code from your other computer.

Move the whole myproject.inform package, as a whole.

Open story.ni in notepad and copy/paste the whole text into Inform 7.

Actually, when testing this (in Windows), I realised something… If you open your source in notepad, it LOOKS like the indentation is all screwy. That’s because some paragraphs are invisible in notepad (they’d previously at least show the “square” symbol, but now not even that). There’s a character there, but it’s invisible because it marks a paragraph break. If you copy/paste that mess back into I7, it’ll be properly formatted. Well, it was in my case.

My point, my point, I’m sure I had one… Oh yeah: maybe the formatting was not as screwy as you thought at first!

Try this (no guarantees, but it may work):

  1. Launch Inform 7 and create a new project. All you need to do is type “X is a room.” That will create a game.

  2. Save your new project under some name (preferably the name of your existing project on the Mac). I keep my Inform projects in a folder called I7 Projects in My Documents.

  3. Quit Inform.

  4. In My Documents, find the newly created project folder – it should be called something like MyGame.inform. Within this folder you’ll see a folder called Source.

  5. Copy your story.ni file from the Mac into this folder, overwriting the story.ni that’s already there.

  6. Re-launch Inform and click the “Reopen last project” button.

First, thanks to everyone for your help. I really, appreciate it.

Ok, so I did this. It opens up the file just fine and Windows Inform 7 only found 1 spacing issue at first. That’s the good news. Here’s the bad news:

  1. It complained about my semi-colons. Dozens and dozens and dozens of them. It suggested that maybe they should be full stops. I did a “Find and replace” of my semicolons, switching them with periods. However, this changes all of them, which might be a bad idea.

  2. After I “fixed” the semi colons, it complained about sections like this: (This is not a real section, but it is similar to one from my game.)

instead of examining something:
…If the noun is the player:
…if the player is tired:
…say “You look terrible.”
…if the player is not tired:
…say “You look great!.”
…if the noun is not the player:
…say “Why bother?”

It complains about the indentions. If I change it to this, it quits complaining:

instead of examining something:
…If the noun is the player and if the player is tired:
…say “You look terrible.”
…If the noun is the player and the player is not tired:
…say “You look great!.”
…if the noun is not the player:
…say “Why bother?”

  1. After I “fixed” those sections, Inform complained about other commands saying it couldn’t find a verb that it knew what to deal with. These were commands like “decrease the life of the player by 10hp.” Keep in mind that “life” and “hp” are clearly defined in the source text. It also started complaining about other things that I had defined. I am wondering if this is related to my scorched earth attempt to fix my semi-colon problem. I am wondering if replacing every semi-colon with a period caused problems.

What is so baffling about this is that the program runs just fine on the Mac. I just ran it again. No issues. No problems. Keep in mind that, for some reason, Windows Inform found one spacing problem. For the life of me, I can’t figure out how that is possible. Nor can I figure out why Mac Inform is fine with my punctuation and implementing, but Windows Inform hates it.

Any thoughts?

Only things that cross my mind offhand:

  1. Did the move transform your tabs into spaces?
  2. Are your Mac and Windows running the same version of Inform?

Yes, I think that’s what happened. If you have something like this:

Instead of eating something: if the noun is poisonous: say "Eeech! That must have been poisonous."; decrease the health of the player by 10hp.

Then replacing the semicolon gives you:

Instead of eating something: if the noun is poisonous: say "Eeech! That must have been poisonous.". decrease the health of the player by 10hp.

But the new period terminates the code block, so “decrease the health of the player by 10hp.” gets treated as a standalone block, which it can’t be–it needs to be inside a rule–so that’s when Inform throws a “No verb I know how to deal with” error.

What I think may have happened is that if you tend to end code blocks with semicolons and blank lines like this:

[code]Instead of jumping:
say “Don’t jump.”;

Instead of attacking something:
say “No fighting!”;[/code]

and the blank line gets eliminated like this:

Instead of jumping: say "Don't jump."; Instead of attacking something: say "No fighting!";

then Inform will be unhappy because it doesn’t know you’ve ended a code block. But if you had a period there, it would know that the period ended a code block even without a blank line afterward. So there changing a semicolon to a period could help. But changing all your semicolons to periods will definitely make a big mess.

If you still have the .inform file from the Macintosh, did you try just transferring it over to the Windows machine and opening it on it? I thought that was what zarf was suggesting.

When I copied and pasted the code, that might be the case. But when I copied the actual source file, you wouldn’t think that would happen, but maybe.

That’s a good question. They are both Inform 7.

However, the “About Inform” description on the Mac is “Inform (1.2 6.31/6H98)”

On the Windows PC it is “Inform 7 for Windows (7th September 2014; 6L38)”

Does that matter?

I just tried that. I was hopeful, but the same mess happened.

This matters a lot. Between 6H98 and 6L38 there was a massive update to Inform that changed a lot of syntaxes. If you want to keep working on your project without updating the syntax, find a copy of Inform 6G60 for Windows and use that. (6H98 is just 6G60 for the Mac–the original 6G60 Mac application had bugs that 6H98 fixed, but that doesn’t apply to Windows.)

If you want to change it to the new version, check out this thread or just post some of the problems you’ve been having. (There are a few standard ones: “change… to…” usually needs to become “now… is…”; any reference to “indexed text” should become “text”–anyone think of any other ones?)