customdistrolst.cpp 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. customdistrolst.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. if (customver::tr("iscustomver-no") == "iscustomver-yes")
  8. {
  9. if (isarch64)
  10. {
  11. if (!customver::tr("amd64").isEmpty())
  12. cpuarch = customver::tr("amd64");
  13. else
  14. cpuarch = "amd64";
  15. }
  16. else
  17. {
  18. if (!customver::tr("i386").isEmpty())
  19. cpuarch = customver::tr("i386");
  20. else
  21. cpuarch = "i386";
  22. }
  23. if (nameDistro == customver::tr("Distro Name 1"))
  24. {
  25. if (customver::tr("distro1format-iso").contains("img"))
  26. {
  27. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  28. downloadfile(customver::tr("http://distro1site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), QString("%1ubninit").arg(targetPath));
  29. }
  30. else
  31. {
  32. downloadfile(customver::tr("http://distro1site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), isotmpf);
  33. extractiso(isotmpf);
  34. }
  35. }
  36. if (nameDistro == customver::tr("Distro Name 2"))
  37. {
  38. if (customver::tr("distro2format-iso").contains("img"))
  39. {
  40. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  41. downloadfile(customver::tr("http://distro2site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), QString("%1ubninit").arg(targetPath));
  42. }
  43. else
  44. {
  45. downloadfile(customver::tr("http://distro2site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), isotmpf);
  46. extractiso(isotmpf);
  47. }
  48. }
  49. if (nameDistro == customver::tr("Distro Name 3"))
  50. {
  51. if (customver::tr("distro3format-iso").contains("img"))
  52. {
  53. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  54. downloadfile(customver::tr("http://distro3site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), QString("%1ubninit").arg(targetPath));
  55. }
  56. else
  57. {
  58. downloadfile(customver::tr("http://distro3site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), isotmpf);
  59. extractiso(isotmpf);
  60. }
  61. }
  62. if (nameDistro == customver::tr("Distro Name 4"))
  63. {
  64. if (customver::tr("distro4format-iso").contains("img"))
  65. {
  66. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  67. downloadfile(customver::tr("http://distro4site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), QString("%1ubninit").arg(targetPath));
  68. }
  69. else
  70. {
  71. downloadfile(customver::tr("http://distro4site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), isotmpf);
  72. extractiso(isotmpf);
  73. }
  74. }
  75. if (nameDistro == customver::tr("Distro Name 5"))
  76. {
  77. if (customver::tr("distro5format-iso").contains("img"))
  78. {
  79. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  80. downloadfile(customver::tr("http://distro5site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), QString("%1ubninit").arg(targetPath));
  81. }
  82. else
  83. {
  84. downloadfile(customver::tr("http://distro5site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), isotmpf);
  85. extractiso(isotmpf);
  86. }
  87. }
  88. if (nameDistro == customver::tr("Distro Name 6"))
  89. {
  90. if (customver::tr("distro6format-iso").contains("img"))
  91. {
  92. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  93. downloadfile(customver::tr("http://distro6site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), QString("%1ubninit").arg(targetPath));
  94. }
  95. else
  96. {
  97. downloadfile(customver::tr("http://distro6site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), isotmpf);
  98. extractiso(isotmpf);
  99. }
  100. }
  101. if (nameDistro == customver::tr("Distro Name 7"))
  102. {
  103. if (customver::tr("distro7format-iso").contains("img"))
  104. {
  105. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  106. downloadfile(customver::tr("http://distro7site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), QString("%1ubninit").arg(targetPath));
  107. }
  108. else
  109. {
  110. downloadfile(customver::tr("http://distro7site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), isotmpf);
  111. extractiso(isotmpf);
  112. }
  113. }
  114. if (nameDistro == customver::tr("Distro Name 8"))
  115. {
  116. if (customver::tr("distro8format-iso").contains("img"))
  117. {
  118. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  119. downloadfile(customver::tr("http://distro8site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), QString("%1ubninit").arg(targetPath));
  120. }
  121. else
  122. {
  123. downloadfile(customver::tr("http://distro8site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), isotmpf);
  124. extractiso(isotmpf);
  125. }
  126. }
  127. if (nameDistro == customver::tr("Distro Name 9"))
  128. {
  129. if (customver::tr("distro9format-iso").contains("img"))
  130. {
  131. instIndvfl("memdisk", QString("%1ubnkern").arg(targetPath));
  132. downloadfile(customver::tr("http://distro9site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), QString("%1ubninit").arg(targetPath));
  133. }
  134. else
  135. {
  136. downloadfile(customver::tr("http://distro9site.org/distro-release-%1/distro-architecture%2.iso").arg(relname).arg(cpuarch), isotmpf);
  137. extractiso(isotmpf);
  138. }
  139. }
  140. }
  141. else
  142. {
  143. #include "distrolst.cpp"
  144. }