aboutsummaryrefslogtreecommitdiff
path: root/packages/patches/put_version_into_aboutpd_page-0.40-pre.patch
blob: 19b7b08229283d41fa0219a40e76503b800a9e59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
? ChangeLog
? configure
Index: makefile.in
===================================================================
RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
retrieving revision 1.9
diff -u -w -r1.9 makefile.in
--- makefile.in	31 Dec 2005 20:55:25 -0000	1.9
+++ makefile.in	27 Feb 2006 17:24:47 -0000
@@ -62,6 +62,20 @@
 
 GOBJ = $(GSRC:.c=.o)
 
+# get version from m_pd.h to use in doc/1.manual/1.introduction.txt
+PD_MAJOR_VERSION := $(shell grep PD_MAJOR_VERSION m_pd.h | \
+	sed 's|^.define *PD_MAJOR_VERSION *\([0-9]*\).*|\1|' )
+PD_MINOR_VERSION := $(shell grep PD_MINOR_VERSION m_pd.h | \
+	sed 's|^.define *PD_MINOR_VERSION *\([0-9]*\).*|\1|' )
+PD_BUGFIX_VERSION := $(shell grep PD_BUGFIX_VERSION m_pd.h | \
+	sed 's|^.define *PD_BUGFIX_VERSION *\([0-9]*\).*|\1|' )
+PD_TEST_VERSION := $(shell grep PD_TEST_VERSION m_pd.h | \
+	sed 's|^.define *PD_TEST_VERSION *"\(.*\)".*|\1|' )
+PD_VERSION := $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION)
+ifneq ($(PD_TEST_VERSION),)
+	PD_VERSION := $(PD_VERSION)-$(PD_TEST_VERSION)
+endif
+
 #
 #  ------------------ targets ------------------------------------
 #
@@ -130,6 +144,7 @@
 
 BINARYMODE=@binarymode@
 
+ABOUT_FILE=$(pddocdir)/1.manual/1.introduction.txt
 install:  all
 	install -d $(libpdbindir)
 	install $(BIN_DIR)/$(GUINAME) $(libpdbindir)/$(GUINAME)
@@ -149,6 +164,10 @@
 		install -d $(pddocdir)/7.stuff/$$dir ; \
 		install -p ../doc/7.stuff/$$dir/*.* $(pddocdir)/7.stuff/$$dir ; \
 	done
+	mv $(ABOUT_FILE) $(ABOUT_FILE).tmp
+	cat $(ABOUT_FILE).tmp | sed 's|PD_VERSION|Pd version $(PD_VERSION)|' \
+		> $(ABOUT_FILE)
+	rm $(ABOUT_FILE).tmp
 	cp -pr ../extra $(libpddir)/
 	rm -f $(libpddir)/extra/*/*.o
 	install -d $(DESTDIR)$(includedir)
Index: s_inter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
retrieving revision 1.15
diff -u -w -r1.15 s_inter.c
--- s_inter.c	31 Dec 2005 20:55:25 -0000	1.15
+++ s_inter.c	27 Feb 2006 17:24:47 -0000
@@ -85,7 +85,6 @@
     t_socketreceivefn sr_socketreceivefn;
 };
 
-extern char pd_version[];
 extern int sys_guisetportnumber;
 extern char sys_font[]; /* tb: typeface */
 
@@ -1245,8 +1244,7 @@
 #endif
          sys_get_audio_apis(buf);
          sys_get_midi_apis(buf2);
-         sys_vgui("pdtk_pd_startup {%s} %s %s {%s}\n", pd_version, buf, buf2,
-                                  sys_font); 
+         sys_vgui("pdtk_pd_startup %s %s {%s}\n", buf, buf2, sys_font); 
     }
     return (0);
 
Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
retrieving revision 1.18
diff -u -w -r1.18 u_main.tk
--- u_main.tk	31 Dec 2005 20:55:25 -0000	1.18
+++ u_main.tk	27 Feb 2006 17:24:48 -0000
@@ -353,7 +353,6 @@
 proc menu_opentext {filename} {
     global doc_number
     global pd_guidir
-    global pd_myversion
 #    global pd_font3
     set name [format ".help%d" $doc_number]
     toplevel $name
@@ -367,8 +366,7 @@
     while {![eof $f]} {
         set bigstring [read $f 1000]
         regsub -all PD_BASEDIR $bigstring $pd_guidir bigstring2
-        regsub -all PD_VERSION $bigstring2 $pd_myversion bigstring3
-        $name.text insert end $bigstring3
+        $name.text insert end $bigstring2
     }
     close $f
     set doc_number [expr $doc_number + 1] 
@@ -3229,10 +3227,9 @@
 # font sizes 8, 10, 12, 14, 16, and 24.
 
 # tb: user defined typefaces
-proc pdtk_pd_startup {version apilist midiapilist fontname} {
-#    puts stderr [concat $version $apilist $fontname]
-    global pd_myversion pd_apilist pd_midiapilist
-    set pd_myversion $version
+proc pdtk_pd_startup {apilist midiapilist fontname} {
+#    puts stderr [concat $apilist $midiapilist $fontname]
+    global pd_apilist pd_midiapilist
     set pd_apilist $apilist
     set pd_midiapilist $midiapilist
     global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7