diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/darwin_app/AppMain.tcl | 91 | ||||
-rw-r--r-- | packages/darwin_app/Makefile | 101 | ||||
-rw-r--r-- | packages/darwin_app/Pd.term | 95 | ||||
-rw-r--r-- | packages/darwin_app/README | 16 | ||||
-rw-r--r-- | packages/darwin_app/TODO | 23 | ||||
-rw-r--r-- | packages/darwin_app/pd-unix.info | 16 |
6 files changed, 101 insertions, 241 deletions
diff --git a/packages/darwin_app/AppMain.tcl b/packages/darwin_app/AppMain.tcl deleted file mode 100644 index b4bbac17..00000000 --- a/packages/darwin_app/AppMain.tcl +++ /dev/null @@ -1,91 +0,0 @@ - -proc log {message} { - exec sh -c "/bin/echo $message" >/dev/stderr -} - -proc alert {message} { - tk_messageBox -message $message -type ok -icon question -} - -proc default_keybindings {} { - return { exit CMD-q } -} - -proc checkPort { port } { - if { - [catch {set result [exec sh -c "/usr/sbin/netstat -an |grep $port"] } errn] } { - # the command returns no result, so the port is not used - return true - } else { - return false - } -} - -proc waitForPort { port } { - for {set x 0} {$x<30} {incr x} { - after 100 - if {![checkPort $port]} { - return true - } - } - return false -} - - - -proc loadpdtcl { } { - global pd_guidir - # wait for pd to start - if {[waitForPort 5400]} { - if { - [catch {load $pd_guidir/bin/pdtcl } errmsg] } { - alert "can't connect to pd : $errmsg" - exit(1) - } - } else { - alert "Couldn't start Pd" - } -} - - - -##### startup ################################################################## - -global pd_guidir -global pd_port - -# get the path to the Wish Shell so a relative path can be -# used to launch Pd -regsub -- "Pd" [info nameofexecutable] "" wish_path -puts "$wish_path/../Resources/lib/pd/bin/pd.tk" - -# set paths -set pd_guidir [file join [file dirname [file dirname [info script]]] lib pd] -set pd_exec_path [file join [file dirname [file dirname [info script]]] bin] - -# launch pd -a dummy guicmd prevents starting the wish shell -if {[checkPort 5400]} { - exec sh -c "cd $pd_exec_path;./pd -guicmd /bin/echo" >&/dev/stderr & -} else { - alert "Can't start pd because the port 5400 is in use" - exit(1) -} - - -# open gui -source [file join $pd_guidir bin pd.tk] - -################################################################################ - - - -# depends on pd.tk -# tk::mac::OpenDocument is called when docs are dropped -# on the Dock icon with the filenames put into the var args -proc tk::mac::OpenDocument {args} { - foreach file $args { - pd [concat pd open [pdtk_enquote [file tail $file]] \ - [pdtk_enquote [file dirname $file]] \;] - menu_doc_open [file dirname $file] [file tail $file] - } -} diff --git a/packages/darwin_app/Makefile b/packages/darwin_app/Makefile index ad0181cb..d99ccf22 100644 --- a/packages/darwin_app/Makefile +++ b/packages/darwin_app/Makefile @@ -74,8 +74,10 @@ ZEXY_VERSION = $(shell grep VERSION ../../externals/zexy/src/zexy.h | cut -d ' ' darwin_app: darwin_app_wrapper darwin_patch_pd darwin_app_core \ - darwin_app_externals darwin_app_docs darwin_app_abstractions + darwin_app_docs darwin_app_externals darwin_app_abstractions +darwin_prebuilt_app: darwin_app_externals darwin_app_docs \ + darwin_app_abstractions darwin_app_doc_format darwin_app_license: # generate HTML version of License @@ -137,11 +139,11 @@ darwin_app_readme: echo "(this package was built on `date`) <BR>" >> $(README_FILE) echo "</body></html>" >> $(README_FILE) -darwin_mount_tcltk: -# it should automatically mount the most recent TclTkStandalone here +# check here for a reference on how to do this: +# http://cvs.sourceforge.net/viewcvs.py/tkcvs/tkcvs-proj/PackApp?rev=1.4 darwin_app_wrapper: - hdiutil mount $(TCLTK).dmg + -hdiutil mount $(TCLTK).dmg # copy Wish Shell.app from default install location # note: use the "standalone" Wish shell to make a "standalone" pd app install -d "$(DESTDIR)$(PD_APP_CONTENTS)/MacOS" @@ -162,23 +164,24 @@ darwin_app_wrapper: install -d "$(DESTDIR)$(PD_APP_CONTENTS)/Resources/Scripts" install -m0644 -p Info.plist "$(DESTDIR)$(PD_APP_CONTENTS)" install -m0644 -p *.icns "$(DESTDIR)$(PD_APP_CONTENTS)/Resources" -# pd/src/u_main.tk now acts as the AppMain.tcl -# install -m0644 -p AppMain.tcl "$(DESTDIR)$(PD_APP_CONTENTS)/Resources/Scripts" # rename the Wish Shell executable to "Pd" mv "$(DESTDIR)$(PD_APP_CONTENTS)/MacOS/Wish Shell" "$(DESTDIR)$(PD_APP_CONTENTS)/MacOS/Pd" - diskutil eject /Volumes/$(TCLTK) +# diskutil eject /Volumes/$(TCLTK) darwin_patch_pd: # apply some patches # cd ../../pd/src/ && patch -p0 < ../../packages/darwin_app/patches/socket.patch # cd ../../pd/src/ && patch -p0 < ../../packages/darwin_app/patches/u_main.tk.patch cd ../../pd/src/ && patch -p0 < ../../packages/darwin_app/patches/darwin_build-0.38.patch + rm ../../pd/src/configure ../../pd/src/makefile + cd ../../pd/src/ && autoconf -darwin_app_core: +darwin_app_core: darwin_app_wrapper # pd core - cd ../../pd/src/ && \ - ./configure --enable-jack --prefix=$(INSTALL_PREFIX) && make - cp -R -p ../../pd/bin ../../pd/doc ../../pd/extra ../../pd/man \ +# cd ../../pd/src/ && \ +# ./configure --enable-jack --prefix=$(INSTALL_PREFIX) && make + cd ../../pd/src/ && ./configure --enable-jack && make + cp -Rp ../../pd/bin ../../pd/doc ../../pd/extra ../../pd/man \ $(PD_FILE_ROOT) # AppMain.tcl cd "$(DESTDIR)$(PD_APP_CONTENTS)/Resources/Scripts" && \ @@ -187,14 +190,21 @@ darwin_app_core: install -d -m0755 $(PD_FILE_ROOT)/include install -m0444 ../../pd/src/*.h $(PD_FILE_ROOT)/include -darwin_app_docs: +darwin_app_doc_format: #---------------------------------------------------------------------------- +# clean out cruft files + -find $(PD_FILE_ROOT) -name .DS_Store -delete + -rm -Rf `find $(PD_FILE_ROOT) -name CVS` # set the font to 10pt on all help patches cd $(HELP_DIR) && \ sed -i.bak 's/^\(\#N canvas [0-9]* [0-9]* [0-9]* [0-9]*\) 12/\1 10/' */*.pd # the BSD/Darwin version of sed must create a backup file when doing # in-place replacement, so delete the unneeded backup files - rm */*.pd.bak + -rm */*.pd.bak +# run script to move help-*.pd files to *-help.pd according to the standard + ../../scripts/convert-help-to-standard.sh + +darwin_app_docs: #---------------------------------------------------------------------------- # DOC install -d $(HELP_DIR)/5.reference @@ -217,13 +227,15 @@ darwin_app_abstractions: #---------------------------------------------------------------------------- # ABSTRACTIONS install -d $(ABSTRACTIONS_DIR) - install -p -m0644 ../../externals/creb/abs/*.pd $(ABSTRACTIONS_DIR) - cd $(ABSTRACTIONS_DIR) && rm count.pd +# creb + install -p -m0444 ../../externals/creb/abs/*.pd $(ABSTRACTIONS_DIR) + cd $(ABSTRACTIONS_DIR) && rm -f count.pd install -d $(ABSTRACTIONS_DIR)/creb install -p -m0444 ../../externals/creb/doc/examples/*.* $(ABSTRACTIONS_DIR)/creb + # cp -Rf footils timestretch vadsr~ $(ABSTRACTIONS_DIR) -darwin_app_externals: darwin_app_externals_standard darwin_app_externals_c++ darwin_app_externals_gem +darwin_app_externals: darwin_app_externals_standard darwin_app_externals_c++ #darwin_app_externals: darwin_app_externals_flext darwin_app_externals_standard darwin_app_externals_c++ darwin_app_externals_gem darwin_app_externals_gem: @@ -323,42 +335,49 @@ darwin_app_externals_standard: cp -Rfp ../../Gem/examples/*.* ../../Gem/examples/data $(HELP_DIR)/gem #---------------------------------------------------------------------------- # hcs + install -p -m0444 $(shell ls -1 ../../externals/hcs/*.pd | \ + grep -v '\-help.pd') $(EXTERNALS_DIR) +# hid cd ../../externals/hcs/hid && make install -p -m0444 ../../externals/hcs/hid/hid.pd_darwin $(EXTERNALS_DIR) - install -p -m0444 ../../externals/hcs/hid/ev*-list.pd $(HELP_DIR)/5.reference - install -p -m0444 ../../externals/hcs/hid/*-help.pd $(HELP_DIR)/5.reference + install -p -m0444 $(shell ls -1 ../../externals/hcs/hid/*.pd | \ + grep -v '\-help.pd'| grep -v '\-list.pd') $(EXTERNALS_DIR) +# pan + install -p -m0444 $(shell ls -1 ../../externals/hcs/pan/*.pd | \ + grep -v '\-help.pd') $(EXTERNALS_DIR) +#---------------------------------------------------------------------------- +# IEMlib + cp -Rp ../../externals/iemlib/iemabs $(EXTERNALS_DIR) + install -d -m0755 $(HELP_DIR)/5.reference/iemabs + mv $(EXTERNALS_DIR)/iemabs/help-*.pd $(HELP_DIR)/5.reference/iemabs #---------------------------------------------------------------------------- # miXed cd ../../externals/miXed/toxy && make cd ../../externals/miXed/cyclone && make - install -d -m755 $(EXTERNALS_DIR)/cyclone - install -p -m444 ../../externals/miXed/bin/*.pd_darwin $(EXTERNALS_DIR)/cyclone - sudo install -p -m555 ../../externals/miXed/bin/cyclist $(PD_FILE_ROOT)/bin + install -d -m755 $(EXTERNALS_DIR) + install -p -m444 ../../externals/miXed/bin/*.pd_darwin $(EXTERNALS_DIR) + install -p -m555 ../../externals/miXed/bin/cyclist $(PD_FILE_ROOT)/bin + install -d -m755 $(HELP_DIR)/5.reference/cyclone install -p -m0444 ../../externals/miXed/test/*/*.* \ - ../../externals/miXed/doc/*/*/*.* \ $(HELP_DIR)/5.reference/cyclone + install -p -m0444 ../../externals/miXed/doc/*/*/*.* \ + $(HELP_DIR)/5.reference #---------------------------------------------------------------------------- # OSC cd ../../externals/OSCx && ./configure && make install -p -m0444 ../../externals/OSCx/doc/*.* $(HELP_DIR)/5.reference install -p -m0444 ../../externals/OSCx/src/*.pd_darwin $(EXTERNALS_DIR) #---------------------------------------------------------------------------- -# PDP - cd ../../externals/pdp && ./configure && make - install -p -m0444 ../../externals/pdp/*.pd_darwin $(EXTERNALS_DIR) +# PdP +# cd ../../externals/pdp && ./configure && make +# install -p -m0444 ../../externals/pdp/*.pd_darwin $(EXTERNALS_DIR) install -p -m0444 ../../externals/pdp/doc/objects/*.* $(HELP_DIR)/5.reference install -d $(HELP_DIR)/pdp/introduction install -p -m0444 ../../externals/pdp/doc/introduction/*.* $(HELP_DIR)/pdp/introduction install -d $(HELP_DIR)/pdp/examples install -p -m0444 ../../externals/pdp/doc/examples/*.* $(HELP_DIR)/pdp/examples install -p -m0444 ../../externals/pdp/doc/reference.txt $(HELP_DIR)/pdp -#---------------------------------------------------------------------------- -# PMPD - cd ../../externals/pmpd/src && make pd_darwin - install -p -m0444 ../../externals/pmpd/src/*.pd_darwin $(EXTERNALS_DIR) - install -p -m0444 ../../externals/pmpd/help/*.pd $(HELP_DIR)/5.reference - install -d $(HELP_DIR)/pmpd - install -p -m0444 ../../externals/pmpd/exemples/*.pd $(HELP_DIR)/pmpd +# libs for PdP #---------------------------------------------------------------------------- # unauthorized cd ../../externals/unauthorized && make @@ -368,12 +387,19 @@ darwin_app_externals_standard: install -p -m0444 ../../externals/unauthorized/*/*.pls $(HELP_DIR)/5.reference cp -Rfp ../../externals/unauthorized/blinkenlights/blm $(HELP_DIR)/5.reference #---------------------------------------------------------------------------- -# zexy - cd ../../externals/zexy/src && make -f makefile.darwin - install -p -m0444 ../../externals/zexy/src/*.pd_darwin $(EXTERNALS_DIR) +# zexy +# new build system doesn't work with CVS layout, and most of zexy is +# included in the extrnals build system now anyway +# cd ../../externals/zexy/src && autoconf && ./configure && make + -install -p -m0444 ../../externals/zexy/src/*.pd_darwin $(EXTERNALS_DIR) + install -p -m0444 \ + $(shell ls -1 ../../externals/zexy/abs/*.pd | \ + grep -v '-help.pd' | sed 's/\([&<>|~]\)/\\\1/g') \ + $(EXTERNALS_DIR) install -p -m0444 ../../externals/zexy/zexy.pd $(HELP_DIR)/5.reference install -d $(HELP_DIR)/help-zexy install -p -m0444 ../../externals/zexy/examples/*.* $(HELP_DIR)/help-zexy + install -p -m0444 ../../externals/zexy/abs/*-help.pd $(HELP_DIR)/5.reference darwin_app_externals_c++: @@ -446,6 +472,9 @@ darwin_app_externals_c++: # echo "</FONT>" >> $(WELCOME_FILE) # echo "</body></html>" >> $(WELCOME_FILE) +darwin_app_perms: + chmod a-x $(HELP_DIR)/*/*.pd $(HELP_DIR)/*/*/*.pd $(HELP_DIR)/*/*/*/*.pd + chmod -R a-w $(HELP_DIR) dmg: darwin_app_readme darwin_unix_pkg_welcome darwin_app_license install -d "$(DMG_NAME)" @@ -457,7 +486,7 @@ dmg: darwin_app_readme darwin_unix_pkg_welcome darwin_app_license /bin/sh mkdmg "$(DMG_NAME)" -clean: darwin_app_clean darwin_unpatch_pd +clean: darwin_app_clean darwin_app_clean: diff --git a/packages/darwin_app/Pd.term b/packages/darwin_app/Pd.term deleted file mode 100644 index 78e0078f..00000000 --- a/packages/darwin_app/Pd.term +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>WindowSettings</key> - <array> - <dict> - <key>AutoFocus</key> - <string>YES</string> - <key>Autowrap</key> - <string>YES</string> - <key>Backwrap</key> - <string>YES</string> - <key>Bell</key> - <string>YES</string> - <key>BlinkCursor</key> - <string>NO</string> - <key>CleanCommands</key> - <string>rlogin;telnet;ssh;slogin</string> - <key>Columns</key> - <string>80</string> - <key>CursorShape</key> - <string>2</string> - <key>CustomTitle</key> - <string>pure data</string> - <key>DeleteKeySendsBackspace</key> - <string>NO</string> - <key>DisableAnsiColors</key> - <string>NO</string> - <key>DoubleBold</key> - <string>YES</string> - <key>DoubleColumnsForDoubleWide</key> - <string>NO</string> - <key>DoubleWideChars</key> - <string>YES</string> - <key>ExecutionString</key> - <string>/Applications/Pd.app/Contents/Resources/bin/pd; exit</string> - <key>FontAntialiasing</key> - <string>YES</string> - <key>FontHeightSpacing</key> - <string>0.8</string> - <key>FontWidthSpacing</key> - <string>1</string> - <key>IsMiniaturized</key> - <string>NO</string> - <key>MacTermFunctionKeys</key> - <string>NO</string> - <key>Meta</key> - <string>27</string> - <key>NSFixedPitchFont</key> - <string>Courier</string> - <key>NSFixedPitchFontSize</key> - <real>12</real> - <key>Rows</key> - <string>24</string> - <key>SaveLines</key> - <string>-1</string> - <key>ScrollRegionCompat</key> - <string>NO</string> - <key>ScrollRows</key> - <string>0</string> - <key>Scrollback</key> - <string>YES</string> - <key>Shell</key> - <string>/bin/sh</string> - <key>ShellExitAction</key> - <string>1</string> - <key>StrictEmulation</key> - <string>NO</string> - <key>StringEncoding</key> - <string>5</string> - <key>TerminalOpaqueness</key> - <real>1</real> - <key>TextColors</key> - <string>0.000 0.000 0.000 1.000 1.000 1.000 1.000 0.797 0.000 1.000 0.797 0.000 1.000 1.000 1.000 0.000 0.000 0.000 0.000 0.084 1.000 0.383 1.000 1.000 </string> - <key>TitleBits</key> - <string>104</string> - <key>Translate</key> - <string>YES</string> - <key>UseCtrlVEscapes</key> - <string>NO</string> - <key>VisualBell</key> - <string>YES</string> - <key>WinLocULY</key> - <string>629</string> - <key>WinLocX</key> - <string>5</string> - <key>WinLocY</key> - <string>0</string> - <key>WindowCloseAction</key> - <string>0</string> - </dict> - </array> -</dict> -</plist> diff --git a/packages/darwin_app/README b/packages/darwin_app/README index e875c38d..eb3c60bf 100644 --- a/packages/darwin_app/README +++ b/packages/darwin_app/README @@ -1,3 +1,16 @@ +============================================================================== + Patches +============================================================================== + +Since currently, only Miller has commit permissions to the 'pd' section of the +CVS, the fixes necessary for building the whole Pd.app are included in +'packages/darwin_app/patches'. The necessary patches are automatically applied +by 'packages/darwin_app/Makefile' before building the sources in 'pd/src' + + +============================================================================== + Compiling Pd.app +============================================================================== To compile a standalone Pd.app, you need this stuff: @@ -7,7 +20,8 @@ Tcl/Tk Standalone .app 1. download TclTkAquaStandalone-8.4.*.dmg from http://tcltkaqua.sourceforge.net/ (I used 8.4.9) - 2. mount the dmg + 2. mount the dmg manually or put TclTkAquaStandalone-8.4.*.dmg in + packages/darwin_app and it will be automatically mounted 3. the Makefile will find what it needs in the mounted .dmg Tcl/Tk Frameworks diff --git a/packages/darwin_app/TODO b/packages/darwin_app/TODO index 07f9d644..126fa25c 100644 --- a/packages/darwin_app/TODO +++ b/packages/darwin_app/TODO @@ -1,4 +1,25 @@ +- create old-style Help->Pure Documentation link on Help menu. It should use a + symlink to the "doc" dir internal to that particular Pd.app. The symlink is + named after the complete path to the "doc" dir, like: + /tmp/.Applications_Pd-0.38-4.app_Contents_Resources_doc + +- make Help menu generator recursive + +- check up on zexy in packages/darwin_app/Makefile and + externals/build/doc/makefile now that its been added to the build system + +- follow AppMain.tcl instructions: + http://wiki.tcl.tk/12987 +http://www.wordtech-software.com/tcl-bundle-tutorial.html + +- try this for the Pref Pane: + kAEShowPreferences ::tk::mac::ShowPreferences + +- research Tcl "auto_path" + +- research Tk + "Custom MDEF" for menus + - include auto-.pdrc script in package somewhere... - make a web page that has stuff that can't be included due to license issues: @@ -21,8 +42,6 @@ - write sed script to set help-patch font size to 10 point from 12 point on all help patches. -- add file browser and cascasing menus to Help menu - - create --enable-cpu and --enable-arch in pd/src/configure.in - create general optimization flag system diff --git a/packages/darwin_app/pd-unix.info b/packages/darwin_app/pd-unix.info deleted file mode 100644 index 83523b69..00000000 --- a/packages/darwin_app/pd-unix.info +++ /dev/null @@ -1,16 +0,0 @@ -Title Pd-UNIX -Version Pd.app Version -Description UNIX Tools for Pd -DefaultLocation /usr/local -DeleteWarning - -### Package Flags - -NeedsAuthorization YES -Required NO -Relocatable YES -RequiresReboot NO -UseUserMask YES -OverwritePermissions NO -InstallFat NO -RootVolumeOnly NO |