Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 326114 Details for
Bug 437752
app-cdr/xfburn - support creating bootable cd using isolinux
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
extends xfburn-0.4.3_p20120601 to create bootable cd with isolinux.bin in /usr/share/xfburn/
xfburn-with-isolinux.diff (text/plain), 8.64 KB, created by
Christian Ostheimer
on 2012-10-09 19:15:15 UTC
(
hide
)
Description:
extends xfburn-0.4.3_p20120601 to create bootable cd with isolinux.bin in /usr/share/xfburn/
Filename:
MIME Type:
Creator:
Christian Ostheimer
Created:
2012-10-09 19:15:15 UTC
Size:
8.64 KB
patch
obsolete
>--- xfburn/xfburn-burn-data-composition-base-dialog.c.orig 2009-07-13 05:24:06.000000000 +0200 >+++ xfburn/xfburn-burn-data-composition-base-dialog.c 2009-09-20 20:45:37.000000000 +0200 >@@ -180,7 +180,11 @@ > priv = XFBURN_BURN_DATA_COMPOSITION_BASE_DIALOG_GET_PRIVATE (obj); > box = GTK_BOX (GTK_DIALOG (obj)->vbox); > >- gtk_window_set_title (GTK_WINDOW (obj), _("Burn Composition")); >+ if (!xfburn_settings_get_boolean ("is-bootable", TRUE)) { >+ gtk_window_set_title (GTK_WINDOW (obj), _("Burn Composition")); >+ } else { >+ gtk_window_set_title (GTK_WINDOW (obj), _("Burn Composition (bootable)")); >+ } > gtk_window_set_destroy_with_parent (GTK_WINDOW (obj), TRUE); > icon = gtk_widget_render_icon (GTK_WIDGET (obj), XFBURN_STOCK_BURN_CD, GTK_ICON_SIZE_DIALOG, NULL); > gtk_window_set_icon (GTK_WINDOW (obj), icon); >--- xfburn/xfburn-data-composition.c.orig 2009-07-16 16:41:25.000000000 +0200 >+++ xfburn/xfburn-data-composition.c 2009-09-20 21:13:32.000000000 +0200 >@@ -1843,9 +1843,10 @@ > gchar *src = NULL; > IsoNode *node = NULL; > IsoDir *dir = NULL; >- int r; >+ int r, skipped; > gchar *basename; > >+ skipped = 0; > gtk_tree_model_get (model, iter, DATA_COMPOSITION_COLUMN_TYPE, &type, > DATA_COMPOSITION_COLUMN_CONTENT, &name, DATA_COMPOSITION_COLUMN_PATH, &src, -1); > >@@ -1858,9 +1859,25 @@ > * then its owner will be set to root:root. Not sure what a better > * default could be, so I'll just leave it like that. */ > } else { >- /* something existing on the filesystem, creating a node >- * will copy its attributes */ >- r = iso_tree_add_node (image, parent, src, &node); >+ gchar * src_name=NULL; >+ src_name=strrchr(src,'/'); >+ // do not include /isolinux/boot.cat into bootable cd (will be created by iso_image_set_boot_image) >+ if( (NULL != src_name && 0 == strcmp("/boot.cat",src_name)) >+ && (0==strcmp("isolinux",iso_node_get_name((IsoNode *)parent))) >+ // is node isolinux a sub node of root node? >+ && (iso_node_get_parent((IsoNode *)parent)==iso_node_get_parent((IsoNode *)iso_node_get_parent((IsoNode *)parent))) >+ ) { >+ if (xfburn_settings_get_boolean ("is-bootable", TRUE)) { >+ skipped = 1; >+ r = 0; >+ printf("info: bootable cd: /isolinux/boot.cat will be replaced by newly created version.\n"); >+ } else >+ r = iso_tree_add_node (image, parent, src, &node); >+ } else { >+ /* something existing on the filesystem, creating a node >+ * will copy its attributes */ >+ r = iso_tree_add_node (image, parent, src, &node); >+ } > } > > if (r < 0) { >@@ -1857,7 +1874,7 @@ > basename = g_path_get_basename (src); > > /* check if the file has been renamed */ >- if (strcmp (basename, name) != 0) { >+ if (skipped == 0 && strcmp (basename, name) != 0) { > /* rename the iso_node */ > r = iso_node_set_name (node, name); > >@@ -1928,6 +1945,76 @@ > fill_image_with_composition (model, image, iso_image_get_root (image), &iter); > } > >+ // check if boot catalog, file boot_cat, exists in newly created iso image: >+ // already done in fill_image_with_composition >+ >+ if (xfburn_settings_get_boolean ("is-bootable", TRUE)) { >+ /* adds El-Torito boot info. Tuned for isolinux */ >+ ElToritoBootImage *bootimg; >+ int result; >+ gchar *boot_folder="/isolinux"; // path in image (NOT in /boot) >+ gchar *boot_foldername=boot_folder+1; >+ // do not change /isolinux/boot.cat (hardcoded into fill_image_with_composition) >+ gchar *boot_cat="/isolinux/boot.cat"; // path in image (NOT in /boot) >+ gchar *boot_catname="boot.cat"; >+ gchar *boot_img="/isolinux/isolinux.bin"; // path in image (NOT in /boot) >+ gchar *boot_imgname="isolinux.bin"; >+ gchar *boot_img_src="/usr/share/xfburn/isolinux.bin"; // path on harddisk >+ IsoDir *dir_isolinux = NULL; >+ IsoNode *node_isolinux = NULL; >+ >+ // check if folder /isolinux exists in image; if not, add folder >+// result = iso_tree_path_to_node(image, "/isolinux", &node_isolinux); >+ result = iso_dir_get_node(iso_image_get_root (image), boot_foldername, &node_isolinux); >+ if (result <= 0) { >+ if (result < 0) { >+ printf ("Error looking up %s in iso image %X\n", boot_folder, result); >+ } >+ if (node_isolinux && iso_node_get_type(node_isolinux) != LIBISO_DIR) { >+ printf ("Error, not a directory, %s in iso image %X\n", boot_folder, result); >+ } >+ // try to add >+ result = iso_tree_add_new_dir (iso_image_get_root (image), boot_foldername, &dir_isolinux); >+ if (result < 0) { >+ printf ("Error adding directory %s %X\n", boot_folder, result); >+ } >+ } else { >+ if (node_isolinux && iso_node_get_type(node_isolinux) == LIBISO_DIR) { >+ dir_isolinux=(IsoDir *)node_isolinux; >+ } else { >+ printf ("Error looking up %s in iso image %X\n", boot_folder, result); >+ } >+ } >+ // check if file boot_img exists in image; if not, add file >+ result = iso_dir_get_node(dir_isolinux, boot_imgname, &node_isolinux); >+ if (result <= 0) { >+ if (result < 0) { >+ printf ("Error looking up %s in iso image %X\n", boot_img, result); >+ } else { >+ if (node_isolinux && iso_node_get_type(node_isolinux) != LIBISO_FILE) { >+ printf ("Error, not a file, %s in iso image %X\n", boot_img, result); >+ } >+ } >+ // try to add >+ result = iso_tree_add_node (image, dir_isolinux, boot_img_src, &node_isolinux); >+ if (result < 0) { >+ printf ("Error adding %s to folder %s/ %X\n", boot_img_src, boot_folder, result); >+ } >+ } else { >+ if (node_isolinux && iso_node_get_type(node_isolinux) != LIBISO_FILE) { >+ printf ("Error, not a file, %s in iso image %X\n", boot_img, result); >+ } >+ } >+ result = iso_image_set_boot_image(image, boot_img, ELTORITO_NO_EMUL, >+ boot_cat, &bootimg); >+ if (result < 0) { >+ printf ("Error adding boot image %X (does file %s exist?)\n", result, boot_img); >+ } else { >+ el_torito_set_load_size(bootimg, 4); >+ el_torito_patch_isolinux_image(bootimg); >+ } >+ } >+ > return image; > } > >--- xfburn/xfburn-preferences-dialog.c.orig 2009-07-09 01:33:06.000000000 +0200 >+++ xfburn/xfburn-preferences-dialog.c 2009-09-20 21:21:33.000000000 +0200 >@@ -41,6 +41,7 @@ > GtkWidget *check_clean_tmpdir; > GtkWidget *check_show_hidden; > GtkWidget *check_show_human_readable; >+ GtkWidget *check_is_bootable; > > GtkWidget *treeview_devices; > GtkWidget *button_scan; >@@ -213,6 +214,17 @@ > gtk_box_pack_start (GTK_BOX (vbox2), priv->check_show_human_readable, FALSE, FALSE, BORDER); > gtk_widget_show (priv->check_show_human_readable); > >+ vbox3 = gtk_vbox_new (FALSE, 0); >+ gtk_widget_show (vbox3); >+ >+ frame = xfce_gtk_frame_box_new_with_content (_("Bootable cd"), vbox3); >+ gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, BORDER); >+ gtk_widget_show (frame); >+ >+ priv->check_is_bootable = gtk_check_button_new_with_mnemonic (_("_bootable cd (/usr/share/xfburn/isolinux.bin)")); >+ gtk_box_pack_start (GTK_BOX (vbox3), priv->check_is_bootable, FALSE, FALSE, BORDER); >+ gtk_widget_show (priv->check_is_bootable); >+ > icon = gtk_widget_render_icon (GTK_WIDGET (priv->icon_bar), > GTK_STOCK_PROPERTIES, > GTK_ICON_SIZE_DIALOG, >@@ -370,6 +382,8 @@ > xfburn_settings_get_boolean ("show-hidden-files", FALSE)); > gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->check_show_human_readable), > xfburn_settings_get_boolean ("human-readable-units", TRUE)); >+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->check_is_bootable), >+ xfburn_settings_get_boolean ("is-bootable", FALSE)); > gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->check_empty_speed_list), > xfburn_settings_get_boolean ("show-empty-speed-list-notice", TRUE)); > gtk_range_set_value (GTK_RANGE (priv->scale_fifo), >@@ -392,6 +406,8 @@ > gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->check_show_hidden))); > xfburn_settings_set_boolean ("human-readable-units", > gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->check_show_human_readable))); >+ xfburn_settings_set_boolean ("is-bootable", >+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->check_is_bootable))); > xfburn_settings_set_boolean ("show-empty-speed-list-notice", > gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->check_empty_speed_list))); > xfburn_settings_set_int ("fifo-size",
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 437752
: 326114 |
326116