]> git.saurik.com Git - wxWidgets.git/blame - misc/scripts/inc_release
Set modifiers properly for the key events with AltGr in wxGTK.
[wxWidgets.git] / misc / scripts / inc_release
CommitLineData
7de9aaf0
VZ
1#!/bin/sh
2##############################################################################
3# Name: misc/scripts/inc_release
4# Purpose: increments the release version number in all files mentioned in
5# docs/tech/tn0011.txt
6# Created: 2007-01-07
7# RCS-ID: $Id$
8# Copyright: (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
9# Licence: wxWindows licence
10##############################################################################
11
12error() {
13 echo "$progname: $*" >&2
14}
15
16msg() {
17 echo "$progname: $*"
18}
19
7bf32538
VZ
20msgn() {
21 echo -n "$progname: $*"
22}
23
24msgc() {
25 echo "$*"
26}
27
7de9aaf0
VZ
28run_sed() {
29 filename=$1
30 shift
31 cmd=
32 while [ $# -gt 0 ]; do
33 cmd="$cmd-e \"$1\" "
34 shift
35 done
36
7bf32538
VZ
37 msgn " processing $filename ... "
38 eval "sed $cmd $filename" > $filename.$$
39 if cmp -s $filename $filename.$$; then
40 rm $filename.$$
41 msgc "unchanged"
42 else
43 mv $filename.$$ $filename
44 msgc "done"
45 fi
7de9aaf0
VZ
46}
47
48progname=`basename $0`
49
50# we must be run from wx directory
51if [ ! -f wxwin.m4 ]; then
52 error "must be ran from root wx directory"
53 exit 1
54fi
55
56# exit on any error
57set -e
58
59# the primary source of information is wx/version.h
60ver_string=`grep '#define wxVERSION_STRING ' include/wx/version.h | sed 's/^.*"wxWidgets \(.*\)")/\1/'`
61ver_major=`echo $ver_string | sed 's/\([0-9]\{1,\}\)\..*/\1/'`
62ver_minor=`echo $ver_string | sed 's/.*\.\([0-9]\{1,\}\)\..*/\1/'`
63ver_release=`echo $ver_string | sed 's/.*\.\([0-9]\{1,\}\)$/\1/'`
64
65msg "Original version is $ver_major.$ver_minor.$ver_release"
66
67ver_release_new=$(($ver_release + 1))
68ver_string_new=$ver_major.$ver_minor.$ver_release_new
69
70msg "Updating version to $ver_string_new"
71
72ver_for_sed="$ver_major\.$ver_minor\.$ver_release"
73
7de9aaf0
VZ
74run_sed configure.in \
75 "/^AC_INIT/s/$ver_for_sed/$ver_string_new/" \
76 "s/^wx_release_number=$ver_release/wx_release_number=$ver_release_new/" \
77 "s/^wx_subrelease_number=.*$/wx_subrelease_number=0/"
78
79for f in *.spec; do
80 run_sed $f "/^%define *ver/s/$ver_for_sed/$ver_string_new/"
81done
82
6e3837d0
VZ
83run_sed build/osx/wxvers.xcconfig \
84 "/DYLIB_.* = /s/$ver_for_sed/$ver_string_new/"
85
0c63cc6e
VZ
86run_sed build/tools/bld_chm_exe.bat \
87 "/^SET WXW_VER=/s/$ver_for_sed/$ver_string_new/"
88
23818855
DS
89run_sed docs/readme.txt \
90 "/wxWidgets /s/$ver_for_sed/$ver_string_new/" \
91 "/\//s/$ver_for_sed/$ver_string_new/" \
92 "/naming: while/s/$ver_for_sed/$ver_string_new/"
93
ddb92955
VZ
94run_sed docs/doxygen/Doxyfile_inc \
95 "/^PROJECT_NUMBER/s/$ver_for_sed/$ver_string_new/"
6e3837d0 96
ddb92955 97run_sed docs/doxygen/latexdocstart.inc \
6e3837d0
VZ
98 "/\\large Version/s/$ver_for_sed/$ver_string_new/"
99
100run_sed include/wx/version.h \
101 "s/^\(#define wxRELEASE_NUMBER *\) $ver_release$/\1 $ver_release_new/" \
102 "s/^\(#define wxSUBRELEASE_NUMBER *\) [0-9]\{1,\}$/\1 0/" \
103 "/^#define wxVERSION_STRING/s/$ver_for_sed/$ver_string_new/"
104
105run_sed include/wx/osx/config_xcode.h \
106 "/^#define PACKAGE/s/$ver_for_sed/$ver_string_new/"
107
108run_sed samples/Info.plist \
109 "/version/s/$ver_for_sed/$ver_string_new/" \
110 "/<string>/s/$ver_for_sed/$ver_string_new/"
ddb92955 111
0c63cc6e
VZ
112run_sed samples/minimal/Info_carbon.plist \
113 "/<string>/s/$ver_for_sed/$ver_string_new/"
114run_sed samples/minimal/Info_cocoa.plist \
115 "/<string>/s/$ver_for_sed/$ver_string_new/"
116
6e3837d0
VZ
117run_sed samples/docview/Info.plist \
118 "/versionon/s/$ver_for_sed/$ver_string_new/" \
119 "/<string>/s/$ver_for_sed/$ver_string_new/"
9efbfd5d
VZ
120
121msg "Don't forget to change the C:R:A triplet in build/bakefiles/version.bkl now!"