Commit f4552d65 authored by Oskar Skog's avatar Oskar Skog

OS X terminal doesn't play nice, deal with it...

parent 6af607dc
......@@ -11,6 +11,7 @@ icon.icns
Info.plist
check.py
anonymine-wrapper
macosx1
anonymine.desktop
enginecfg.out
mkenginecfg.py
......
......@@ -72,15 +72,18 @@ FD_DESKTOP_STAGE := $(builddir)$(NAME).desktop
FD_DESKTOP_DEST := $(DESTDIR)$(prefix)/share/applications/$(NAME).desktop
# Mac OS X, see desktop/README
OSX_WRAPPER := $(builddir)$(NAME)-wrapper
OSX_WRAPPER1 := $(builddir)macosx1
OSX_WRAPPER2 := $(srcdir)desktop/macosx2
OSX_INFO_PLIST := $(builddir)Info.plist
OSX_MK_INFO_PLIST := $(srcdir)desktop/Info.plist.py
OSX_ICON := $(builddir)icon.icns
OSX_MK_ICON := $(srcdir)desktop/icon.icns.py
# See desktop/README
BUNDLE := /Applications/$(NAME_C).app
# make clean
ALL_STAGE := "$(MAIN_STAGE)" "$(OSX_WRAPPER)" "$(OSX_INFO_PLIST)" \
ALL_STAGE := "$(MAIN_STAGE)" "$(OSX_WRAPPER1)" "$(OSX_INFO_PLIST)" \
"$(OSX_ICON)" "$(builddir)check.py" "$(FD_DESKTOP_STAGE)" \
"$(ENGINECFG_STAGE)" "$(builddir)mkenginecfg.py" \
"$(builddir)module-symlinks"
......@@ -130,12 +133,12 @@ $(FD_DESKTOP_STAGE) : $(FD_MK_DESKTOP) $(builddir)Makefile
@"$(FD_MK_DESKTOP)" "$(FD_DESKTOP_STAGE)" $(NAME) "$(NAME_C)" \
"$(DESCRIPTION) -- version $(VERSION)"
build-macosx : $(OSX_WRAPPER) $(OSX_INFO_PLIST) $(OSX_ICON)
build-macosx : $(OSX_WRAPPER1) $(OSX_INFO_PLIST) $(OSX_ICON)
@: # Refer to desktop/README for information about the following.
@$(info) 'Mac OS X stuff created'
$(OSX_WRAPPER) : $(builddir)Makefile
@echo '#!/bin/sh' > "$(OSX_WRAPPER)"
@echo 'open -b com.apple.terminal' "$(MAIN_DEST)" >> "$(OSX_WRAPPER)"
$(OSX_WRAPPER1) : $(builddir)Makefile
@echo '#!/bin/sh' > "$(OSX_WRAPPER1)"
@echo 'open -b com.apple.terminal' "$(BUNDLE)/Contents/MacOS/macosx2" >> "$(OSX_WRAPPER1)"
$(OSX_INFO_PLIST) : $(OSX_MK_INFO_PLIST) $(builddir)Makefile
@$(python) "$(OSX_MK_INFO_PLIST)" "$(OSX_INFO_PLIST)" "$(NAME_C)" \
"$(NAME_C) - $(DESCRIPTION)" $(VERSION) $(NAME)
......@@ -197,8 +200,6 @@ FD_ICON_SRC256 := $(srcdir)desktop/$(NAME)-256x256.png
FD_ICON_DESTDIR256 := $(DESTDIR)$(prefix)/share/icons/hicolor/256x256/apps
FD_ICON_DEST256 := $(FD_ICON_DESTDIR256)/$(NAME).png
# See desktop/README
BUNDLE := $(DESTDIR)/Applications/$(NAME_C).app
check-install-cfg : $(builddir)Makefile FORCE
@cd "$(builddir)" && $(MAKE) _check-install-cfg >/dev/null
......@@ -234,9 +235,9 @@ _install-dirs : FORCE
mkdir -p "$(DESTDIR)$(prefix)/share/pixmaps" || true; \
fi
@if "$(macosx)"; then \
$(INSTALL) -d "$(BUNDLE)/Contents"; \
$(INSTALL) -d "$(BUNDLE)/Contents/MacOS"; \
$(INSTALL) -d "$(BUNDLE)/Contents/Resources"; \
$(INSTALL) -d "$(DESTDIR)$(BUNDLE)/Contents"; \
$(INSTALL) -d "$(DESTDIR)$(BUNDLE)/Contents/MacOS"; \
$(INSTALL) -d "$(DESTDIR)$(BUNDLE)/Contents/Resources"; \
fi
install : $(builddir)Makefile FORCE
......@@ -268,11 +269,13 @@ _install : _all _check-install-cfg _install-dirs
@if "$(macosx)"; then \
$(info) 'Installing app/bundle'; \
$(INSTALL) -m 644 "$(OSX_INFO_PLIST)" \
"$(BUNDLE)/Contents/Info.plist"; \
$(INSTALL) -m 755 "$(OSX_WRAPPER)" \
"$(BUNDLE)/Contents/MacOS/$(NAME)-wrapper"; \
"$(DESTDIR)$(BUNDLE)/Contents/Info.plist"; \
$(INSTALL) -m 755 "$(OSX_WRAPPER1)" \
"$(DESTDIR)$(BUNDLE)/Contents/MacOS/macosx1"; \
$(INSTALL) -m 755 "$(OSX_WRAPPER2)" \
"$(DESTDIR)$(BUNDLE)/Contents/MacOS/macosx2"; \
$(INSTALL) -m 644 "$(OSX_ICON)" \
"$(BUNDLE)/Contents/Resources/icon.icns"; \
"$(DESTDIR)$(BUNDLE)/Contents/Resources/icon.icns"; \
fi
@$(POST_INSTALL)
@if "$(freedesktop)"; then \
......
......@@ -17,7 +17,7 @@ f.write('''<?xml version="1.0" encoding="UTF-8"?>
<!-- -->
<key>CFBundleSignature</key> <string>boom</string>
<key>CFBundlePackageType</key> <string>APPL</string>
<key>CFBundleExecutable</key> <string>{5}-wrapper</string>
<key>CFBundleExecutable</key> <string>macosx1</string>
<key>CFBundleIconFile</key> <string>icon.icns</string>
<key>LSApplicationCategoryType</key><string>public.app-category.puzzle-games</string>
<!-- -->
......
#!/bin/sh
clear
anonymine
clear
echo ")-:"
echo "Sorry, this window can't close itself"
echo; echo
......@@ -15,7 +15,7 @@ NAME="anonymine"
subdirs="desktop windows-beta"
files="${NAME}.py ${NAME}_engine.py ${NAME}_fields.py ${NAME}_solver.py \
configure.py Makefile.static install-cfg enginecfg.fallback cursescfg \
test.py testcfg desktop/Info.plist.py desktop/icon.icns.py \
test.py testcfg desktop/Info.plist.py desktop/icon.icns.py desktop/anonymine-wrapper2 \
ChangeLog FAQ INSTALL NEWS README LICENSE desktop/FILES \
desktop/README RELEASE-NOTES INSTALL.Haiku INSTALL.Windows.txt \
configure check.sh desktop/desktop.sh desktop/${NAME}-*.png \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment