@@ -7,7 +7,8 @@ PYTHONBUILDDIR = ../..
77PYTHONSRCDIR = ../..
88
99INSTALLDIR =/Library/Frameworks/Python.framework/Versions/Current
10- APPINSTALLDIR =/Applications/Python.app
10+ PYTHONAPPSDIR =/Applications/Python
11+ APPINSTALLDIR =$(PYTHONAPPSDIR ) /Python.app
1112
1213# Variables for installing the "normal" unix binaries
1314UNIXBINDIR =/usr/local/bin
@@ -30,7 +31,7 @@ INCLUDES=-I$(PYTHONBUILDDIR) -I$(PYTHONSRCDIR)/Include \
3031DEFINES =-DHAVE_CONFIG_H
3132
3233CFLAGS =$(OPT ) $(DEFINES ) $(INCLUDES )
33- LDFLAGS =-framework System -framework Python -framework Carbon \
34+ LDFLAGS =-F $( PYTHONBUILDDIR ) - framework System -framework Python -framework Carbon \
3435 -framework Foundation
3536CC =cc
3637LD =cc
@@ -40,17 +41,21 @@ DEREZ=/Developer/Tools/DeRez
4041OBJECTS =$(PYTHONBUILDDIR ) /Mac/Python/macmain.o \
4142 $(PYTHONBUILDDIR ) /Mac/Python/macgetargv.o
4243
43- pythonforbundle : $(OBJECTS )
44- $(LD ) $(LDFLAGS ) $(OBJECTS ) -o pythonforbundle
45-
4644PYTHON =$(PYTHONBUILDDIR ) /python.exe
4745APPTEMPLATE =$(PYTHONSRCDIR ) /Mac/OSXResources/app
4846APPSUBDIRS =MacOS Resources Resources/English.lproj
4947RESOURCEDIR =$(PYTHONSRCDIR ) /Mac/Resources
5048RESOURCEFILE =python.rsrc
5149RFCONVERTER =$(PYTHONSRCDIR ) /Mac/Lib/applesingle.py
52- install : pythonforbundle
53- @for i in $(APPINSTALLDIR ) $(APPINSTALLDIR ) /Contents; do \
50+
51+ install_all : install_PythonLauncher install_Python install_IDE
52+
53+ install_PythonLauncher :
54+ cd $(PYTHONSRCDIR ) /Mac/OSX/PythonLauncher/PythonLauncher.pbproj ; \
55+ pbxbuild -target PythonLauncher -buildstyle Deployment DSTROOT=/ install
56+
57+ install_Python : pythonforbundle
58+ @for i in $(PYTHONAPPSDIR ) $(APPINSTALLDIR ) $(APPINSTALLDIR ) /Contents; do \
5459 if test ! -d $$ i; then \
5560 echo " Creating directory $$ i" ; \
5661 $(INSTALL ) -d -m $(DIRMODE ) $$ i; \
@@ -95,6 +100,11 @@ install: pythonforbundle
95100 $(DEREZ ) -useDF -skip ckid errors.rsrc > errors.r
96101 $(REZ ) -useDF -o $(RESOURCEFILE ) dialogs.r errors.r
97102 $(INSTALL_DATA ) $(RESOURCEFILE ) $(APPINSTALLDIR ) /Contents/Resources/$(RESOURCEFILE )
103+
104+ install_IDE : $(INSTALLED_PYTHONW )
105+ $(INSTALLED_PYTHONW ) $(PYTHONSRCDIR ) /Mac/scripts/BuildApplet.py \
106+ --output $(PYTHONAPPSDIR ) /PythonIDE.app --noargv \
107+ $(PYTHONSRCDIR ) /Mac/Tools/IDE/PythonIDE.py
98108
99109LIBDEST =$(INSTALLDIR ) /Mac/Lib
100110LIBSRC =$(PYTHONSRCDIR ) /Mac/Lib
@@ -208,7 +218,10 @@ installmacsubtree:
208218 $(INSTALL_DATA) $(PYTHONSRCDIR)/Mac/OSX/Mac.pth $(INSTALLDIR)/lib/python$(VERSION)/site-packages/
209219
210220# Put symlinks "python" and "pythonw" in the standard place
211- installunixprograms : $(INSTALLED_PYTHON ) pythonw.sh
221+ $(INSTALLED_PYTHONW ) : install_Python
222+ # $(INSTALLED_PYTHON) has to be done by the main Makefile, we cannot do that here.
223+
224+ installunixprograms : $(INSTALLED_PYTHON ) $(INSTALLED_PYTHONW ) pythonw.sh
212225 $(INSTALL ) -d $(UNIXBINDIR )
213226 $(INSTALL_SYMLINK ) $(INSTALLED_PYTHON ) $(UNIXBINDIR ) /python
214227 $(INSTALL ) pythonw.sh $(UNIXBINDIR ) /pythonw
@@ -220,6 +233,8 @@ dontinstallmacsubtree:
220233 echo $$ l > $(INSTALLDIR ) /lib/python$(VERSION ) /site-packages/Mac.pth ; \
221234 echo $$ l/lib-scriptpackages >> $(INSTALLDIR ) /lib/python$(VERSION ) /site-packages/Mac.pth
222235
236+ pythonforbundle : $(OBJECTS )
237+ $(LD ) $(LDFLAGS ) $(OBJECTS ) -o pythonforbundle
223238
224239# Rules to build each file in OBJECTS - is there a better way?
225240$(PYTHONBUILDDIR ) /Mac/Python/macmain.o : $(PYTHONSRCDIR ) /Mac/Python/macmain.c
0 commit comments