aboutsummaryrefslogtreecommitdiff
path: root/packages/darwin_app/patches/extended-help-menu.patch
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-21 04:39:02 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-21 04:39:02 +0000
commitc67180156bb011ebe9a0524757052a28a6c62692 (patch)
treea0c3e3660a926a44c1254516338ac83cff0d05b2 /packages/darwin_app/patches/extended-help-menu.patch
parent3382e067199abb3bb8fcb2044711910640a459c1 (diff)
Lots of changes, got the first complete(-ish) build with the new extended
build system. I left as much of the old functionality in place as possible, definitely were it was being used. But there are some changes that break backwards compatibility, thought they should be noticed by few, and be easy to fix going forward. Some highlights: - centralized patch system (packages/patches with targets patch_pd and unpatch_pd) - easily redirected builds, using INSTALL_PREFIX and all of the *_DEST variables. This makes building packages like Pd.app, .deb, .rpm, etc. much easier. - libdir format: basically a libdir is a directory that has both the objects and the help files together in one folder. It can be added using -lib or the StartUp preferences, or you can access them via geiger namespaces, i.e. [mylibrary/myobject]. - special characters allow in setup function/file names for objects. This makes objects like [||~] possible without having to be in a library. Now they can be either .pd files or individual .pd_darwin files (thanks IOhannes for the patch). svn path=/trunk/; revision=3993
Diffstat (limited to 'packages/darwin_app/patches/extended-help-menu.patch')
-rw-r--r--packages/darwin_app/patches/extended-help-menu.patch174
1 files changed, 0 insertions, 174 deletions
diff --git a/packages/darwin_app/patches/extended-help-menu.patch b/packages/darwin_app/patches/extended-help-menu.patch
deleted file mode 100644
index 00809abb..00000000
--- a/packages/darwin_app/patches/extended-help-menu.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-Index: u_main.tk
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
---- pd-0.38-4/src/u_main.tk Sun Feb 20 20:03:36 2005
-+++ u_main.tk Wed Nov 16 00:33:02 2005
-@@ -374,22 +374,41 @@
- set help_directory $pd_guidir/doc
- set help_top_directory $pd_guidir/doc
-
-+################## generate_menu_doc_link #########################
-+# This procedure generates a temporary mirror of the documentation directory
-+# in /tmp so that it can be opened from the Help->Pure Documentation... menu
-+# under Mac OS X. It is meant to be run at startup.
-+# Damn you Apple and your "hide stuff from the user" "features".
-+# <hans@at.or.at.>
-+proc generate_menu_doc_link {} {
-+ global help_directory
-+
-+ regsub -all "/" $help_directory "." help_directory_alias
-+ set help_directory_alias /tmp/$help_directory_alias
-+ set help_directory_tmpdir $help_directory_alias/doc
-+ # if something other than a directory exists, delete it
-+ if [file exists $help_directory_alias] {
-+ file delete -force -- $help_directory_alias
-+ }
-+ if { ! [ file isdirectory $help_directory_tmpdir ] } {
-+ file mkdir $help_directory_tmpdir
-+ }
-+ foreach file [ lsort [ glob -dir $help_directory * ] ] {
-+ regsub -all ".*/" $file "" link_file_name
-+ file link -symbolic [file join $help_directory_tmpdir $link_file_name ] $file
-+ }
-+ set help_directory $help_directory_tmpdir
-+}
-+
-+################## menu_documentation #########################
- proc menu_documentation {} {
- global help_directory
- global pd_nt
- global pd_guidir
-
-- if {$pd_nt == 2} {
-- exec rm -rf /tmp/pd-documentation
-- exec cp -pr $pd_guidir/doc /tmp/pd-documentation
-- set filename [tk_getOpenFile -defaultextension .pd \
-- -filetypes { {{documentation} {.pd .txt .htm}} } \
-- -initialdir /tmp/pd-documentation]
-- } else {
- set filename [tk_getOpenFile -defaultextension .pd \
- -filetypes { {{documentation} {.pd .txt .htm}} } \
- -initialdir $help_directory]
-- }
- if {$filename != ""} {
- if {[string first .txt $filename] >= 0} {
- menu_opentext $filename
-@@ -411,35 +430,57 @@
-
- set dirname $pd_guidir/$subdir
-
-+ set file_type [file type $dirname/$basename]
-+ if { $file_type == "directory" } {
-+ pd [concat pd open [pdtk_enquote $basename] \
-+ [pdtk_enquote $dirname] \;]
-+ } else {
- if {[regexp ".*\.(txt|c)$" $basename]} {
- menu_opentext $dirname/$basename
-+ } elseif {[regexp ".*\.(pd|max)$" $basename]} {
-+ pd [concat pd open [pdtk_enquote $basename] \
-+ [pdtk_enquote $dirname] \;]
- } elseif {[regexp ".*\.html?$" $basename]} {
- menu_openhtml $dirname/$basename
- } else {
-- pd [concat pd open [pdtk_enquote $basename] \
-- [pdtk_enquote $dirname] \;]
-+ menu_openhtml $dirname/$basename
-+ }
- }
- }
-
--proc doc_submenu {helpmenu subdir} {
-- global help_top_directory pd_tearoff
--
-- set menudir $help_top_directory/$subdir
-
-- regsub -all "\\\." $subdir "" submenu
-+################## menu_doc_submenu #########################
-
-+# this is a recursive function to generation a nested menu in the help menu
-+# which shows the complete contents of the doc directory <hans@at.or.at>
-+proc menu_doc_submenu {helpmenu base_dir sub_dir} {
-+ global pd_tearoff
-+ global help_top_directory
-+
-+ set menu_dir $help_top_directory/$base_dir/$sub_dir
-+
-+ foreach file [ lsort [ glob -nocomplain -dir $menu_dir * ] ] {
-+ set file_type [file type $file]
-+ regsub {.*/(.*$)} $file {\1} file_name
-+ # If links are going to be used then there needs to be a check to see if each
-+ # link might cause this function to recurse forever <hans@at.or.at>
-+ # if { $file_type == "link"} {
-+ # puts stderr "LINK: $file"
-+ # }
-+ if { $file_type == "file" } {
-+ # only put certain file types on the menu
-+ if {[regexp ".*\.(htm|html|c|pd|txt|pdf|wav|aif|aiff)$" $file]} {
-+ $helpmenu add command -label $file_name \
-+ -command "menu_doc_open doc/$base_dir/$sub_dir $file_name"
-+ }
-+ } elseif { $file_type == "directory" } {
-+ regsub -all "\\\." [string tolower $file_name] "" submenu
- menu $helpmenu.$submenu -tearoff $pd_tearoff
-- regsub -all "\\\." $subdir " " submenuname
-+ regsub -all "\\\." $file_name " " submenuname
- $helpmenu add cascade -label $submenuname \
- -menu $helpmenu.$submenu
--
--# use this glob pattern to exclude the supporting files
--# foreach file [ lsort [ glob -dir $menudir {*[0-9][0-9]*} ] ]
-- foreach file [ lsort [ glob -dir $menudir * ] ] {
-- set filename ""
-- regsub {.*/(.*\..+$)} $file {\1} filename
-- $helpmenu.$submenu add command -label $filename \
-- -command "menu_doc_open doc/$subdir $filename"
-+ menu_doc_submenu $helpmenu.$submenu $base_dir/$sub_dir [file tail $file]
-+ }
- }
- }
-
-@@ -494,7 +535,18 @@
-
-
- # the "Help" menu
-- if {$pd_nt != 2} {
-+ if {$pd_nt == 2} {
-+# Apple doesn't allow cascading menus in their Help so I had to call this
-+# one "docs" <hans@at.or.at>
-+ generate_menu_doc_link
-+ $mbar.docs add command -label {Browse Documentation...} \
-+ -command {menu_documentation}
-+ # the help menu only really works well on Mac OS X <hans@at.or.at>
-+ $mbar.docs add command -label {Pd HTML Manual...} \
-+ -command {menu_doc_open doc/1.manual index.htm}
-+ $mbar.docs add separator
-+ menu_doc_submenu $mbar.docs "." "."
-+ } else {
- # a menu on the main menubar named "$whatever.help" while be treated
- # as a special menu with specific behaviors on different platforms.
- # See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
-@@ -502,22 +554,9 @@
- -command {menu_doc_open doc/1.manual 1.introduction.txt}
- $mbar.help add command -label {Pure Documentation...} \
- -command {menu_documentation}
-- # add menu items for each section instead of using Pd patches
-- $mbar.help add separator
-- set helpmenuname help
-- } else {
--# Apple doesn't allow cascading menus in their Help so I had to call this
--# one "docs" <hans@at.or.at>
-- set helpmenuname docs
-- }
--
-- $mbar.$helpmenuname add command -label {1 manual...} \
-+ $mbar.help add command -label {1 manual...} \
- -command {menu_doc_open doc/1.manual index.htm}
-- doc_submenu $mbar.$helpmenuname 2.control.examples
-- doc_submenu $mbar.$helpmenuname 3.audio.examples
-- doc_submenu $mbar.$helpmenuname 4.fft.examples
-- doc_submenu $mbar.$helpmenuname 5.reference
-- doc_submenu $mbar.$helpmenuname 6.externs
-+ }
- }
-
- #################### the "File" menu for the Pd window ##############