1563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#!/usr/bin/perl
2563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#
3563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# Copyright (C) 2008 Holger Hans Peter Freyther
4563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#
5563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# Redistribution and use in source and binary forms, with or without
6563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# modification, are permitted provided that the following conditions
7563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# are met:
8563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#
9563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 1.  Redistributions of source code must retain the above copyright
10563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#     notice, this list of conditions and the following disclaimer. 
11563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 2.  Redistributions in binary form must reproduce the above copyright
12563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#     notice, this list of conditions and the following disclaimer in the
13563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#     documentation and/or other materials provided with the distribution. 
14563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
15563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#     its contributors may be used to endorse or promote products derived
16563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#     from this software without specific prior written permission. 
17563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark#
18563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
19563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
22563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
29563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# Regenerate WebCore/inspector/front-end/WebKit.qrc from the content of WebCore/inspector/front-end/
30563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
31563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarksub addFiles(@)
32563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark{
33563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    my @files = @_;
34563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
35563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    foreach $file (@files) {
36cad810f21b803229eb11403f9209855525a25d57Steve Block        $file =~ s,Source/WebCore/inspector/front-end/,,;
37563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark        print WEBKIT_QRC "    <file>".$file . "</file>\n";
38563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark    }
39563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark}
40563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
41563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# Setup
42cad810f21b803229eb11403f9209855525a25d57Steve Blockopen(WEBKIT_QRC, ">Source/WebCore/inspector/front-end/WebKit.qrc") or die;
43563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkprint WEBKIT_QRC '<!DOCTYPE RCC><RCC version="1.0">'."\n";
44563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkprint WEBKIT_QRC '<qresource prefix="/webkit/inspector">'."\n";
45563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
46563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
47563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark# Directory with html and js files and the images
48cad810f21b803229eb11403f9209855525a25d57Steve BlockaddFiles(<Source/WebCore/inspector/front-end/*.{*html,js,css,svg}>);
49cad810f21b803229eb11403f9209855525a25d57Steve BlockaddFiles(<Source/WebCore/inspector/front-end/Images/*>);
50563af33bc48281d19dce701398dbb88cb54fd7ecCary Clark
51563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkprint WEBKIT_QRC "</qresource>\n";
52563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkprint WEBKIT_QRC "</RCC>\n";
53563af33bc48281d19dce701398dbb88cb54fd7ecCary Clarkclose(WEBKIT_QRC);
54