Package: xcdroast
Version: 0.98+0alpha16-1

--- Please enter the report below this line. ---
The reason 13_cdrecord_to_wodim.patch is not applied is that it was
created for the previous version of xcdroast (0.98+0alpha15) and that it
doesn't apply, at least automatically) to the new one (0.98+0alpha16).
I've updated and now it seems to apply cleanly. However it needs some
extra test before could be packaged and uploaded.

The new upstream version of xcdroast no more distinguish between
cdrecord and cdrecord.prodvd. Most of conflicts come from code that was
removed.
--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.32-5-686

Debian Release: squeeze/sid
  500 unstable        ftp.fr.debian.org 

--- Package information. ---
Depends             (Version) | Installed
=============================-+-============
debconf             (>= 0.5)  | 1.5.32
 OR debconf-2.0               | 
libatk1.0-0       (>= 1.20.0) | 1.30.0-1
libc6              (>= 2.7-1) | 2.11.2-2
libcairo2          (>= 1.2.4) | 1.8.10-4
libglib2.0-0      (>= 2.12.0) | 2.24.1-1
libgtk2.0-0       (>= 2.12.0) | 2.20.1-1
libpango1.0-0     (>= 1.22.0) | 1.28.1-1
wodim                         | 9:1.1.10-1
genisoimage        (>= 4:2.0) | 9:1.1.10-1
icedax             (>= 4:2.0) | 9:1.1.10-1


Package's Recommends field is empty.

Suggests        (Version) | Installed
=========================-+-===========
cdparanoia                | 3.10.2+debian-9




#! /bin/sh /usr/share/dpatch/dpatch-run
## 13_cdrecord_to_wodim.dpatch by  <b...@decadent.org.uk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Changes for the cdrecord -> wodim transition.

@DPATCH@
Index: src/create.c
===================================================================
--- src/create.c.orig	2006-12-10 12:00:08.000000000 +0100
+++ src/create.c	2006-12-10 12:01:12.000000000 +0100
@@ -523,7 +523,7 @@
         gtk_widget_show(tbl);
         vbox = gtk_vbox_new(FALSE,10);
         gtk_table_attach_defaults(GTK_TABLE(tbl),vbox,1,2,0,1);
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
         	f1 = gtk_frame_new(_("CD-Information"));
 	} else {
         	f1 = gtk_frame_new(_("CD/DVD-Information"));
@@ -1260,7 +1260,7 @@
         gtk_widget_show(tbl);
         vbox = gtk_vbox_new(FALSE,10);
         gtk_table_attach_defaults(GTK_TABLE(tbl),vbox,0,1,0,1);
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
         	f1 = gtk_frame_new(_("CD-Information"));
 	} else {
         	f1 = gtk_frame_new(_("CD/DVD-Information"));
@@ -2979,7 +2979,7 @@
                 GTK_SIGNAL_FUNC(fixate_clicked), NULL);
         define_tooltip(b1,_("Just fixate (close) the CD, if for some reason the CD has been written but not fixated."));
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
         	b1 = gtk_button_new_with_label(_("Blank CD-RW"));
 	} else {
         	b1 = gtk_button_new_with_label(_("Blank CD/DVD+-RW"));
@@ -3086,7 +3086,7 @@
                 gtk_widget_show (menu_item);
                 i++;
         }
