Mercurial > dwindows
annotate dwindows-config1.in @ 2819:a2fc275fa9bb
iOS: Fix major memory leaks when destroying widgets and windows.
More surely needs to be done regardig this, iOS doesn't destroy subviews as
expected when the parent is removed. I was expecting it to bring the
reference counts to 0 and starts destroying subviews... so I had to do this
manually. Boxes, ScrollBoxes, Spinbuttons and Comboboxes all now destroy
their subviews. Probably will need to do the same for splitbar, notebooks
and possibly others. However this stops the memory leak in Interface
Builder when recreating the interface. Also need to figure out why the
reference count is lower for DWButtons.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 02 Aug 2022 06:17:09 +0000 |
parents | c677d728e143 |
children |
rev | line source |
---|---|
1611
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1 #!/bin/sh |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
2 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
3 dw_libs="@LIBS@" |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
4 dw_cflags="@CFLAGS@ -D@DW_DEFINE@" |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
5 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
6 prefix=@prefix@ |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
7 exec_prefix=@exec_prefix@ |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
8 exec_prefix_set=no |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
9 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
10 usage() |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
11 { |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
12 cat <<EOF |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
13 Usage: dwindows-config [OPTIONS] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
14 Options: |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
15 [--prefix[=DIR]] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
16 [--exec-prefix[=DIR]] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
17 [--version] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
18 [--libs] |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
19 [--cflags] |
2202
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
20 [--gresource] |
1611
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
21 EOF |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
22 exit $1 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
23 } |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
24 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
25 if test $# -eq 0; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
26 usage 1 1>&2 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
27 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
28 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
29 while test $# -gt 0; do |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
30 case "$1" in |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
31 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
32 *) optarg= ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
33 esac |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
34 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
35 case $1 in |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
36 --prefix=*) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
37 prefix=$optarg |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
38 if test $exec_prefix_set = no ; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
39 exec_prefix=$optarg |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
40 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
41 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
42 --prefix) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
43 echo_prefix=yes |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
44 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
45 --exec-prefix=*) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
46 exec_prefix=$optarg |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
47 exec_prefix_set=yes |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
48 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
49 --version) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
50 echo @DW_MAJOR_VERSION@.@DW_MINOR_VERSION@.@DW_SUB_VERSION@ |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
51 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
52 --cflags) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
53 echo_cflags=yes |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
54 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
55 --libs) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
56 echo_libs=yes |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
57 ;; |
2202
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
58 --gresource) |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
59 echo_gresource=yes |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
60 ;; |
1611
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
61 *) |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
62 usage 1 1>&2 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
63 ;; |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
64 esac |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
65 shift |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
66 done |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
67 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
68 if test "$echo_prefix" = "yes"; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
69 echo $prefix |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
70 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
71 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
72 if test "$echo_exec_prefix" = "yes"; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
73 echo $exec_prefix |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
74 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
75 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
76 if test "$echo_cflags" = "yes"; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
77 echo -I${prefix}/include $dw_cflags |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
78 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
79 |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
80 if test "$echo_libs" = "yes"; then |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
81 echo -L${prefix}/lib -ldwindows $dw_libs |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
82 fi |
2675e0edcc1d
First attempt at fixing dwindows-config --version after the build
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
83 |
2202
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
84 if test "$echo_gresource" = "yes"; then |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
85 echo @DW_GRESOURCE@ |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
86 fi |
c677d728e143
GTK3: Switch to using GResource for compiled in image resources.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1611
diff
changeset
|
87 |