Skip to content
This repository was archived by the owner on Mar 14, 2020. It is now read-only.

Commit 151d2d0

Browse files
added new source
1 parent 65a6040 commit 151d2d0

6 files changed

Lines changed: 346 additions & 132 deletions

File tree

source/BootableDriveMaker.pro.user

Lines changed: 336 additions & 0 deletions
Large diffs are not rendered by default.

source/guihandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void guiHandler::run() {
2424
}
2525
biglog.close();
2626
}
27-
msleep(200);
27+
msleep(500);
2828
}
2929
}
3030
void guiHandler::done(int,QProcess::ExitStatus) { hasFinished = true; }

source/mainwindow.cpp

Lines changed: 8 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
3434
ui->plainTextEdit->appendPlainText("ERROR: Could Not Write To findDevs.sh\nThis Application Might Not Be In /Applications?");
3535
setEnabled(false);
3636
}
37-
QStringList itemsToAdd;
38-
itemsToAdd << "1. Debian 8.6.0 (Internet Installer)";
39-
itemsToAdd << "2. Ubuntu 16.04";
40-
itemsToAdd << "3. Lubuntu 16.04";
41-
itemsToAdd << "4. Kubuntu 16.04";
42-
itemsToAdd << "5. Xubuntu 16.04";
43-
itemsToAdd << "6. Ubuntu GNOME 16.04";
44-
ui->osSelector->addItems(itemsToAdd);
4537
on_refreshDevs_clicked();
4638
}
4739
MainWindow::~MainWindow() {
@@ -97,7 +89,10 @@ void MainWindow::on_startStop_clicked() {
9789
}
9890
if (ui->devID->currentText().contains("internal")) {
9991
QMessageBox msgBox;
100-
msgBox.setText("You have selected an internal device for use.\nTo abort, click cancel in the authorization prompt after closing this message.\nTo continue, just close this message.");
92+
msgBox.setText("WARNING!\n"
93+
"You have selected an internal device for use.\n"
94+
"To abort, click cancel in the authorization prompt after closing this message.\n"
95+
"To continue, just close this message.");
10196
msgBox.exec();
10297
}
10398
//Disable GUI
@@ -108,13 +103,10 @@ void MainWindow::on_startStop_clicked() {
108103
ui->openISO->setEnabled(false);
109104
ui->openIMG->setEnabled(false);
110105
ui->openDMG->setEnabled(false);
111-
ui->downloadOS->setEnabled(false);
112-
ui->osSelector->setEnabled(false);
113106
ui->allowNonExtern->setEnabled(false);
114107
ui->refreshDevs->setEnabled(false);
115108
ui->pathReadOut->setEnabled(false);
116109
ui->label->setEnabled(false);
117-
ui->label_2->setEnabled(false);
118110
ui->label_3->setEnabled(false);
119111
ui->label_4->setEnabled(false);
120112
//Print osPath to path.txt
@@ -170,9 +162,7 @@ void MainWindow::on_refreshDevs_clicked() {
170162
for (int i = 0; i < allDevs.length(); ++i) {
171163
QString c = allDevs.at(i);
172164
if (c != "\n") {
173-
if (c != ":") {
174-
currLine += c;
175-
}
165+
if (c != ":") currLine += c;
176166
}
177167
else {
178168
devs.append(currLine);
@@ -190,9 +180,7 @@ void MainWindow::on_refreshDevs_clicked() {
190180
}
191181
if (devs.isEmpty()) devs << "ERROR: No External Devices Found.";
192182
}
193-
else {
194-
if (devs.isEmpty()) devs << "ERROR: Device Parsing Error.";
195-
}
183+
else if (devs.isEmpty()) devs << "ERROR: Device Parsing Error.";
196184
}
197185
else {
198186
ui->allowNonExtern->setEnabled(false);
@@ -205,55 +193,18 @@ QString MainWindow::devIDToInt() {
205193
QString newStr = "";
206194
for (int i = 0; i < ui->devID->currentText().length(); ++i) {
207195
QString curr = ui->devID->currentText().at(i);
208-
if (curr == "0") newStr += "0";
209-
else if (curr == "1") newStr += curr;
210-
else if (curr == "2") newStr += curr;
211-
else if (curr == "3") newStr += curr;
212-
else if (curr == "4") newStr += curr;
213-
else if (curr == "5") newStr += curr;
214-
else if (curr == "6") newStr += curr;
215-
else if (curr == "7") newStr += curr;
216-
else if (curr == "8") newStr += curr;
217-
else if (curr == "9") newStr += curr;
196+
if (curr >= "0" && curr <= "9") newStr += curr;
218197
}
219198
return newStr;
220199
}
221-
void MainWindow::on_downloadOS_clicked() {
222-
switch(ui->osSelector->currentText().split(".")[0].toInt()) {
223-
case 1:
224-
if (!QDesktopServices::openUrl(QUrl(QString("http://saimei.acc.umu.se/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0-amd64-netinst.iso"))))
225-
ui->plainTextEdit->appendPlainText("Failed To Open URL.");
226-
break;
227-
case 2:
228-
if (!QDesktopServices::openUrl(QUrl(QString("http://mirrors.mit.edu/ubuntu-releases/16.04/ubuntu-16.04-desktop-amd64.iso"))))
229-
ui->plainTextEdit->appendPlainText("Failed To Open URL.");
230-
break;
231-
case 3:
232-
if (!QDesktopServices::openUrl(QUrl(QString("http://cdimage.ubuntu.com/lubuntu/releases/xenial/release/lubuntu-16.04.1-desktop-amd64.iso"))))
233-
ui->plainTextEdit->appendPlainText("Failed To Open URL.");
234-
break;
235-
case 4:
236-
if (!QDesktopServices::openUrl(QUrl(QString("http://cdimage.ubuntu.com/kubuntu/releases/16.04.1/release/kubuntu-16.04.1-desktop-amd64.iso"))))
237-
ui->plainTextEdit->appendPlainText("Failed To Open URL.");
238-
break;
239-
case 5:
240-
if (!QDesktopServices::openUrl(QUrl(QString("http://mirror.us.leaseweb.net/ubuntu-cdimage/xubuntu/releases/16.04/release/xubuntu-16.04-desktop-amd64.iso"))))
241-
ui->plainTextEdit->appendPlainText("Failed To Open URL.");
242-
break;
243-
case 6:
244-
if (!QDesktopServices::openUrl(QUrl(QString("http://cdimage.ubuntu.com/ubuntu-gnome/releases/xenial/release/ubuntu-gnome-16.04.1-desktop-amd64.iso"))))
245-
ui->plainTextEdit->appendPlainText("Failed To Open URL.");
246-
break;
247-
}
248-
}
249200
void MainWindow::on_allowNonExtern_clicked() { on_refreshDevs_clicked(); }
250201
void MainWindow::on_actionSelectISO_triggered() { if(!hasStarted) on_openISO_clicked(); }
251202
void MainWindow::on_actionSelectIMG_triggered() { if(!hasStarted) on_openIMG_clicked(); }
252203
void MainWindow::on_actionSelectDMG_triggered() { if(!hasStarted) on_openDMG_clicked(); }
253204
void MainWindow::on_actionContact_triggered() { QMessageBox::about(this,"Contact","Email: contact@etcg.pw\nWebsite: http://www.etcg.pw"); }
254205
void MainWindow::on_actionCopyright_triggered() {
255206
QFile copyNotice("../Resources/copyrightNotice.txt"),
256-
copy ("../Resources/COPYING"),
207+
copy("../Resources/COPYING"),
257208
copyLesser("../Resources/COPYING.LESSER");
258209
if (copyNotice.open(QIODevice::ReadOnly) && copy.open(QIODevice::ReadOnly)
259210
&& copyLesser.open(QIODevice::ReadOnly)) {
@@ -303,27 +254,3 @@ void MainWindow::on_actionCopyright_triggered() {
303254
}
304255
else QMessageBox::about(this,"Failed To Open","Failed To Open One Or More Copyright Files.");
305256
}
306-
void MainWindow::on_actionREADME_triggered() {
307-
QFile README("../Resources/README.md");
308-
if (README.open(QIODevice::ReadOnly)) {
309-
QTextStream in(&README);
310-
//Make dialog
311-
QDialog dialog;
312-
//Make textHolder for dialog
313-
QPlainTextEdit textHolder;
314-
textHolder.appendPlainText(in.readAll());
315-
textHolder.setReadOnly(true);
316-
QTextCursor cursor = textHolder.textCursor();
317-
cursor.movePosition(QTextCursor::Start);
318-
textHolder.setTextCursor(cursor);
319-
//Make textHolder take up all of dialog
320-
QVBoxLayout layout;
321-
layout.addWidget(&textHolder);
322-
//Setup dialog
323-
dialog.setLayout(&layout);
324-
dialog.setFixedSize(500,500);
325-
dialog.setWindowTitle("README");
326-
dialog.exec();
327-
}
328-
else QMessageBox::about(this,"Failed To Open README","Failed To Open README.");
329-
}

source/mainwindow.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ private slots:
2525
void on_startStop_clicked();
2626
void autoScroll();
2727
void on_refreshDevs_clicked();
28-
void on_downloadOS_clicked();
2928
void on_allowNonExtern_clicked();
3029
void on_openISO_clicked();
3130
void on_openIMG_clicked();
@@ -35,7 +34,6 @@ private slots:
3534
void on_actionSelectDMG_triggered();
3635
void on_actionContact_triggered();
3736
void on_actionCopyright_triggered();
38-
void on_actionREADME_triggered();
3937
};
4038

4139
#endif // MAINWINDOW_H

source/mainwindow.ui

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -21,52 +21,6 @@
2121
</property>
2222
<widget class="QWidget" name="centralWidget">
2323
<layout class="QVBoxLayout" name="verticalLayout">
24-
<item>
25-
<layout class="QHBoxLayout" name="horizontalLayout_2">
26-
<item>
27-
<widget class="QLabel" name="label_2">
28-
<property name="maximumSize">
29-
<size>
30-
<width>240</width>
31-
<height>16777215</height>
32-
</size>
33-
</property>
34-
<property name="text">
35-
<string>Download A 64-Bit Operating System:</string>
36-
</property>
37-
</widget>
38-
</item>
39-
<item>
40-
<widget class="QComboBox" name="osSelector">
41-
<property name="minimumSize">
42-
<size>
43-
<width>300</width>
44-
<height>0</height>
45-
</size>
46-
</property>
47-
</widget>
48-
</item>
49-
<item>
50-
<widget class="QPushButton" name="downloadOS">
51-
<property name="minimumSize">
52-
<size>
53-
<width>110</width>
54-
<height>0</height>
55-
</size>
56-
</property>
57-
<property name="maximumSize">
58-
<size>
59-
<width>110</width>
60-
<height>16777215</height>
61-
</size>
62-
</property>
63-
<property name="text">
64-
<string>Download</string>
65-
</property>
66-
</widget>
67-
</item>
68-
</layout>
69-
</item>
7024
<item>
7125
<layout class="QHBoxLayout" name="horizontalLayout_3">
7226
<item>
@@ -246,7 +200,6 @@
246200
<addaction name="actionSelectISO"/>
247201
<addaction name="actionSelectIMG"/>
248202
<addaction name="actionSelectDMG"/>
249-
<addaction name="actionREADME"/>
250203
<addaction name="actionContact"/>
251204
<addaction name="actionCopyright"/>
252205
</widget>

source/resourceFiles/copyrightNotice.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Copyright 2016 ETCG
2+
Copyright 2018 Gregory Conrad
33

44
This program is free software: you can redistribute it and/or modify
55
it under the terms of the GNU Lesser General Public License as published by

0 commit comments

Comments
 (0)