release.tmpl 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. [% BLOCK download_build;
  2. # vars that need to be set by caller or document:
  3. # smversion: version number (2.0a1, 2.0.1, ...)
  4. # platform: platform (win, linux, osx)
  5. # locale: locale (en-US, de, ...)
  6. # mirrorred: bool that tells us if to use release mirrors/bouncer, false means direct FTP
  7. # uselongversion: bool that tells us if to use the longversion, false means no
  8. # usefulldetails: bool that, if true, tells us to use locale and platform
  9. IF mirrorred;
  10. "https://download.mozilla.org/?product=seamonkey-$smversion&os=$platform&lang=$locale";
  11. ELSE;
  12. ftpdir = "https://archive.mozilla.org/pub/seamonkey/releases/$smversion";
  13. IF smversion.match('^1\.') OR smversion.match('^2\.0a');
  14. IF platform == "win";
  15. "$ftpdir/seamonkey-${smversion}.${locale}.win32.installer.exe";
  16. ELSIF platform == "osx";
  17. "$ftpdir/seamonkey-${smversion}.${locale}.mac.dmg";
  18. ELSIF platform == "linux";
  19. IF smversion.match('^1\.');
  20. "$ftpdir/seamonkey-${smversion}.${locale}.linux-i686.installer.tar.gz";
  21. ELSE;
  22. "$ftpdir/seamonkey-${smversion}.${locale}.linux-i686.installer.tar.bz2";
  23. END;
  24. ELSE;
  25. "$ftpdir/";
  26. END;
  27. ELSIF usefulldetails;
  28. filebase = "$locale/seamonkey-${smversion}.$locale";
  29. IF platform == "win";
  30. "$ftpdir/win32/${filebase}.win32.installer.exe";
  31. ELSIF platform == "win64";
  32. "$ftpdir/win64/${filebase}.win64.installer.exe";
  33. ELSIF platform == "osx";
  34. "$ftpdir/mac/${filebase}.mac.dmg";
  35. ELSIF platform == "linux";
  36. "$ftpdir/linux-i686/${filebase}.linux-i686.tar.bz2";
  37. ELSIF platform == "linux64";
  38. "$ftpdir/linux-x86_64/${filebase}.linux-x86_64.tar.bz2";
  39. ELSE;
  40. "$ftpdir/$platform/$locale/";
  41. END;
  42. ELSIF smversion.match('^2\.49\.5');
  43. IF platform == "win";
  44. "$ftpdir/win32/$locale/seamonkey-${smversion}.installer.exe";
  45. ELSIF platform == "win64";
  46. "$ftpdir/win64/$locale/seamonkey-${smversion}.installer.exe";
  47. ELSIF platform == "osx";
  48. "$ftpdir/mac/$locale/seamonkey-${smversion}.dmg";
  49. ELSIF platform == "linux";
  50. "$ftpdir/linux-i686/$locale/seamonkey-${smversion}.tar.bz2";
  51. ELSIF platform == "linux64";
  52. "$ftpdir/linux-x86_64/$locale/seamonkey-${smversion}.tar.bz2";
  53. ELSE;
  54. "$ftpdir/$platform/$locale/";
  55. END;
  56. ELSIF uselongversion;
  57. longversion = smversion|replace('a','%20Alpha%20')|replace('b','%20Beta%20')|replace('rc','%20RC%20');
  58. IF platform == "win";
  59. "$ftpdir/win32/$locale/SeaMonkey%20Setup%20${longversion}.exe";
  60. ELSIF platform == "win64";
  61. "$ftpdir/win64/$locale/SeaMonkey%20Setup%20${longversion}.exe";
  62. ELSIF platform == "osx";
  63. "$ftpdir/mac/$locale/SeaMonkey%20${longversion}.dmg";
  64. ELSIF platform == "linux";
  65. "$ftpdir/linux-i686/$locale/seamonkey-${smversion}.tar.bz2";
  66. ELSIF platform == "linux64";
  67. "$ftpdir/linux-x86_64/$locale/seamonkey-${smversion}.tar.bz2";
  68. ELSE;
  69. "$ftpdir/$platform/$locale/";
  70. END;
  71. ELSE;
  72. IF platform == "win";
  73. "$ftpdir/win32/$locale/SeaMonkey%20Setup%20${smversion}.exe";
  74. ELSIF platform == "win64";
  75. "$ftpdir/win64/$locale/SeaMonkey%20Setup%20${smversion}.exe";
  76. ELSIF platform == "osx";
  77. "$ftpdir/mac/$locale/SeaMonkey%20${smversion}.dmg";
  78. ELSIF platform == "linux";
  79. "$ftpdir/linux-i686/$locale/seamonkey-${smversion}.tar.bz2";
  80. ELSIF platform == "linux64";
  81. "$ftpdir/linux-x86_64/$locale/seamonkey-${smversion}.tar.bz2";
  82. ELSE;
  83. "$ftpdir/$platform/$locale/";
  84. END;
  85. END;
  86. END;
  87. END;
  88. %]
  89. [% BLOCK direct_download_file;
  90. "https://archive.mozilla.org/pub/seamonkey/releases/$smversion/$path";
  91. END;
  92. %]
  93. [% BLOCK download_file;
  94. # vars that need to be set by caller or document:
  95. # smversion: version number (2.0a1, 2.0.1, ...)
  96. # mirrorred: bool that tells us if to use release mirrors/bouncer, false means direct FTP
  97. # path: path to add to the base URL of that version
  98. # releases.mozilla.org disabled, see bug 871120
  99. # IF mirrorred AND NOT smversion.match('a|b');
  100. # "http://releases.mozilla.org/pub/seamonkey/releases/$smversion/$path";
  101. # ELSE;
  102. INCLUDE direct_download_file;
  103. # END;
  104. END;
  105. %]
  106. [% BLOCK downloads_table;
  107. # vars that need to be set by caller or document:
  108. # languages: set of languages containing information for the table
  109. # smversion: version number (2.0a1, 2.0.1, ...)
  110. " <table class=\"downloads\" cellpadding=\"0\" cellspacing=\"0\" summary=\"$languages.summary\">\n";
  111. " <thead>\n";
  112. " <tr>\n";
  113. FOREACH header IN languages.header;
  114. table_header = "<th";
  115. IF header.colspan;
  116. table_header = "$table_header colspan=\"$header.colspan\"";
  117. END;
  118. IF header.class;
  119. table_header = "$table_header class=\"$header.class\">";
  120. ELSE;
  121. table_header = "$table_header>";
  122. END;
  123. IF header.spanclass;
  124. table_header = "$table_header<span class=\"$header.spanclass\">$header.name";
  125. IF header.second;
  126. table_header = "$table_header<br>$header.second</span>";
  127. ELSE;
  128. table_header = "$table_header</span>";
  129. END;
  130. ELSE;
  131. table_header = "$table_header$header.name";
  132. END;
  133. " $table_header</th>\n";
  134. END;
  135. " </tr>\n";
  136. " </thead>\n";
  137. " <tfoot>\n";
  138. " <tr>\n";
  139. FOREACH footer IN languages.footer;
  140. IF footer.class;
  141. " <td class=\"$footer.class\"></td>\n";
  142. END;
  143. IF footer.colspan;
  144. " <td colspan=\"$footer.colspan\"></td>\n";
  145. END;
  146. END;
  147. " </tr>\n";
  148. " </tfoot>\n";
  149. " <tbody>\n";
  150. class = "odd";
  151. FOREACH language IN languages.language;
  152. " <tr id=\"$language.id\" class=\"$class\">\n";
  153. IF class == "odd";
  154. class = "even";
  155. ELSE;
  156. class = "odd";
  157. END;
  158. FOREACH cell IN language.cell;
  159. IF cell.name;
  160. " <td>$cell.name</td>\n";
  161. END;
  162. IF cell.lang;
  163. " <td lang=\"$cell.lang\">$cell.native</td>\n";
  164. END;
  165. IF cell.version;
  166. " <td class=\"curVersion\">$smversion</td>\n";
  167. END;
  168. IF cell.locale;
  169. " <td><a href=\"";
  170. INCLUDE download_build platform=cell.platform locale=cell.locale;
  171. "\" class=\"$cell.class\" data-platform=\"$cell.platform\">$cell.content</a></td>\n";
  172. END;
  173. END;
  174. " </tr>\n";
  175. END;
  176. " </tbody>\n";
  177. " </table>\n";
  178. END;
  179. %]
  180. [% BLOCK downloads_fieldset;
  181. # vars that need to be set by caller or document:
  182. # dropdowns: set of dropdowns containing information for the selects
  183. " <fieldset>\n";
  184. FOREACH dropdown IN dropdowns.dropdown;
  185. " <p class=\"$dropdown.class\">\n";
  186. " <label for=\"$dropdown.id\" class=\"select-label\">$dropdown.label</label>\n";
  187. " <select id=\"$dropdown.id\" class=\"select-input\" aria-controls=\"$dropdown.aria\">\n";
  188. FOREACH option IN dropdown.option;
  189. " <option value=\"$option.value\">$option.label</option>\n";
  190. END;
  191. " </select>\n";
  192. " </p>\n";
  193. END;
  194. " </fieldset>\n";
  195. END;
  196. %]
  197. [% BLOCK downloads_langpack;
  198. # vars that need to be set by caller or document:
  199. # languages: set of languages containing information for the langpacks
  200. # smversion: version number (2.0a1, 2.0.1, ...)
  201. "<p>\n";
  202. FOREACH language IN languages.language;
  203. " <a href=\"";
  204. INCLUDE download_file path="langpack/seamonkey-${smversion}.${language.id}.langpack.xpi";
  205. "\">";
  206. FOREACH cell IN language.cell;
  207. IF cell.name;
  208. "$cell.name</a>,\n";
  209. END;
  210. END;
  211. END;
  212. "</p>\n";
  213. END;
  214. %]