Last active
December 18, 2015 05:19
-
-
Save EmacsUser/5731809 to your computer and use it in GitHub Desktop.
Instructions for building the Inform Mac IDE from its git repository under Xcode 4.6.2, current as of 2013-06-07.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instruction for building the Inform Mac IDE | |
-------------------------------------------------------------------------------- | |
Disclaimers: | |
- I used git repositories rather than source archives throughout. For the IDE, | |
both are out-of-date, though I'm not sure which is newer. | |
- I'm not an Xcode expert, so there might be better or less round-about ways to | |
get the build up and running. | |
- I discovered later that Zoom has git submodules, which might be a nicer option | |
than all of the explicit cloning below. | |
-------------------------------------------------------------------------------- | |
Create an empty directory and change to it. | |
$ mkdir ... | |
$ cd ... | |
Download and extract Expat 2.1.0 to a directory called ``expat''. | |
$ curl 'http://hivelocity.dl.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz' -o expat.tar.gz | |
$ tar xvfz expat.tar.gz | |
$ rm expat.tar.gz | |
$ mv expat-2.1.0 expat | |
Download and extract Sparkle to a directory called ``Sparkle-1.1''. (Probably | |
there's an easy way to change that to actually match the Sparkle version number, | |
though I haven't looked yet.) | |
$ mkdir Sparkle-1.1 | |
$ curl 'http://sparkle.andymatuschak.org/files/Sparkle%20Current.zip' -o Sparkle-1.1/sparkle.zip | |
$ (cd Sparkle-1.1; unzip sparkle.zip) | |
Symbolically link to the Sparkle framework from its old path. | |
$ mkdir -p Sparkle-1.1/Extras/English-Only\ Framework | |
$ ln -s $(pwd)/Sparkle-1.1/Sparkle.framework Sparkle-1.1/Extras/English-Only\ Framework/Sparkle.framework | |
Download and extract Babel to a directory called ``babel''. | |
$ mkdir babel | |
$ curl 'http://babel.ifarchive.org/downloads/babel.zip' -o babel/babel.zip | |
$ (cd babel; unzip babel.zip) | |
Clone Inform 6 to a directory called ``inform63''. | |
$ git clone git://github.com/DavidKinder/Inform6.git inform63 | |
Clone Glulxe. | |
$ git clone git://github.com/erkyrath/glulxe.git | |
Clone Git. | |
$ git clone git://github.com/DavidKinder/Git.git | |
Clone CocoaGlk. | |
$ git clone http://code.logicalshift.co.uk/zoom/cocoaglk.git | |
Clone Zoom. | |
$ git clone http://code.logicalshift.co.uk/zoom/zoom.git | |
Clone the Inform IDE. | |
$ git clone http://code.logicalshift.co.uk/inform/inform.git | |
Move cocoastart.m from the CocoaGlk hierarchy to the Glulxe hierarchy and | |
symbolically link to Glulxe from the CocoaGlk hierarchy. | |
$ mv cocoaglk/glulxe/cocoastart.m glulxe/cocoastart.m | |
$ rm -r cocoaglk/glulxe | |
$ ln -s $(pwd)/glulxe cocoaglk/glulxe | |
Move cocoastart.m from the CocoaGlk hierarchy to the Git hierarchy and | |
symbolically link to Git from the CocoaGlk hierarchy. (The ``git-1.2.9'' is | |
because, at the time of writing, that's the directory that CocoaGlk builds | |
against. Probably there's an easy way to change that to actually match the git | |
version number, though I haven't looked yet.) | |
$ mv cocoaglk/git-1.2.9/cocoastart.m Git/cocoastart.m | |
$ rm -r cocoaglk/git-1.2.9 | |
$ ln -s $(pwd)/Git cocoaglk/git-1.2.9 | |
Symbolically link to CocoaGlk from the Zoom hierarchy. | |
$ ln -s $(pwd)/cocoaglk zoom/depends/CocoaGlk | |
Open the CocoaGlk project. (From here on out, the instructions may be specific | |
to Xcode 4.6.2---I haven't tried other versions.) | |
$ open cocoaglk/CocoaGlk.xcodeproj | |
Configure the CocoaGlk project. | |
- Select Menu Bar -> ``File'' -> ``Project Settings...'' | |
- Select the ``Build'' subpane. | |
- Change the ``Derived Data Location'' entry to ``Project-relative''. | |
- Click ``Done''. | |
- In the project navigator (usually on the left), select the CocoaGlk | |
project. | |
- In the projects and targets list, select the CocoaGlk project, not a | |
target. | |
- Select the ``Info'' subpane. | |
- Change the ``OS X Deployment Target'' entry to ``10.4''. | |
- Select the ``Build Settings'' subpane. | |
- Select the ``All/Combined'' view. | |
- Change the ``Base SDK'' entry to ``Latest OS X''. | |
- Change the ``Build Options'' -> ``Compiler for C/C++/Objective-C'' | |
entry to ``Default Compiler''. | |
- In the projects and targets list, select the git target. | |
- Select the ``Build Settings'' subpane. | |
- Select the ``All/Combined'' view. | |
- Change the ``Search Paths'' -> ``Header Search Paths'' entry to | |
``./GlkClient''. | |
Update the CocoaGlk code. | |
- In the project navigator, select ``CocoaGlk'' -> ``GlkView'' -> | |
``Typesetter'' -> ``GlkTypesetter.m''. | |
- In the source code editor, replace all occurrences of ``(id)super'' | |
with ``super''. | |
Build Git. | |
- Select Menu Bar -> ``Product'' -> ``Scheme'' -> ``git'' | |
- Select Menu Bar -> ``Product'' -> ``Build'' | |
Build, run, and test the CocoaGlk project with Glulxe. | |
- Select Menu Bar -> ``Product'' -> ``Scheme'' -> ``CocoaGlk'' | |
- Select Menu Bar -> ``Product'' -> ``Run'' | |
- Test the program on your favorite Glulx story file. | |
Close the CocoaGlk project. | |
Add a directory for the autogenerated Zoom code. (This is a workaround. A | |
proper fix would probably change .../zoom/ProjectBuilder/build_files.sh to base | |
its output directory on its working directory.) | |
$ mkdir zoom/build | |
Open the Zoom project. | |
$ open zoom/ZoomCocoa.xcodeproj | |
Configure the Zoom project. | |
- Select Menu Bar -> ``File'' -> ``Project Settings...'' | |
- Select the ``Build'' subpane. | |
- Change the ``Derived Data Location'' entry to ``Project-relative''. | |
- Click ``Done''. | |
- In the project navigator, select the ZoomCocoa project. | |
- In the projects and targets list, select the ZoomCocoa project, not a | |
target. | |
- Select the ``Info'' subpane. | |
- Change the ``OS X Deployment Target'' entry to ``10.4''. | |
- Select the ``Build Settings'' subpane. | |
- Select the ``All/Combined'' view. | |
- Change the ``Base SDK'' entry to ``Latest OS X''. | |
- Change the ``Build Options'' -> ``Compiler for C/C++/Objective-C'' | |
entry to ``Default Compiler''. | |
- Replace the ``/build'' substring in the ``Search Paths'' -> | |
``Framework Search Paths'' -> * entries with | |
``/cocoaglk/DerivedData/CocoaGlk/Build/Products''. (Be sure to | |
select, pause, and then click again to edit; the list-style editor | |
that appears if you double click will be ignored.) | |
- In the projects and targets list, select the Zoom target. | |
- Select the ``Build Phases'' subpane. | |
- Select the ``Fix Xcode'' task. | |
- Replace all occurrences of ``/build/${BUILD_STYLE}'' with | |
``/cocoaglk/DerivedData/CocoaGlk/Build/Products/${CONFIGURATION}''. | |
- In the projects and targets list, select the Glulxe target. | |
- Select the ``Build Phases'' subpane. | |
- Select the first ``Run Script'' task. | |
- Replace all occurrences of ``/build/${BUILD_STYLE}'' with | |
``/cocoaglk/DerivedData/CocoaGlk/Build/Products/${CONFIGURATION}''. | |
- In the projects and targets list, select the Leopard Extensions | |
target. | |
- Select the ``Build Settings'' subpane. | |
- Select the ``All/Combined'' view. | |
- Change the ``Base SDK'' entry to ``Latest OS X''. | |
- In the projects and targets list, select the Quick Look target. | |
- Select the ``Build Settings'' subpane. | |
- Select the ``All/Combined'' view. | |
- Change the ``Base SDK'' entry to ``Latest OS X''. | |
Update the Zoom code. | |
- In the project navigator, select ``ZoomCocoa'' -> ``Zoom'' -> | |
``Interpreter'' -> ``interp.c''. | |
- In the source code editor, replace the occurrences of ``inline'' before | |
``store'' and ``store_nopush'' with ``static inline''. | |
- In the project navigator, select ``ZoomCocoa'' -> ``Zoom'' -> | |
``Interpreter'' -> ``tokenise.c''. | |
- In the source code editor, replace the ``inline'' before | |
``lookup_word'' with ``static inline''. | |
- In the project navigator, select ``ZoomCocoa'' -> ``ZoomClient'' -> | |
``Skeins'' -> ``ZoomSkeinLayout.m''. | |
- In the source code editor, replace ``NSMakeSize(0.4, -1)'' with | |
``CGSizeMake(0.4, -1)''. | |
- In the project navigator, select ``ZoomCocoa'' -> ``ZoomClient'' -> | |
``iFiction'' -> ``ZoomiFictionController.m''. | |
- In the source code editor, replace both occurrences of | |
``NSMakeSize(1.1, -1.5)'' with ``CGSizeMake(1.1, -1.5)''. | |
Build Zoom. | |
- Select Menu Bar -> ``Product'' -> ``Scheme'' -> ``Zoom'' | |
- Select Menu Bar -> ``Product'' -> ``Build'' | |
Close the Zoom project. | |
Patch the IDE project to automatically create intermediate directories. | |
$ sed -i .temp 's/mkdir/mkdir -p/g' ./inform/Inform-xc2.xcodeproj/project.pbxproj | |
Patch the IDE project to remove website template directories during cleanup. | |
$ sed -i .temp '/Templates/s/rm -f /shopt -s dotglob \&\& rm -rf /' ./inform/Injection/makefile | |
Create a stand-in directory for the IDE injections. | |
$ mkdir Inform-Source | |
$ echo 'all:' > Inform-Source/Makefile | |
$ echo ' ln -s -f ../inform/Injection/Injections ./Injections' >> Inform-Source/Makefile | |
$ echo ' $(MAKE) -f ../inform/Injection/makefile copyall' >> Inform-Source/Makefile | |
(Note that the leading whitespace in the last two lines must be a single | |
tab.) | |
Update the IDE injections. (These commands assume that you have a recent build | |
of the IDE at /Applications/Inform.app.) | |
$ rm -r ./inform/Injection/Injections/cBlorb | |
$ cp -r /Applications/Inform.app/Contents/Resources/Compilers/* ./inform/Injection/Injections/ | |
$ mv ./inform/Injection/Injections/cBlorb ./inform/Injection/Injections/cBlorb.file | |
$ mkdir ./inform/Injection/Injections/cBlorb | |
$ mv ./inform/Injection/Injections/cBlorb.file ./inform/Injection/Injections/cBlorb/cBlorb | |
$ rm -r ./inform/Injection/Injections/Extensions | |
$ cp -r /Applications/Inform.app/Contents/Resources/Inform7/Extensions ./inform/Injection/Injections/ | |
$ cp -r /Applications/Inform.app/Contents/Resources/*.html ./inform/Injection/Injections/Documentation/ | |
$ cp -r /Applications/Inform.app/Contents/Resources/manifest.txt ./inform/Injection/Injections/Documentation/ | |
$ cp -r /Applications/Inform.app/Contents/Resources/English.lproj/*.html ./inform/Injection/Injections/Documentation/English.lproj/ | |
$ cp -r /Applications/Inform.app/Contents/Resources/doc_images ./inform/Injection/Injections/Documentation/doc_images | |
$ cp -r /Applications/Inform.app/Contents/Resources/English.lproj/Error*.html ./inform/Injection/Injections/Error\ pages/ | |
$ cp -r /Applications/Inform.app/Contents/Resources/English.lproj/RTP_P*.html ./inform/Injection/Injections/RTP\ pages/ | |
$ cp -r /Applications/Inform.app/Contents/Resources/*.png ./inform/Injection/Injections/Miscellaneous/ | |
$ cp -r /Applications/Inform.app/Contents/Resources/scene_icons ./inform/Injection/Injections/ | |
$ cp -r /Applications/Inform.app/Contents/Resources/map_icons ./inform/Injection/Injections/ | |
Open the IDE project. | |
$ open ./inform/Inform-xc2.xcodeproj | |
Configure the IDE project. | |
- In the project navigator, select the Inform-xc2 project. | |
- In the projects and targets list, select the Inform-xc2 project, not a | |
target. | |
- Select the ``Info'' subpane. | |
- Change the ``OS X Deployment Target'' entry to ``10.4''. | |
- Select the ``Build Settings'' subpane. | |
- Select the ``All/Combined'' view. | |
- Change the ``Base SDK'' entry to ``Latest OS X''. | |
- Change the ``Build Options'' -> ``Compiler for C/C++/Objective-C'' | |
entry to ``Default Compiler''. | |
- In the projects and targets list, select the main Inform target. | |
- Select the ``Build Phases'' subpane. | |
- Select the ``Remove previously built frameworks'' task. | |
- Replace all occurrences of ``/zoom/build/${BUILD_STYLE}'' with | |
``/zoom/DerivedData/ZoomCocoa/Build/Products/${CONFIGURATION}''. | |
- Replace all occurrences of ``/CocoaGlk/build/${BUILD_STYLE}'' with | |
``/cocoaglk/DerivedData/CocoaGlk/Build/Products/${CONFIGURATION}''. | |
- In the projects and targets list, select the Inform QL target. | |
- Select the ``Build Settings'' subpane. | |
- Select the ``All/Combined'' view. | |
- Change the ``Base SDK'' entry to ``Latest OS X''. | |
- Select the ``Build Phases'' subpane. | |
- Select the ``Fix dependencies'' task. | |
- Replace all occurrences of ``/zoom/build/${BUILD_STYLE}'' with | |
``/zoom/DerivedData/ZoomCocoa/Build/Products/${CONFIGURATION}''. | |
- Replace all occurrences of ``/CocoaGlk/build/${BUILD_STYLE}'' with | |
``/cocoaglk/DerivedData/CocoaGlk/Build/Products/${CONFIGURATION}''. | |
- In the projects and targets list, select the Inform for Leopard | |
target. | |
- Select the ``Build Settings'' subpane. | |
- Change the ``Base SDK'' entry to ``Latest OS X''. | |
Update the IDE code. | |
- In the project navigator, select ``Classes'' -> ``Settings'' -> | |
``IFSetting.h''. | |
- In the source code editor, replace ``(IBOutlet void)'' with | |
``(void)''. | |
- In the project navigator, select ``Classes'' -> ``Settings'' -> | |
``IFSetting.m''. | |
- In the source code editor, replace ``(IBOutlet void)'' with | |
``(void)''. | |
- In the project navigator, select ``Classes'' -> ``Project'' -> | |
``Pages'' -> ``IFPage.h''. | |
- In the source code editor, replace ``(IBOutlet void)'' with | |
``(void)''. | |
- In the project navigator, select ``Classes'' -> ``Project'' -> | |
``Pages'' -> ``IFPage.m''. | |
- In the source code editor, replace ``(IBOutlet void)'' with | |
``(void)''. | |
Build, run, and test the IDE project. | |
- Select Menu Bar -> ``Product'' -> ``Scheme'' -> ``Inform'' | |
- Select Menu Bar -> ``Product'' -> ``Run'' | |
(Note that, when running from Xcode, you may have to click on Inform in the dock | |
before the splash screen will appear.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment