Skip to content

Commit

Permalink
Update packaged version to v1.60 of f-engrave. (Skipped v1.59)
Browse files Browse the repository at this point in the history
Updated build script and README to reflect compilation on fresh machine and actual dependencies.
  • Loading branch information
stephenhouser committed Nov 8, 2016
1 parent f4c475d commit 61e2152
Show file tree
Hide file tree
Showing 9 changed files with 20,100 additions and 561 deletions.
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,26 @@ to run F-Engrave from a Terminal prompt.
## Compiling

In the main directory run `build.sh`. This will create a clickable OSX Application
named `f-engrave-XXX.app` (where XXX is the version number of f-engrave) that can
then be distributed or moved to your Applications folder.
named `f-engrave.app` that can then be distributed or moved to your Applications folder.

There are a few complications with compilation that are addressed in the `build.sh` script.
I've been able to compile everything on a freshly installed macOS 10.11.6 system after
installing the dependencies listed below.

Specifically:

* There are dependencies (see below)
* `py2app` needs to be run with system restrictions changed (see `build.sh`)
* `py2app` does not copy file permissions for resources (see `build.sh`)

## Dependencies

* `Xcode Command Line Tools` (for `g++`)
* `XQuartz` (for `libfreetype2`)

Includes `ttf2cxf` modified makefile for OS X with X11 in `/usr/X11` to
allow engraving of TrueType (`ttf`) fonts. Will need `libfreetype` installed to
compile.
allow engraving of TrueType (`ttf`) fonts. This adds the requirement for
`XQuartz` and it's provided library `libfreetype2` installed to compile.

Does not include `potrace`. If `potrace` is installed in the system path or
in `/usr/local/bin` (e.g. Homebrew) then bitmap (`PBM`) files can be read and
Expand Down
2 changes: 1 addition & 1 deletion TTF2CXF_STREAM/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WIN_BASEDIR = freetype-2.3.5-1-lib
all: linux

linux:
g++ -o ttf2cxf_stream ttf2cxf_stream.cpp -lm -I/usr/include/freetype2 -lfreetype
g++ -o ttf2cxf_stream ttf2cxf_stream.cpp -lm -I/usr/local/include/freetype2 -lfreetype

install: linux
@echo "Installing... ttf2cxf_stream"
Expand Down
9,273 changes: 9,273 additions & 0 deletions archive/f-engrave-159.py

Large diffs are not rendered by default.

9,278 changes: 9,278 additions & 0 deletions archive/f-engrave-160.py

Large diffs are not rendered by default.

325 changes: 325 additions & 0 deletions archive/osx-package-160.diff

Large diffs are not rendered by default.

30 changes: 29 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@
# This file executes the build command for the OS X Application bundle.
# It is here because I am lazy
# ---------------------------------------------------------------------
# To compile TTF2CXF_STREAM need to have:
# - XQuartz (for freetype2)
# - Xcode command line tools (for g++)
(cd TTF2CXF_STREAM; make osx)
python setup.py py2app

# Use system (OSX) python and py2app, not homebrew or another.
# Ensures things will work on other computers as expected by bundling
# python with the app. Using the system one to ensure
#
# There's a permission problem since 10.10 with the default system py2app:
# http://stackoverflow.com/questions/33197412/py2app-operation-not-permitted
# https://forums.developer.apple.com/thread/6987
#
# Solution:
# - Boot in recovery mode
# - csrutil disable
# - Reboot
# - sudo chflags -R norestricted /System/Library/Frameworks/Python.framework
# - Reboot into recovery mode
# - csrutil enable
# - Reboot and build...
/usr/bin/python setup.py py2app

# Py2app does not copy permissions (executable) when bundling resources.
# This may actually not be the right place for the executable, but it works
# for the moment, as long as we tweak the permissions when it's completed.
# http://stackoverflow.com/questions/15815364/embedding-an-executable-within-a-py2app-application
# http://stackoverflow.com/questions/11370012/can-executables-made-with-py2app-include-other-terminal-scripts-and-run-them/11371197#11371197
chmod +x dist/f-engrave.app/Contents/Resources/ttf2cxf_stream

rm -rf build
Loading

0 comments on commit 61e2152

Please sign in to comment.