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
<?php
/**
* MicroEmulator
* Copyright (C) 2006-2007 Vadym Pinchuk
* Copyright (C) 2006-2007 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';

$jnlpFileName = "demo.jnlp";

$jnlpRewritDir = "tck/";

$jnlpFilePath = "../" . $jnlpFileName;
$fh = fopen($jnlpFilePath, 'r');
$xml = fread($fh, filesize($jnlpFilePath));
fclose($fh);
$xml = ereg_replace('<!--jadRewrite-->', '<argument>-Xautotest:' . $jadURL . '</argument>', $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

r2408 by skarzhevskyy on Oct 9, 2008   Diff
organize product to modules
r1876 by skarzhevskyy on Mar 16, 2008   Diff
Starting TCK client as Java Web Start
All revisions of this file

File info

Size: 1580 bytes, 46 lines

File properties

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