OSDN Git Service

Update license.
[qt-creator-jp/qt-creator-jp.git] / src / plugins / designer / syncqtheader.sh
1 #!/bin/sh
2
3 #  *************************************************************************
4 #
5 #  This file is part of Qt Creator
6 #
7 #  Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
8 #
9 #  Contact: Nokia Corporation (info@qt.nokia.com)
10 #
11 #  GNU Lesser General Public License Usage
12 #
13 #  This file may be used under the terms of the GNU Lesser General Public
14 #  License version 2.1 as published by the Free Software Foundation and
15 #  appearing in the file LICENSE.LGPL included in the packaging of this file.
16 #  Please review the following information to ensure the GNU Lesser General
17 #  Public License version 2.1 requirements will be met:
18 #  http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 #
20 #  In addition, as a special exception, Nokia gives you certain additional
21 #  rights. These rights are described in the Nokia Qt LGPL Exception
22 #  version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
23 #
24 #  Other Usage
25 #
26 #  Alternatively, this file may be used in accordance with the terms and
27 #  conditions contained in a signed written agreement between you and Nokia.
28 #
29 #  If you are unsure which license is appropriate for your use, please
30 #  contact the sales department at http://qt.nokia.com/contact.
31 #
32 #  ************************************************************************
33
34 # Internal utility script that synchronizes the Qt Designer private headers
35 # used by the Qt Designer plugin (located in the qt_private) directory
36 # with the Qt source tree pointed to by the environment variable QTDIR.
37
38 REQUIRED_HEADERS="pluginmanager_p.h iconloader_p.h qdesigner_formwindowmanager_p.h formwindowbase_p.h
39 abstractnewformwidget_p.h qtresourcemodel_p.h abstractoptionspage_p.h
40 shared_global_p.h abstractsettings_p.h qdesigner_integration_p.h qsimpleresource_p.h shared_enums_p.h"
41
42 echo Using $QTDIR
43
44 syncHeader()
45 {
46   HDR=$1
47   # Locate the Designer header: look in lib/shared or SDK
48   QTHDR=$QTDIR/tools/designer/src/lib/shared/$HDR
49   if [ ! -f $QTHDR ]
50   then
51     QTHDR=$QTDIR/tools/designer/src/lib/sdk/$HDR
52   fi
53   echo Syncing $QTHDR
54
55   [ -f $QTHDR ] || { echo "$HDR does not exist" ; exit 1 ; }
56
57   TARGET=qt_private/$HDR
58
59   # Exchange license header
60   head -n 28 formwindowfile.h > $TARGET || exit 1
61   tail -n +41 $QTHDR >> $TARGET || exit 1
62 }
63
64 for H in $REQUIRED_HEADERS
65 do
66   syncHeader $H
67 done