File: replace_poweriso.patch

package info (click to toggle)
acetoneiso 2.4-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,224 kB
  • sloc: cpp: 5,629; makefile: 7
file content (105 lines) | stat: -rw-r--r-- 4,017 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Description: Remove automatic download and installation of PowerISO
Author: Nick Andrik <nick.andrik@gmail.com>
Forwarded: not-needed
Last-Update: 2024-09-20

Index: b/acetoneiso/sources/converter.h
===================================================================
--- a/acetoneiso/sources/converter.h
+++ b/acetoneiso/sources/converter.h
@@ -14,17 +14,30 @@
 //    You should have received a copy of the GNU General Public License
 //    along with AcetoneISO.  If not, see <http://www.gnu.org/licenses/>.
 
+QFile & acetoneiso::find_poweriso_exec() {
+	static QFile poweriso_file( QDir::homePath() + "/.acetoneiso/poweriso");
+	if(!poweriso_file.exists()) {
+		// XXX: Do not try to download poweriso automatically since this is a violation of Debian policy
+		//get_poweriso();
+
+		QMessageBox dlBox;
+		dlBox.setTextFormat(Qt::RichText);
+		dlBox.setText(tr("Unable to find") + " poweriso " + tr("in ~/.acetoneiso/.\nPlease download it from: ")
+			+ "<a href='https://www.poweriso.com/poweriso-1.3.tar.gz'>https://www.poweriso.com/poweriso-1.3.tar.gz</a>"
+			+ tr(" and extract it to ~/.acetoneiso/ folder.")
+		);
+		dlBox.exec();
+	}
+	return poweriso_file;
+}
+
 void acetoneiso::converter()
 {
 
-QMessageBox::warning(this, "AcetoneISO",tr("Note:\nISO-9660 filesystem does not support multisector images, this means you will loose all sectors above first sector. Generally speaking, the first sector holds data file.\nIf it's a video game image in MDF/IMG/CCD format, you will probably loose sectors that hold copyprotection files."));
-QDir acetone_bin = QDir::home();
-acetone_bin.cd(".acetoneiso");
-QFile poweriso_file( acetone_bin.path() + "/poweriso");
-	if(!poweriso_file.exists()) {
-	get_poweriso();
-	return;
-	}
+	QMessageBox::warning(this, "AcetoneISO",tr("Note:\nISO-9660 filesystem does not support multisector images, this means you will loose all sectors above first sector. Generally speaking, the first sector holds data file.\nIf it's a video game image in MDF/IMG/CCD format, you will probably loose sectors that hold copyprotection files."));
+	QFile & poweriso_file = find_poweriso_exec();
+	if(!poweriso_file.exists())
+		return;
 	
 	//estrazione qui
 	QDir Home = QDir::home();
@@ -69,12 +82,8 @@ msgBox.exec();
     extract();
    }
  else if  (msgBox.clickedButton() == connectButton2) {
-    QDir acetone_bin = QDir::home();
-    acetone_bin.cd(".acetoneiso");
-    QFile poweriso_file( acetone_bin.path() + "/poweriso");
-    if(!poweriso_file.exists())
-       get_poweriso();
-    else{
+    QFile & poweriso_file = find_poweriso_exec();
+    if(poweriso_file.exists()) {
 //estrazione qui
        QDir Home = QDir::home();
        QString isodaconvertire;
@@ -109,12 +118,8 @@ msgBox.exec();
 
 void acetoneiso::extract()
 {
-QDir acetone_bin = QDir::home();
-acetone_bin.cd(".acetoneiso");
-QFile poweriso_file( acetone_bin.path() + "/poweriso");
-if(!poweriso_file.exists())
-   get_poweriso();
-else {
+QFile & poweriso_file = find_poweriso_exec();
+if(poweriso_file.exists()){
 //estrazione qui
    QDir Home = QDir::home();
    QString isodaestrarre;
@@ -193,12 +198,8 @@ QMessageBox::information(this, "AcetoneI
 
 void acetoneiso::contextExtract()
 {
-QDir acetone_bin = QDir::home();
-acetone_bin.cd(".acetoneiso");
-QFile poweriso_file( acetone_bin.path() + "/poweriso");
-if(!poweriso_file.exists())
-   get_poweriso();
-else {
+QFile & poweriso_file = find_poweriso_exec();
+if(poweriso_file.exists()){
 //estrazione qui
 QDir Home = QDir::home();
 QFile file(Home.path() + "/.acetoneiso/acetoneiso.conf");
Index: b/acetoneiso/sources/acetoneiso.h
===================================================================
--- a/acetoneiso/sources/acetoneiso.h
+++ b/acetoneiso/sources/acetoneiso.h
@@ -133,6 +133,7 @@ private slots:
     void open_mounted(QListWidgetItem *item);
     void status_mounted();
     void get_poweriso();
+    QFile & find_poweriso_exec();
     void extract_poweriso();
     void messaggio_poweriso();
     void message_extract_finish();