Skip to content

Commit

Permalink
more fixes for python init in Mac app
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42146 15284696-431f-4ddb-bdfa-cd5b030d7da7
  • Loading branch information
kyngchaos committed May 8, 2010
1 parent b4e8d2c commit 5efbf59
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 10 additions & 2 deletions macosx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,31 @@ ifeq ($(XCODE_VER),xcode3)
else
${PACKAGEMAKER} -build -ds -p "GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.pkg" -f dist/${MACOSX_APP_NAME} -r dist/resources -i dist/Info.plist -d dist/Description.plist
endif
@# remove intermediate files
@# -rm -rf dist 2>/dev/null

install-basic-macosx:
${MAKE_DIR_CMD} ${INST_DIR_TARGET}
-cd ${GISBASE} ; tar cBf - ${MACOSX_APP_NAME} | (cd ${PREFIX_TARGET} ; tar xBf - ) 2>/dev/null
@# ***TODO*** don't build app shell into dist, assemble app bundle here
@# install dist all at once
-cd ${GISBASE} ; tar cBf - $(FILES) | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - bin | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - bwidget | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - demolocation | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - docs | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - driver | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - etc | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - fonts | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - scripts | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - tools | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
if [ ${LOCALE} -eq 1 ] ; then cd ${GISBASE} ; tar cBf - locale | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null ; fi
-cd ${GISBASE} ; tar cBf - include | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - lib | (cd ${INST_DIR_TARGET} ; tar xBf - ) 2>/dev/null
-sed -e 's#'@GISBASE@'#'$(INST_DIR)'#g' \
-e 's#'@LD_LIBRARY_PATH_VAR@'#'$(LD_LIBRARY_PATH_VAR)'#g' \
-e 's#'@CONFIG_PROJSHARE@'#'$(PROJSHARE)'#g' \
$(ARCH_DISTDIR)/$(GRASS_NAME).tmp > $(INST_DIR_TARGET)/$(GRASS_NAME)
-chmod a+x $(UNIX_BIN)/$(GRASS_NAME)
-chmod -R a+rX ${PREFIX_TARGET}/${MACOSX_APP_NAME} 2>/dev/null
-touch ${PREFIX_TARGET}/${MACOSX_APP_NAME}

Expand Down
1 change: 1 addition & 0 deletions macosx/app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ $(OBJDIR)/grass.sh: grass.sh.in
-e "s,@X11@,$(USE_X11),g" \
-e "s,@PYVER@,$(PYVER),g" \
-e "s,@WX64BIT@,$(WX64BIT),g" \
-e "s,@GRASS_NAME@,$(GRASS_NAME),g" \
grass.sh.in > $(OBJDIR)/grass.sh

clean:
Expand Down
3 changes: 2 additions & 1 deletion macosx/app/grass.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,5 @@ if [ "$GRASS_GUI" = "text" ] && [ "$x11" = "tig" ] ; then
osascript -e "tell application \"$USERTERM\" to activate"
fi

exec $GRASS_PYTHON "@BINDIR@/grass70.py" "$@" &
# use the python wrapper to start grass
exec "$GISBASE/bin/python" "$GISBASE/@GRASS_NAME@" "$@"

0 comments on commit 5efbf59

Please sign in to comment.