From a9fbe3293f3cae9ab528d2d278cca5282342e28c Mon Sep 17 00:00:00 2001 From: William Moore Date: Tue, 27 Sep 2022 09:37:02 +0200 Subject: [PATCH] Initial commit --- .gitignore | 17 +++++++++++++++++ Makefile | 27 +++++++++++++++++++++++++++ README.md | 22 ++++++++++++++++++++++ settings.json | 3 +++ web.sh | 4 ++++ 5 files changed, 73 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.md create mode 100644 settings.json create mode 100755 web.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..33d1de8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*.i6 +*.*blorb +*.z8 +*.ulx +.DS_Store +build/ +dist/ +Release/ +Index/ +*.plist +*.blurb +*.iFiction +*.log +gametext.txt +*.c +*.o +Mooreheim \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ac5b385 --- /dev/null +++ b/Makefile @@ -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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..fbfef58 --- /dev/null +++ b/README.md @@ -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. \ No newline at end of file diff --git a/settings.json b/settings.json new file mode 100644 index 0000000..00efd3f --- /dev/null +++ b/settings.json @@ -0,0 +1,3 @@ +{ + "makefile.extensionOutputFolder": "./.vscode" +} \ No newline at end of file diff --git a/web.sh b/web.sh new file mode 100755 index 0000000..39222f8 --- /dev/null +++ b/web.sh @@ -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'`"