distrolst.cpp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. /*
  2. distrolst.cpp from UNetbootin <http://unetbootin.sourceforge.net>
  3. Copyright (C) 2007-2008 Geza Kovacs <geza0kovacs@gmail.com>
  4. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
  5. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License at <http://www.gnu.org/licenses/> for more details.
  6. */
  7. #ifndef debianrelnamereplace
  8. #define debianrelnamereplace \
  9. relname \
  10. .replace("unstable", "sid") \
  11. .replace("testing", "jessie") \
  12. .replace("stable", "wheezy");
  13. #endif
  14. #ifndef ubunturelnamereplace
  15. #define ubunturelnamereplace \
  16. relname \
  17. .replace("14.04", "trusty") \
  18. .replace("13.10", "saucy") \
  19. .replace("13.04", "raring") \
  20. .replace("12.10", "quantal") \
  21. .replace("12.04", "precise") \
  22. .replace("11.10", "oneiric") \
  23. .replace("11.04", "natty") \
  24. .replace("10.10", "maverick") \
  25. .replace("10.04", "lucid") \
  26. .replace("9.10", "karmic") \
  27. .replace("9.04", "jaunty") \
  28. .replace("8.10", "intrepid") \
  29. .replace("8.04", "hardy") \
  30. .replace("7.10", "gutsy") \
  31. .replace("7.04", "feisty") \
  32. .replace("6.10", "edgy") \
  33. .replace("6.06", "dapper");
  34. #endif
  35. /*non-free*//*#ifndef ubuntunetinst
  36. #define ubuntunetinst \
  37. if (ishdmedia) \
  38. { \
  39. ubunturelnamereplace \
  40. downloadfile(QString("http://archive.ubuntu.com/ubuntu/dists/%1/main/installer-%2/current/images/hd-media/vmlinuz").arg(relname, cpuarch), QString("%1ubnkern").arg(targetPath)); \
  41. downloadfile(QString("http://archive.ubuntu.com/ubuntu/dists/%1/main/installer-%2/current/images/hd-media/initrd.gz").arg(relname, cpuarch), QString("%1ubninit").arg(targetPath)); \
  42. postinstmsg = unetbootin::tr("\n*IMPORTANT* Before rebooting, place an Ubuntu alternate (not desktop) install iso file on the root directory of your hard drive or USB drive. These can be obtained from cdimage.ubuntu.com"); \
  43. } \
  44. else if (isnetinstall) \
  45. { \
  46. ubunturelnamereplace \
  47. downloadfile(QString("http://archive.ubuntu.com/ubuntu/dists/%1/main/installer-%2/current/images/netboot/ubuntu-installer/%2/linux").arg(relname, cpuarch), QString("%1ubnkern").arg(targetPath)); \
  48. downloadfile(QString("http://archive.ubuntu.com/ubuntu/dists/%1/main/installer-%2/current/images/netboot/ubuntu-installer/%2/initrd.gz").arg(relname, cpuarch), QString("%1ubninit").arg(targetPath)); \
  49. }
  50. #endif
  51. */
  52. /*non-free
  53. #ifdef AUTOSUPERGRUBDISK
  54. if (nameDistro == "Auto Super Grub Disk")
  55. {
  56. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  57. instIndvfl("asgd.img", QString("%1ubninit").arg(targetPath));
  58. }
  59. if (nameDistro == "Super Grub Disk")
  60. {
  61. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  62. instIndvfl("sgd.img", QString("%1ubninit").arg(targetPath));
  63. }
  64. #endif
  65. */
  66. /*non-free*//*
  67. #ifdef EEEPCLOS
  68. if (nameDistro == "EeePCLinuxOS")
  69. {
  70. downloadfile(QString("http://www.eeepclinuxos.com/eeepclos-%1.iso").arg(relname), isotmpf);
  71. extractiso(isotmpf);
  72. }
  73. #endif
  74. */
  75. /*
  76. #ifdef EEEUBUNTU
  77. if (nameDistro == "Ubuntu Eee")
  78. {
  79. downloadfile(QString("http://lubi.sourceforge.net/ubuntu-eee-%1.iso").arg(relname), isotmpf);
  80. extractiso(isotmpf);
  81. }
  82. #endif
  83. */
  84. /*non-free
  85. #ifdef ELIVE
  86. if (nameDistro == "Elive")
  87. {
  88. if (relname == "unstable")
  89. relname = "development";
  90. downloadfile(fileFilterNetDir(QStringList() <<
  91. "http://elive.icedslash.com/isos/"+relname+"/" <<
  92. "http://elive.leviathan-avc.com/"+relname+"/" <<
  93. "http://elive.jumbef.net/"+relname+"/" <<
  94. "http://elive.homogenica.com/"+relname+"/" <<
  95. "http://elive.evryanz.net/isos/"+relname+"/" <<
  96. "http://elive.7ds.pl/isos/"+relname+"/"
  97. , 524288000, 1048576000, QList<QRegExp>() <<
  98. QRegExp(".iso$", Qt::CaseInsensitive) <<
  99. QRegExp("elive\\S{0,}.iso$", Qt::CaseInsensitive)
  100. ), isotmpf);
  101. extractiso(isotmpf);
  102. }
  103. #endif
  104. */
  105. /*FREEDOM!!!*/
  106. #ifdef GNEWSENSE
  107. if (nameDistro == "gNewSense")
  108. {
  109. downloadfile(QString("http://cdimage.gnewsense.org/gnewsense-livecd-%1.iso").arg(relname), isotmpf);
  110. extractiso(isotmpf);
  111. }
  112. #endif
  113. #ifdef KIWILINUX
  114. ;
  115. /*commented out becuause non-free
  116. if (nameDistro == "Kiwi Linux")
  117. {
  118. downloadfile(QString("http://depo.osn.ro/content/distributii/linux/romanesti/kiwilinux-%1.iso").arg(relname), isotmpf);
  119. extractiso(isotmpf);
  120. }
  121. */
  122. #endif
  123. #ifdef NIMBLEX
  124. ;
  125. /*commented out becuause non-free
  126. if (nameDistro == "NimbleX")
  127. {
  128. downloadfile("http://public.nimblex.net/Download/NimbleX-latest.iso", isotmpf);
  129. extractiso(isotmpf);
  130. }
  131. */
  132. #endif
  133. #ifdef SLITAZ
  134. ;
  135. /*commented out becuause non-free
  136. if (nameDistro == "SliTaz")
  137. {
  138. if (relname == "webboot")
  139. {
  140. instIndvfl("gpxe", QString("%1ubnkern").arg(targetPath));
  141. kernelOpts = "url=http://mirror.slitaz.org/pxe/pxelinux.0";
  142. slinitrdLine = "";
  143. initrdLine = "";
  144. initrdOpts = "";
  145. initrdLoc = "";
  146. // downloadfile("http://mirror.slitaz.org/boot/slitaz-boot.iso", isotmpf);
  147. // extractiso(isotmpf);
  148. }
  149. else
  150. {
  151. downloadfile(fileFilterNetDir(QStringList() <<
  152. QString("http://mirror.slitaz.org/iso/%1/").arg(relname)
  153. , 3072000, 1048576000, QList<QRegExp>() <<
  154. QRegExp("^slitaz", Qt::CaseInsensitive) <<
  155. QRegExp(".iso$", Qt::CaseInsensitive) <<
  156. QRegExp("^slitaz-\\S{1,}.iso$", Qt::CaseInsensitive)
  157. ), isotmpf);
  158. extractiso(isotmpf);
  159. }
  160. }
  161. */
  162. #endif
  163. #ifdef XPUD
  164. ;
  165. /*commented out becuause non-free
  166. if (nameDistro == "xPUD")
  167. {
  168. if (relname == "stable")
  169. {
  170. downloadfile("http://xpud.org/xpud-latest-iso.php", isotmpf);
  171. }
  172. else if (relname == "unstable")
  173. {
  174. downloadfile("http://xpud.org/xpud-latest-snapshot.php", isotmpf);
  175. }
  176. extractiso(isotmpf);
  177. }
  178. */
  179. #endif
  180. #ifdef STDUNETBOOTIN
  181. if (nameDistro == "Trisquel")
  182. {
  183. cpuarch = "i686";
  184. relname = "trisquel";
  185. downloadfile(QString("http://mirror.fsf.org/trisquel-images/%1_7.0_%2.iso").arg(relname, cpuarch), isotmpf);/*always i686 for some reason*/
  186. extractiso(isotmpf);
  187. }
  188. if (nameDistro == "Trisquel_Mini")
  189. {
  190. cpuarch = "i686";
  191. relname = "trisquel-mini";
  192. downloadfile(QString("http://mirror.fsf.org/trisquel-images/%1_7.0_%2.iso").arg(relname, cpuarch), isotmpf);
  193. extractiso(isotmpf);
  194. }
  195. if (nameDistro == "Blag")
  196. {
  197. cpuarch = "i686";
  198. relname = "Blag";
  199. downloadfile(QString("ftp://blag.fsf.org/140000/en/iso/%1-140k-%2.iso").arg(relname, cpuarch), isotmpf);
  200. extractiso(isotmpf);
  201. }
  202. if (nameDistro == "Dragora")
  203. {
  204. cpuarch = "i486";
  205. relname = "dragora";
  206. downloadfile(QString("http://mirror.fsf.org/dragora-images/iso-2.2/%1-2.2-%2.iso").arg(relname, cpuarch), isotmpf);
  207. extractiso(isotmpf);
  208. }
  209. if (nameDistro == "Dynebolic")
  210. {
  211. cpuarch = "i386";
  212. relname = "dynebolic";
  213. downloadfile(QString("http://mirror.fsf.org/dynebolic/dynebolic-3.0.0-beta.iso").arg(relname, cpuarch), isotmpf);
  214. extractiso(isotmpf);
  215. }
  216. if (nameDistro == "Musix")
  217. {
  218. cpuarch = "i386";
  219. relname = "Musix";
  220. downloadfile(QString("http://musix.najval.net/musix/isos/MUSIX_GNU+Linux_3.0.1_Stable.iso").arg(relname, cpuarch), isotmpf);
  221. extractiso(isotmpf);
  222. }
  223. if (nameDistro == "Parabola")
  224. {
  225. cpuarch = "i386";
  226. relname = "Parabola";
  227. /*http://repo.parabola.nu/iso/latest/parabola-2014.10.07-dual.iso currently not working*/
  228. downloadfile(QString("http://alfplayer.com/parabola/iso/latest/parabola-2014.10.07-dual.iso").arg(relname, cpuarch), isotmpf);
  229. extractiso(isotmpf);
  230. }
  231. if (nameDistro == "Ututo")
  232. {
  233. cpuarch = "i386";
  234. relname = "Ututo";
  235. downloadfile(QString("http://e7.ututo.org/isos/XS2012-04/UTUTO-XS-2012-04-Vivo-intel32.iso").arg(relname, cpuarch), isotmpf);
  236. extractiso(isotmpf);
  237. }
  238. /* not included
  239. * if (nameDistro == "Debian")
  240. {
  241. if (isarch64){cpuarch = "amd64";}else{cpuarch = "i386";}if (islivecd){
  242. debianrelnamereplace
  243. downloadfile(QString("http://live.debian.net/cdimage/%1-builds/current/%2/debian-live-%1-%2-gnome-desktop.iso").arg(relname, cpuarch), isotmpf);
  244. extractiso(isotmpf);}else if (ishdmedia){
  245. downloadfile(QString("http://ftp.debian.org/debian/dists/%1/main/installer-%2/current/images/hd-media/vmlinuz").arg(relname, cpuarch), QString("%1ubnkern").arg(targetPath));
  246. downloadfile(QString("http://ftp.debian.org/debian/dists/%1/main/installer-%2/current/images/hd-media/initrd.gz").arg(relname, cpuarch), QString("%1ubninit").arg(targetPath));
  247. postinstmsg = unetbootin::tr("\n*IMPORTANT* Before rebooting, place a Debian install iso file on the root directory of your hard drive or USB drive. These can be obtained from cdimage.debian.org");}else{
  248. downloadfile(QString("http://ftp.debian.org/debian/dists/%1/main/installer-%2/current/images/netboot/debian-installer/%2/linux").arg(relname, cpuarch), QString("%1ubnkern").arg(targetPath));
  249. downloadfile(QString("http://ftp.debian.org/debian/dists/%1/main/installer-%2/current/images/netboot/debian-installer/%2/initrd.gz").arg(relname, cpuarch), QString("%1ubninit").arg(targetPath));}
  250. }
  251. */
  252. /*
  253. * old gnewsense code
  254. * downloadfile(fileFilterNetDir(QStringList() <<
  255. "http://cdimage.gnewsense.org/" <<
  256. "http://heanet.archive.gnewsense.org/gnewsense/cdimage/" <<
  257. "http://mirror.softwarelibre.nl/gnewsense/cdimage/"
  258. , 61440000, 1048576000, QList<QRegExp>() <<
  259. QRegExp("gnewsense\\S{0,}livecd\\S{0,}.iso$", Qt::CaseInsensitive) <<
  260. QRegExp("livecd\\S{0,}.iso$", Qt::CaseInsensitive) <<
  261. QRegExp("gnewsense\\S{0,}.iso$", Qt::CaseInsensitive) <<
  262. QRegExp(".iso$", Qt::CaseInsensitive)
  263. ), isotmpf);
  264. * */
  265. /*LIBRE!*/
  266. if (nameDistro == "gNewSense")
  267. {
  268. cpuarch = "i386";
  269. relname = "gnewsense";
  270. downloadfile(QString("http://cdimage.gnewsense.org/%1-live-3.1-%2-gnome.iso").arg(relname, cpuarch), isotmpf);
  271. extractiso(isotmpf);
  272. }
  273. /*if (nameDistro == "Guix_SD")
  274. {
  275. cpuarch = "i686";
  276. relname = "guixsd"
  277. }
  278. */
  279. /*
  280. * 64-bit versions
  281. * */
  282. if (nameDistro == "Trisquel_64-bit")
  283. {
  284. cpuarch = "amd64";
  285. relname = "trisquel";
  286. downloadfile(QString("http://mirror.fsf.org/trisquel-images/%1_7.0_%2.iso").arg(relname, cpuarch), isotmpf);
  287. extractiso(isotmpf);
  288. }
  289. if (nameDistro == "Trisquel_Mini_64-bit")
  290. {
  291. cpuarch = "amd64";
  292. relname = "trisquel-mini";
  293. downloadfile(QString("http://mirror.fsf.org/trisquel-images/%1_7.0_%2.iso").arg(relname, cpuarch), isotmpf);
  294. extractiso(isotmpf);
  295. }
  296. if (nameDistro == "Blag_64-bit")
  297. {
  298. cpuarch = "x86_64";
  299. relname = "Blag";
  300. downloadfile(QString("ftp://blag.fsf.org/140000/en/iso/%1-140k-%2.iso").arg(relname, cpuarch), isotmpf);
  301. extractiso(isotmpf);
  302. }
  303. if (nameDistro == "Dragora_64-bit")
  304. {
  305. cpuarch = "x86_64";
  306. relname = "dragora";
  307. downloadfile(QString("http://mirror.fsf.org/dragora-images/iso-2.2/%1-2.2-%2.iso").arg(relname, cpuarch), isotmpf);
  308. extractiso(isotmpf);
  309. }
  310. if (nameDistro == "Ututo_64-bit")
  311. {
  312. cpuarch = "x86_64";
  313. relname = "Ututo";
  314. downloadfile(QString("http://e7.ututo.org/isos/XS2012-04/UTUTO-XS-2012-04-Vivo-intel64.iso").arg(relname, cpuarch), isotmpf);
  315. extractiso(isotmpf);
  316. }
  317. /*LIBRE!*/
  318. if (nameDistro == "gNewSense_64-bit")
  319. {
  320. cpuarch = "x86_64";
  321. relname = "GnewSense";
  322. downloadfile(QString("cdimage.gnewsense.org/gnewsense-live-3.1-amd64-gnome.iso").arg(relname, cpuarch), isotmpf);
  323. extractiso(isotmpf);
  324. }
  325. if (nameDistro == "LibertyBSD_64-bit")
  326. {
  327. cpuarch = "x86_64";
  328. relname = "LibertyBSD";
  329. downloadfile(QString("http://delwink.com/pub/LibertyBSD/5.6/amd64/install56.iso").arg(relname, cpuarch), isotmpf);
  330. extractiso(isotmpf);
  331. }
  332. #endif