My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* MicroEmulator
* Copyright (C) 2006-2008 Vadym Pinchuk
* Copyright (C) 2006-2008 Vlad Skarzhevskyy
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @version $Id$
*/

header('Content-Type: application/x-java-jnlp-file');

$appURL = $_GET['app-url'];
$jadURL = 'http://' . $appURL . '.jad';

$patern = '<!--jadRewrite-->';

$jnlpFileName = "demo.jnlp";

$jnlpRewritDir = "tck-dev-1/";

$jnlpFilePath = "../" . $jnlpFileName;
$fh = fopen($jnlpFilePath, 'r');
$xml = fread($fh, filesize($jnlpFilePath));
fclose($fh);
$xml = ereg_replace('<!--jadRewrite-->', '<argument>-Xautotest:' . $jadURL . '</argument>', $xml);
$xml = ereg_replace('<!--propertyRewrite-->', '<property name="bluecove.deviceID" value="1" />', $xml);

if (strlen($appURL) > 0) {
$patern_href = 'href="' . $jnlpFileName . '"';
$new_href = 'href="' . $jnlpRewritDir . $appURL . '.jnlp"';
$xml = str_replace($patern_href, $new_href, $xml);
}

echo($xml);
?>

Change log

r2555 by skarzhevskyy on Dec 10, 2008   Diff
fixed webstart
Go to: 
Project members, sign in to write a code review

Older revisions

r2546 by skarzhevskyy on Dec 10, 2008   Diff
more webstarts for TCK tests
All revisions of this file

File info

Size: 1730 bytes, 49 lines

File properties

svn:mime-type
text/plain
svn:eol-style
native
svn:keywords
Date Author Id Revision
Powered by Google Project Hosting