Skip to content

Commit

Permalink
Latest with official Inform 10.1.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyLobster committed Aug 20, 2022
1 parent 2a30955 commit 60aeb9e
Show file tree
Hide file tree
Showing 595 changed files with 108,053 additions and 102,926 deletions.
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# The Inform App for macOS

## What's New
A new beta version of the Inform App is now available [here](https://github.com/TobyLobster/Inform/releases). The minimum requirement is now macOS 10.14.6 (Mojave). Users on older macOS versions can of course continue using previous versions from [here](http://inform7.com/downloads/).
A new version of the Inform App is now available [here](https://github.com/TobyLobster/Inform/releases). The minimum requirement is now macOS 10.14.6 (Mojave). Users of older macOS versions can of course continue using previous versions from [here](http://inform7.com/downloads/).

- The launcher screen shows the latest News from the IFTF.
- The launcher screen shows the latest News from the [IFTF](https://iftechfoundation.org).
- Colour schemes have been introduced (see the new preferences pane).
- Support for Dark Mode.
- Support for *Basic Inform*.
Expand All @@ -15,12 +15,9 @@ A new beta version of the Inform App is now available [here](https://github.com/
Many thanks to MaddTheSane for a heroic number of modernisations, tweaks and fixes.

### Known Issues
- Release with winning node marked with '***' in Skein not currently working?
- Release with a public solution (winning node marked with '***' in Skein) not currently working.

### Work in the Pipeline
- Build instructions.
- Updating to latest libraries.
- Dark mode across more views.
- Mac App Store Version.
- Longer term: Modernisation to Swift, and away from deprecated APIs.

Expand All @@ -35,6 +32,7 @@ Inform is free, with no strings attached. What you make with it is yours, to pub

App Version | Inform Version | Release Date | Description
------------ | -------------- | ------------ | :---------------------------------------
1.82.0 | 10.1.0 | 2022-08-20 | Official release, supporting Inform 10.1.0
1.81.0‑beta1 | 10.1.0 (beta) | 2022‑07‑30 | This is a Beta. Colour Schemes, Dark mode, Basic Inform, Apple Silicon native support.
1.68.1 | 6M62 | 2019-11-14 | Release with website bug fix.
1.67.1 | 6M62 | 2019-10-25 | macOS Catalina support.
Expand All @@ -48,14 +46,7 @@ App Version | Inform Version | Release Date | Description
1.50 | 6L02 | 2014-05-07 | First update, modernising Inform

### Building the Inform App.
This section is TODO.

Before building the Inform App, there are changes required to the XCode project files found in its submodules. I therefore need to document these for this section to be useful. I am investigating possible solutions for this issue.

Inform is currently being compiled with XCode (13.4.1) on macOS Monterey (12.4).

### Building a release of the Inform App
This section is TODO.
See [Building the macOS Inform App](documentation/building_inform.md)

### Licensing
See file 'COPYING'
Expand Down
171 changes: 171 additions & 0 deletions documentation/building_inform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Building the macOS Inform App

## 0. Prerequisites

- A recent version of macOS and XCode.
- At time of writing I'm using XCode 13.4.1 on macOS 12.4 (Monterey).
- *Apple Developer Program* membership, probably. You will need a valid *Code Signing Identity* and *Developer Team*. That means having valid *Provisioning Profiles*, *Certificates* etc configured directly from Apple.
- Python 3.
- Experience of XCode and git.


## 1. Clone the repo and submodules:

```
git clone --recurse-submodules https://github.com/TobyLobster/Inform.git
```

## 2. Get and install the additional tools:

2a. Install a tool from a github repo that uses Python 3 to edit XCode project files.

- This is required.
- It's my fork of this repo because it needed fixing to work with the ZoomCocoa project.

```
git clone https://github.com/TobyLobster/mod-pbxproj-fork.git
cd mod-pbxproj-fork
sudo python3 setup.py install
```

2b. Optionally install a repo that creates fancy disk images. The install instructions are [here](https://github.com/create-dmg/create-dmg). This is only needed when creating a disk image for release outside the Mac App Store.

## 3. Configure a build:

Before building the app, all project files (including those in recursive submodules), as well as some .plists and .strings files must be configured correctly. This is all automated by a python script found in the root directory. It needs to be executed once, then only when the build type changes or the version number needs to be updated.

* Close any Inform project open in XCode. (XCode doesn't cope well when project files change underneath it.)

* Execute `./configure.py --help`

To see the options. Execute this script with the appropriate parameters specified. Edit the `configure.py` script itself to change the current version number of the App.

* Open the Inform project in XCode.

* After running the configure script always do menu `Product->Clean Build Folder`.

* Now the Inform XCode project should build and run in XCode as normal.

* Troubleshooting: If you're having code signing issues, there is Apple documentation that may help:
- [XCode Help: If a code signing error occurs](https://help.apple.com/xcode/mac/current/#/dev01865b392).
- [About Code Signing](https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html).
- [Developer Archive: Code Signing in Depth](https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919).
- [Developer Forums: Manual Code Signing Example](https://developer.apple.com/forums/thread/130855/).
- [Apple Developer: Code Signing](https://developer.apple.com/support/code-signing/).
- [Developer Forums: Code Signing](https://developer.apple.com/forums/tags/code-signing/).
- [Apple Developer: Code Signing Search](https://developer.apple.com/search/?q=Code%20Signing).
- Deep Dive:
- [Inside Code Signing: Provisioning Profiles](https://developer.apple.com/documentation/technotes/tn3125-inside-code-signing-provisioning-profiles).
- [Inside Code Signing: Hashes](https://developer.apple.com/documentation/technotes/tn3126-inside-code-signing-hashes).
- [Inside Code Signing: Requirements](https://developer.apple.com/documentation/technotes/tn3127-inside-code-signing-requirements/).


# Distributing a build

This whole section is a reminder for me on the procedure for doing this.

- Test everything in the App is working first!

- Check the copyright date in the About box includes the current year.

- Edit `configure.py` to use the latest version numbers.

#### Non-Mac App Store build

- Close XCode.

- Make sure you have installed the `create-dmg` tool as detailed in section 2b. above.

- `./configure.py --standalone --team ...`

- Load the Inform project into XCode.

- In XCode choose menu `Product->Clean Build Folder`

- Choose menu `Product->Archive`
- This will build the project and create an Archive.
- The Archiver will appear with your product - WAIT! IT IS NOT DONE YET!
- It will take a few minutes! It is running a script that:
- Exports the archive to a temporary location
- Creates a DMG from the exported Archive.
- Code Signs the DMG.
- Opens the `inform/Distribution` directory in the finder. This is how you know it's finished.
- Logs details to `~/inform_post_archive_output.txt` - check for errors there.
- FYI:
- This script is found in `Scripts/post_archive.sh`
- It is the post-action step of the Archive action in the XCode Scheme.
- This uses a third party tool to create the fancy DMG.

- You should see file `inform/Distribution/inform.dmg` has been produced.

- Troubleshooting: If something went wrong, check the Archive has only the things in it that are needed. If there are extra unwanted executables/libraries in there, then they can be removed by setting SKIP_INSTALL=YES in the appropriate Target. This should be done by adding to the `configure.py` script. The Archive layout should look like this:

```
dSYMs
Builder.dSYM
git-client.dSYM
GlkClient.framework.dSYM
GlkSound.framework.dSYM
GlkView.framework.dSYM
glulxe-client.dSYM
Inform.app.dSYM
InformQL.qlgenerator.dSYM
SFBAudioEngine.framework.dSYM
ZoomServer.dSYM
ZoomView.framework.dSYM
Info.plist
Products
Applications
Inform.app
SCMBlueprint
Inform.xcscmblueprint
SwiftSupport
macosx
libswiftAppKit.dylib
libswiftCore.dylib
libswiftCoreData.dylib
libswiftCoreFoundation.dylib
libswiftCoreGraphics.dylib
libswiftCoreImage.dylib
libswiftDarwin.dylib
libswiftDispatch.dylib
libswiftFoundation.dylib
libswiftIOKit.dylib
libswiftMetal.dylib
libswiftObjectiveC.dylib
libswiftos.dylib
libswiftQuartzCore.dylib
libswiftXPC.dylib
```
See also Apple's documentation [Troubleshooting Application Archiving in Xcode](https://developer.apple.com/library/archive/technotes/tn2215/_index.html).

- Notarize and staple the DMG. See Apple's documentation:
- [Notarizing macOS software before distribution](https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution?language=objc).
- [Customizing the notarization workflow](https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow?language=objc).
- [Testing a Notarised Product](https://developer.apple.com/forums/thread/130560).

- Rename the DMG with a version number in this format e.g. `Inform_10_1_0_macOS_1_82_0.dmg`

- Done!


#### Mac App Store build

- Close XCode.

- Execute `./configure.py --mas --team ...`

- Load the Inform project into XCode.

- Choose menu `Product->Archive`
- This will build the project and create an Archive.

- Note that Notarisation and Stapling is not required for Mac App Store builds.

- Validate the App in the Archiver?

- Then there's a whole bunch more stuff around uploading the Archive to *App Store Connect*, filling in a whole bunch of forms, providing a bunch of screenshots and icons for the app in a variety of defined sizes, descriptions, declarations, etc, submitting the App to Apple for verification, and if everything is OK, finally releasing on the *Mac App Store*.

## Updating to the latest Inform Compiler

- TODO
2 changes: 1 addition & 1 deletion inform/Compiler/IFCompilerController.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef NS_ENUM(unsigned int, IFCompilerTabId) {
/// (In ye olden dayes, this was a window controller as well, but now young whippersnapper
/// compilers can go anywhere, so it's not any more)
///
@interface IFCompilerController : NSObject<NSTextStorageDelegate, WebPolicyDelegate, WebFrameLoadDelegate>
@interface IFCompilerController : NSObject<NSTextStorageDelegate, NSSplitViewDelegate, WebPolicyDelegate, WebFrameLoadDelegate>

/// The default styles for the error messages
+ (NSDictionary<NSAttributedStringKey, id>*) defaultStyles;
Expand Down
Loading

0 comments on commit 60aeb9e

Please sign in to comment.