OSDN Git Service

docs: Updating download dir for ADT 23.0.0 links to new location
[android-x86/build.git] / tools / droiddoc / templates-sdk / sdkpage.cs
1 <?cs include:"doctype.cs" ?>
2 <?cs include:"macros.cs" ?>
3 <html<?cs if:devsite ?> devsite<?cs /if ?>>
4 <?cs if:sdk.redirect ?>
5   <head>
6     <title>Redirecting...</title>
7     <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs
8       if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
9       else ?>index.html<?cs /if ?>">
10   </head>
11 <?cs else ?>
12   <?cs include:"head_tag.cs" ?>
13 <?cs /if ?>
14 <body class="gc-documentation
15   <?cs if:(guide||develop||training||reference||tools||sdk) ?>develop<?cs
16   elif:design ?>design<?cs
17   elif:distribute ?>distribute<?cs
18   /if ?>" itemscope itemtype="http://schema.org/CreativeWork">
19   <a name="top"></a>
20 <?cs include:"header.cs" ?>
21
22
23 <div <?cs if:fullpage
24 ?><?cs else
25 ?>class="col-13" id="doc-col"<?cs /if ?> >
26
27 <?cs if:sdk.redirect ?>
28
29 <div class="g-unit">
30   <div id="jd-content">
31     <p>Redirecting to
32     <a href="<?cs var:toroot ?>sdk/<?cs
33       if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
34       else ?>index.html<?cs /if ?>"><?cs
35       if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
36       else ?>Download the SDK<?cs /if ?>
37     </a> ...</p>
38
39 <?cs else ?>
40 <?cs # else, if NOT redirect ...
41 #
42 #
43 # The following is for SDK/NDK pages
44 #
45 #
46 ?>
47
48 <?cs if:header.hide ?><?cs else ?>
49 <h1 itemprop="name"><?cs var:page.title ?></h1>
50 <?cs /if ?>
51   <div id="jd-content" itemprop="description">
52
53 <?cs if:sdk.not_latest_version ?>
54   <div class="special">
55     <p><strong>This is NOT the current Android SDK release.</strong></p>
56     <p><a href="/sdk/index.html">Download the current Android SDK</a></p>
57   </div>
58 <?cs /if ?>
59
60
61 <?cs if:ndk ?>
62 <?cs #
63 #
64 #
65 #
66 #
67 #
68 #
69 # the following is for the NDK
70 #
71 # (nested in if/else redirect)
72 #
73 #
74 #
75 #
76 ?>
77
78   <table class="download" id="download-table">
79     <tr>
80       <th>Platform</th>
81       <th>Package</th>
82       <th style="white-space:nowrap">Size (Bytes)</th>
83       <th>MD5 Checksum</th>
84   </tr>
85   <tr>
86     <td>Windows 32-bit</td>
87     <td>
88   <a onClick="return onDownload(this)"
89      href="http://dl.google.com/android/ndk/<?cs var:ndk.win32_download ?>"><?cs var:ndk.win32_download ?></a>
90     </td>
91     <td><?cs var:ndk.win32_bytes ?></td>
92     <td><?cs var:ndk.win32_checksum ?></td>
93   </tr>
94  <!-- <tr>
95    <td>
96   <a onClick="return onDownload(this)"
97      href="http://dl.google.com/android/ndk/<?cs var:ndk.win32.legacy_download ?>"><?cs var:ndk.win32.legacy_download ?></a>
98     </td>
99     <td><?cs var:ndk.win32.legacy_bytes ?></td>
100     <td><?cs var:ndk.win32.legacy_checksum ?></td>
101   </tr> -->
102   <tr>
103     <td>Windows 64-bit</td>
104     <td>
105   <a onClick="return onDownload(this)"
106      href="http://dl.google.com/android/ndk/<?cs var:ndk.win64_download ?>"><?cs var:ndk.win64_download ?></a>
107     </td>
108     <td><?cs var:ndk.win64_bytes ?></td>
109     <td><?cs var:ndk.win64_checksum ?></td>
110   </tr>
111  <!--  <tr>
112     <td>
113   <a onClick="return onDownload(this)"
114      href="http://dl.google.com/android/ndk/<?cs var:ndk.win64.legacy_download ?>"><?cs var:ndk.win64.legacy_download ?></a>
115     </td>
116     <td><?cs var:ndk.win64.legacy_bytes ?></td>
117     <td><?cs var:ndk.win64.legacy_checksum ?></td>
118   </tr> -->
119   <tr>
120     <td>Mac OS X 32-bit</td>
121     <td>
122   <a onClick="return onDownload(this)"
123      href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32_download ?>"><?cs var:ndk.mac32_download ?></a>
124     </td>
125     <td><?cs var:ndk.mac32_bytes ?></td>
126     <td><?cs var:ndk.mac32_checksum ?></td>
127   </tr>
128  <!--  <tr>
129     <td>
130   <a onClick="return onDownload(this)"
131      href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32.legacy_download ?>"><?cs var:ndk.mac32.legacy_download ?></a>
132     </td>
133     <td><?cs var:ndk.mac32.legacy_bytes ?></td>
134     <td><?cs var:ndk.mac32.legacy_checksum ?></td>
135   </tr> -->
136     <td>Mac OS X 64-bit</td>
137     <td>
138   <a onClick="return onDownload(this)"
139      href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64_download ?>"><?cs var:ndk.mac64_download ?></a>
140     </td>
141     <td><?cs var:ndk.mac64_bytes ?></td>
142     <td><?cs var:ndk.mac64_checksum ?></td>
143   </tr>
144  <!--  <tr>
145     <td>
146   <a onClick="return onDownload(this)"
147      href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64.legacy_download ?>"><?cs var:ndk.mac64.legacy_download ?></a>
148     </td>
149     <td><?cs var:ndk.mac64.legacy_bytes ?></td>
150     <td><?cs var:ndk.mac64.legacy_checksum ?></td>
151   </tr> -->
152   <tr>
153     <td>Linux 32-bit (x86)</td>
154     <td>
155   <a onClick="return onDownload(this)"
156      href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32_download ?>"><?cs var:ndk.linux32_download ?></a>
157     </td>
158     <td><?cs var:ndk.linux32_bytes ?></td>
159     <td><?cs var:ndk.linux32_checksum ?></td>
160   </tr>
161  <!--  <tr>
162     <td>
163   <a onClick="return onDownload(this)"
164      href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32.legacy_download ?>"><?cs var:ndk.linux32.legacy_download ?></a>
165     </td>
166     <td><?cs var:ndk.linux32.legacy_bytes ?></td>
167     <td><?cs var:ndk.linux32.legacy_checksum ?></td>
168   </tr> -->
169   <tr>
170     <td>Linux 64-bit (x86)</td>
171     <td>
172   <a onClick="return onDownload(this)"
173      href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64_download ?>"><?cs var:ndk.linux64_download ?></a>
174     </td>
175     <td><?cs var:ndk.linux64_bytes ?></td>
176     <td><?cs var:ndk.linux64_checksum ?></td>
177   </tr>
178   <!--  <tr>
179     <td>
180   <a onClick="return onDownload(this)"
181      href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64.legacy_download ?>"><?cs var:ndk.linux64.legacy_download ?></a>
182     </td>
183     <td><?cs var:ndk.linux64.legacy_bytes ?></td>
184     <td><?cs var:ndk.linux64.legacy_checksum ?></td>
185   </tr> -->
186     <tr>
187       <th>Additional Download</th>
188       <th>Package</th>
189       <th style="white-space:nowrap">Size (Bytes)</th>
190       <th>MD5 Checksum</th>
191   </tr>
192   <tr>
193     <td>STL debug info</td>
194     <td>
195   <a onClick="return onDownload(this)"
196      href="http://dl.google.com/android/ndk/<?cs var:ndk.debug_info_download ?>"><?cs var:ndk.debug_info_download ?></a>
197     </td>
198     <td><?cs var:ndk.debug_info_bytes ?></td>
199     <td><?cs var:ndk.debug_info_checksum ?></td>
200   </tr>
201   </table>
202
203   <?cs ########  HERE IS THE JD DOC CONTENT ######### ?>
204   <?cs call:tag_list(root.descr) ?>
205
206
207
208 <script>
209   function onDownload(link) {
210
211     $("#downloadForRealz").html("Download " + $(link).text());
212     $("#downloadForRealz").attr('href',$(link).attr('href'));
213
214     $("#tos").fadeIn('slow');
215
216     location.hash = "download";
217     return false;
218   }
219
220
221   function onAgreeChecked() {
222     if ($("input#agree").is(":checked")) {
223       $("a#downloadForRealz").removeClass('disabled');
224     } else {
225       $("a#downloadForRealz").addClass('disabled');
226     }
227   }
228
229   function onDownloadNdkForRealz(link) {
230     if ($("input#agree").is(':checked')) {
231       $("#tos").fadeOut('slow');
232
233       $('html, body').animate({
234           scrollTop: $("#Installing").offset().top
235         }, 800, function() {
236           $("#Installing").click();
237       });
238
239       return true;
240     } else {
241       $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
242         function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
243       );
244       return false;
245     }
246   }
247
248   $(window).hashchange( function(){
249     if (location.hash == "") {
250       location.reload();
251     }
252   });
253
254 </script>
255
256   <?cs else ?>
257 <?cs # end if NDK ...
258 #
259 #
260 #
261 #
262 #
263 #
264 # the following is for the SDK
265 #
266 # (nested in if/else redirect and if/else NDK)
267 #
268 #
269 #
270 #
271 ?>
272   <?cs if:android.whichdoc == "online" ?>
273
274
275 <?cs ########  HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?>
276 <?cs call:tag_list(root.descr) ?>
277
278
279
280
281 <h4><a href='' class="expandable"
282   onclick="toggleExpandable(this,'.pax');hideExpandable('.myide,.reqs');return false;"
283   >VIEW ALL DOWNLOADS AND SIZES</a></h4>
284
285
286 <div class="pax col-13 online" style="display:none;margin:0;">
287
288
289 <p class="table-caption"><strong>ADT Bundle</strong></p>
290   <table class="download">
291     <tr>
292       <th>Platform</th>
293       <th>Package</th>
294       <th>Size</th>
295       <th>MD5 Checksum</th>
296   </tr>
297   <tr>
298     <td>Windows 32-bit</td>
299     <td>
300   <a onClick="return onDownload(this)" id="win-bundle32"
301      href="http://dl.google.com/android/adt/<?cs var:sdk.win32_bundle_download ?>"><?cs var:sdk.win32_bundle_download ?></a>
302     </td>
303     <td><?cs var:sdk.win32_bundle_bytes ?> bytes</td>
304     <td><?cs var:sdk.win32_bundle_checksum ?></td>
305   </tr>
306   <tr>
307     <td>Windows 64-bit</td>
308     <td>
309   <a onClick="return onDownload(this)" id="win-bundle64"
310      href="http://dl.google.com/android/adt/<?cs var:sdk.win64_bundle_download ?>"><?cs var:sdk.win64_bundle_download ?></a>
311     </td>
312     <td><?cs var:sdk.win64_bundle_bytes ?> bytes</td>
313     <td><?cs var:sdk.win64_bundle_checksum ?></td>
314   </tr>
315   <tr>
316     <td><nobr>Mac OS X 64-bit</nobr></td>
317     <td>
318   <a onClick="return onDownload(this)" id="mac-bundle64"
319      href="http://dl.google.com/android/adt/<?cs var:sdk.mac64_bundle_download ?>"><?cs var:sdk.mac64_bundle_download ?></a>
320     </td>
321     <td><?cs var:sdk.mac64_bundle_bytes ?> bytes</td>
322     <td><?cs var:sdk.mac64_bundle_checksum ?></td>
323   </tr>
324   <tr>
325     <td>Linux 32-bit</td>
326     <td>
327   <a onClick="return onDownload(this)" id="linux-bundle32"
328      href="http://dl.google.com/android/adt/<?cs var:sdk.linux32_bundle_download ?>"><?cs var:sdk.linux32_bundle_download ?></a>
329     </td>
330     <td><?cs var:sdk.linux32_bundle_bytes ?> bytes</td>
331     <td><?cs var:sdk.linux32_bundle_checksum ?></td>
332   </tr>
333   <tr>
334     <td>Linux 64-bit</td>
335     <td>
336   <a onClick="return onDownload(this)" id="linux-bundle64"
337      href="http://dl.google.com/android/adt/<?cs var:sdk.linux64_bundle_download ?>"><?cs var:sdk.linux64_bundle_download ?></a>
338     </td>
339     <td><?cs var:sdk.linux64_bundle_bytes ?> bytes</td>
340     <td><?cs var:sdk.linux64_bundle_checksum ?></td>
341   </tr>
342   </table>
343
344
345 <p class="table-caption"><strong>SDK Tools Only</strong></p>
346   <table class="download">
347     <tr>
348       <th>Platform</th>
349       <th>Package</th>
350       <th>Size</th>
351       <th>MD5 Checksum</th>
352   </tr>
353   <tr>
354     <td rowspan="2">Windows<br>32 &amp; 64-bit</td>
355     <td>
356   <a onclick="return onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download
357 ?>"><?cs var:sdk.win_download ?></a>
358     </td>
359     <td><?cs var:sdk.win_bytes ?> bytes</td>
360     <td><?cs var:sdk.win_checksum ?></td>
361   </tr>
362   <tr>
363     <!-- blank TD from Windows rowspan -->
364     <td>
365   <a onclick="return onDownload(this)" id="win-tools" href="http://dl.google.com/android/<?cs
366 var:sdk.win_installer
367 ?>"><?cs var:sdk.win_installer ?></a> (Recommended)
368     </td>
369     <td><?cs var:sdk.win_installer_bytes ?> bytes</td>
370     <td><?cs var:sdk.win_installer_checksum ?></td>
371   </tr>
372   <tr>
373     <td><nobr>Mac OS X</nobr><br>32 &amp; 64-bit</td>
374     <td>
375   <a onclick="return onDownload(this)" id="mac-tools" href="http://dl.google.com/android/<?cs
376 var:sdk.mac_download
377 ?>"><?cs var:sdk.mac_download ?></a>
378     </td>
379     <td><?cs var:sdk.mac_bytes ?> bytes</td>
380     <td><?cs var:sdk.mac_checksum ?></td>
381   </tr>
382   <tr>
383     <td>Linux<br>32 &amp; 64-bit</td>
384     <td>
385   <a onclick="return onDownload(this)" id="linux-tools" href="http://dl.google.com/android/<?cs
386 var:sdk.linux_download
387 ?>"><?cs var:sdk.linux_download ?></a>
388     </td>
389     <td><?cs var:sdk.linux_bytes ?> bytes</td>
390     <td><?cs var:sdk.linux_checksum ?></td>
391   </tr>
392   </table>
393
394 </div><!-- end pax -->
395
396
397
398 </div><!-- end col-13 for lower-half content -->
399
400
401
402
403 <script>
404   if (location.hash == "#Requirements") {
405     $('.reqs').show();
406   } else if (location.hash == "#ExistingIDE") {
407          $('.ide').show();
408   }
409
410   var os;
411   var bundlename;
412   var $toolslink;
413
414   if (navigator.appVersion.indexOf("Win")!=-1) {
415     os = "Windows";
416     bundlename = '#win-bundle';
417     $toolslink = $('#win-tools');
418   } else if (navigator.appVersion.indexOf("Mac")!=-1) {
419     os = "Mac";
420     bundlename = '#mac-bundle';
421     $toolslink = $('#mac-tools');
422   } else if (navigator.appVersion.indexOf("Linux")!=-1) {
423     os = "Linux";
424     bundlename = '#linux-bundle';
425     $toolslink = $('#linux-tools');
426   }
427
428   if (os) {
429     $('#not-supported').hide();
430
431     /* set up primary adt download button */
432     $('#download-bundle-button').show();
433     $('#download-bundle-button').append("Download Eclipse ADT <br/><span class='small'>with the Android SDK for " + os + "</span>");
434     $('#download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
435
436     /* set up sdk tools only button */
437     $('#download-tools-button').show();
438     $('#download-tools-button').append("Download the stand-alone Android SDK Tools for " + os);
439     $('#download-tools-button').click(function() {return onDownload(this,true);}).attr('href', $toolslink.attr('href'));
440   } else {
441     $('.pax').show();
442   }
443
444
445   function onDownload(link, button, bundle) {
446
447     /* set text for download button */
448     if (button) {
449       $("#downloadForRealz").html($(link).text());
450     } else {
451       $("#downloadForRealz").html("Download " + $(link).text());
452     }
453
454     /* if it's a bundle, show the 32/64-bit picker */
455     if (bundle) {
456       $("#downloadForRealz").attr('bundle','true');
457       if ($("#downloadForRealz").text().indexOf("Mac") == -1) {
458         $("p#bitpicker").show();
459       } else {
460         /* mac is always 64 bit, so set it checked */
461         $("p#bitpicker input[value=64]").attr('checked', true);
462       }
463       /* save link name until the bit version is chosen */
464       $("#downloadForRealz").attr('name',$(link).attr('href'));
465     } else {
466       /* if not using bundle, set download button to ignore bitpicker and set url */
467       $("#downloadForRealz").attr('bundle','false');
468       $("#downloadForRealz").attr('href',$(link).attr('href'));
469       /* set picker checked as a fake default */
470       $("p#bitpicker input[value=64]").attr('checked', true);
471       $("a#next-link").html("Setting Up an Existing IDE").attr('href',toRoot + 'sdk/installing/index.html');
472     }
473
474     $("#tos").fadeIn('fast');
475     $("#landing").fadeOut('fast');
476
477     location.hash = "download";
478     return false;
479   }
480
481
482   function onAgreeChecked() {
483     /* verify that the TOS is agreed and a bit version is chosen */
484     if ($("input#agree").is(":checked") && $("#bitpicker input:checked").length) {
485
486       /* if downloading the bundle */
487       if ($("#downloadForRealz").attr('bundle')) {
488         /* construct the name of the link we want based on the bit version */
489         linkId = $("a#downloadForRealz").attr("name") + $("#bitpicker input:checked").val();
490         /* set the real url for download */
491         $("a#downloadForRealz").attr("href", $(linkId).attr("href"));
492       }
493
494       /* reveal the download button */
495       $("a#downloadForRealz").removeClass('disabled');
496     } else {
497       $("a#downloadForRealz").addClass('disabled');
498     }
499   }
500
501   function onDownloadForRealz(link) {
502     if ($("input#agree").is(':checked') && $("#bitpicker input:checked").length) {
503       $("div.sdk-terms").slideUp();
504       $("h1#tos-header").text('Now redirecting to the install instructions...');
505       $("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow', function() {
506         setTimeout(function() {
507           if ($("#downloadForRealz").attr('bundle') == 'true') {
508             // User downloaded the ADT Bundle
509             window.location = "/sdk/installing/index.html?pkg=adt";
510           } else {
511             // User downloaded the SDK Tools
512             window.location = "/sdk/installing/index.html?pkg=tools";
513           }
514         }, 500);
515       });
516       _gaq.push(['_trackEvent', 'SDK', 'ADT and Tools', $("#downloadForRealz").html()]);
517       return true;
518     } else {
519       $("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200,
520         function() {$("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#222"}, 200)}
521       );
522       return false;
523     }
524   }
525
526   $(window).hashchange( function(){
527     if (location.hash == "") {
528       location.reload();
529     }
530   });
531
532 </script>
533
534
535
536 </div><!-- end the wrapper used for relative/absolute positions  -->
537 <?cs # THIS DIV WAS OPENED IN INDEX.JD ?>
538
539
540
541
542   <?cs else ?> <?cs # end if online ?>
543
544     <?cs if:sdk.preview ?><?cs # it's preview offline docs ?>
545       <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming
546     Android 3.0 release, to give you a head-start on developing applications for it.
547     </p>
548
549       <p>See the <a
550     href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information
551     about how to set up the preview SDK and get started.</p>
552     <style type="text/css">
553     .non-preview { display:none; }
554     </style>
555
556     <?cs else ?><?cs # it's normal offline docs ?>
557
558       <?cs ########  HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?>
559       <?cs call:tag_list(root.descr) ?>
560       <style type="text/css">
561         body .offline { display:block; }
562         body .online { display:none; }
563       </style>
564       <script>
565         $('.reqs').show();
566       </script>
567     <?cs /if ?>
568
569   <?cs /if ?> <?cs # end if/else online ?>
570
571 <?cs /if ?> <?cs # end if/else NDK ?>
572
573 <?cs /if ?> <?cs # end if/else redirect ?>
574
575
576 </div><!-- end jd-content -->
577
578 <?cs if:!sdk.redirect ?>
579 <?cs include:"footer.cs" ?>
580 <?cs /if ?>
581
582 </div><!-- end g-unit -->
583
584 <?cs include:"trailer.cs" ?>
585
586 <!-- Start of Tag -->
587 <script type="text/javascript">
588 var axel = Math.random() + "";
589 var a = axel * 10000000000000;
590 document.write('<iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>');
591 </script>
592 <noscript>
593 <iframe src="https://2507573.fls.doubleclick.net/activityi;src=2507573;type=other026;cat=googl348;ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe>
594 </noscript>
595 <!-- End of Tag -->
596 </body>
597 </html>
598
599
600