[PD-cvs] packages/darwin_app embed-MacOSX-dependencies.sh, NONE, 1.1 Makefile, 1.29, 1.30 TODO, 1.15, 1.16 org.puredata.pd.plist, 1.6, 1.7
Hans-Christoph Steiner
eighthave at users.sourceforge.net
Fri Dec 16 19:38:13 CET 2005
Update of /cvsroot/pure-data/packages/darwin_app
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4435/darwin_app
Modified Files:
Makefile TODO org.puredata.pd.plist
Added Files:
embed-MacOSX-dependencies.sh
Log Message:
- Lots of bug fixes
- added script which searches thru all of the .pd_darwin files for
dependencies from Fink. It then copies those libs into the Pd.app and sets
everything up for them to be sourced by the objects.
- added Guenter's quick hack to allow international characters in Pd patches
--- NEW FILE: embed-MacOSX-dependencies.sh ---
#!/bin/sh
#
# This script finds all of the dependecies from Fink and included them into
# the Pd.app. <hans at at.or.at>
#
# run it in the root directory where the externals are stored, i.e. "extra"
if [ $# -ne 1 ]; then
echo "Usage: $0 Pd.app-Contents"
echo " i.e. $0 /Applications/Pd.app/Contents/"
exit
fi
LIB_DIR=lib
PD_APP_CONTENTS=$1
PD_APP_LIB=$PD_APP_CONTENTS/$LIB_DIR
#echo "PD_APP_CONTENTS: $PD_APP_CONTENTS"
#echo "PD_APP_LIB: $PD_APP_LIB"
echo " "
for pd_darwin in `find $PD_APP_CONTENTS -name '*.pd_darwin'`; do
LIBS=`otool -L $pd_darwin | sed -n 's|.*/sw/lib/\(.*\.dylib\).*|\1|p'`
if [ "x$LIBS" != "x" ]; then
echo "`echo $pd_darwin | sed 's|.*/\(.*\.pd_darwin$\)|\1|'` is using:"
for lib in $LIBS; do
echo -e "\t$lib"
install -d $PD_APP_LIB
install -p /sw/lib/$lib $PD_APP_LIB
# @executable_path starts from Contents/Resources/bin/pd
install_name_tool -id @executable_path/../../$LIB_DIR/$lib $PD_APP_LIB/$lib
install_name_tool -change /sw/lib/$lib @executable_path/../../$LIB_DIR/$lib $pd_darwin
done
echo " "
fi
done
for dylib in $PD_APP_LIB/*.dylib; do
LIBS=`otool -L $dylib | sed -n 's|.*/sw/lib/\(.*\.dylib\).*|\1|p'`
if [ "x$LIBS" != "x" ]; then
echo "`echo $dylib | sed 's|.*/\(.*\.dylib\)|\1|'` is using:"
for lib in $LIBS; do
echo -e "\t$lib"
install -p /sw/lib/$lib $PD_APP_LIB
# @executable_path starts from Contents/Resources/bin/pd
install_name_tool -id @executable_path/../../$LIB_DIR/$lib $PD_APP_LIB/$lib
install_name_tool -change /sw/lib/$lib @executable_path/../../$LIB_DIR/$lib $dylib
done
echo " "
fi
done
Index: Makefile
===================================================================
RCS file: /cvsroot/pure-data/packages/darwin_app/Makefile,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** Makefile 12 Dec 2005 02:17:03 -0000 1.29
--- Makefile 16 Dec 2005 18:38:11 -0000 1.30
***************
*** 3,7 ****
# needed to support weak linking of frameworks
! MAKE=MACOSX_DEPLOYMENT_TARGET=10.3 make
CWD := $(shell pwd)
--- 3,7 ----
# needed to support weak linking of frameworks
! MAKE = MACOSX_DEPLOYMENT_TARGET=10.3 make
CWD := $(shell pwd)
***************
*** 26,29 ****
--- 26,49 ----
include $(BUILDLAYOUT_DIR)/Makefile.buildlayout
+ # base level optimizations
+ OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer
+
+ # CPU-specific gleaned from http://developer.apple.com/releasenotes/DeveloperTools/GCC3.html
+ # check this too: http://hpc.sourceforge.net/
+ # Generic PowerPC
+ #OPT_CFLAGS += -mcpu=powerpc -mpowerpc
+ # PowerPC 750 (G3)
+ #OPT_CFLAGS += -mcpu=750 -mpowerpc-gfxopt
+ # PowerPC 7400 (G4 <= 700Mhz)
+ #OPT_CFLAGS += -mcpu=7400 -faltivec -mpowerpc-gfxopt
+ # PowerPC 7450 (G4 >= 533MHz)
+ #OPT_CFLAGS += -fast -fPIC -mcpu=7450 -mtune=7450 -faltivec -ffast-math -mpowerpc-gfxopt
+ # PowerPC G5 (gcc-3.3)
+ #OPT_CFLAGS += -fast -fPIC -faltivec -mpowerpc-gpopt -mpowerpc-gfxopt
+
+ # Package default, support older PowerPCs, but G4 (7450) is the most common
+ OPT_CFLAGS += -mcpu=powerpc -mtune=7450 -mpowerpc-gfxopt
+
+
# these are sent to all of the various Makefiles so that they all copy their
# output to the same directory tree
***************
*** 32,49 ****
prefix=$(prefix) \
DESTDIR=$(DESTDIR) \
UNAME=$(UNAME)
install: darwin_app
#------------------------------------------------------------------------------#
! darwin_app: darwin_app_core extended_app_install darwin_app_doc_format rez_install
@echo " "
@echo "Pd.app build succeeded!"
#------------------------------------------------------------------------------#
# this target is for when you already have a pre-built Pd.app and you
# just want to fill it with goodies from CVS. To do so, place your
# Pd.app in $(BUILD_BASE)/Pd.app
! extended_app_install: extended_install
--- 52,81 ----
prefix=$(prefix) \
DESTDIR=$(DESTDIR) \
+ OPT_CFLAGS="$(OPT_CFLAGS)" \
UNAME=$(UNAME)
+ all:
+ cd $(packages_src) && $(MAKE) $(DEST_PATHS)
+
install: darwin_app
#------------------------------------------------------------------------------#
! darwin_app: darwin_app_core extended_install darwin_app_doc_format rez_install \
! darwin_app_embed_libs
@echo " "
@echo "Pd.app build succeeded!"
+ extended_install:
+ cd $(packages_src) && $(MAKE) $(DEST_PATHS) install
+
#------------------------------------------------------------------------------#
# this target is for when you already have a pre-built Pd.app and you
# just want to fill it with goodies from CVS. To do so, place your
# Pd.app in $(BUILD_BASE)/Pd.app
! extended_app_install:
! cd $(packages_src) && $(MAKE) $(DEST_PATHS) abstractions_install
! cd $(packages_src) && $(MAKE) $(DEST_PATHS) doc_install
! cd $(packages_src) && $(MAKE) $(DEST_PATHS) extensions_install
! cd $(packages_src) && $(MAKE) $(DEST_PATHS) externals_install
***************
*** 61,65 ****
install -d "$(PD_APP_CONTENTS)/Resources"
install -m0644 -p \
! $(WISH_CONTENTS)/Resources/Wish\ Shell.rsrc \
"$(PD_APP_CONTENTS)/Resources"
install -d "$(PD_APP_CONTENTS)/Frameworks"
--- 93,97 ----
install -d "$(PD_APP_CONTENTS)/Resources"
install -m0644 -p \
! $(WISH_CONTENTS)/Resources/$(WISH_NAME).rsrc \
"$(PD_APP_CONTENTS)/Resources"
install -d "$(PD_APP_CONTENTS)/Frameworks"
***************
*** 88,96 ****
#------------------------------------------------------------------------------#
darwin_app_core: darwin_app_wrapper
- export MACOSX_DEPLOYMENT_TARGET=10.3
cd $(packages_src) && \
! make $(DEST_PATHS) PD_CONFIGURE_FLAGS=--enable-jack pd_install
cd "$(PD_APP_CONTENTS)/Resources/Scripts" && \
ln -s ../bin/pd.tk AppMain.tcl
--- 120,131 ----
+ darwin_app_embed_libs:
+ ./embed-MacOSX-dependencies.sh $(PD_APP_CONTENTS)
+
+
#------------------------------------------------------------------------------#
darwin_app_core: darwin_app_wrapper
cd $(packages_src) && \
! $(MAKE) $(DEST_PATHS) PD_CONFIGURE_FLAGS=--enable-jack pd_install
cd "$(PD_APP_CONTENTS)/Resources/Scripts" && \
ln -s ../bin/pd.tk AppMain.tcl
***************
*** 118,124 ****
#==============================================================================#
- extended_install:
- cd $(packages_src) && make $(DEST_PATHS) install
-
#------------------------------------------------------------------------------#
--- 153,156 ----
***************
*** 148,152 ****
dmg: darwin_app_perms
install -d "$(CWD)/$(DMG_NAME)"
- cd $(BUILD_BASE) && mv $(PD_APP_NAME).app "$(CWD)/$(DMG_NAME)/"
install -p -m0444 $(manualsdir)/Pd/Pd-LICENSE.txt \
$(manualsdir)/Pd/License.html \
--- 180,183 ----
***************
*** 154,168 ****
$(manualsdir)/Pd/ReadMe.html \
"$(CWD)/$(DMG_NAME)"
install -p -m0444 org.puredata.pd.plist "$(CWD)/$(DMG_NAME)"
cd $(CWD) && /bin/sh mkdmg "$(DMG_NAME)"
! clean: darwin_app_clean darwin_app_externals_flext_clean \
! cd $(packages_src) && make clean
-rm Info.plist
darwin_app_clean:
! -sudo rm -Rf -- $(PD_APP_CONTENTS)/Frameworks
-rm -f -- $(PD_APP_CONTENTS)/Plugins $(PD_APP_CONTENTS)/Info.plist
-rm -f -- $(PD_APP_CONTENTS)/MacOS/Pd
--- 185,206 ----
$(manualsdir)/Pd/ReadMe.html \
"$(CWD)/$(DMG_NAME)"
+ cd $(BUILD_BASE) && mv $(PD_APP_NAME).app "$(CWD)/$(DMG_NAME)/"
install -p -m0444 org.puredata.pd.plist "$(CWD)/$(DMG_NAME)"
cd $(CWD) && /bin/sh mkdmg "$(DMG_NAME)"
!
! distclean: clean
! cd $(packages_src) && $(MAKE) $(DEST_PATHS) distclean
!
!
! clean: darwin_app_clean
! cd $(packages_src) && $(MAKE) $(DEST_PATHS) clean
-rm Info.plist
darwin_app_clean:
! -chmod -R u+w $(PD_APP_CONTENTS)/Frameworks
! -rm -rf -- $(PD_APP_CONTENTS)/Frameworks
-rm -f -- $(PD_APP_CONTENTS)/Plugins $(PD_APP_CONTENTS)/Info.plist
-rm -f -- $(PD_APP_CONTENTS)/MacOS/Pd
***************
*** 170,173 ****
--- 208,214 ----
-rm -f -- $(PD_APP_CONTENTS)/Resources/Scripts/AppMain.tcl
-rmdir $(PD_APP_CONTENTS)/Resources/Scripts
+ -rm -f -- $(WISH_CONTENTS)/Resources/$(WISH_NAME).rsrc \
+ $(WISH_CONTENTS)/Resources/pd*.icns
+ -rmdir $(PD_APP_CONTENTS)/Resources
-rm -f -- $(DESTDIR)
-rm -f -- *~ 1 $(README_FILE) $(WELCOME_FILE) $(LICENSE_FILE) \
***************
*** 175,185 ****
! darwin_app_externals_flext_clean:
! cd $(externals_src)/footils/syncgrain && make -f makefile.pd-darwin clean
! -cd $(externals_src)/grill && \
! rm -- flext/buildsys/config-mac-pd-gcc.txt config.txt flext/config.txt \
! flext/source/libflext.a */pd-darwin/*.o */pd-darwin/*/*.o \
! */pd-darwin/*/*.pd_darwin */pd-darwin/*.pd_darwin \
! */pd-darwin/release-shared/*.dylib */pd-darwin/release-shared/*.opp
--- 216,220 ----
!
***************
*** 211,220 ****
#==============================================================================#
darwin_app_externals_flext:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && make flext_install"
! cd $(packages_src) && make $(DEST_PATHS) flext_install
--- 246,260 ----
#==============================================================================#
+ darwin_app_externals_flext_clean:
+ @echo " "
+ @echo "Deprecated!!"
+ @echo "cd $(packages_src) && $(MAKE) flext_clean"
+
darwin_app_externals_flext:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && $(MAKE) flext_install"
! cd $(packages_src) && $(MAKE) $(DEST_PATHS) flext_install
***************
*** 222,287 ****
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && make noncvs_install"
! cd $(packages_src) && make $(DEST_PATHS) noncvs_install
darwin_app_externals_gem_clean:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && make gem_clean"
darwin_app_externals_gem:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && make gem_install"
darwin_app_externals_standard_clean:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && make externals_clean"
darwin_pd_clean:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && make pd_clean"
darwin_app_externals:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(externals_src) && make install"
darwin_app_externals_standard:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(externals_src) && make install"
darwin_patch_pd:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && make patch_pd"
darwin_unpatch_pd:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && make unpatch_pd"
darwin_app_docs:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(doc_src) && make install"
darwin_app_license:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && make license"
darwin_app_welcome:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && make welcome"
darwin_app_readme:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && make readme"
darwin_prebuilt_app:
--- 262,327 ----
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && $(MAKE) noncvs_install"
! cd $(packages_src) && $(MAKE) $(DEST_PATHS) noncvs_install
darwin_app_externals_gem_clean:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && $(MAKE) gem_clean"
darwin_app_externals_gem:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && $(MAKE) gem_install"
darwin_app_externals_standard_clean:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && $(MAKE) externals_clean"
darwin_pd_clean:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(packages_src) && $(MAKE) pd_clean"
darwin_app_externals:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(externals_src) && $(MAKE) install"
darwin_app_externals_standard:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(externals_src) && $(MAKE) install"
darwin_patch_pd:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && $(MAKE) patch_pd"
darwin_unpatch_pd:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && $(MAKE) unpatch_pd"
darwin_app_docs:
@echo " "
@echo "Deprecated!!"
! @echo "cd $(doc_src) && $(MAKE) install"
darwin_app_license:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && $(MAKE) license"
darwin_app_welcome:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && $(MAKE) welcome"
darwin_app_readme:
@echo " "
@echo "Deprecated!!"
! @echo "cd .. && $(MAKE) readme"
darwin_prebuilt_app:
Index: TODO
===================================================================
RCS file: /cvsroot/pure-data/packages/darwin_app/TODO,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** TODO 12 Dec 2005 01:58:39 -0000 1.15
--- TODO 16 Dec 2005 18:38:11 -0000 1.16
***************
*** 5,21 ****
- research Tcl "auto_path"
- make Pd open a new window when its launched to workaround the bug where the
menus don't work until a window is opened.
- otool dylib help: http://qin.laya.com/tech_coding_help/dylib_linking.html
! - from Carmen Rocco about [fiddle~] crash: "is fiddle~: * compiled with the same header * linked with the same binary of (lib)pd * compiled with the same compiler? i had very similar issues with bonk on windows (Virtually same stacktrace but s/fiddle/bonk) until fixing the above 3 things..."
- review permissions so that you can build on top on existing builds (its the Frameworks)
- add standard paths to included org.puredata.pd.plist following these
guidelines:
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/WhereToPutFiles.html
- Pd should then test to see if Jack is available before switching to it,
otherwise it'll just crash. Here's apple's method of testing:
--- 5,43 ----
- research Tcl "auto_path"
+
- make Pd open a new window when its launched to workaround the bug where the
menus don't work until a window is opened.
+
- otool dylib help: http://qin.laya.com/tech_coding_help/dylib_linking.html
! http://doc.trolltech.com/qq/qq09-mac-deployment.html
!
! Now that we have copied the Qt library into the bundle, we must update
! both the library and the executable so that they know where they can be
! found. This is where the install_name_tool command-line tool comes in
! handy. For the Qt library:
!
! install_name_tool \
! -id @executable_path/../Frameworks/libqt.3.dylib \
! demo.app/Contents/Frameworks/libqt.3.dylib
!
! otool -L oggcast~.pd_darwin | grep /sw/ | sed -n 's|.*/sw/lib/\(.*\.dylib\).*|\1|p'
!
!
! - from Carmen Rocco about [fiddle~] crash: "is fiddle~: * compiled with the
! same header * linked with the same binary of (lib)pd * compiled with the
! same compiler? i had very similar issues with bonk on windows (Virtually
! same stacktrace but s/fiddle/bonk) until fixing the above 3 things..."
!
- review permissions so that you can build on top on existing builds (its the Frameworks)
+
- add standard paths to included org.puredata.pd.plist following these
guidelines:
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/WhereToPutFiles.html
+
- Pd should then test to see if Jack is available before switching to it,
otherwise it'll just crash. Here's apple's method of testing:
***************
*** 23,33 ****
--- 45,59 ----
http://developer.apple.com/documentation/mac/runtimehtml/RTArch-43.html
+
- try this for the Pref Pane:
kAEShowPreferences ::tk::mac::ShowPreferences
+
- research Tk + "Custom MDEF" for menus
+
- create Tcl script called from Prefs that creates links for the standard unix
+
- redo menu system
- the menus are the same for all windows
***************
*** 38,41 ****
--- 64,68 ----
- fix edit mode menu item (make it a checkbox or change to "play mode"
+
- redo key mapping system
- make Cmd-Delete also delete, as well as just Delete, so that my
***************
*** 43,49 ****
--- 70,78 ----
- make Cmd-click work like Ctrl-click
+
- write script to convert from -DMACOSX to -D__APPLE__ where ever possible (check out
__gnu_linux__ and WIN32 while I am at it) and submit to miller
+
- instead of shipping Pd.app with a org.puredata.pd.plist, make a script that
uses the "defaults" command to add the desired prefs to any existing
***************
*** 51,54 ****
--- 80,84 ----
working, i.e. loadlib1, loadlib2, etc)
+
------------------------------------------------------------------------------
semi-abandoned TODOs
Index: org.puredata.pd.plist
===================================================================
RCS file: /cvsroot/pure-data/packages/darwin_app/org.puredata.pd.plist,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** org.puredata.pd.plist 14 Dec 2005 00:35:12 -0000 1.6
--- org.puredata.pd.plist 16 Dec 2005 18:38:11 -0000 1.7
***************
*** 8,14 ****
<string>Gem</string>
<key>loadlib2</key>
! <string>cyclone</string>
<key>loadlib3</key>
! <string>iemabs</string>
<key>loadlib4</key>
<string>iemmatrix</string>
--- 8,14 ----
<string>Gem</string>
<key>loadlib2</key>
! <string>zexy</string>
<key>loadlib3</key>
! <string>cyclone</string>
<key>loadlib4</key>
<string>iemmatrix</string>
***************
*** 30,34 ****
<string>xsample</string>
<key>loadlib13</key>
! <string>zexy</string>
<key>loadlib14</key>
<string>maxlib</string>
--- 30,34 ----
<string>xsample</string>
<key>loadlib13</key>
! <string>markex</string>
<key>loadlib14</key>
<string>maxlib</string>
***************
*** 38,44 ****
<string>motex</string>
<key>loadlib17</key>
! <string>loaders</string>
! <key>loadlib18</key>
! <string>markex</string>
</dict>
</plist>
--- 38,42 ----
<string>motex</string>
<key>loadlib17</key>
! <string>iemabs</string>
</dict>
</plist>
More information about the Pd-cvs
mailing list