Skip to content

Commit

Permalink
Fix code signing issue. This fixes #195
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Apr 12, 2016
1 parent d8648e3 commit df3199a
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ Changelog

These are all the changes in Lektor since the first public release.

2.1
---

Released on 12th of April 2016

- Fixed a code signing issue on OS X 10.10.3 and lower.

2.0
---

Expand Down
21 changes: 11 additions & 10 deletions gui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ OSX_BUNDLE=$(OSX_BUNDLE_BASE)/Lektor.app
OSX_BUNDLE_RES=$(OSX_BUNDLE)/Contents/Resources

# The identity to use for code signing
CODESIGN_IDENTITY=5DA541005F2A61656E1DAC24798CA6C14FFC40CE
CODESIGN_IDENTITY='Developer ID Application'
CODESIGN_FLAGS=--force --verbose --strict --sign $(CODESIGN_IDENTITY) --preserve-metadata=i,e,req --timestamp=none

REBUILD_CMD=./node_modules/.bin/electron-rebuild -w runas

Expand Down Expand Up @@ -62,7 +63,7 @@ osx-bundle: build/imagemagick/convert icons build-wheels
cp build/File.icns $(OSX_BUNDLE_RES)
mkdir -p $(OSX_BUNDLE_RES)/local/bin
cp build/imagemagick/convert $(OSX_BUNDLE_RES)/local/bin
cp resources/lektor-mac-proxy $(OSX_BUNDLE)/Contents/MacOS/lektor-proxy
cp resources/lektor-mac-proxy $(OSX_BUNDLE_RES)/local/bin/lektor-proxy
cp resources/lektor $(OSX_BUNDLE_RES)/lektor
rm $(OSX_BUNDLE_RES)/atom.icns
rm -rf $(OSX_BUNDLE_RES)/default_app
Expand All @@ -77,15 +78,15 @@ osx-bundle: build/imagemagick/convert icons build-wheels
find $(OSX_BUNDLE)/Contents -name '.DS_Store' -exec rm {} \;

osx-signed-bundle: osx-bundle
find $(OSX_BUNDLE) -name '*.dylib' -exec codesign --force --verbose --sign $(CODESIGN_IDENTITY) {} \;
find $(OSX_BUNDLE) -name '*.so' -exec codesign --force --verbose --sign $(CODESIGN_IDENTITY) {} \;
find $(OSX_BUNDLE) -type f -perm +0111 -exec codesign --force --verbose --sign $(CODESIGN_IDENTITY) {} \;
find $(OSX_BUNDLE) -name '*.dylib' -exec codesign $(CODESIGN_FLAGS) {} \;
find $(OSX_BUNDLE) -name '*.so' -exec codesign $(CODESIGN_FLAGS) {} \;
find $(OSX_BUNDLE) -type f -perm +0111 -exec codesign $(CODESIGN_FLAGS) {} \;
codesign --force --verbose --sign $(CODESIGN_IDENTITY) $(OSX_BUNDLE)/Contents/Frameworks/Python.framework/Versions/Current/Resources/Python.app
find $(OSX_BUNDLE) -name '*.app' -exec codesign --force --verbose --sign $(CODESIGN_IDENTITY) {} \;
find $(OSX_BUNDLE) -name '*.framework' -exec codesign --force --verbose --sign $(CODESIGN_IDENTITY) {} \;
codesign --force --verbose --sign $(CODESIGN_IDENTITY) $(OSX_BUNDLE)/Contents/MacOS/Electron
codesign --force --verbose --sign $(CODESIGN_IDENTITY) $(OSX_BUNDLE)/Contents/MacOS/lektor-proxy
codesign --force --verbose --sign $(CODESIGN_IDENTITY) $(OSX_BUNDLE)
find $(OSX_BUNDLE) -name '*.app' -exec codesign $(CODESIGN_FLAGS) {} \;
find $(OSX_BUNDLE) -name '*.framework' -exec codesign $(CODESIGN_FLAGS) {} \;
codesign $(CODESIGN_FLAGS) $(OSX_BUNDLE)/Contents/MacOS/Electron
codesign $(CODESIGN_FLAGS) $(OSX_BUNDLE_RES)/local/bin/lektor-proxy
codesign $(CODESIGN_FLAGS) $(OSX_BUNDLE)
codesign --verify --verbose --deep $(OSX_BUNDLE)

node_modules/.bin/appdmg:
Expand Down
2 changes: 1 addition & 1 deletion gui/bin/compile-imagemagick
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wget "http://www.ijg.org/files/jpegsrc.v7.tar.gz" -O libjpeg.tar.gz
mkdir libjpeg
(cd libjpeg; tar --strip-components=1 -xzf "../libjpeg.tar.gz")

wget "http://downloads.sourceforge.net/project/libpng/libpng16/1.6.19/libpng-1.6.19.tar.gz" -O libpng.tar.gz
wget "http://downloads.sourceforge.net/project/libpng/libpng16/1.6.21/libpng-1.6.21.tar.gz" -O libpng.tar.gz
mkdir libpng
(cd libpng; tar --strip-components=1 -xzf "../libpng.tar.gz")

Expand Down
2 changes: 1 addition & 1 deletion gui/resources/lektor-mac-proxy
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fi

# Special commands for installing the proxy command globally.
if [ "$1" == "--install-shell-command" ]; then
ln -fs "$LEKTOR_PATH/$LEKTOR_APP_NAME/Contents/MacOS/lektor-proxy" "$SHELL_COMMAND_PATH"
ln -fs "$LEKTOR_PATH/$LEKTOR_APP_NAME/Contents/Resources/local/bin/lektor-proxy" "$SHELL_COMMAND_PATH"
echo 'Successfully installed the global lektor shell command'
exit 0
elif [ "$1" == "--uninstall-shell-command" ]; then
Expand Down
2 changes: 1 addition & 1 deletion gui/static/js/lektorInterop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function findLektorExecutable() {

export function findLektorProxyExecutable() {
if (process.platform == 'darwin') {
return path.join(getBundleBase(), 'MacOS', 'lektor-proxy');
return path.join(getBundleBase(), 'Resources', 'local', 'bin', 'lektor-proxy');
} else {
return findLektorExecutable();
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='Lektor',
version='2.0',
version='2.1',
url='http://github.com/lektor/lektor/',
description='A static content management system.',
license='BSD',
Expand Down

0 comments on commit df3199a

Please sign in to comment.