OSDN Git Service

add 64-bit variety NDK packages to download table.
[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>Size</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 ?> bytes</td>
92     <td><?cs var:ndk.win32_checksum ?></td>
93   </tr>
94   <tr>
95     <td>Windows 64-bit</td>
96     <td>
97   <a onClick="return onDownload(this)"
98      href="http://dl.google.com/android/ndk/<?cs var:ndk.win64_download ?>"><?cs var:ndk.win64_download ?></a>
99     </td>
100     <td><?cs var:ndk.win64_bytes ?> bytes</td>
101     <td><?cs var:ndk.win64_checksum ?></td>
102   </tr>
103   <tr>
104     <td>Mac OS X 32-bit</td>
105     <td>
106   <a onClick="return onDownload(this)"
107      href="http://dl.google.com/android/ndk/<?cs var:ndk.mac32_download ?>"><?cs var:ndk.mac32_download ?></a>
108     </td>
109     <td><?cs var:ndk.mac32_bytes ?> bytes</td>
110     <td><?cs var:ndk.mac32_checksum ?></td>
111   </tr>
112   <tr>
113     <td>Mac OS X 64-bit</td>
114     <td>
115   <a onClick="return onDownload(this)"
116      href="http://dl.google.com/android/ndk/<?cs var:ndk.mac64_download ?>"><?cs var:ndk.mac64_download ?></a>
117     </td>
118     <td><?cs var:ndk.mac64_bytes ?> bytes</td>
119     <td><?cs var:ndk.mac64_checksum ?></td>
120   </tr>
121   <tr>
122     <td>Linux 32-bit (x86)</td>
123     <td>
124   <a onClick="return onDownload(this)"
125      href="http://dl.google.com/android/ndk/<?cs var:ndk.linux32_download ?>"><?cs var:ndk.linux32_download ?></a>
126     </td>
127     <td><?cs var:ndk.linux32_bytes ?> bytes</td>
128     <td><?cs var:ndk.linux32_checksum ?></td>
129   </tr>
130   <tr>
131     <td>Linux 64-bit (x86)</td>
132     <td>
133   <a onClick="return onDownload(this)"
134      href="http://dl.google.com/android/ndk/<?cs var:ndk.linux64_download ?>"><?cs var:ndk.linux64_download ?></a>
135     </td>
136     <td><?cs var:ndk.linux64_bytes ?> bytes</td>
137     <td><?cs var:ndk.linux64_checksum ?></td>
138   </tr>
139   </table>
140   
141   <?cs ########  HERE IS THE JD DOC CONTENT ######### ?>
142   <?cs call:tag_list(root.descr) ?>
143
144
145   
146 <script>
147   function onDownload(link) {
148
149     $("#downloadForRealz").html("Download " + $(link).text());
150     $("#downloadForRealz").attr('href',$(link).attr('href'));
151
152     $("#tos").fadeIn('slow');
153
154     location.hash = "download";
155     return false;
156   }
157
158
159   function onAgreeChecked() {
160     if ($("input#agree").is(":checked")) {
161       $("a#downloadForRealz").removeClass('disabled');
162     } else {
163       $("a#downloadForRealz").addClass('disabled');
164     }
165   }
166
167   function onDownloadNdkForRealz(link) {
168     if ($("input#agree").is(':checked')) {
169       $("#tos").fadeOut('slow');
170       
171       $('html, body').animate({
172           scrollTop: $("#Installing").offset().top
173         }, 800, function() {
174           $("#Installing").click();
175       });
176      
177       return true;
178     } else {
179       $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
180         function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
181       );
182       return false;
183     }
184   }
185
186   $(window).hashchange( function(){
187     if (location.hash == "") {
188       location.reload();
189     }
190   });
191
192 </script>
193
194   <?cs else ?>
195 <?cs # end if NDK ... 
196 #
197 #
198 #
199 #
200 #
201 #
202 # the following is for the SDK
203 #
204 # (nested in if/else redirect and if/else NDK)
205 #
206 #
207 #
208 #
209 ?>
210   <?cs if:android.whichdoc == "online" ?>
211
212
213 <?cs ########  HERE IS THE JD DOC CONTENT FOR ONLINE ######### ?>
214 <?cs call:tag_list(root.descr) ?>
215
216
217
218
219 <h4><a href='' class="expandable"
220   onclick="toggleExpandable(this,'.pax');hideExpandable('.myide,.reqs');return false;"
221   >DOWNLOAD FOR OTHER PLATFORMS</a></h4>
222   
223   
224 <div class="pax col-13 online" style="display:none;margin:0;">
225
226   
227 <p class="table-caption"><strong>ADT Bundle</strong></p>
228   <table class="download">
229     <tr>
230       <th>Platform</th>
231       <th>Package</th>
232       <th>Size</th>
233       <th>MD5 Checksum</th>
234   </tr>
235   <tr>
236     <td>Windows 32-bit</td>
237     <td>
238   <a onClick="return onDownload(this)" id="win-bundle32"
239      href="http://dl.google.com/android/adt/<?cs var:sdk.win32_bundle_download ?>"><?cs var:sdk.win32_bundle_download ?></a>
240     </td>
241     <td><?cs var:sdk.win32_bundle_bytes ?> bytes</td>
242     <td><?cs var:sdk.win32_bundle_checksum ?></td>
243   </tr>
244   <tr>
245     <td>Windows 64-bit</td>
246     <td>
247   <a onClick="return onDownload(this)" id="win-bundle64"
248      href="http://dl.google.com/android/adt/<?cs var:sdk.win64_bundle_download ?>"><?cs var:sdk.win64_bundle_download ?></a>
249     </td>
250     <td><?cs var:sdk.win64_bundle_bytes ?> bytes</td>
251     <td><?cs var:sdk.win64_bundle_checksum ?></td>
252   </tr>
253   <tr>
254     <td><nobr>Mac OS X 64-bit</nobr></td>
255     <td>
256   <a onClick="return onDownload(this)" id="mac-bundle64"
257      href="http://dl.google.com/android/adt/<?cs var:sdk.mac64_bundle_download ?>"><?cs var:sdk.mac64_bundle_download ?></a>
258     </td>
259     <td><?cs var:sdk.mac64_bundle_bytes ?> bytes</td>
260     <td><?cs var:sdk.mac64_bundle_checksum ?></td>
261   </tr>
262   <tr>
263     <td>Linux 32-bit</td>
264     <td>
265   <a onClick="return onDownload(this)" id="linux-bundle32"
266      href="http://dl.google.com/android/adt/<?cs var:sdk.linux32_bundle_download ?>"><?cs var:sdk.linux32_bundle_download ?></a>
267     </td>
268     <td><?cs var:sdk.linux32_bundle_bytes ?> bytes</td>
269     <td><?cs var:sdk.linux32_bundle_checksum ?></td>
270   </tr>
271   <tr>
272     <td>Linux 64-bit</td>
273     <td>
274   <a onClick="return onDownload(this)" id="linux-bundle64"
275      href="http://dl.google.com/android/adt/<?cs var:sdk.linux64_bundle_download ?>"><?cs var:sdk.linux64_bundle_download ?></a>
276     </td>
277     <td><?cs var:sdk.linux64_bundle_bytes ?> bytes</td>
278     <td><?cs var:sdk.linux64_bundle_checksum ?></td>
279   </tr>
280   </table>
281
282
283 <p class="table-caption"><strong>SDK Tools Only</strong></p>
284   <table class="download">
285     <tr>
286       <th>Platform</th>
287       <th>Package</th>
288       <th>Size</th>
289       <th>MD5 Checksum</th>
290   </tr>
291   <tr>
292     <td rowspan="2">Windows<br>32 &amp; 64-bit</td>
293     <td>
294   <a onclick="return onDownload(this)" href="http://dl.google.com/android/<?cs var:sdk.win_download
295 ?>"><?cs var:sdk.win_download ?></a>
296     </td>
297     <td><?cs var:sdk.win_bytes ?> bytes</td>
298     <td><?cs var:sdk.win_checksum ?></td>
299   </tr>
300   <tr>
301     <!-- blank TD from Windows rowspan -->
302     <td>
303   <a onclick="return onDownload(this)" id="win-tools" href="http://dl.google.com/android/<?cs
304 var:sdk.win_installer
305 ?>"><?cs var:sdk.win_installer ?></a> (Recommended)
306     </td>
307     <td><?cs var:sdk.win_installer_bytes ?> bytes</td>
308     <td><?cs var:sdk.win_installer_checksum ?></td>
309   </tr>
310   <tr>
311     <td><nobr>Mac OS X</nobr><br>32 &amp; 64-bit</td>
312     <td>
313   <a onclick="return onDownload(this)" id="mac-tools" href="http://dl.google.com/android/<?cs
314 var:sdk.mac_download
315 ?>"><?cs var:sdk.mac_download ?></a>
316     </td>
317     <td><?cs var:sdk.mac_bytes ?> bytes</td>
318     <td><?cs var:sdk.mac_checksum ?></td>
319   </tr>
320   <tr>
321     <td>Linux<br>32 &amp; 64-bit</td>
322     <td>
323   <a onclick="return onDownload(this)" id="linux-tools" href="http://dl.google.com/android/<?cs
324 var:sdk.linux_download
325 ?>"><?cs var:sdk.linux_download ?></a>
326     </td>
327     <td><?cs var:sdk.linux_bytes ?> bytes</td>
328     <td><?cs var:sdk.linux_checksum ?></td>
329   </tr>
330   </table>
331
332 </div><!-- end pax -->
333
334
335
336 </div><!-- end col-13 for lower-half content -->
337   
338   
339   
340   
341 <script>
342   if (location.hash == "#Requirements") {
343     $('.reqs').show();
344   } else if (location.hash == "#ExistingIDE") {
345          $('.ide').show();
346   }
347
348   var os;
349   var bundlename;
350   var $toolslink;
351
352   if (navigator.appVersion.indexOf("Win")!=-1) {
353     os = "Windows";
354     bundlename = '#win-bundle';
355     $toolslink = $('#win-tools');
356   } else if (navigator.appVersion.indexOf("Mac")!=-1) {
357     os = "Mac";
358     bundlename = '#mac-bundle';
359     $toolslink = $('#mac-tools');
360   } else if (navigator.appVersion.indexOf("Linux")!=-1) {
361     os = "Linux";
362     bundlename = '#linux-bundle';
363     $toolslink = $('#linux-tools');
364   }
365
366   if (os) {
367     $('#not-supported').hide();
368
369     /* set up primary adt download button */
370     $('#download-bundle-button').show();
371     $('#download-bundle-button').append("Download the SDK <br/><span class='small'>ADT Bundle for " + os + "</span>");
372     $('#download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
373
374     /* set up sdk tools only button */
375     $('#download-tools-button').show();
376     $('#download-tools-button').append("Download the SDK Tools for " + os);
377     $('#download-tools-button').click(function() {return onDownload(this,true);}).attr('href', $toolslink.attr('href'));
378   } else {
379     $('.pax').show();
380   }
381   
382   
383   function onDownload(link, button, bundle) {
384   
385     /* set text for download button */
386     if (button) {
387       $("#downloadForRealz").html($(link).text());
388     } else {
389       $("#downloadForRealz").html("Download " + $(link).text());
390     }
391     
392     /* if it's a bundle, show the 32/64-bit picker */
393     if (bundle) {
394       $("#downloadForRealz").attr('bundle','true');
395       if ($("#downloadForRealz").text().indexOf("Mac") == -1) {
396         $("p#bitpicker").show();
397       } else {
398         /* mac is always 64 bit, so set it checked */
399         $("p#bitpicker input[value=64]").attr('checked', true);
400       }
401       /* save link name until the bit version is chosen */
402       $("#downloadForRealz").attr('name',$(link).attr('href'));
403     } else {
404       /* if not using bundle, set download button to ignore bitpicker and set url */
405       $("#downloadForRealz").attr('bundle','false');
406       $("#downloadForRealz").attr('href',$(link).attr('href'));
407       /* set picker checked as a fake default */
408       $("p#bitpicker input[value=64]").attr('checked', true);
409       $("a#next-link").html("Setting Up an Existing IDE").attr('href',toRoot + 'sdk/installing/index.html');
410     }
411
412     $("#tos").fadeIn('fast');
413     $("#landing").fadeOut('fast');
414
415     location.hash = "download";
416     return false;
417   }
418
419
420   function onAgreeChecked() {
421     /* verify that the TOS is agreed and a bit version is chosen */
422     if ($("input#agree").is(":checked") && $("#bitpicker input:checked").length) {
423       
424       /* if downloading the bundle */
425       if ($("#downloadForRealz").attr('bundle')) {
426         /* construct the name of the link we want based on the bit version */
427         linkId = $("a#downloadForRealz").attr("name") + $("#bitpicker input:checked").val();
428         /* set the real url for download */
429         $("a#downloadForRealz").attr("href", $(linkId).attr("href"));
430       }
431       
432       /* reveal the download button */
433       $("a#downloadForRealz").removeClass('disabled');
434     } else {
435       $("a#downloadForRealz").addClass('disabled');
436     }
437   }
438
439   function onDownloadForRealz(link) {
440     if ($("input#agree").is(':checked') && $("#bitpicker input:checked").length) {
441       $("div.sdk-terms").slideUp();
442       $("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow');
443       $("#next-steps").fadeIn('slow');
444       $("h1#tos-header").text('Get Ready to Code!');
445       return true;
446     } else {
447       $("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#258AAF"}, 200,
448         function() {$("label#agreeLabel,#bitpicker input").parent().stop().animate({color: "#222"}, 200)}
449       );
450       return false;
451     }
452   }
453
454   $(window).hashchange( function(){
455     if (location.hash == "") {
456       location.reload();
457     }
458   });
459
460 </script>
461
462
463
464 </div><!-- end the wrapper used for relative/absolute positions  -->
465 <?cs # THIS DIV WAS OPENED IN INDEX.JD ?>
466
467
468
469
470   <?cs else ?> <?cs # end if online ?>
471
472     <?cs if:sdk.preview ?><?cs # it's preview offline docs ?>
473       <p>Welcome developers! We are pleased to provide you with a preview SDK for the upcoming
474     Android 3.0 release, to give you a head-start on developing applications for it.
475     </p>
476     
477       <p>See the <a
478     href="<?cs var:toroot ?>sdk/preview/start.html">Getting Started</a> document for more information
479     about how to set up the preview SDK and get started.</p>
480     <style type="text/css">
481     .non-preview { display:none; }
482     </style>
483     
484     <?cs else ?><?cs # it's normal offline docs ?>
485       
486       <?cs ########  HERE IS THE JD DOC CONTENT FOR OFFLINE ######### ?>
487       <?cs call:tag_list(root.descr) ?>
488       <style type="text/css">
489         body .offline { display:block; }
490         body .online { display:none; }
491       </style>      
492       <script>
493         $('.reqs').show();
494       </script>
495     <?cs /if ?>
496     
497   <?cs /if ?> <?cs # end if/else online ?>
498   
499 <?cs /if ?> <?cs # end if/else NDK ?>
500
501 <?cs /if ?> <?cs # end if/else redirect ?>
502
503
504 </div><!-- end jd-content -->
505
506 <?cs if:!sdk.redirect ?>
507 <?cs include:"footer.cs" ?>
508 <?cs /if ?>
509
510 </div><!-- end g-unit -->
511
512 <?cs include:"trailer.cs" ?>
513
514 </body>
515 </html>
516
517
518