Initial commit

This commit is contained in:
William Moore 2022-09-27 09:37:02 +02:00
commit a9fbe3293f
5 changed files with 73 additions and 0 deletions

17
.gitignore vendored Normal file
View File

@ -0,0 +1,17 @@
*.i6
*.*blorb
*.z8
*.ulx
.DS_Store
build/
dist/
Release/
Index/
*.plist
*.blurb
*.iFiction
*.log
gametext.txt
*.c
*.o
Mooreheim

27
Makefile Normal file
View File

@ -0,0 +1,27 @@
SRCDIR := .
include Targets
all: $(TARGETS)
$(TARGETS): %.inform
$(eval PROJDIR := $(SRCDIR)/$@.inform)
$(eval SRCS := $(wildcard $(PROJDIR)/Source/*.ni))
$(eval I6S := $(patsubst %.ni,%.i6,$(SRCS)))
$(INFORM7) -project "$(PROJDIR)" $(ARGS)
$(INFORM6) -E2w~S~DG $(PROJDIR)/Build/auto.inf $(PROJDIR)/Build/output.ulx
$(INBLORB) $(PROJDIR)/Release.blurb $(SRCDIR)/$@.gblorb
$(IF)/web.sh $@
%.inform:
echo $@
clean_inform:
echo $(SRCDIR)/$(TARGET_NAME)/Build
web:
$(foreach TARGET_NAME, $(TARGETS), - python3 $(IF)/blorbtool.py $(TARGET_NAME).gblorb giload $(TARGET_NAME).materials/Release/interpreter interpreter && echo `pwd` && cp $(TARGET_NAME).gblorb "$(TARGET_NAME).materials/Release/`cat $(TARGET_NAME).inform/Release.blurb | grep -Eo -m1 '([^\"]+\.gblorb)' | sed -e 's/\( \)/\\ /g'`" )
clean:
$(foreach TARGET_NAME, $(TARGETS), - rm -rf $(SRCDIR)/$(TARGET_NAME).inform/Build - rm -rf $(SRCDIR)/$(TARGET_NAME).materials/Release $(SRCDIR)/$(TARGET_NAME).inform/Index $(SRCDIR)/$(TARGET_NAME).inform/*.plist $(SRCDIR)/$(TARGET_NAME).inform/*.iFiction $(SRCDIR)/$(TARGET_NAME).inform/*.blurb )
- rm *.gblorb

22
README.md Normal file
View File

@ -0,0 +1,22 @@
# What to do with this?
Use it as a template for projects when you don't want to use IDE's (I'm looking at you code warriors). Keep in mind, this is an opinionated approach to the entire process of Interactive Fictions using the Inform 7 toolchain by Graham Nelson.
## The Environment
You'll need to define the following environment variables somehow (either globally or local to user or whatever).
```
IF # root of where you have all the interactive fiction tools stuff
INFORM # Inform toolchain's home path
INFORM7 # The path to the executable for inform7
INFORM6 # The path to the executable for inform6
INBLORB # The path to the executable for inblorb
```
## Tools Installed
* Python 3 (I'm being opinionated here!)
* [Graham Nelson's Inform 7 toolchain](https://github.com/ganelson/inform)
* [blorbtool.py](https://github.com/erkyrath/glk-dev/blob/master/blorbtool.py)
* web.sh (included here and needs to be in the IF path as specified)
## For VSCode users unwilling to make global settings changes
I have included the settings.json with necessary changes for allowing VSCode to use tab indention but only for Inform 7 and can be included in your global settings.

3
settings.json Normal file
View File

@ -0,0 +1,3 @@
{
"makefile.extensionOutputFolder": "./.vscode"
}

4
web.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
python3 ${IF}/blorbtool.py $1.gblorb giload $1.materials/Release/interpreter interpreter
cp $1.gblorb "$1.materials/Release/`cat $1.inform/Release.blurb | grep -Eo -m1 '([^\"]+\.gblorb)' | sed -e 's/\( \)/\\ /g'`"