OSDN Git Service

Modify the load function
[sie/sie.git] / org / build.php
1 <html>
2 <head><title>build.php for SIE</title></head>
3 <body>
4 <!--
5 /*build.php under LGPL2.1 & GPL2.0 & Mozilla Public Lisence
6 d */
7 /* ***** BEGIN LICENSE BLOCK *****
8  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
9  *
10  * The contents of this file are subject to the Mozilla Public License Version
11  * 1.1 (the "License"); you may not use this file except in compliance with
12  * the License. You may obtain a copy of the License at
13  * http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS" basis,
16  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
17  * for the specific language governing rights and limitations under the
18  * License.
19  *
20  * The Original Code is the Mozilla SVG Cairo Renderer project.
21  *
22  * The Initial Developer of the Original Code is IBM Corporation.
23  * Portions created by the Initial Developer are Copyright (C) 2004
24  * the Initial Developer. All Rights Reserved.
25  *
26  * Parts of this file contain code derived from the following files(s)
27  * of the Mozilla SVG project (these parts are Copyright (C) by their
28  * respective copyright-holders):
29  *    layout/svg/renderer/src/libart/nsSVGLibartBPathBuilder.cpp
30  *
31  * Contributor(s):DHRNAME revulo
32  *
33  * Alternatively, the contents of this file may be used under the terms of
34  * either of the GNU General Public License Version 2 or later (the "GPL"),
35  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
36  * in which case the provisions of the GPL or the LGPL are applicable instead
37  * of those above. If you wish to allow use of your version of this file only
38  * under the terms of either the GPL or the LGPL, and not to allow others to
39  * use your version of this file under the terms of the MPL, indicate your
40  * decision by deleting the provisions above and replace them with the notice
41  * and other provisions required by the GPL or the LGPL. If you do not delete
42  * the provisions above, a recipient may use your version of this file under
43  * the terms of any one of the MPL, the GPL or the LGPL.
44  *
45  * ***** END LICENSE BLOCK ***** */
46 /*
47  * Copyright (c) 2000 World Wide Web Consortium,
48  * (Massachusetts Institute of Technology, Institut National de
49  * Recherche en Informatique et en Automatique, Keio University). All
50  * Rights Reserved. This program is distributed under the W3C's Software
51  * Intellectual Property License. This program is distributed in the
52  * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
53  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
54  * PURPOSE.
55  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
56  */
57
58 -->
59 <?php
60 $filelist = array("w3c/core.js", "w3c/dom/events.js", "w3c/dom/stylesheet.js", "w3c/dom/css.js", "w3c/dom/smil.js", "w3c/dom/svg.js");
61 $s = "";
62 foreach ($filelist as $file) {
63     $st = file_get_contents($file);
64     $st = str_replace('new STLog(true', 'new STLog(false', $st);
65     preg_match("/\/\*SIE\-SVG[\s\S]+?Legal\/ for more details[^\*]+\*\//", $st, $matches);
66     $st = preg_replace("/\/\*SIE\-SVG[\s\S]+?Legal\/ for more details[^\*]+\*\//", "", $st);
67     $s .= $st;
68 }
69 $s = $matches[0] .$s;
70 file_put_contents("sie-uncompressed.js", $s);
71 echo "success!";
72 ?>
73 </body>
74 </html>