Kaydet (Commit) 2b959a83 authored tarafından Jack Jansen's avatar Jack Jansen

Backport of 1.5 thru 1.8:

- Use full paths for Rez and DeRez, which may not be on $PATH. Fixes bug
#509074.
- Also install the Tools directory on "make installmacsubtree".
- Added a note that you have to add Mac/Lib to sys.path after doing
a "make installmacsubtree".
- Include errors.rsrc in the Python.app resource file, so the error strings
are available in MacOS API exceptions.
üst c8363d7e
...@@ -18,6 +18,8 @@ LDFLAGS=-framework System -framework Python -framework Carbon \ ...@@ -18,6 +18,8 @@ LDFLAGS=-framework System -framework Python -framework Carbon \
-framework Foundation -framework Foundation
CC=cc CC=cc
LD=cc LD=cc
REZ=/Developer/Tools/Rez
DEREZ=/Developer/Tools/DeRez
OBJECTS=$(PYTHONBUILDDIR)/Mac/Python/macmain.o \ OBJECTS=$(PYTHONBUILDDIR)/Mac/Python/macmain.o \
$(PYTHONBUILDDIR)/Mac/Python/macgetargv.o $(PYTHONBUILDDIR)/Mac/Python/macgetargv.o
...@@ -28,7 +30,7 @@ pythonforbundle: $(OBJECTS) ...@@ -28,7 +30,7 @@ pythonforbundle: $(OBJECTS)
PYTHON=$(PYTHONBUILDDIR)/python.exe PYTHON=$(PYTHONBUILDDIR)/python.exe
APPTEMPLATE=$(PYTHONBUILDDIR)/Mac/OSXResources/app APPTEMPLATE=$(PYTHONBUILDDIR)/Mac/OSXResources/app
APPSUBDIRS=MacOS Resources Resources/English.lproj APPSUBDIRS=MacOS Resources Resources/English.lproj
RESOURCEFILE_ASINGLE=$(PYTHONBUILDDIR)/Mac/Resources/dialogs.rsrc RESOURCEDIR=$(PYTHONBUILDDIR)/Mac/Resources
RESOURCEFILE=python.rsrc RESOURCEFILE=python.rsrc
RFCONVERTER=$(PYTHONBUILDDIR)/Mac/Lib/applesingle.py RFCONVERTER=$(PYTHONBUILDDIR)/Mac/Lib/applesingle.py
install: pythonforbundle install: pythonforbundle
...@@ -71,7 +73,11 @@ install: pythonforbundle ...@@ -71,7 +73,11 @@ install: pythonforbundle
done done
$(INSTALL_PROGRAM) pythonforbundle $(APPINSTALLDIR)/Contents/MacOS/python $(INSTALL_PROGRAM) pythonforbundle $(APPINSTALLDIR)/Contents/MacOS/python
# Create a temporary version of the resources here # Create a temporary version of the resources here
$(PYTHON) $(RFCONVERTER) -r $(RESOURCEFILE_ASINGLE) $(RESOURCEFILE) $(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/dialogs.rsrc dialogs.rsrc
$(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/errors.rsrc errors.rsrc
$(DEREZ) -useDF -skip ckid dialogs.rsrc > dialogs.r
$(DEREZ) -useDF -skip ckid errors.rsrc > errors.r
$(REZ) -useDF -o $(RESOURCEFILE) dialogs.r errors.r
$(INSTALL_DATA) $(RESOURCEFILE) $(APPINSTALLDIR)/Contents/Resources/$(RESOURCEFILE) $(INSTALL_DATA) $(RESOURCEFILE) $(APPINSTALLDIR)/Contents/Resources/$(RESOURCEFILE)
LIBDEST=$(INSTALLDIR)/Mac/Lib LIBDEST=$(INSTALLDIR)/Mac/Lib
...@@ -79,8 +85,11 @@ LIBSRC=$(PYTHONBUILDDIR)/Mac/Lib ...@@ -79,8 +85,11 @@ LIBSRC=$(PYTHONBUILDDIR)/Mac/Lib
LIBSUBDIRS=Carbon lib-scriptpackages lib-scriptpackages/CodeWarrior lib-scriptpackages/Explorer \ LIBSUBDIRS=Carbon lib-scriptpackages lib-scriptpackages/CodeWarrior lib-scriptpackages/Explorer \
lib-scriptpackages/Finder lib-scriptpackages/Netscape lib-scriptpackages/StdSuites \ lib-scriptpackages/Finder lib-scriptpackages/Netscape lib-scriptpackages/StdSuites \
mkcwproject mkcwproject/template mkcwproject/template-carbon mkcwproject/template-ppc mkcwproject mkcwproject/template mkcwproject/template-carbon mkcwproject/template-ppc
TOOLSDEST=$(INSTALLDIR)/Mac/Tools
TOOLSSRC=$(PYTHONBUILDDIR)/Mac/Tools
TOOLSSUBDIRS=IDE
installmacsubtree: installmacsubtree:
@for i in $(LIBDEST); \ @for i in $(LIBDEST) $(TOOLSDEST); \
do \ do \
if test ! -d $$i; then \ if test ! -d $$i; then \
echo "Creating directory $$i"; \ echo "Creating directory $$i"; \
...@@ -133,3 +142,42 @@ installmacsubtree: ...@@ -133,3 +142,42 @@ installmacsubtree:
esac; \ esac; \
done; \ done; \
done done
@for d in $(TOOLSSUBDIRS); \
do \
a=$(TOOLSSRC)/$$d; \
if test ! -d $$a; then continue; else true; fi; \
b=$(TOOLSDEST)/$$d; \
if test ! -d $$b; then \
echo "Creating directory $$b"; \
$(INSTALL) -d -m $(DIRMODE) $$b; \
else true; \
fi; \
done
@for d in $(TOOLSSUBDIRS); \
do \
a=$(TOOLSSRC)/$$d; \
if test ! -d $$a; then continue; else true; fi; \
b=$(TOOLSDEST)/$$d; \
for i in $$a/*; \
do \
case $$i in \
*CVS) ;; \
*.py[co]) ;; \
*.orig) ;; \
*~) ;; \
*) \
if test -d $$i; then continue; fi; \
if test -x $$i; then \
echo $(INSTALL_SCRIPT) $$i $$b; \
$(INSTALL_SCRIPT) $$i $$b; \
else \
echo $(INSTALL_DATA) $$i $$b; \
$(INSTALL_DATA) $$i $$b; \
fi;; \
esac; \
done; \
done
@echo '** Copy the contents of sample_sitecustomize.py (or similar code) into'
@echo '**' $(INSTALLDIR)/lib/python2.2/sitecustomize.py
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