distrolst.cpp~ 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  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. #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. #ifdef AUTOSUPERGRUBDISK
  52. if (nameDistro == "Auto Super Grub Disk")
  53. {
  54. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  55. instIndvfl("asgd.img", QString("%1ubninit").arg(targetPath));
  56. }
  57. if (nameDistro == "Super Grub Disk")
  58. {
  59. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  60. instIndvfl("sgd.img", QString("%1ubninit").arg(targetPath));
  61. }
  62. #endif
  63. #ifdef EEEPCLOS
  64. if (nameDistro == "EeePCLinuxOS")
  65. {
  66. downloadfile(QString("http://www.eeepclinuxos.com/eeepclos-%1.iso").arg(relname), isotmpf);
  67. extractiso(isotmpf);
  68. }
  69. #endif
  70. #ifdef EEEUBUNTU
  71. if (nameDistro == "Ubuntu Eee")
  72. {
  73. downloadfile(QString("http://lubi.sourceforge.net/ubuntu-eee-%1.iso").arg(relname), isotmpf);
  74. extractiso(isotmpf);
  75. }
  76. #endif
  77. #ifdef ELIVE
  78. if (nameDistro == "Elive")
  79. {
  80. if (relname == "unstable")
  81. relname = "development";
  82. downloadfile(fileFilterNetDir(QStringList() <<
  83. "http://elive.icedslash.com/isos/"+relname+"/" <<
  84. "http://elive.leviathan-avc.com/"+relname+"/" <<
  85. "http://elive.jumbef.net/"+relname+"/" <<
  86. "http://elive.homogenica.com/"+relname+"/" <<
  87. "http://elive.evryanz.net/isos/"+relname+"/" <<
  88. "http://elive.7ds.pl/isos/"+relname+"/"
  89. , 524288000, 1048576000, QList<QRegExp>() <<
  90. QRegExp(".iso$", Qt::CaseInsensitive) <<
  91. QRegExp("elive\\S{0,}.iso$", Qt::CaseInsensitive)
  92. ), isotmpf);
  93. extractiso(isotmpf);
  94. }
  95. #endif
  96. #ifdef GNEWSENSE
  97. if (nameDistro == "gNewSense")
  98. {
  99. downloadfile(QString("http://cdimage.gnewsense.org/gnewsense-livecd-%1.iso").arg(relname), isotmpf);
  100. extractiso(isotmpf);
  101. }
  102. #endif
  103. #ifdef KIWILINUX
  104. ;
  105. /*commented out becuause non-free
  106. if (nameDistro == "Kiwi Linux")
  107. {
  108. downloadfile(QString("http://depo.osn.ro/content/distributii/linux/romanesti/kiwilinux-%1.iso").arg(relname), isotmpf);
  109. extractiso(isotmpf);
  110. }
  111. */
  112. #endif
  113. #ifdef NIMBLEX
  114. ;
  115. /*commented out becuause non-free
  116. if (nameDistro == "NimbleX")
  117. {
  118. downloadfile("http://public.nimblex.net/Download/NimbleX-latest.iso", isotmpf);
  119. extractiso(isotmpf);
  120. }
  121. */
  122. #endif
  123. #ifdef SLITAZ
  124. ;
  125. /*commented out becuause non-free
  126. if (nameDistro == "SliTaz")
  127. {
  128. if (relname == "webboot")
  129. {
  130. instIndvfl("gpxe", QString("%1ubnkern").arg(targetPath));
  131. kernelOpts = "url=http://mirror.slitaz.org/pxe/pxelinux.0";
  132. slinitrdLine = "";
  133. initrdLine = "";
  134. initrdOpts = "";
  135. initrdLoc = "";
  136. // downloadfile("http://mirror.slitaz.org/boot/slitaz-boot.iso", isotmpf);
  137. // extractiso(isotmpf);
  138. }
  139. else
  140. {
  141. downloadfile(fileFilterNetDir(QStringList() <<
  142. QString("http://mirror.slitaz.org/iso/%1/").arg(relname)
  143. , 3072000, 1048576000, QList<QRegExp>() <<
  144. QRegExp("^slitaz", Qt::CaseInsensitive) <<
  145. QRegExp(".iso$", Qt::CaseInsensitive) <<
  146. QRegExp("^slitaz-\\S{1,}.iso$", Qt::CaseInsensitive)
  147. ), isotmpf);
  148. extractiso(isotmpf);
  149. }
  150. }
  151. */
  152. #endif
  153. #ifdef XPUD
  154. ;
  155. /*commented out becuause non-free
  156. if (nameDistro == "xPUD")
  157. {
  158. if (relname == "stable")
  159. {
  160. downloadfile("http://xpud.org/xpud-latest-iso.php", isotmpf);
  161. }
  162. else if (relname == "unstable")
  163. {
  164. downloadfile("http://xpud.org/xpud-latest-snapshot.php", isotmpf);
  165. }
  166. extractiso(isotmpf);
  167. }
  168. */
  169. #endif
  170. #ifdef STDUNETBOOTIN
  171. ;
  172. /*commented out becuause non-free
  173. if (nameDistro == "Arch Linux")
  174. {
  175. if (isarch64)
  176. {
  177. cpuarch = "x86_64";
  178. }
  179. else
  180. {
  181. cpuarch = "i686";
  182. }
  183. downloadfile(fileFilterNetDir(QStringList() <<
  184. "http://mirrors.kernel.org/archlinux/iso/latest/" <<
  185. "http://distro.ibiblio.org/archlinux/iso/latest/" <<
  186. "http://mirror.rit.edu/archlinux/iso/latest/"
  187. , 3072000, 2048576000, QList<QRegExp>() <<
  188. QRegExp("^arch", Qt::CaseInsensitive) <<
  189. QRegExp("^archlinux", Qt::CaseInsensitive) <<
  190. QRegExp(".iso$", Qt::CaseInsensitive) <<
  191. QRegExp(cpuarch, Qt::CaseInsensitive) <<
  192. QRegExp(relname, Qt::CaseInsensitive)
  193. ), isotmpf);
  194. extractiso(isotmpf);
  195. }
  196. */
  197. /*non-free*/
  198. /*if (nameDistro == "BackTrack")
  199. {
  200. if (isarch64)
  201. {
  202. cpuarch = "64";
  203. }
  204. else
  205. {
  206. cpuarch = "32";
  207. }
  208. downloadfile(QString("http://www.backtrack-linux.org/ajax/download_redirect.php?id=BT%1-%2.iso").arg(nameVersion).arg(cpuarch), isotmpf);
  209. extractiso(isotmpf);
  210. }
  211. */
  212. ;
  213. /*commented out becuause non-free*/
  214. /*if (nameDistro == "CentOS")
  215. {
  216. if (isarch64)
  217. {
  218. cpuarch = "x86_64";
  219. }
  220. else
  221. {
  222. cpuarch = "i386";
  223. }
  224. if (islivecd)
  225. {
  226. downloadfile(fileFilterNetDir(QStringList() <<
  227. QString("http://mirrors.kernel.org/centos/%1/isos/%2/").arg(relname, cpuarch) <<
  228. QString("http://mirror.stanford.edu/yum/pub/centos/%1/isos/%2/").arg(relname, cpuarch) <<
  229. QString("http://ftp.osuosl.org/pub/centos/%1/isos/%2/").arg(relname, cpuarch) <<
  230. QString("http://mirrors.usc.edu/pub/linux/distributions/centos/%1/isos/%2/").arg(relname, cpuarch)
  231. , 524288000, 1048576000, QList<QRegExp>() <<
  232. QRegExp(".iso$", Qt::CaseInsensitive) <<
  233. QRegExp("LiveCD\\S{0,}.iso$", Qt::CaseInsensitive)
  234. ), isotmpf);
  235. extractiso(isotmpf);
  236. }
  237. else
  238. {
  239. downloadfile(QString("http://isoredirect.centos.org/centos/%1/os/%2/images/pxeboot/vmlinuz").arg(relname, cpuarch), QString("%1ubnkern").arg(targetPath));
  240. downloadfile(QString("http://isoredirect.centos.org/centos/%1/os/%2/images/pxeboot/initrd.img").arg(relname, cpuarch), QString("%1ubninit").arg(targetPath));
  241. postinstmsg = unetbootin::tr("\n*IMPORTANT* After rebooting, ignore any error messages and select back if prompted for a CD, then go to the main menu, select the 'Start Installation' option, choose 'Network' as the source, choose 'HTTP' as the protocol, enter 'mirrors.kernel.org' when prompted for a server, and enter '/centos/%1/os/%2' when asked for the folder.").arg(nameVersion, cpuarch);
  242. kernelOpts = "splash=silent showopts";
  243. }
  244. }
  245. */
  246. /*non-free*/
  247. /*
  248. if (nameDistro == "CloneZilla")
  249. {
  250. downloadfile(QString("http://downloads.sourceforge.net/clonezilla/clonezilla-live-%1.iso").arg(relname), isotmpf);
  251. extractiso(isotmpf);
  252. }
  253. */
  254. /*non-free
  255. if (nameDistro == "Damn Small Linux")
  256. {
  257. downloadfile(fileFilterNetDir(QStringList() <<
  258. "ftp://ibiblio.org/pub/Linux/distributions/damnsmall/current/" <<
  259. "http://ibiblio.org/pub/Linux/distributions/damnsmall/current/" <<
  260. "ftp://gd.tuwien.ac.at/opsys/linux/damnsmall/current/" <<
  261. "http://gd.tuwien.ac.at/opsys/linux/damnsmall/current/" <<
  262. "ftp://ftp.is.co.za/linux/distributions/damnsmall/current/" <<
  263. // "ftp://ftp.belnet.be/packages/damnsmalllinux/current/" <<
  264. "http://ftp.belnet.be/packages/damnsmalllinux/current/" <<
  265. "ftp://ftp.heanet.ie/mirrors/damnsmalllinux.org/current/" <<
  266. "http://ftp.heanet.ie/mirrors/damnsmalllinux.org/current/"
  267. // "ftp://ftp.oss.cc.gatech.edu/pub/linux/distributions/damnsmall/current/" <<
  268. // "http://ftp.oss.cc.gatech.edu/pub/linux/distributions/damnsmall/current/" <<
  269. // "ftp://ftp.planetmirror.com/pub/damnsmall/current/" <<
  270. // "http://planetmirror.com/pub/damnsmall/current/" <<
  271. , 3072000, 1048576000, QList<QRegExp>() <<
  272. QRegExp("^dsl", Qt::CaseInsensitive) <<
  273. QRegExp(".iso$", Qt::CaseInsensitive) <<
  274. QRegExp("initrd", Qt::CaseInsensitive) <<
  275. QRegExp("initrd.iso$", Qt::CaseInsensitive) <<
  276. QRegExp("^dsl-\\S{1,}-initrd.iso$", Qt::CaseInsensitive)
  277. ), isotmpf);
  278. extractiso(isotmpf);
  279. }
  280. */
  281. if (nameDistro == "Debian")/*debatible if non-free i will come back to this*/
  282. {
  283. if (isarch64)
  284. {
  285. cpuarch = "amd64";
  286. }
  287. else
  288. {
  289. cpuarch = "i386";
  290. }
  291. if (islivecd)
  292. {
  293. debianrelnamereplace
  294. downloadfile(QString("http://live.debian.net/cdimage/%1-builds/current/%2/debian-live-%1-%2-gnome-desktop.iso").arg(relname, cpuarch), isotmpf);
  295. extractiso(isotmpf);
  296. }
  297. else if (ishdmedia)
  298. {
  299. downloadfile(QString("http://ftp.debian.org/debian/dists/%1/main/installer-%2/current/images/hd-media/vmlinuz").arg(relname, cpuarch), QString("%1ubnkern").arg(targetPath));
  300. 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));
  301. 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");
  302. }
  303. else
  304. {
  305. 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));
  306. 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));
  307. }
  308. }
  309. if (nameDistro == "Dreamlinux")
  310. {
  311. downloadfile(fileFilterNetDir(QStringList() <<
  312. "ftp://ftp.nluug.nl/pub/os/Linux/distr/dreamlinux/stable/" <<
  313. "http://ftp.nluug.nl/pub/os/Linux/distr/dreamlinux/stable/" <<
  314. "ftp://ftp.surfnet.nl/pub/os/Linux/distr/dreamlinux/stable/" <<
  315. "http://ftp.surfnet.nl/pub/os/Linux/distr/dreamlinux/stable/"
  316. , 524288000, 1048576000, QList<QRegExp>() <<
  317. QRegExp(".iso$", Qt::CaseInsensitive) <<
  318. QRegExp("DL\\S{0,}.iso$", Qt::CaseInsensitive)
  319. ), isotmpf);
  320. extractiso(isotmpf);
  321. }
  322. if (nameDistro == "Dr.Web AntiVirus")
  323. {
  324. this->searchsymlinks = true;
  325. downloadfile(fileFilterNetDir(QStringList() <<
  326. "ftp://ftp.drweb.com/pub/drweb/livecd/"
  327. , 9288000, 1048576000, QList<QRegExp>() <<
  328. QRegExp(".iso$", Qt::CaseInsensitive) <<
  329. QRegExp("DrWeb\\S{0,}.iso$", Qt::CaseInsensitive)
  330. ), isotmpf);
  331. extractiso(isotmpf);
  332. }
  333. if (nameDistro == "Elive")
  334. {
  335. if (relname == "unstable")
  336. relname = "development";
  337. downloadfile(fileFilterNetDir(QStringList() <<
  338. "http://elive.icedslash.com/isos/"+relname+"/" <<
  339. "http://elive.leviathan-avc.com/"+relname+"/" <<
  340. "http://elive.jumbef.net/"+relname+"/" <<
  341. "http://elive.homogenica.com/"+relname+"/" <<
  342. "http://elive.evryanz.net/isos/"+relname+"/" <<
  343. "http://elive.7ds.pl/isos/"+relname+"/"
  344. , 524288000, 1048576000, QList<QRegExp>() <<
  345. QRegExp(".iso$", Qt::CaseInsensitive) <<
  346. QRegExp("elive\\S{0,}.iso$", Qt::CaseInsensitive)
  347. ), isotmpf);
  348. extractiso(isotmpf);
  349. }
  350. if (nameDistro == "Fedora")
  351. {
  352. QString minorarch = "";
  353. if (isarch64)
  354. {
  355. cpuarch = "x86_64";
  356. minorarch = "x86_64";
  357. }
  358. else
  359. {
  360. cpuarch = "i386";
  361. minorarch = "i686";
  362. }
  363. if (islivecd)
  364. {
  365. downloadfile(QString("http://download.fedoraproject.org/pub/fedora/linux/releases/%1/Live/%2/Fedora-Live-Desktop-%3-%1-1.iso").arg(relname).arg(cpuarch).arg(minorarch), isotmpf);
  366. extractiso(isotmpf);
  367. }
  368. else
  369. {
  370. if (relname == "rawhide")
  371. {
  372. downloadfile(QString("download.fedoraproject.org/pub/fedora/linux/development/%1/os/images/pxeboot/vmlinuz").arg(cpuarch), QString("%1ubnkern").arg(targetPath));
  373. downloadfile(QString("download.fedoraproject.org/pub/fedora/linux/development/%1/os/images/pxeboot/initrd.img").arg(cpuarch), QString("%1ubninit").arg(targetPath));
  374. postinstmsg = unetbootin::tr("\n*IMPORTANT* After rebooting, ignore any error messages and select back if prompted for a CD, then go to the main menu, select the 'Start Installation' option, choose 'Network' as the source, choose 'HTTP' as the protocol, enter 'download.fedora.redhat.com' when prompted for a server, and enter '/pub/fedora/linux/development/%1/os' when asked for the folder.").arg(cpuarch);
  375. }
  376. else
  377. {
  378. downloadfile(QString("http://download.fedoraproject.org/pub/fedora/linux/releases/%1/Fedora/%2/os/images/pxeboot/vmlinuz").arg(relname, cpuarch), QString("%1ubnkern").arg(targetPath));
  379. downloadfile(QString("http://download.fedoraproject.org/pub/fedora/linux/releases/%1/Fedora/%2/os/images/pxeboot/initrd.img").arg(relname, cpuarch), QString("%1ubninit").arg(targetPath));
  380. postinstmsg = unetbootin::tr("\n*IMPORTANT* After rebooting, ignore any error messages and select back if prompted for a CD, then go to the main menu, select the 'Start Installation' option, choose 'Network' as the source, choose 'HTTP' as the protocol, enter 'download.fedora.redhat.com' when prompted for a server, and enter '/pub/fedora/linux/releases/%1/Fedora/%2/os' when asked for the folder.").arg(relname, cpuarch);
  381. }
  382. kernelOpts = "splash=silent showopts";
  383. }
  384. }
  385. if (nameDistro == "FreeBSD")
  386. {
  387. if (isarch64)
  388. {
  389. cpuarch = "-x64";
  390. }
  391. else
  392. {
  393. cpuarch = "";
  394. }
  395. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  396. downloadfile(QString("http://downloads.sourceforge.net/sourceforge/lubi/freebsd-%1%2.img.gz").arg(relname, cpuarch), QString("%1ubninit").arg(targetPath));
  397. }
  398. if (nameDistro == "FreeDOS")
  399. {
  400. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  401. downloadfile(QString("http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/%1/fdboot.img").arg(relname), QString("%1ubninit").arg(targetPath));
  402. }
  403. if (nameDistro == "FreeNAS")
  404. {
  405. if (isarch64)
  406. {
  407. cpuarch = "amd64";
  408. }
  409. else
  410. {
  411. cpuarch = "i386";
  412. }
  413. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  414. if (islivecd)
  415. {
  416. downloadfile(QString("http://downloads.sourceforge.net/sourceforge/lubi/FreeNAS-%1-LiveCD-%2.img.gz").arg(cpuarch, relname), QString("%1ubninit").arg(targetPath));
  417. }
  418. else
  419. {
  420. downloadfile(QString("http://sourceforge.net/projects/freenas/files/stable/0.7/FreeNAS-%1-embedded-%2.img/download").arg(cpuarch, relname), QString("%1ubninit").arg(targetPath));
  421. }
  422. }
  423. if (nameDistro == "Frugalware")
  424. {
  425. if (isarch64)
  426. {
  427. cpuarch = "x86_64";
  428. }
  429. else
  430. {
  431. cpuarch = "i686";
  432. }
  433. QStringList frugalwaremirrorsL = QStringList() <<
  434. // "ftp://ftp5.frugalware.org/packages/frugalware/pub/frugalware-"+relname+"/boot/" <<
  435. // "http://www5.frugalware.org/packages/frugalware/pub/frugalware-"+relname+"/boot/" <<
  436. "ftp://ftp8.frugalware.org/distro/frugalware/frugalware-"+relname+"/boot/" <<
  437. "http://www8.frugalware.org/distro/frugalware/frugalware-"+relname+"/boot/" <<
  438. "ftp://ftp10.frugalware.org/pub/linux/frugalware/frugalware-"+relname+"/boot/" <<
  439. "http://www10.frugalware.org/pub/linux/frugalware/frugalware-"+relname+"/boot/" <<
  440. "ftp://ftp12.frugalware.org/mirrors/ftp.frugalware.org/pub/frugalware/frugalware-"+relname+"/boot/" <<
  441. "http://www12.frugalware.org/mirrors/ftp.frugalware.org/pub/frugalware/frugalware-"+relname+"/boot/" <<
  442. "ftp://ftp4.frugalware.org/pub/linux/distributions/frugalware/frugalware-"+relname+"/boot/" <<
  443. "http://www4.frugalware.org/pub/linux/distributions/frugalware/frugalware-"+relname+"/boot/" <<
  444. "ftp://ftp2.frugalware.org/frugalware/pub/frugalware/frugalware-"+relname+"/boot/" <<
  445. "ftp://ftp3.frugalware.org/mirrors/frugalware/pub/frugalware/frugalware-"+relname+"/boot/";
  446. downloadfile(fileFilterNetDir(frugalwaremirrorsL
  447. , 307200, 104857600, QList<QRegExp>() <<
  448. QRegExp("vmlinuz", Qt::CaseInsensitive) <<
  449. QRegExp("^vmlinuz-", Qt::CaseInsensitive) <<
  450. QRegExp(cpuarch, Qt::CaseInsensitive) <<
  451. QRegExp("-"+cpuarch+"$", Qt::CaseInsensitive) <<
  452. QRegExp("^vmlinuz-\\S{1,}-"+cpuarch+"$", Qt::CaseInsensitive)
  453. ), QString("%1ubnkern").arg(targetPath));
  454. downloadfile(fileFilterNetDir(frugalwaremirrorsL
  455. , 3145728, 1048576000, QList<QRegExp>() <<
  456. QRegExp("initrd", Qt::CaseInsensitive) <<
  457. QRegExp("^initrd-", Qt::CaseInsensitive) <<
  458. QRegExp(cpuarch, Qt::CaseInsensitive) <<
  459. QRegExp("-"+cpuarch+".img", Qt::CaseInsensitive) <<
  460. QRegExp("-"+cpuarch+".img.gz$", Qt::CaseInsensitive) <<
  461. QRegExp("^initrd-\\S{0,}"+cpuarch+".img.gz$", Qt::CaseInsensitive)
  462. ), QString("%1ubninit").arg(targetPath));
  463. kernelOpts = "load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=100000 rw root=/dev/ram quiet vga=791";
  464. }
  465. if (nameDistro == "F-Secure Rescue CD")
  466. {
  467. downloadfile("http://unetbootin.sourceforge.net/f-secure-rescue-cd.zip", isotmpf);
  468. extractiso(isotmpf);
  469. }
  470. if (nameDistro == "GAG")
  471. {
  472. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  473. downloadfile(QString("http://downloads.sourceforge.net/sourceforge/lubi/gag-%1.img.gz").arg(relname), QString("%1ubninit").arg(targetPath));
  474. }
  475. if (nameDistro == "GeeXboX")
  476. {
  477. downloadfile(QString("http://www.geexbox.org/wp-content/plugins/download-monitor/download.php?id=geexbox-%1.iso").arg(relname), isotmpf);
  478. extractiso(isotmpf);
  479. }
  480. if (nameDistro == "Gentoo")
  481. {
  482. if (isarch64)
  483. {
  484. cpuarch = "amd64";
  485. }
  486. else
  487. {
  488. cpuarch = "x86";
  489. }
  490. downloadfile(QString("http://bouncer.gentoo.org/fetch/gentoo-%1-livecd/%2/").arg(relname, cpuarch), isotmpf);
  491. extractiso(isotmpf);
  492. }
  493. if (nameDistro == "gNewSense")
  494. {
  495. downloadfile(fileFilterNetDir(QStringList() <<
  496. "http://cdimage.gnewsense.org/" <<
  497. "http://heanet.archive.gnewsense.org/gnewsense/cdimage/" <<
  498. "http://mirror.softwarelibre.nl/gnewsense/cdimage/"
  499. , 61440000, 1048576000, QList<QRegExp>() <<
  500. QRegExp("gnewsense\\S{0,}livecd\\S{0,}.iso$", Qt::CaseInsensitive) <<
  501. QRegExp("livecd\\S{0,}.iso$", Qt::CaseInsensitive) <<
  502. QRegExp("gnewsense\\S{0,}.iso$", Qt::CaseInsensitive) <<
  503. QRegExp(".iso$", Qt::CaseInsensitive)
  504. ), isotmpf);
  505. extractiso(isotmpf);
  506. }
  507. if (nameDistro == "Kaspersky Rescue Disk")
  508. {
  509. if (relname == "8")
  510. {
  511. downloadfile(fileFilterNetDir(QStringList() <<
  512. "http://devbuilds.kaspersky-labs.com/devbuilds/RescueDisk/" <<
  513. "http://ftp.kaspersky.com/devbuilds/RescueDisk/" <<
  514. "ftp://ftp.kaspersky.com/devbuilds/RescueDisk/"
  515. , 9288000, 1048576000, QList<QRegExp>() <<
  516. QRegExp(".iso$", Qt::CaseInsensitive) <<
  517. QRegExp("k\\S{0,}.iso$", Qt::CaseInsensitive)
  518. ), isotmpf);
  519. }
  520. else
  521. {
  522. downloadfile(fileFilterNetDir(QStringList() <<
  523. "http://devbuilds.kaspersky-labs.com/devbuilds/RescueDisk10/" <<
  524. "http://ftp.kaspersky.com/devbuilds/RescueDisk10/" <<
  525. "ftp://ftp.kaspersky.com/devbuilds/RescueDisk10/"
  526. , 9288000, 1048576000, QList<QRegExp>() <<
  527. QRegExp(".iso$", Qt::CaseInsensitive) <<
  528. QRegExp("k\\S{0,}.iso$", Qt::CaseInsensitive)
  529. ), isotmpf);
  530. }
  531. extractiso(isotmpf);
  532. }
  533. if (nameDistro == "Gujin")
  534. {
  535. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  536. downloadfile(QString("http://downloads.sourceforge.net/sourceforge/lubi/gujin-%1.img.gz").arg(relname), QString("%1ubninit").arg(targetPath), 81920);
  537. }
  538. if (nameDistro == "LinuxConsole")
  539. {
  540. downloadfile(QString("http://jukebox.linuxconsole.org/official/linuxconsole%1.iso").arg(QString(relname)), isotmpf);
  541. extractiso(isotmpf);
  542. }
  543. if (nameDistro == "Linux Mint")
  544. {
  545. if (isarch64)
  546. {
  547. cpuarch = "64";
  548. }
  549. else
  550. {
  551. cpuarch = "32";
  552. }
  553. QList<QRegExp> mintregex = QList<QRegExp>() <<
  554. QRegExp(".iso$", Qt::CaseInsensitive) <<
  555. QRegExp("linuxmint", Qt::CaseInsensitive) <<
  556. QRegExp(cpuarch, Qt::CaseInsensitive) <<
  557. QRegExp("^((?!nocodecs).)*$", Qt::CaseInsensitive) <<
  558. QRegExp("cinnamon", Qt::CaseInsensitive);
  559. downloadfile(fileFilterNetDir(QStringList() <<
  560. QString("http://ftp.heanet.ie/pub/linuxmint.com/stable/%1/").arg(relname) <<
  561. QString("http://mira.sunsite.utk.edu/linuxmint/stable/%1/").arg(relname) <<
  562. QString("http://mirror.yellowfiber.net/linuxmint/stable/%1/").arg(relname) <<
  563. QString("http://mirror.optus.net/linuxmint/isos/stable/%1/").arg(relname) <<
  564. QString("http://mint.ez.by/linuxmint.com/stable/%1/").arg(relname) <<
  565. QString("http://linuxmint.secsup.org/stable/%1/").arg(relname) <<
  566. QString("http://ftp.jaist.ac.jp/pub/Linux/LinuxMint-ISO/stable/%1/").arg(relname) <<
  567. QString("http://ftp.riken.jp/pub/Linux/linuxmint/stable/%1/").arg(relname) <<
  568. QString("http://ftp.oss.tw/pub/Mint/LinuxMint-ISO/stable/%1/").arg(relname) <<
  569. QString("http://gd.tuwien.ac.at/linux/mint/isos/stable/%1/").arg(relname) <<
  570. QString("http://ftp.mgts.by/pub/linuxmint/isos/stable/%1/").arg(relname) <<
  571. QString("http://mirrors.cytanet.com.cy/linux/mint/stable/%1/").arg(relname) <<
  572. QString("http://ftp.klid.dk/ftp/linuxmint/stable/%1/").arg(relname) <<
  573. QString("http://ftp5.gwdg.de/pub/linux/debian/mint/stable/%1/").arg(relname) <<
  574. QString("http://mirror.netcologne.de/mint/stable/%1/").arg(relname) <<
  575. QString("http://ftp.cc.uoc.gr/mirrors/linux/linuxmint/stable/%1/").arg(relname) <<
  576. QString("http://ftp.heanet.ie/pub/linuxmint.com/stable/%1/").arg(relname) <<
  577. QString("http://ftp.akl.lt/Linux/Mint/stable/%1/").arg(relname) <<
  578. QString("http://cesium.di.uminho.pt/pub/linuxmint/stable/%1/").arg(relname) <<
  579. QString("http://ftp.df.lth.se/pub/linuxmint/stable/%1/").arg(relname) <<
  580. QString("http://mirror.switch.ch/ftp/mirror/linuxmint/stable/%1/").arg(relname) <<
  581. QString("http://mirror.sov.uk.goscomb.net/linuxmint.com/stable/%1/").arg(relname) <<
  582. QString("http://mirror.csclub.uwaterloo.ca/linuxmint/stable/%1/").arg(relname) <<
  583. QString("http://mirror.aarnet.edu.au/pub/linuxmint/stable/%1/").arg(relname) <<
  584. QString("http://mirror.waia.asn.au/pub/linux/linuxmint/linuxmint-isos/linuxmint.com/stable/%1/").arg(relname) <<
  585. QString("ftp://mirrors.secution.com/linuxmint.com/stable/%1/").arg(relname) <<
  586. QString("ftp://ftp.is.co.za/mirror/linuxmint.com/stable/%1/").arg(relname) <<
  587. QString("ftp://ftp.tpnet.pl/pub/linux/linuxmint/isos/stable/%1/").arg(relname) <<
  588. QString("ftp://mirror.unej.ac.id/pub/iso/linux-mint/stable/%1/").arg(relname)
  589. , 61440000, 1048576000, mintregex), isotmpf);
  590. extractiso(isotmpf);
  591. }
  592. if (nameDistro == "Mandriva")
  593. {
  594. if (isarch64)
  595. {
  596. cpuarch = "x86_64";
  597. }
  598. else
  599. {
  600. cpuarch = "i586";
  601. }
  602. if (islivecd)
  603. {
  604. if (relname == "2008.0")
  605. {
  606. downloadfile(QString("ftp://ftp.free.fr/mirrors/ftp.mandriva.com/MandrivaLinux/official/iso/%1/mandriva-linux-%3-one-GNOME-cdrom-%2.iso").arg(relname, cpuarch, QString(relname).remove(QRegExp("\\.\\d{0,}$"))), isotmpf);
  607. }
  608. else if (relname == "2008.1")
  609. {
  610. downloadfile(QString("ftp://ftp.free.fr/mirrors/ftp.mandriva.com/MandrivaLinux/official/iso/%1/mandriva-linux-one-%3-spring-GNOME-int-cdrom-%2.iso").arg(relname, cpuarch, QString(relname).remove(QRegExp("\\.\\d{0,}$"))), isotmpf);
  611. }
  612. extractiso(isotmpf);
  613. }
  614. else
  615. {
  616. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  617. downloadfile(QString("ftp://ftp.free.fr/mirrors/ftp.mandriva.com/MandrivaLinux/official/%1/%2/install/images/all.img").arg(relname, cpuarch), QString("%1ubninit").arg(targetPath));
  618. }
  619. }
  620. if (nameDistro == "MEPIS")
  621. {
  622. if (isarch64)
  623. {
  624. cpuarch = "64";
  625. }
  626. else
  627. {
  628. cpuarch = "32";
  629. }
  630. if (relname == "antix")
  631. {
  632. downloadfile(fileFilterNetDir(QStringList() <<
  633. "ftp://ftp.ibiblio.org/pub/linux/distributions/mepis/released/antix/" <<
  634. "http://distro.ibiblio.org/pub/linux/distributions/mepis/released/antix/" <<
  635. "ftp://ftp-linux.cc.gatech.edu/pub/linux/distributions/mepis/released/antix/" <<
  636. "http://ftp.uwsg.indiana.edu/linux/mepis/released/antix/" <<
  637. "ftp://ftp.ussg.iu.edu/pub/linux/mepis/released/antix/" <<
  638. "http://mirror.cs.vt.edu/pub/MEPIS/antix/"
  639. , 61440000, 1048576000, QList<QRegExp>() <<
  640. QRegExp("antiX\\S{0,}.iso$", Qt::CaseInsensitive) <<
  641. QRegExp(".iso$", Qt::CaseInsensitive)
  642. ), isotmpf);
  643. }
  644. else
  645. {
  646. downloadfile(fileFilterNetDir(QStringList() <<
  647. "ftp://ftp.ibiblio.org/pub/linux/distributions/mepis/released/" <<
  648. "http://distro.ibiblio.org/pub/linux/distributions/mepis/released/" <<
  649. "ftp://ftp-linux.cc.gatech.edu/pub/linux/distributions/mepis/released/" <<
  650. "http://ftp.uwsg.indiana.edu/linux/mepis/released/" <<
  651. "ftp://ftp.ussg.iu.edu/pub/linux/mepis/released/" <<
  652. "http://mirror.cs.vt.edu/pub/MEPIS/"
  653. , 61440000, 1048576000, QList<QRegExp>() <<
  654. QRegExp("MEPIS\\S{0,}.iso$", Qt::CaseInsensitive) <<
  655. QRegExp(".iso$", Qt::CaseInsensitive) <<
  656. QRegExp("\\S{0,}"+cpuarch+".iso$", Qt::CaseInsensitive)
  657. ), isotmpf);
  658. }
  659. extractiso(isotmpf);
  660. }
  661. if (nameDistro == "NetbootCD")
  662. {
  663. downloadfile("http://download.tuxfamily.org/netbootcd/NetbootCD-current.iso", isotmpf);
  664. extractiso(isotmpf);
  665. }
  666. if (nameDistro == "NetBSD")
  667. {
  668. if (isarch64)
  669. {
  670. cpuarch = "amd64";
  671. }
  672. else
  673. {
  674. cpuarch = "i386";
  675. }
  676. downloadfile(QString("http://ftp.netbsd.org/pub/NetBSD/NetBSD-%1/%2/binary/kernel/netbsd-INSTALL.gz").arg(relname, cpuarch), QString("%1ubnkern").arg(targetPath));
  677. kernelParam = "--type=netbsd";
  678. slinitrdLine = "";
  679. initrdLine = "";
  680. initrdOpts = "";
  681. initrdLoc = "";
  682. }
  683. if (nameDistro == "NimbleX")
  684. {
  685. downloadfile("http://public.nimblex.net/Download/NimbleX-latest.iso", isotmpf);
  686. extractiso(isotmpf);
  687. }
  688. if (nameDistro == "NTPasswd")
  689. {
  690. downloadfile(QString("http://downloads.sourceforge.net/sourceforge/lubi/ntpasswd-%1-kernel").arg(relname), QString("%1ubnkern").arg(targetPath));
  691. downloadfile(QString("http://downloads.sourceforge.net/sourceforge/lubi/ntpasswd-%1-initrd.gz").arg(relname), QString("%1ubninit").arg(targetPath));
  692. kernelOpts = "rw vga=1 init=/linuxrc";
  693. }
  694. if (nameDistro == "openSUSE")
  695. {
  696. if (isarch64)
  697. {
  698. cpuarch = "x86_64";
  699. }
  700. else
  701. {
  702. cpuarch = "i386";
  703. }
  704. if (islivecd)
  705. {
  706. downloadfile(QString("http://download.opensuse.org/distribution/%1/iso/cd/openSUSE-%1-GM-GNOME-Live-%2.iso").arg(relname, cpuarch), isotmpf);
  707. extractiso(isotmpf);
  708. }
  709. else
  710. {
  711. if (relname == "factory")
  712. {
  713. downloadfile(QString("http://download.opensuse.org/factory/repo/oss/boot/%1/loader/linux").arg(cpuarch), QString("%1ubnkern").arg(targetPath));
  714. downloadfile(QString("http://download.opensuse.org/factory/repo/oss/boot/%1/loader/initrd").arg(cpuarch), QString("%1ubninit").arg(targetPath));
  715. postinstmsg = unetbootin::tr("\n*IMPORTANT* After rebooting, ignore any error messages and select back if prompted for a CD, then go to the main menu, select the 'Start Installation' option, choose 'Network' as the source, choose 'HTTP' as the protocol, enter 'download.opensuse.org' when prompted for a server, and enter '/factory/repo/oss' when asked for the folder.");
  716. }
  717. else
  718. {
  719. downloadfile(QString("http://download.opensuse.org/distribution/%1/repo/oss/boot/%2/loader/linux").arg(relname, cpuarch), QString("%1ubnkern").arg(targetPath));
  720. downloadfile(QString("http://download.opensuse.org/distribution/%1/repo/oss/boot/%2/loader/initrd").arg(relname, cpuarch), QString("%1ubninit").arg(targetPath));
  721. postinstmsg = unetbootin::tr("\n*IMPORTANT* After rebooting, ignore any error messages and select back if prompted for a CD, then go to the main menu, select the 'Start Installation' option, choose 'Network' as the source, choose 'HTTP' as the protocol, enter 'download.opensuse.org' when prompted for a server, and enter '/distribution/%1/repo/oss' when asked for the folder.").arg(relname);
  722. }
  723. kernelOpts = "splash=silent showopts";
  724. }
  725. }
  726. if (nameDistro == "Ophcrack")
  727. {
  728. downloadfile(QString("http://downloads.sourceforge.net/ophcrack/ophcrack-%1.iso").arg(relname), isotmpf);
  729. extractiso(isotmpf);
  730. }
  731. if (nameDistro == "Parted Magic")
  732. {
  733. if (relname == "2.1")
  734. {
  735. downloadfile("http://downloads.sourceforge.net/sourceforge/lubi/partedmagic-2.1-kernel", QString("%1ubnkern").arg(targetPath));
  736. downloadfile("http://downloads.sourceforge.net/sourceforge/lubi/partedmagic-2.1-initrd", QString("%1ubninit").arg(targetPath));
  737. kernelOpts = "noapic root=/dev/ram0 init=/linuxrc ramdisk_size=200000 keymap=us liveusb vga=791 quiet toram";
  738. }
  739. else
  740. {
  741. downloadfile("http://partedmagic.com/partedmagic-latest.iso", isotmpf);
  742. extractiso(isotmpf);
  743. }
  744. }
  745. if (nameDistro == "PCLinuxOS")
  746. {
  747. QString deskn = relname.toLower().split(" ").first();
  748. QString vern = relname.toLower().split(" ").last();
  749. downloadfile(fileFilterNetDir(QStringList() <<
  750. "http://distro.ibiblio.org/pub/linux/distributions/texstar/pclinuxos/live-cd/english/preview/"
  751. , 10485760, 2147483647, QList<QRegExp>() <<
  752. QRegExp("^pclinuxos", Qt::CaseInsensitive) <<
  753. QRegExp(".iso$", Qt::CaseInsensitive) <<
  754. QRegExp(deskn, Qt::CaseInsensitive) <<
  755. QRegExp(vern, Qt::CaseInsensitive)
  756. ), isotmpf);
  757. extractiso(isotmpf);
  758. }
  759. if (nameDistro == "Puppy Linux")
  760. {
  761. downloadfile(fileFilterNetDir(QStringList() <<
  762. "ftp://ibiblio.org/pub/linux/distributions/puppylinux/" <<
  763. "http://distro.ibiblio.org/pub/linux/distributions/puppylinux/" <<
  764. "ftp://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux/" <<
  765. "http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux/"
  766. , 61440000, 1048576000, QList<QRegExp>() <<
  767. QRegExp(".iso$", Qt::CaseInsensitive) <<
  768. QRegExp("^puppy-\\d{1,}\\S{1,}.iso$", Qt::CaseInsensitive) <<
  769. QRegExp("^puppy-4\\S{1,}.iso$", Qt::CaseInsensitive)
  770. ), isotmpf);
  771. extractiso(isotmpf);
  772. }
  773. if (nameDistro == "Sabayon Linux")
  774. {
  775. if (isarch64)
  776. {
  777. cpuarch = "amd64";
  778. }
  779. else
  780. {
  781. cpuarch = "x86";
  782. }
  783. QString relnamenum = nameVersion;
  784. QString relnamepart = "";
  785. if (nameVersion.contains('-'))
  786. {
  787. relnamenum = nameVersion.section('-', 0, 0);
  788. relnamepart = nameVersion.section('-', -1, -1);
  789. }
  790. downloadfile(fileFilterNetDir(QStringList() <<
  791. "http://cross-lfs.sabayonlinux.org/iso/" <<
  792. "http://mirror.cs.vt.edu/pub/SabayonLinux/iso/" <<
  793. "http://mirror.umoss.org/sabayonlinux/iso/" <<
  794. "http://distro.ibiblio.org/pub/linux/distributions/sabayonlinux/" <<
  795. "http://ftp.nluug.nl/pub/os/Linux/distr/sabayonlinux/iso/" <<
  796. "http://mirror.aarnet.edu.au/pub/SabayonLinux/iso/" <<
  797. "http://na.mirror.garr.it/mirrors/sabayonlinux/iso/" <<
  798. "http://cesium.di.uminho.pt/pub/sabayon/iso/" <<
  799. "http://ftp.fsn.hu/pub/linux/distributions/sabayon/iso/"
  800. , 61440000, 2147483647, QList<QRegExp>() << // need to store as unsigned long long to use FTP (HTTP doesn't check size)
  801. QRegExp(".iso$", Qt::CaseInsensitive) <<
  802. QRegExp("^Sabayon\\S{0,}Linux\\S{0,}.iso$", Qt::CaseInsensitive) <<
  803. QRegExp("^Sabayon\\S{0,}Linux\\S{0,}"+cpuarch+"\\S{0,}.iso$", Qt::CaseInsensitive) <<
  804. QRegExp("^Sabayon\\S{0,}Linux\\S{0,}"+relnamenum+"\\S{0,}.iso$", Qt::CaseInsensitive) <<
  805. QRegExp("^Sabayon\\S{0,}Linux\\S{0,1}"+relnamenum+"\\S{0,}.iso$", Qt::CaseInsensitive) <<
  806. QRegExp("^Sabayon\\S{0,}Linux\\S{0,}"+relnamenum+"\\S{0,}"+relnamepart+"\\S{0,}.iso$", Qt::CaseInsensitive) <<
  807. QRegExp("^Sabayon\\S{0,}Linux\\S{0,}"+relnamenum+"\\S{0,}"+cpuarch+"\\S{0,}.iso$", Qt::CaseInsensitive) <<
  808. QRegExp("^Sabayon\\S{0,}Linux\\S{0,}"+relnamenum+"\\S{0,}"+relnamepart+"\\S{0,}"+cpuarch+"\\S{0,}.iso$", Qt::CaseInsensitive)
  809. ), isotmpf);
  810. extractiso(isotmpf);
  811. }
  812. if (nameDistro == "Salix")
  813. {
  814. QString edition = "NONE"; // for old Salix
  815. if (relname.contains("_xfce"))
  816. {
  817. relname.remove("_xfce");
  818. edition = "xfce";
  819. }
  820. else if (relname.contains("_lxde"))
  821. {
  822. relname.remove("_lxde");
  823. edition = "lxde";
  824. }
  825. else if (relname.contains("_kde"))
  826. {
  827. relname.remove("_kde");
  828. edition = "kde";
  829. }
  830. else if (relname.contains("_fluxbox"))
  831. {
  832. relname.remove("_fluxbox");
  833. edition = "fluxbox";
  834. }
  835. else if (relname.contains("_ratpoison"))
  836. {
  837. relname.remove("_ratpoison");
  838. edition = "ratpoison";
  839. }
  840. // relname should only contains the version from there, i.e. 13.0.2a, 13.1.2, 13.37, 14.0, ... or latest
  841. QString version = relname;
  842. if (version == "latest") {
  843. QString archfolder;
  844. if (isarch64)
  845. {
  846. archfolder = "x86_64";
  847. cpuarch = "64";
  848. }
  849. else
  850. {
  851. archfolder = "i486";
  852. cpuarch = "";
  853. }
  854. if (islivecd) {
  855. downloadfile(QString("http://latestsalix.enialis.net/%1/salixlive%2-%3.iso").arg(archfolder).arg(cpuarch).arg(edition), isotmpf);
  856. }
  857. else
  858. {
  859. downloadfile(QString("http://latestsalix.enialis.net/%1/salix%2-%3.iso").arg(archfolder).arg(cpuarch).arg(edition), isotmpf);
  860. }
  861. } else {
  862. QStringList decomposedVersion = version.split(".");
  863. QString simpleversion = decomposedVersion.at(0); // simple version contains only the two first numbers, i.e. 13.1 not 13.1.2
  864. if (decomposedVersion.size() > 1) {
  865. simpleversion.append(".").append(decomposedVersion.at(1));
  866. }
  867. if (islivecd) {
  868. if (isarch64)
  869. {
  870. cpuarch = "64";
  871. }
  872. else
  873. {
  874. cpuarch = "32";
  875. }
  876. downloadfile(QString("http://downloads.sourceforge.net/salix/%1/salixlive-%4-%2-%3.iso").arg(simpleversion).arg(version).arg(cpuarch).arg(edition), isotmpf);
  877. } else {
  878. if (isarch64)
  879. {
  880. cpuarch = "64";
  881. }
  882. else
  883. {
  884. cpuarch = "";
  885. }
  886. if (edition == "NONE") { // Salix 13.0 does not have any edition, Xfce was the default.
  887. downloadfile(QString("http://downloads.sourceforge.net/salix/%1/salix%3-%2.iso").arg(simpleversion).arg(version).arg(cpuarch), isotmpf);
  888. } else {
  889. downloadfile(QString("http://downloads.sourceforge.net/salix/%1/salix%3-%4-%2.iso").arg(simpleversion).arg(version).arg(cpuarch).arg(edition), isotmpf);
  890. }
  891. }
  892. }
  893. extractiso(isotmpf);
  894. }
  895. if (nameDistro == "Slax")
  896. {
  897. downloadfile("http://www.slax.org/get_slax.php?download=iso", isotmpf);
  898. extractiso(isotmpf);
  899. }
  900. if (nameDistro == "SliTaz")
  901. {
  902. downloadfile(fileFilterNetDir(QStringList() <<
  903. QString("http://mirror.slitaz.org/iso/%1/").arg(relname)
  904. , 3072000, 1048576000, QList<QRegExp>() <<
  905. QRegExp("^slitaz", Qt::CaseInsensitive) <<
  906. QRegExp(".iso$", Qt::CaseInsensitive) <<
  907. QRegExp("^slitaz-\\S{1,}.iso$", Qt::CaseInsensitive)
  908. ), isotmpf);
  909. extractiso(isotmpf);
  910. }
  911. if (nameDistro == "Smart Boot Manager")
  912. {
  913. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  914. downloadfile(QString("http://downloads.sourceforge.net/sourceforge/lubi/sbm-%1.img.gz").arg(relname), QString("%1ubninit").arg(targetPath));
  915. }
  916. if (nameDistro == "Super Grub Disk")
  917. {
  918. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  919. downloadfile(QString("http://lubi.sourceforge.net/sgd-latest.img").arg(relname), QString("%1ubninit").arg(targetPath));
  920. }
  921. if (nameDistro == "Super OS")
  922. {
  923. downloadfile("http://hacktolive.org/download/os", isotmpf);
  924. extractiso(isotmpf);
  925. }
  926. if (nameDistro == "SystemRescueCD")
  927. {
  928. downloadfile(fileFilterNetDir(QStringList() <<
  929. "ftp://ftp.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/s/project/sy/systemrescuecd/" <<
  930. "http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/s/project/sy/systemrescuecd/"
  931. , 9440000, 1147483647, QList<QRegExp>() <<
  932. QRegExp("systemrescuecd\\S{0,}.iso$", Qt::CaseInsensitive) <<
  933. QRegExp("x86", Qt::CaseInsensitive) <<
  934. QRegExp("systemrescuecd-x86\\S{0,}.iso$", Qt::CaseInsensitive) <<
  935. QRegExp(".iso$", Qt::CaseInsensitive)
  936. ), isotmpf);
  937. extractiso(isotmpf);
  938. }
  939. if (nameDistro == "Ubuntu")
  940. {
  941. if (isarch64)
  942. {
  943. cpuarch = "amd64";
  944. }
  945. else
  946. {
  947. cpuarch = "i386";
  948. }
  949. if (relname == "daily")
  950. {
  951. downloadfile(fileFilterNetDir(QStringList() <<
  952. "http://cdimage.ubuntu.com/daily-live/current/"
  953. , 61440000, 1048576000, QList<QRegExp>() <<
  954. QRegExp(".iso$", Qt::CaseInsensitive) <<
  955. QRegExp("desktop\\S{0,}.iso$", Qt::CaseInsensitive) <<
  956. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive)
  957. ), isotmpf);
  958. extractiso(isotmpf);
  959. }
  960. else
  961. {
  962. if (islivecd)
  963. {
  964. downloadfile(fileFilterNetDir(QStringList() <<
  965. "http://releases.ubuntu.com/"+relname <<
  966. "http://releases.ubuntu.com/releases/"+relname <<
  967. "ftp://releases.ubuntu.com/releases/.pool/" <<
  968. "http://mirrors.gigenet.com/ubuntu/"+relname <<
  969. "http://mirrors.easynews.com/linux/ubuntu-releases/"+relname <<
  970. "http://www.gtlib.gatech.edu/pub/ubuntu-releases/"+relname <<
  971. "http://ftp.wayne.edu/linux_distributions/ubuntu/"+relname <<
  972. "http://ubuntu.mirrors.proxad.net/"+relname
  973. , 524288000, 1048576000, QList<QRegExp>() <<
  974. QRegExp(".iso$", Qt::CaseInsensitive) <<
  975. QRegExp(cpuarch+".iso$", Qt::CaseInsensitive) <<
  976. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive) <<
  977. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive) <<
  978. QRegExp("ubuntu\\S{0,}"+relname+"\\S{0,}desktop\\S{0,}"+cpuarch+"\\S{0,}.iso$", Qt::CaseInsensitive) <<
  979. QRegExp("ubuntu-"+relname+"\\S{0,}-desktop-"+cpuarch+".iso$", Qt::CaseInsensitive)
  980. ), isotmpf);
  981. extractiso(isotmpf);
  982. }
  983. }
  984. ubuntunetinst
  985. }
  986. if (nameDistro == "Kubuntu")
  987. {
  988. if (isarch64)
  989. {
  990. cpuarch = "amd64";
  991. }
  992. else
  993. {
  994. cpuarch = "i386";
  995. }
  996. if (relname == "daily")
  997. {
  998. downloadfile(fileFilterNetDir(QStringList() <<
  999. "http://cdimage.ubuntu.com/kubuntu/daily-live/current/"
  1000. , 61440000, 1048576000, QList<QRegExp>() <<
  1001. QRegExp(".iso$", Qt::CaseInsensitive) <<
  1002. QRegExp("desktop\\S{0,}.iso$", Qt::CaseInsensitive) <<
  1003. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive)
  1004. ), isotmpf);
  1005. extractiso(isotmpf);
  1006. }
  1007. else
  1008. {
  1009. if (islivecd)
  1010. {
  1011. downloadfile(fileFilterNetDir(QStringList() <<
  1012. "http://cdimage.ubuntu.com/kubuntu/releases/"+relname+"/release"
  1013. , 524288000, 1048576000, QList<QRegExp>() <<
  1014. QRegExp(".iso$", Qt::CaseInsensitive) <<
  1015. QRegExp(cpuarch+".iso$", Qt::CaseInsensitive) <<
  1016. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive) <<
  1017. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive) <<
  1018. QRegExp("kubuntu\\S{0,}"+relname+"\\S{0,}desktop\\S{0,}"+cpuarch+"\\S{0,}.iso$", Qt::CaseInsensitive) <<
  1019. QRegExp("kubuntu-"+relname+"\\S{0,}-desktop-"+cpuarch+".iso$", Qt::CaseInsensitive)
  1020. ), isotmpf);
  1021. extractiso(isotmpf);
  1022. }
  1023. }
  1024. ubuntunetinst
  1025. }
  1026. if (nameDistro == "Lubuntu")
  1027. {
  1028. if (isarch64)
  1029. {
  1030. cpuarch = "amd64";
  1031. }
  1032. else
  1033. {
  1034. cpuarch = "i386";
  1035. }
  1036. if (relname == "daily")
  1037. {
  1038. downloadfile(fileFilterNetDir(QStringList() <<
  1039. "http://cdimage.ubuntu.com/lubuntu/daily-live/current/"
  1040. , 61440000, 1048576000, QList<QRegExp>() <<
  1041. QRegExp(".iso$", Qt::CaseInsensitive) <<
  1042. QRegExp("desktop\\S{0,}.iso$", Qt::CaseInsensitive) <<
  1043. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive)
  1044. ), isotmpf);
  1045. extractiso(isotmpf);
  1046. }
  1047. else
  1048. {
  1049. if (islivecd)
  1050. {
  1051. downloadfile(fileFilterNetDir(QStringList() <<
  1052. "http://cdimage.ubuntu.com/lubuntu/releases/"+relname+"/release"
  1053. , 524288000, 1048576000, QList<QRegExp>() <<
  1054. QRegExp(".iso$", Qt::CaseInsensitive) <<
  1055. QRegExp(cpuarch+".iso$", Qt::CaseInsensitive) <<
  1056. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive) <<
  1057. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive) <<
  1058. QRegExp("lubuntu\\S{0,}"+relname+"\\S{0,}desktop\\S{0,}"+cpuarch+"\\S{0,}.iso$", Qt::CaseInsensitive) <<
  1059. QRegExp("lubuntu-"+relname+"\\S{0,}-desktop-"+cpuarch+".iso$", Qt::CaseInsensitive)
  1060. ), isotmpf);
  1061. extractiso(isotmpf);
  1062. }
  1063. }
  1064. ubuntunetinst
  1065. }
  1066. if (nameDistro == "xPUD")
  1067. {
  1068. if (relname == "stable")
  1069. {
  1070. downloadfile("http://xpud.org/xpud-latest-iso.php", isotmpf);
  1071. }
  1072. else if (relname == "unstable")
  1073. {
  1074. downloadfile("http://xpud.org/xpud-latest-snapshot.php", isotmpf);
  1075. }
  1076. /*
  1077. initrdLoc = "";
  1078. kernelLoc = "/boot/xpud";
  1079. initrdOpts = "";
  1080. initrdLine = "";
  1081. slinitrdLine = "";
  1082. */
  1083. extractiso(isotmpf);
  1084. }
  1085. if (nameDistro == "Xubuntu")
  1086. {
  1087. if (isarch64)
  1088. {
  1089. cpuarch = "amd64";
  1090. }
  1091. else
  1092. {
  1093. cpuarch = "i386";
  1094. }
  1095. if (relname == "daily")
  1096. {
  1097. downloadfile(fileFilterNetDir(QStringList() <<
  1098. "http://cdimage.ubuntu.com/xubuntu/daily-live/current/"
  1099. , 61440000, 1048576000, QList<QRegExp>() <<
  1100. QRegExp(".iso$", Qt::CaseInsensitive) <<
  1101. QRegExp("desktop\\S{0,}.iso$", Qt::CaseInsensitive) <<
  1102. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive)
  1103. ), isotmpf);
  1104. extractiso(isotmpf);
  1105. }
  1106. else
  1107. {
  1108. if (islivecd)
  1109. {
  1110. downloadfile(fileFilterNetDir(QStringList() <<
  1111. "http://cdimage.ubuntu.com/xubuntu/releases/"+relname+"/release"
  1112. , 524288000, 1048576000, QList<QRegExp>() <<
  1113. QRegExp(".iso$", Qt::CaseInsensitive) <<
  1114. QRegExp(cpuarch+".iso$", Qt::CaseInsensitive) <<
  1115. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive) <<
  1116. QRegExp("desktop-"+cpuarch+".iso$", Qt::CaseInsensitive) <<
  1117. QRegExp("xubuntu\\S{0,}"+relname+"\\S{0,}desktop\\S{0,}"+cpuarch+"\\S{0,}.iso$", Qt::CaseInsensitive) <<
  1118. QRegExp("xubuntu-"+relname+"\\S{0,}-desktop-"+cpuarch+".iso$", Qt::CaseInsensitive)
  1119. ), isotmpf);
  1120. extractiso(isotmpf);
  1121. }
  1122. }
  1123. ubuntunetinst
  1124. }
  1125. if (nameDistro == "Zenwalk")
  1126. {
  1127. downloadfile(QString("ftp://zenwalk.mirrors.tds.net/pub/linux/zenlive/zenwalk-live-%1.iso").arg(relname), isotmpf);
  1128. extractiso(isotmpf);
  1129. }
  1130. #endif