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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
<?php
$SESSION_URL=$_GET['sessionURL'];
if($SESSION_URL == null || $SESSION_URL == "")
{
$SESSION_URL=$_GET['file'];
}
$LOCUS= urldecode($_GET['locus']);
$MAXHEAP=$_GET['maxHeapSize'];
$INITHEAP=$_GET['initialHeapSize'];
$GENOME=$_GET['genome'];
$INDEX=$_GET['index'];
$NAME=$_GET['name'];
$PREFS=$_GET['prefs'];
$DATA_FORMAT=$_GET['dataFormat'];
$USER_AGENT=$_SERVER['HTTP_USER_AGENT'];
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
if($iPod || $iPhone || $iPad) {
$IPAD_URL = "igvipadapp://eval";
if($SESSION_URL != null && $SESSION_URL != "") {
$IPAD_URL = $IPAD_URL . "?file=". $SESSION_URL;
if($LOCUS != null && $LOCUS != "") {
$IPAD_URL = $IPAD_URL . "&locus=". $LOCUS;
}
if($DATA_FORMAT != null && $DATA_FORMAT != "") {
$IPAD_URL = $IPAD_URL . "&dataFormat=" . $DATA_FORMAT;
}
if($INDEX != null && $INDEX != "")
{
$IPAD_URL = $IPAD_URL . "&index=" . $INDEX;
}
}
else if($LOCUS != null && $LOCUS != "") {
$IPAD_URL = $IPAD_URL . "?locus=". $LOCUS;
}
header( 'Location: ' .$IPAD_URL);
}
$igv_project = htmlspecialchars($_GET['user']);
if($igv_project == null) {
$igv_project = "launcher";
}
$igv_version = "2.4";
$referred_by = $_SERVER['HTTP_USER_AGENT'];
$user_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
if ($user_ip == '') {
$user_ip = $_SERVER['REMOTE_ADDR'];
}
header('Content-type: application/x-java-jnlp-file');
header('Content-Disposition: attachment; filename="igv.jnlp"');
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-control: post-check=0, pre-check=0, false");
header("Pragma: no-cache");
header("Content-Type: application/x-java-jnlp-file");
?>
<?xml version="1.0" encoding="utf-8"?>
<jnlp
spec="6.0+"
codebase="https://data.broadinstitute.org/igv/projects/2.4">
<information>
<title>IGV 2.4</title>
<vendor>The Broad Institute</vendor>
<homepage href="http://www.broadinstitute.org/igv"/>
<description>IGV Software</description>
<description kind="short">IGV</description>
<icon href="IGV_64.gif"/>
<icon kind="splash" href="IGV_64.gif"/>
<offline-allowed/>
<shortcut/>
</information>
<security>
<all-permissions/>
</security>
<update check="background"/>
<resources>
<?php
if($MAXHEAP == null || $MAXHEAP == "") {
$MAXHEAP="900m";
}
if($INITHEAP == null || $INITHEAP == "") {
$INITHEAP="256m";
}
print('<java version="1.8+" initial-heap-size="');
print($INITHEAP);
print('" max-heap-size="');
print($MAXHEAP);
print('"/>');
?>
<jar href="igv.jar" download="eager" main="true"/>
<jar href="batik-codec__V1.7.jar" download="eager"/>
<jar href="goby-io-igv__V1.0.jar" download="eager"/>
<property name="java.net.preferIPv4Stack" value="true"/>
<property name="apple.laf.useScreenMenuBar" value="true"/>
<property name="com.apple.mrj.application.growbox.intrudes" value="false"/>
<property name="com.apple.mrj.application.live-resize" value="true"/>
<property name="com.apple.macos.smallTabs" value="true"/>
<property name="http.agent" value="IGV"/>
<property name="production" value="true"/>
</resources>
<application-desc main-class="org.broad.igv.ui.Main">
<?php
if($SESSION_URL != null && $SESSION_URL != "")
{
print(" <argument>$SESSION_URL</argument>\n");
}
if($LOCUS != null && $LOCUS != "")
{
print(" <argument>$LOCUS</argument>\n");
}
if($GENOME != null && $GENOME != "")
{
print(" <argument>-g</argument>\n");
print(" <argument>$GENOME</argument>\n");
}
if($INDEX != null && $INDEX != "")
{
print(" <argument>-i</argument>\n");
print(" <argument>$INDEX</argument>\n");
}
if($NAME != null && $NAME != "")
{
print(" <argument>-n</argument>\n");
print(" <argument>$NAME</argument>\n");
}
print(" <argument>--preferences</argument>\n");
if($PREFS != null && $PREFS != "")
{
print(" <argument>$PREFS</argument>\n");
}
else {
print(" <argument>http://data.broadinstitute.org/igv/projects/current/genomespace.properties</argument>\n");
}
?>
</application-desc>
</jnlp>
|