aboutsummaryrefslogtreecommitdiff
path: root/pd/tcl/AppMain.tcl
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2009-08-17 23:31:36 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2009-08-17 23:31:36 +0000
commit282671282b20fa17ab9dbbaba9d1cf2246b5029d (patch)
treef7af53ee269efd2564ca872a4da187e1ae687f3b /pd/tcl/AppMain.tcl
parent76d1c8472e025126a4b3e1571f817198b2fec9f9 (diff)
merge in new tcl implementation by Steiner & Chun
svn path=/trunk/; revision=11934
Diffstat (limited to 'pd/tcl/AppMain.tcl')
-rw-r--r--pd/tcl/AppMain.tcl27
1 files changed, 27 insertions, 0 deletions
diff --git a/pd/tcl/AppMain.tcl b/pd/tcl/AppMain.tcl
new file mode 100644
index 00000000..26adc832
--- /dev/null
+++ b/pd/tcl/AppMain.tcl
@@ -0,0 +1,27 @@
+# This file is for the Wish.app on Mac OS X. It is only used when a Wish.app
+# is loading embedded pd code on Mac OS X. It is completely unused on any
+# other configuration, like when 'pd' launches Wish.app or when 'pd' is using
+# an X11 wish on Mac OS X. GNU/Linux and Windows will never use this file.
+
+
+puts --------------------------AppMain.tcl-----------------------------------
+catch {console show}
+
+# FIXME apple_events must require a newer tcl than 8.4?
+# package require apple_events
+
+puts "AppMain.tcl"
+puts "argv0: $argv0"
+puts "executable: [info nameofexecutable]"
+puts "argc: $argc argv: $argv"
+
+# TODO is there anything useful to do with the psn (Process Serial Number)?
+if {[string first "-psn" [lindex $argv 0]] == 0} {
+ set argv [lrange $argv 1 end]
+ set argc [expr $argc - 1]
+}
+
+# launch pd.tk here
+if [catch {source [file join [file dirname [info script]] ../tcl/pd.tcl]}] {
+ puts stderr $errorInfo
+}