-        if (curset.isProDVD) {
+        if (curset.isDVD) {
                 i = 0;
                 tmpval = curset.cdrtype;
                 while (dvdtypes[i] != 0) {
@@ -5774,7 +5774,7 @@
 	bootable_frame1 = NULL;
 	bootable_frame2 = NULL;
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		f1 = gtk_frame_new(_("Options to create a bootable CD"));
 	} else {
 		f1 = gtk_frame_new(_("Options to create a bootable CD/DVD"));
@@ -5794,7 +5794,7 @@
 	gtk_box_pack_start(GTK_BOX(vbox),tbl,FALSE,FALSE,0);
         gtk_widget_show(tbl);
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
         	l1 = rightjust_gtk_label_new(_("Make CD bootable?"));
 	} else {
         	l1 = rightjust_gtk_label_new(_("Make CD/DVD bootable?"));
@@ -6792,7 +6792,7 @@
 			fill_session_available();
 			/* force recalc of session size if dvd */
 			/* so he will get the multisession warning */
-			if (curset.cdrtype >= 1000 && ( curset.isProDVD & 1 ) && curset.multisession == 1) {
+			if (curset.cdrtype >= 1000 && ( curset.isDVD & 1 ) && curset.multisession == 1) {
 				set_sessionsize_unknown();	
 			}
 			break;
@@ -7023,7 +7023,7 @@
                 gtk_widget_show (menu_item);
                 i++;
         }
-        if (curset.isProDVD) {
+        if (curset.isDVD) {
                 i = 0;
                 tmpval = curset.cdrtype;
                 while (dvdtypes[i] != 0) {
@@ -7174,7 +7174,7 @@
         gtk_widget_show(b1);
         define_tooltip(b1,_("Set additional write options for advanced users."));
 	/* blank button */
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
         	b1 = gtk_button_new_with_label(_("Blank CD-RW"));
 	} else {
         	b1 = gtk_button_new_with_label(_("Blank CD/DVD+-RW"));
Index: src/duplicate.c
===================================================================
--- src/duplicate.c.orig	2006-12-10 12:00:08.000000000 +0100
+++ src/duplicate.c	2006-12-10 12:01:12.000000000 +0100
@@ -1156,7 +1156,7 @@
 	gtk_table_set_col_spacings(GTK_TABLE(tbl),10);
 	gtk_box_pack_start(GTK_BOX(actionspace),tbl,TRUE,TRUE,10);
 	gtk_widget_show(tbl);
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		f1 = gtk_frame_new(_("CD-Information"));
 	} else {
 		f1 = gtk_frame_new(_("CD/DVD-Information"));
@@ -1739,7 +1739,7 @@
 	gtk_widget_show(tbl);
 	vbox = gtk_vbox_new(FALSE,10);
 	gtk_table_attach_defaults(GTK_TABLE(tbl),vbox,0,1,0,1);
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		f1 = gtk_frame_new(_("CD-Information"));
 	} else {
 		f1 = gtk_frame_new(_("CD/DVD-Information"));
@@ -2241,7 +2241,7 @@
 	gtk_widget_show(tbl);
 	vbox = gtk_vbox_new(FALSE,10);
 	gtk_table_attach_defaults(GTK_TABLE(tbl),vbox,0,1,0,1);
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		f1 = gtk_frame_new(_("CD-Information"));
 	} else {
 		f1 = gtk_frame_new(_("CD/DVD-Information"));
@@ -3090,7 +3090,7 @@
 	gtk_table_set_col_spacings(GTK_TABLE(tbl),10);
 	gtk_box_pack_start(GTK_BOX(actionspace),tbl,TRUE,TRUE,10);
 	gtk_widget_show(tbl);
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		f1 = gtk_frame_new(_("CD to write"));
 	} else {
 		f1 = gtk_frame_new(_("CD/DVD to write"));
@@ -3107,7 +3107,7 @@
 	hbox = gtk_hbox_new(TRUE,10);
 	gtk_box_pack_start(GTK_BOX(actionspace),hbox,FALSE,TRUE,5);
 	gtk_widget_show(hbox);
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		b1 = gtk_button_new_with_label(_("Write CD"));
 	} else {
 		b1 = gtk_button_new_with_label(_("Write CD/DVD"));
@@ -3118,7 +3118,7 @@
 		GTK_SIGNAL_FUNC(writetracks_clicked), NULL);
 	define_tooltip(b1,_("Writes all tracks specified by the TOC file to a CD."));
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		b1 = gtk_button_new_with_label(_("Blank CD-RW"));
 	} else {
 		b1 = gtk_button_new_with_label(_("Blank CD/DVD+-RW"));
@@ -3239,7 +3239,7 @@
 		gtk_widget_show (menu_item);
 		i++;
 	}
-	if (curset.isProDVD) {
+	if (curset.isDVD) {
 		i = 0;
 		tmpval = curset.cdrtype;
 		while (dvdtypes[i] != 0) {
@@ -3984,7 +3984,7 @@
 	side_widgets[0] = b1;
 	define_tooltip(b1,_("Displays information about the currently inserted CD and tracks stored on the harddrive."));
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		b1 = gtk_toggle_button_new_with_label(_("Read CD"));
 	} else {
 		b1 = gtk_toggle_button_new_with_label(_("Read CD/DVD"));
@@ -3996,7 +3996,7 @@
 	side_widgets[1] = b1;
 	define_tooltip(b1,_("Reads all tracks of a CD and copy them to the harddrive."));
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		b1 = gtk_toggle_button_new_with_label(_("Verify CD"));
 	} else {
 		b1 = gtk_toggle_button_new_with_label(_("Verify CD/DVD"));
@@ -4016,7 +4016,7 @@
 	side_widgets[3] = b1;
 	define_tooltip(b1,_("Plays audio tracks (.wav files) from the harddrive via soundcard."));
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		b1 = gtk_toggle_button_new_with_label(_("Write CD"));
 	} else {
 		b1 = gtk_toggle_button_new_with_label(_("Write CD/DVD"));
Index: src/init.c
===================================================================
--- src/init.c.orig	2006-12-10 12:00:08.000000000 +0100
+++ src/init.c	2006-12-10 12:01:12.000000000 +0100
@@ -80,8 +80,10 @@
 gchar *language = NULL;
 GdkFont *fixedfont;
 
+#ifndef CDRECORDDVD_IS_FREE
 /* ProDVD key in global variable to let solaris-putenv access it */
 gchar security_key[MAXLINE];
+#endif
 
 /* give the setupdata-structure valid startvalues */
 
@@ -136,7 +138,9 @@
         setupdata.root_option_change_imagedirs = fullaccess;
         setupdata.root_option_change_logoptions = fullaccess;
 
+#ifndef CDRECORDDVD_IS_FREE
 	setupdata.ProDVDkey = g_strdup("");	
+#endif
 
 	setupdata.mainwindow.x = -1;
 	setupdata.mainwindow.y = -1;
@@ -156,7 +160,7 @@
 gint cdrtypes[] = CDR_TYPES_MIN;
 gint i;
 
-	curset.isProDVD = 0;
+	curset.isDVD = 0;
 	curset.support_ontheflyaudio = 0;
 	curset.writer_devnr = -1;
 	curset.reader_devnr = -1;
@@ -391,16 +395,16 @@
 }
 
 /* check if needed binaries are installed */
-/* return if proDVD version found */
+/* return if (pro)DVD version found */
 
 static gint check_binaries(gint noversioncheck) {
 gchar tmp[MAXLINE];
 gchar ver[MAXLINE];
 gchar link[MAXLINE];
 gint stat;
-gint isProDVD;
+gint isDVD;
 	
-	isProDVD = 0;
+	isDVD = 0;
 	check_executable(UNAME,UNAME2,0);
 	check_executable(DF,DF2,0);
 
@@ -414,9 +418,9 @@
 		dodebug(3, "%s is a link to %s\n", tmp, link); 
 #endif
 	}
-	stat = check_version_cdrecord(CDRECORD_VERSION, ver, &isProDVD);
+	stat = check_version_cdrecord(CDRECORD_VERSION, ver, &isDVD);
 	if (stat == 1 && !noversioncheck) {
-		g_warning("Invalid cdrecord version %s found.\n\tExpecting at least version %s\n\tStart xcdroast with the -n option to override (not recommended!)", ver, CDRECORD_VERSION);	
+		g_warning("Invalid " CDRECORD_NAME " version %s found.\n\tExpecting at least version %s\n\tStart xcdroast with the -n option to override (not recommended!)", ver, CDRECORD_VERSION);	
 		gtk_exit(1);
 	}
 	if (stat == 2) {
@@ -495,7 +499,7 @@
 	g_snprintf(tmp,MAXLINE,"%s/%s", sharedir, CDDBTOOL);
 	check_executable(tmp,NULL,1);
 
-	return isProDVD;
+	return isDVD;
 }
 
 
@@ -688,7 +692,7 @@
 	}
 
 	/* check prodvd only when it is installed */
-	get_spawn_path(CDRECORDPRODVD,tmp);
+	get_spawn_path(CDRECORDDVD,tmp);
 	if (is_file(tmp)) {
 		if (check_nonroot_mode_cdrtools(tmp) == 0) {
 			nofail = 0;
@@ -755,7 +759,8 @@
 /*	g_print("\t-r <root config-file>  (currently: %s)\n", rootconfig); */
 	g_print("\t-o : Disable multibyte font support\n");
 	g_print("\t-n : Disable cdrtools version check (use at own risk)\n");
-	g_print("\t-w : Don't use cdrecord-ProDVD, even when it is available.\n");
+	if (strcmp(CDRECORD, CDRECORDDVD))
+		g_print("\t-w : Don't use " CDRECORDDVD_NAME ", even when it is available.\n");
 #if (defined(__MACH__) && defined(__APPLE__)) 
 	g_print("\t-a : Don't display the autodiskmount daemon handling at startup\n");
 #else
@@ -783,7 +888,7 @@
 gchar *p1;
 gchar *alt_dev_string;
 gint c, usercnf, stat;
-gint isProDVD, ignoreProDVD;
+gint isDVD, ignoreDVD;
 	
 	if (!language) 
 		language = g_strdup("");
@@ -793,7 +798,7 @@
 	no_versioncheck = 0;
 	support_ontheflyaudio = 0;
 	c_locale_is_utf8 = 0;
-	ignoreProDVD = 0;
+	ignoreDVD = 0;
 	alt_dev_string = NULL;
 	strncpy(configdir, CONFIGDIR, MAXLINE);
 	g_snprintf(rootconfig, MAXLINE, "%s/%s", SYSCONFDIR, ROOTCONFIG);
@@ -854,7 +859,7 @@
 		break;
 
 	case 'w':
-		ignoreProDVD = 1;
+		ignoreDVD = 1;
 		break;
 
 	case 'f':
@@ -954,17 +959,19 @@
 #endif 
 
 	dodebug(3, "Checking for helper binaries (noversioncheck = %d)\n", no_versioncheck);
-	isProDVD = check_binaries(no_versioncheck);
+	isDVD = check_binaries(no_versioncheck);
 
-	if (isProDVD) {
-		if (ignoreProDVD) {
-			isProDVD = 0;
-			dodebug(1,"-> cdrecord.ProDVD detected but disabled\n");
-		} else {	
-			dodebug(1,"-> cdrecord.ProDVD detected\n");
+	if (strcmp(CDRECORD, CDRECORDDVD)) {
+		if (isDVD) {
+			if (ignoreDVD) {
+				isDVD = 0;
+				dodebug(1,"-> " CDRECORDDVD_NAME " detected but disabled\n");
+			} else {	
+				dodebug(1,"-> " CDRECORDDVD_NAME " detected\n");
+			}
+		} else {
+			dodebug(1,"-> " CDRECORDDVD_NAME " not detected\n");
 		}
-	} else {
-		dodebug(1,"-> cdrecord.ProDVD not detected\n");
 	}
 	if (support_ontheflyaudio == 1) {
 		dodebug(1, "   Enabled support for on-the-fly audio\n");
@@ -1005,7 +1012,7 @@
 	tocfiles = (GList *) NULL;
 	strcpy(xcdroast_version_loaded, "");
 
-	curset.isProDVD = isProDVD;
+	curset.isDVD = isDVD;
 	curset.support_ontheflyaudio = support_ontheflyaudio;
 
 	/* load iso-options if available */
@@ -1126,7 +1133,8 @@
 	}
 #endif
 
-	if (curset.isProDVD == 1) {
+#ifndef CDRECORDDVD_IS_FREE
+	if (curset.isDVD == 1) {
 		/* set key if we got one from the config-file */
 		if (strcmp(setupdata.ProDVDkey,"")) {
 
@@ -1139,6 +1147,7 @@
 #endif
 		}
 	}
+#endif
 
 	if (usercnf == 0) {
 		/* load ok */
Index: src/io.c
===================================================================
--- src/io.c.orig	2006-12-10 12:00:08.000000000 +0100
+++ src/io.c	2006-12-10 12:01:12.000000000 +0100
@@ -703,7 +703,7 @@
 	strncpy(tmp2,dev,MAXLINE);
 	convert_escape(tmp2);
 
-	g_snprintf(tmp,MAXLINE," -scanbus dev= \"%s\" 2>&1",tmp2);
+	g_snprintf(tmp,MAXLINE," -scanbus dev= \"%s\" 2>/dev/null",tmp2);
 	strcat(line,tmp);
 
 	dodebug(1, "calling: %s\n", line);
@@ -922,7 +922,7 @@
 
 	/* traditional scanning first */
 	get_wrap_path_cdrecord(line);
-	strcat(line," -scanbus 2>&1");
+	strcat(line," -scanbus 2>/dev/null");
 
 	dodebug(1, "calling: %s\n", line);
         if ((fpin = popen(line,"r")) == NULL) {
@@ -973,7 +973,7 @@
 	scsicount = 0;
 
 	get_wrap_path_cdrecord(line);
-	g_snprintf(tmp,MAXLINE," dev=%s -scanbus 2>&1", transport);
+	g_snprintf(tmp,MAXLINE," dev=%s -scanbus 2>/dev/null", transport);
 	strcat(line, tmp);
 	
 	dodebug(1, "calling: %s\n", line);
@@ -1282,7 +1282,7 @@
 	drvcount = 0;
 
 	get_wrap_path_cdrecord(line);
-	strcat(line," driver=help 2>&1");
+	strcat(line," driver=help 2>&1 | sed -n '/Driver types:/,//p'");
 
 	dodebug(1, "calling: %s\n", line);
         if ((fpin = popen(line,"r")) == NULL) {
@@ -2104,9 +2104,11 @@
 	g_snprintf(tmp,MAXLINE,"OPTION_SELECTIONMODE = %d\n",setupdata.option_selectionmode);
 	fputs(tmp,fd);
 
+#ifndef CDRECORDDVD_IS_FREE
 	strcpy(tmp2,setupdata.ProDVDkey);
 	g_snprintf(tmp,MAXLINE,"PRODVD_KEY = \"%s\"\n",convert_escape(tmp2));
 	fputs(tmp,fd);
+#endif
 
 	/* save geometry data? */
 	if (setupdata.option_savepos) {
@@ -2221,6 +2223,7 @@
 		if (fgets(line,MAXLINE,fd) == NULL)
 			break;
 
+#ifndef CDRECORDDVD_IS_FREE
 		/* special case here to protect pro-dvd-key */
 		if (strstr(line, "PRODVD_KEY") && strlen(line) > 50) {
 			strncpy(tmp,line,50);
@@ -2229,6 +2232,7 @@
 		} else {
 			dodebug(10,"config: %s", line);
 		}
+#endif
 
 		/* skip empty or hashed lines */
 		strip_string(line);
@@ -2508,6 +2512,7 @@
 		if (strcmp("OPTION_SELECTIONMODE",id) == 0) {
 			setupdata.option_selectionmode = atoi(value);
 		}
+#ifndef CDRECORDDVD_IS_FREE
 		if (strcmp("PRODVD_KEY",id) == 0) {
 			/* dont overwrite evtuelly set value with empty key */
 			if (strcmp(value,"") != 0) {
@@ -2515,6 +2520,7 @@
 				setupdata.ProDVDkey = g_strdup(value);
 			}
 		}
+#endif
 		if (setupdata.option_savepos) {
 			if (strcmp("GEOMETRY_MAINWINDOW_X",id) == 0) {
 				setupdata.mainwindow.x = atoi(value);
@@ -5856,7 +5862,7 @@
 	drvcount = 0;
 
 	get_wrap_path_cdrecord(line);
-	strcat(line," blank=help 2>&1");
+	strcat(line," blank=help 2>&1 | sed -n '/Blanking options:/,//p'");
 
 	dodebug(1, "calling: %s\n", line);
 
@@ -5980,11 +5986,12 @@
 			dialog_done = -1;
 		}
 
+#ifndef CDRECORDDVD_IS_FREE
 		/* or cdrecord died by signal? e.g. SIGALRM */
 		if (WIFSIGNALED(ret) && read_done == 0) {
 
 			/* most likely invalid prodvd key */
-			if (curset.isProDVD) {
+			if (curset.isDVD) {
 				strncpy(tmp, "\nReceived ALARM from cdrecord-ProDVD. Aborting blank...\nInvalid ProDVD key?\n", MAXLINE);
 
 				convert_for_gtk2_textwidget(tmp);
@@ -5993,6 +6000,7 @@
 				read_done = 1;
 			}
 		}
+#endif
 
                 dodebug(10,"Finished in read_blank_out with status: %d\n", 
                         read_done);
@@ -6363,14 +6371,16 @@
 			dialog_done = -1;
 		}
 
+#ifndef CDRECORDDVD_IS_FREE
 		/* or cdrecord died by signal? e.g. SIGALRM */
 		if (WIFSIGNALED(ret) && read_done == 0) {
 
 			/* most likely invalid prodvd key */
-			if (curset.isProDVD && curset.cdrtype > 1000) {
+			if (curset.isDVD && curset.cdrtype > 1000) {
 				read_done = 2;
 			}
 		}
+#endif
 
                 dodebug(10,"Finished in read_write_out with status: %d\n", 
                         read_done);
@@ -6396,8 +6406,9 @@
 		return;
 	}
 
+#ifndef CDRECORDDVD_IS_FREE
 	/* prodvd and beginning to write soon? */
-	if (curset.isProDVD && curset.cdrtype > 1000) {
+	if (curset.isDVD && curset.cdrtype > 1000) {
 		if (strstr(line,"Last chance to quit")) {
 			cdrtimer = gtk_timeout_add(1000, 
 					cdrtimer_callback, NULL);
@@ -6412,6 +6423,7 @@
 			}
 		}
 	}
+#endif
 
 	/* skip all lines that contain "seconds." */
 	if (n > 8) {
@@ -6702,6 +6714,7 @@
 }
 
 
+#ifndef CDRECORDDVD_IS_FREE
 /* display an error when useing prodvd and cdrecord aborts */
 
 static void display_invalid_prodvdkey() {
@@ -6710,6 +6723,7 @@
 		show_dialog(ICO_WARN, _("cdrecord-ProDVD terminated.\n\nMost likely because you have entered\nan invalid key. Please check if it is correct."), T_OK, NULL, NULL, 0);
 	}
 }
+#endif
 
 
 /* call cdrecord to write some tracks */
@@ -6958,10 +6972,12 @@
 	if (read_done != 0 || read_output_ctrl == 5) {
 		gtk_label_set_text(GTK_LABEL(readtrack_info_label), _("Error writing tracks"));
 		gtk_label_set_text(GTK_LABEL(readtrack_small_info),_("Write-Error:"));
+#ifndef CDRECORDDVD_IS_FREE
 		if (read_done == 2) {
 			/* invalid cdrecord key - show window */
 			display_invalid_prodvdkey();
 		}
+#endif
 		return 1;
 	} else {
 		/* all ok */
@@ -7556,10 +7572,12 @@
 	if (read_done != 0 || read_output_ctrl == 5) {
 		gtk_label_set_text(GTK_LABEL(readtrack_info_label), _("Error writing tracks"));
 		gtk_label_set_text(GTK_LABEL(readtrack_small_info),_("Write-Error:"));
+#ifndef CDRECORDDVD_IS_FREE
                 if (read_done == 2) {
                         /* invalid cdrecord key - show window */
 			display_invalid_prodvdkey();
                 }
+#endif
 		return 1;
 	} else {
 		/* all ok */
@@ -7725,10 +7743,12 @@
 	if (read_done != 0 || read_output_ctrl == 5) {
 		gtk_label_set_text(GTK_LABEL(readtrack_info_label), _("Error writing tracks"));
 		gtk_label_set_text(GTK_LABEL(readtrack_small_info),_("Write-Error:"));
+#ifndef CDRECORDDVD_IS_FREE
                 if (read_done == 2) {
                         /* invalid cdrecord key - show window */
 			display_invalid_prodvdkey();
                 }
+#endif
 		return 1;
 	} else {
 		/* all ok */
@@ -9878,10 +9898,12 @@
 	if (read_done != 0 || read_output_ctrl == 5) {
 		gtk_label_set_text(GTK_LABEL(readtrack_info_label), _("Error writing tracks"));
 		gtk_label_set_text(GTK_LABEL(readtrack_small_info),_("Write-Error:"));
+#ifndef CDRECORDDVD_IS_FREE
                 if (read_done == 2) {
                         /* invalid cdrecord key - show window */
 			display_invalid_prodvdkey();
                 }
+#endif
 		return 1;
 	} else {
 		/* all ok */
@@ -9895,17 +9917,17 @@
 /* check the version of cdrecord */
 /* return 1 if not correct (to old) */
 
-gint check_version_cdrecord(gchar *match, gchar *found, gint *isProDVD) {
+gint check_version_cdrecord(gchar *match, gchar *found, gint *isDVD) {
 gchar line[MAXLINE];
 gchar vline[MAXLINE];
 gchar ver[MAXLINE];
 FILE *fpin;
 gchar *p;
 
-	*isProDVD = 0;
+	*isDVD = 0;
 	strcpy(ver,"");
 	get_wrap_path("CDRECORD",line);
-	strcat(line," -version 2>/dev/null");
+	strcat(line," -version 2>&1");
 
 	dodebug(1, "calling: %s\n", line);
         if ((fpin = popen(line,"r")) == NULL) {
@@ -9950,7 +9972,7 @@
 	} else {
 		p = strstr(vline, "ProDVD");
 		if (p != NULL) {
-			*isProDVD = 1;
+			*isDVD = 1;
 			p = strtok(p, " ");
 			if (p != NULL) {
 			  p = strtok(NULL, " ");
@@ -9967,6 +9989,9 @@
 					p = strtok(NULL, " ");
 					if (p) {
 						strcpy(ver,p);
+						if (strstr(ver,"-dvd")) {
+							*isDVD = 1;
+						}
 					}
 				}
 			}
@@ -10033,9 +10058,9 @@
 	/* now line contains the version string of mkisofs */
 	/* try to extract the version number */
 
-	p = strstr(line,"mkisofs");
+	p = strstr(line, MKISOFS_NAME);
 	if (p != NULL) {
-		p = strtok(p+8, " ");
+		p = strtok(p + (sizeof(MKISOFS_NAME) - 1) + 1, " ");
 		if (p != NULL) {
 			strcpy(ver,p);
 		}
@@ -10138,7 +10163,7 @@
 
 	strcpy(ver,"");
 	get_wrap_path("READCD",line);
-	strcat(line," -version 2>/dev/null");
+	strcat(line," -version 2>/dev/null | head -n 1");
 
 	dodebug(1, "calling: %s\n", line);
         if ((fpin = popen(line,"r")) == NULL) {
@@ -10165,9 +10190,9 @@
 	/* now line contains the version string of readcd */
 	/* try to extract the version number */
 
-	p = strstr(line,"readcd");
+	p = strstr(line, READCD_NAME);
 	if (p != NULL) {
-		p = strtok(p+7, " ");
+		p = strtok(p + (sizeof(READCD_NAME) - 1) + 1, " ");
 		if (p != NULL) {
 			strcpy(ver,p);
 		}
Index: src/main.c
===================================================================
--- src/main.c.orig	2006-12-10 12:00:08.000000000 +0100
+++ src/main.c	2006-12-10 12:01:12.000000000 +0100
@@ -226,7 +226,7 @@
 	gtk_box_pack_start(GTK_BOX(sidespace), side_t,TRUE,TRUE,0);
 
 	side_t_btn1 = gtk_button_new_with_label (_("Setup"));
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		side_t_btn2 = gtk_button_new_with_label (_("Duplicate CD"));
 		side_t_btn3 = gtk_button_new_with_label (_("Create CD"));
 	} else {
@@ -583,19 +583,19 @@
 */
 
         /* warn about non-existing LFS support in dvd mode */
-        if ((curset.isProDVD & 1) && sizeof(off_t) != 8) {
+        if ((curset.isDVD & 1) && sizeof(off_t) != 8) {
                 show_dialog(ICO_WARN, _("Warning: Your system is not able to create files larger\nthan 2 GB. Writing DVDs will therefore not possible."), T_OK, NULL, NULL, 0);
         }
 
         /* if we are in DVD mode, check if the security-key is set */
 #if 0
-        if (curset.isProDVD == 1) {
+        if (curset.isDVD == 1) {
                 keyenv = getenv("CDR_SECURITY");
                 if (keyenv == NULL) {
 			show_dialog(ICO_WARN, _("Warning: You have not entered a cdrecord-ProDVD key in setup.\nPlease see the FAQ on how to obtain your free key.\nYou also have to renew the key every few months because it got an\nexpire date. You will not be able to properly write DVDs without it."), T_OK, NULL, NULL, 0); 
                 }
 
 	}
 #endif
 
 	dolog(1,"Starting X-CD-Roast\n");
 
Index: src/main.h
===================================================================
--- src/main.h.orig	2006-12-10 12:00:08.000000000 +0100
+++ src/main.h	2006-12-10 12:01:12.000000000 +0100
@@ -194,7 +194,7 @@
 gint start_master_action();
 gint start_onthefly_master_action(gint write_devnr);
 
-gint check_version_cdrecord(gchar *match, gchar *found, gint *isProDVD);
+gint check_version_cdrecord(gchar *match, gchar *found, gint *isDVD);
 gint check_version_mkisofs(gchar *match, gchar *found);
 gint check_version_cdda2wav(gchar *match, gchar *found);
 gint check_version_readcd(gchar *match, gchar *found);
Index: src/menus.c
===================================================================
--- src/menus.c.orig	2006-12-10 12:00:08.000000000 +0100
+++ src/menus.c	2006-12-10 12:01:12.000000000 +0100
@@ -2701,7 +2701,7 @@
 	gtk_container_set_border_width (GTK_CONTAINER (box1), 5);
         gtk_container_add(GTK_CONTAINER(dialog),box1);
 
-        if (!curset.isProDVD) {
+        if (!curset.isDVD) {
 		f1 = gtk_frame_new(_("Blank CD-RW"));
         } else {
 		f1 = gtk_frame_new(_("Blank CD/DVD+-RW"));
@@ -2811,7 +2811,7 @@
 	gtk_box_pack_start(GTK_BOX(box1),box3,FALSE,TRUE,5);
 	gtk_widget_show(box3);
 
-        if (!curset.isProDVD) {
+        if (!curset.isDVD) {
 		button1 = gtk_button_new_with_label(_("Blank CD-RW"));
         } else {
 		button1 = gtk_button_new_with_label(_("Blank CD/DVD+-RW"));
Index: src/setup.c
===================================================================
--- src/setup.c.orig	2006-12-10 12:00:09.000000000 +0100
+++ src/setup.c	2006-12-10 12:01:12.000000000 +0100
@@ -134,8 +134,10 @@
 	g_free(bak_setupdata.cddb_proxy_host);
 	setupdata.logfile = g_strdup(bak_setupdata.logfile);
 	g_free(bak_setupdata.logfile);
+#ifndef CDRECORDDVD_IS_FREE
 	setupdata.ProDVDkey = g_strdup(bak_setupdata.ProDVDkey);
 	g_free(bak_setupdata.ProDVDkey);
+#endif
 
 	/* restore and free also writerreader structure copy */
 	if (bak_writerreader) {
@@ -269,6 +271,7 @@
 	/* check_tilde(tmp); */
 	setupdata.logfile = g_strdup(tmp);
 
+#ifndef CDRECORDDVD_IS_FREE
 	g_free(setupdata.ProDVDkey);
 	setupdata.ProDVDkey = g_strdup("");
 #if 0
@@ -290,6 +293,7 @@
         putenv(security_key);
 #endif
 #endif
+#endif
 
 	/* save the current window size if we are asked to */
 	if (setupdata.option_savepos) {
@@ -314,8 +318,8 @@
 	dolog(2, "Confirm setup\n");
 
 	/* some lasts checks and warnings */
-	if (is_dvdwriter(setupdata.writer_devnr) && !curset.isProDVD) {
-		ret = show_dialog(ICO_WARN, _("Please note that you have to install ProDVD support before\nyou can write DVDs. Currently you will only be able to\nwrite regular CDs with your DVD-Writer."), T_OK,T_CANCEL, NULL, 0);
+	if (is_dvdwriter(setupdata.writer_devnr) && !curset.isDVD) {
+		ret = show_dialog(ICO_WARN, _("Please note that you have to install DVD support before\nyou can write DVDs. Currently you will only be able to\nwrite regular CDs with your DVD-Writer."), T_OK,T_CANCEL, NULL, 0);
 		if (ret == 1) {
 			/* abort */
 			return;
@@ -339,7 +343,9 @@
 		return;
 
 	/* free memory of backup-config */
+#ifndef CDRECORDDVD_IS_FREE
 	g_free(bak_setupdata.ProDVDkey);
+#endif
 	g_free(bak_setupdata.logfile);
 	g_free(bak_setupdata.cddb_host);
 	g_free(bak_setupdata.cddb_proxy_host);
@@ -1146,7 +1152,7 @@
 	gtk_box_pack_start(GTK_BOX(vbox2),tbl,FALSE,TRUE,0);
 	gtk_widget_show(tbl);
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		l1 = rightjust_gtk_label_new(_("CD Writer Device:"));
 	} else {
 		l1 = rightjust_gtk_label_new(_("CD/DVD Writer Device:"));
@@ -2749,6 +2755,7 @@
 	define_tooltip(check, _("When enabled, then multiple selections in lists are handled like the lists in Windows (hold CTRL-Key to select more than one entry and use SHIFT to select a whole range of entries)."));
 
 #if 0
+#ifndef CDRECORDDVD_IS_FREE
 	f1 = gtk_frame_new(_("cdrecord-ProDVD key"));
 	set_font_and_color_frame(f1,BOLDFONT,NULL);
 	gtk_box_pack_start(GTK_BOX(vbox),f1,TRUE,TRUE,10);
@@ -2791,6 +2798,7 @@
 		gtk_widget_set_sensitive(l1, FALSE);
 		gtk_widget_set_sensitive(txt, FALSE);
 	}
+#endif // !defined(CDRECORDDVD_IS_FREE)
 #endif
 }
 
@@ -3196,7 +3204,7 @@
 	gtk_container_add (GTK_CONTAINER (f1), tbl);
 	gtk_widget_show(tbl);
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		check = gtk_check_button_new_with_label(_("change CD Writer Device"));
 	} else {
 		check = gtk_check_button_new_with_label(_("change CD/DVD Writer Device"));
@@ -3218,7 +3226,7 @@
 	gtk_widget_show(check);
 	define_tooltip(check, _("If enabled, then the user is allowed the change the write parameters for the CD Writer (e.g. Speed and FIFO-Buffer-Size)."));
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		check = gtk_check_button_new_with_label(_("change CD Reader Device"));
 	} else {
 		check = gtk_check_button_new_with_label(_("change CD/DVD Reader Device"));
@@ -3300,7 +3308,9 @@
 	bak_setupdata.cddb_host = g_strdup(setupdata.cddb_host);
 	bak_setupdata.cddb_proxy_host = g_strdup(setupdata.cddb_proxy_host);
 	bak_setupdata.logfile = g_strdup(setupdata.logfile);
+#ifndef CDRECORDDVD_IS_FREE
 	bak_setupdata.ProDVDkey = g_strdup(setupdata.ProDVDkey);
+#endif
 
 	/* backup the dynamic part of the readerwriter structure too */
 	bak_writerreader = g_new0(writerreader_bak_t *, MAXDEVICES);
@@ -3385,7 +3395,7 @@
 	gtk_notebook_append_page(GTK_NOTEBOOK (notebook),f1,l1);
 	draw_scsi_scan(f1);
 
-	if (!curset.isProDVD) {
+	if (!curset.isDVD) {
 		l2 = gtk_label_new(_("CD Settings"));
 	} else {
 		l2 = gtk_label_new(_("CD/DVD Settings"));
Index: src/xcdrdata.h
===================================================================
--- src/xcdrdata.h.orig	2006-12-10 12:00:09.000000000 +0100
+++ src/xcdrdata.h	2006-12-10 12:01:12.000000000 +0100
@@ -60,7 +60,9 @@
 	gboolean root_option_change_imagedirs;
 	gboolean root_option_change_logoptions;
 
+#ifndef CDRECORDDVD_IS_FREE
 	gchar *ProDVDkey;
+#endif
 	geometry_t mainwindow;
 	geometry_t burnwindow;
 	
@@ -120,7 +122,7 @@
 } writer_driver_t;
 
 typedef struct current_set {
-	gint isProDVD;
+	gint isDVD;
 	gint support_ontheflyaudio;
 	gint writer_devnr;
 	gint reader_devnr;
Index: src/xcdroast.h
===================================================================
--- src/xcdroast.h.orig	2006-12-10 12:00:12.000000000 +0100
+++ src/xcdroast.h	2006-12-10 12:10:20.000000000 +0100
@@ -112,10 +112,18 @@
    then in $PREFIX (e.g. /usr/bin/cdrecord instead of 
    /usr/local/lib/xcdroast-0.98/bin/cdrecord) */
 
-#define CDRECORD "bin/cdrecord" 
-#define CDDA2WAV "bin/cdda2wav"
-#define READCD "bin/readcd"
-#define MKISOFS "bin/mkisofs"
+#define CDRECORD "bin/wodim" 
+#define CDDA2WAV "bin/icedax"
+#define READCD "bin/readom"
+#define MKISOFS "bin/genisoimage"
+
+#define CDRECORD_NAME "wodim"
+#define CDRECORDDVD_NAME "wodim"
+#define CDRECORDDVD_IS_FREE
+
+#define CDDA2WAV_NAME "icedax"
+#define READCD_NAME "readom"
+#define MKISOFS_NAME "genisoimage"
 
 /* MINIMUM required versions. Greater versions are now silently
    accepted. 
@@ -123,11 +131,11 @@
    IT WONT WORK WITH LOWER VERSIONS, EVEN WHEN YOU THINK IT DOES! */
  
 #define CDRECORD_VERSION "2.01"
-#define CDRECORD_PRODVD_VERSION "2.01a11"
+#define CDRECORDDVD_VERSION "2.01.01a03"
 #define CDRECORD_VERSION_WITH_ONTHFLYAUDIO "2.01a13"
-#define MKISOFS_VERSION "2.01"
-#define CDDA2WAV_VERSION "2.01"
-#define READCD_VERSION "2.01"
+#define MKISOFS_VERSION "1.1.0"
+#define CDDA2WAV_VERSION "1.1.0"
+#define READCD_VERSION "1.1.0"
 
 /* group to use for non-root-mode */
 /* #define NONROOTMODEGROUP "xcdwrite"  - HISTORIC */
Index: src/xcdrwrap.c
===================================================================
--- src/xcdrwrap.c.orig	2006-12-10 12:00:09.000000000 +0100
+++ src/xcdrwrap.c	2006-12-10 12:01:12.000000000 +0100
@@ -308,7 +308,7 @@
 #endif
 		/* show found paths of helper apps */
 		get_spawn_path(CDRECORD, tmp, 1);
-		printf("cdrecord found at: %s\n", tmp);
+		printf(CDRECORD_NAME " found at: %s\n", tmp);
 		get_spawn_path(CDDA2WAV, tmp, 1);
 		printf("cdda2wav found at: %s\n", tmp);
 		get_spawn_path(READCD, tmp, 1);
Index: src/xtools.c
===================================================================
--- src/xtools.c.orig	2006-12-10 12:00:09.000000000 +0100
+++ src/xtools.c	2006-12-10 12:01:12.000000000 +0100
@@ -2375,7 +2375,7 @@
 
 /* reroute a command through the wrapper */
 /* cmd is one of "CDRECORD", "MKISOFS", "CDDA2WAV", "READCD" 
-   or "CDRECORDPRODVD" */
+   or "CDRECORDDVD" */
 
 gchar *get_wrap_path(gchar *cmd, gchar *ret) {
 gchar tmp[MAXLINE];
@@ -2403,7 +2403,7 @@
 
 gint get_gracetime() {
 
-	if (curset.isProDVD && curset.cdrtype > 1000) {
+	if (curset.isDVD && curset.cdrtype > 1000) {
 		/* use 10 seconds for prodvd, because the keycheck
 		   can take a while... */
 		return 10;
@@ -3511,7 +3511,7 @@
 
 /* return whether we have a empty CD-R or DVD-R in the drive */
 /* we are sure that there IS a medium there - but we dont know which type */
-/* check only if device is dvdwriter and we have prodvd installed */
+/* check only if device is dvdwriter and we have (pro)dvd installed */
 
 gchar *return_media_type(gint devnr) {
 gchar drvflags[MAXLINE], drvmodes[MAXLINE];
@@ -3521,7 +3521,7 @@
 	isdvd = 0;
 	i = get_writerreaderdevs_index(devnr);
 
-	if (i >= 0 && curset.isProDVD && writerreaderdevs[i]->is_dvdwriter) {
+	if (i >= 0 && curset.isDVD && writerreaderdevs[i]->is_dvdwriter) {
 	        if (convert_devnr2busid(devnr,tmp) != 0) {
 	                g_error("non existing cdrom?");
 	        }

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to