release.tmpl 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  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.seamonkey-project.org/?product=seamonkey-$smversion&os=$platform&lang=$locale";
  11. ELSE;
  12. ftpdir = "https://archive.seamonkey-project.org/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.seamonkey-project.org/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. INCLUDE direct_download_file;
  99. END;
  100. %]
  101. [% BLOCK downloads_table;
  102. # vars that need to be set by caller or document:
  103. # languages: set of languages containing information for the table
  104. # smversion: version number (2.0a1, 2.0.1, ...)
  105. " <table class=\"downloads\" cellpadding=\"0\" cellspacing=\"0\" summary=\"$languages.summary\">\n";
  106. " <thead>\n";
  107. " <tr>\n";
  108. FOREACH header IN languages.header;
  109. table_header = "<th";
  110. IF header.colspan;
  111. table_header = "$table_header colspan=\"$header.colspan\"";
  112. END;
  113. IF header.class;
  114. table_header = "$table_header class=\"$header.class\">";
  115. ELSE;
  116. table_header = "$table_header>";
  117. END;
  118. IF header.spanclass;
  119. table_header = "$table_header<span class=\"$header.spanclass\">$header.name";
  120. IF header.second;
  121. table_header = "$table_header<br>$header.second</span>";
  122. ELSE;
  123. table_header = "$table_header</span>";
  124. END;
  125. ELSE;
  126. table_header = "$table_header$header.name";
  127. END;
  128. " $table_header</th>\n";
  129. END;
  130. " </tr>\n";
  131. " </thead>\n";
  132. " <tfoot>\n";
  133. " <tr>\n";
  134. FOREACH footer IN languages.footer;
  135. IF footer.class;
  136. " <td class=\"$footer.class\"></td>\n";
  137. END;
  138. IF footer.colspan;
  139. " <td colspan=\"$footer.colspan\"></td>\n";
  140. END;
  141. END;
  142. " </tr>\n";
  143. " </tfoot>\n";
  144. " <tbody>\n";
  145. class = "odd";
  146. FOREACH language IN languages.language;
  147. " <tr id=\"$language.id\" class=\"$class\">\n";
  148. IF class == "odd";
  149. class = "even";
  150. ELSE;
  151. class = "odd";
  152. END;
  153. FOREACH cell IN language.cell;
  154. IF cell.name;
  155. " <td>$cell.name</td>\n";
  156. END;
  157. IF cell.lang;
  158. " <td lang=\"$cell.lang\">$cell.native</td>\n";
  159. END;
  160. IF cell.version;
  161. " <td class=\"curVersion\">$smversion</td>\n";
  162. END;
  163. IF cell.locale;
  164. " <td><a href=\"";
  165. INCLUDE download_build platform=cell.platform locale=cell.locale;
  166. "\" class=\"$cell.class\" data-platform=\"$cell.platform\">$cell.content</a></td>\n";
  167. END;
  168. END;
  169. " </tr>\n";
  170. END;
  171. " </tbody>\n";
  172. " </table>\n";
  173. END;
  174. %]
  175. [% BLOCK downloads_fieldset;
  176. # vars that need to be set by caller or document:
  177. # dropdowns: set of dropdowns containing information for the selects
  178. " <fieldset>\n";
  179. FOREACH dropdown IN dropdowns.dropdown;
  180. " <p class=\"$dropdown.class\">\n";
  181. " <label for=\"$dropdown.id\" class=\"select-label\">$dropdown.label</label>\n";
  182. " <select id=\"$dropdown.id\" class=\"select-input\" aria-controls=\"$dropdown.aria\">\n";
  183. FOREACH option IN dropdown.option;
  184. " <option value=\"$option.value\">$option.label</option>\n";
  185. END;
  186. " </select>\n";
  187. " </p>\n";
  188. END;
  189. " </fieldset>\n";
  190. END;
  191. %]
  192. [% BLOCK downloads_langpack;
  193. # vars that need to be set by caller or document:
  194. # languages: set of languages containing information for the langpacks
  195. # smversion: version number (2.0a1, 2.0.1, ...)
  196. "<p>\n";
  197. FOREACH language IN languages.language;
  198. " <a href=\"";
  199. INCLUDE download_file path="langpack/seamonkey-${smversion}.${language.id}.langpack.xpi";
  200. "\">";
  201. FOREACH cell IN language.cell;
  202. IF cell.name;
  203. "$cell.name</a>,\n";
  204. END;
  205. END;
  206. END;
  207. "</p>\n";
  208. END;
  209. %]