#1 Burning Software

It is currently Wed Dec 18, 2024 10:46 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Building an Image
PostPosted: Sun Jul 31, 2005 9:38 pm 
Offline

Joined: Sun Feb 13, 2005 3:37 pm
Posts: 19
Hi guys,
I would like to ask if there is a better example of buildimage.c using StarBurn_ISO9660JolietFileTree_Add available? I've looked through the current one and it's not really helping solve my little problems :cry:

Firstly, when I use the sample provided with the SDK, I run it to create an image of a folder called TestFolder. For some reason, it adds a file called SIGN.BIN, makes a folder called THIS IS NEW SHORT NAME and proceeds to build the image with all my files in that folder, here's an example of the new built image:

Quote:
0000000026 , \SIGN.BIN
0000000058 , \THIS IS NEW SHORT NAME\FILE1.HEX
0000000192 , \THIS IS NEW SHORT NAME\FILE2.HEX
0000000193 , \THIS IS NEW SHORT NAME\FILE3.HEX
0000000194 , \THIS IS NEW SHORT NAME\FILE4.HEX
0000000330 , \THIS IS NEW SHORT NAME\FILE5.HEX
0000001317 , \THIS IS NEW SHORT NAME\TESTFOLDER\FILE1.HEX
0000001325 , \THIS IS NEW SHORT NAME\TESTFOLDER\FILE2.HEX


Another thing I'd like to ask is how to add files individually?
If, for example, I have a file on my hard drive: C:\Test\TestImage\Folder2\Info.txt How could I add this file so it would be located at: %ROOT%\Folder2\Info.txt on the disk image?
Thanks :)


Top
 Profile  
 
 Post subject: Re: Building an Image
PostPosted: Sun Jul 31, 2005 10:29 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
See, SDK samples are here to show as much of the SDK as they can. That's why BuildImage has some of the REDUNDANT calls most people don't need. In your particular case you:

1) don't need to rename the upper directory by calling SetNames (it's the code to rename the directory into the "new short name").

2) don't need to call AddMemory to add the file with memory content and sign.bin

and the last thing - just use Add(...) to add individual files and not whole directories. We'll automatically parse the dirs however adding single files one-by-one would work just great.

Sonix wrote:
Hi guys,
I would like to ask if there is a better example of buildimage.c using StarBurn_ISO9660JolietFileTree_Add available? I've looked through the current one and it's not really helping solve my little problems :cry:

Firstly, when I use the sample provided with the SDK, I run it to create an image of a folder called TestFolder. For some reason, it adds a file called SIGN.BIN, makes a folder called THIS IS NEW SHORT NAME and proceeds to build the image with all my files in that folder, here's an example of the new built image:

Quote:
0000000026 , \SIGN.BIN
0000000058 , \THIS IS NEW SHORT NAME\FILE1.HEX
0000000192 , \THIS IS NEW SHORT NAME\FILE2.HEX
0000000193 , \THIS IS NEW SHORT NAME\FILE3.HEX
0000000194 , \THIS IS NEW SHORT NAME\FILE4.HEX
0000000330 , \THIS IS NEW SHORT NAME\FILE5.HEX
0000001317 , \THIS IS NEW SHORT NAME\TESTFOLDER\FILE1.HEX
0000001325 , \THIS IS NEW SHORT NAME\TESTFOLDER\FILE2.HEX


Another thing I'd like to ask is how to add files individually?
If, for example, I have a file on my hard drive: C:\Test\TestImage\Folder2\Info.txt How could I add this file so it would be located at: %ROOT%\Folder2\Info.txt on the disk image?
Thanks :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 8:14 am 
Offline

Joined: Sun Feb 13, 2005 3:37 pm
Posts: 19
As usual, thanks for a quick reply Anton :)

One thing I'm still unsure of though is how to add a file into a specific folder in the image... example, if I want to pass a file called test1.hex so it's path in the image is \TEST3\test1.hex, how would I do this?
Would I need to create a folder in the image first? and how do I tell starburn the location I want to place the file?
Using StarBurn_ISO9660JolietFileTree_Add to pass the single file, how do I tell it what path to use?

Basically, this is what I'm trying to do:
I've written some code so the user can drag and drop files/folders into a list. Once the user hits the make image button I have a list containing the FullPath to files and the VirtualPath for files on the disk.
Can I pass this information to starburn as it is to create the iso?
Example:
FullPath = Y:\Test\TestFolder\File2.hex
VirtPath = \TestFolder\File2.hex

Unlike the BuildImage example, I cannot assume that all the dropped files are in one folder on the users hard drive, they could be scattered.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 11:57 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
If you need to add files or directories to some specific location you need to parse file tree with GetFirst/GetNextKid API calls. And then pass pointer to pointer to "parent" directory node as pre-last parameter.

Sonix wrote:
As usual, thanks for a quick reply Anton :)

One thing I'm still unsure of though is how to add a file into a specific folder in the image... example, if I want to pass a file called test1.hex so it's path in the image is \TEST3\test1.hex, how would I do this?
Would I need to create a folder in the image first? and how do I tell starburn the location I want to place the file?
Using StarBurn_ISO9660JolietFileTree_Add to pass the single file, how do I tell it what path to use?

Basically, this is what I'm trying to do:
I've written some code so the user can drag and drop files/folders into a list. Once the user hits the make image button I have a list containing the FullPath to files and the VirtualPath for files on the disk.
Can I pass this information to starburn as it is to create the iso?
Example:
FullPath = Y:\Test\TestFolder\File2.hex
VirtPath = \TestFolder\File2.hex

Unlike the BuildImage example, I cannot assume that all the dropped files are in one folder on the users hard drive, they could be scattered.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 10:42 pm 
Offline

Joined: Sun Feb 13, 2005 3:37 pm
Posts: 19
Thanks Anton, I've finally got my drag and drop function coded and working correctly :lol:
But.... (:roll: here we go again :D )
Now I'm attempting to do the same kind of thing but with UDF image. I took a look at your UDFBuildImage.c code and compiled it. When I tested it I found it had created an invalid image :cry:
I'm not sure why, but when I ran the example it didn't create a Table Of Contents for the image file. It added all the files from the folder, but there is no TOC at 0x8000 in the image.
Have I missed something? Surely the image needs a TOC for any hardware/software to read it's contents. :?:


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 10:47 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
UDF images are created with a different API and have different FS structures. If you create ISO image can you mount it with DVD emulation (like StarPort)? Can you parse the image with verification tool (say IsoBuster)?

Sonix wrote:
Thanks Anton, I've finally got my drag and drop function coded and working correctly :lol:
But.... (:roll: here we go again :D )
Now I'm attempting to do the same kind of thing but with UDF image. I took a look at your UDFBuildImage.c code and compiled it. When I tested it I found it had created an invalid image :cry:
I'm not sure why, but when I ran the example it didn't create a Table Of Contents for the image file. It added all the files from the folder, but there is no TOC at 0x8000 in the image.
Have I missed something? Surely the image needs a TOC for any hardware/software to read it's contents. :?:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 7:34 am 
Offline

Joined: Sun Feb 13, 2005 3:37 pm
Posts: 19
Sorry, it was a late night and didn't realise that it only holds UDF info :oops:
Is there any option to include ISO TOC along with UDF TOC though? it seems most DVD image making software includes both ISO and UDF format TOC in their headers.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 7:44 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Yes of course! Please see DVDVideoBuildImage sample to find out how to create so-called "bridge" file system consisting from both ISO9660 and UDF file system structures.

Sonix wrote:
Sorry, it was a late night and didn't realise that it only holds UDF info :oops:
Is there any option to include ISO TOC along with UDF TOC though? it seems most DVD image making software includes both ISO and UDF format TOC in their headers.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 8:22 am 
Offline

Joined: Sun Feb 13, 2005 3:37 pm
Posts: 19
Quote:
IN PUDF_TREE_ITEM p__PUDF_TREE_ITEM__ISO9660UDFBridgeRootVideo
Pointer to UDF root node for VIDEO_TS directory.

Can this bridge only be used for UDF DVD Movie image?
My test folder doesn't contain VIDEO_TS/AUDIO_TS folders as I'm trying to build a data UDF image.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 02, 2005 9:49 am 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4089
Location: British Virgin Islands
Yes, StarBurn support DVD-Video file system for DVD-Video discs only. For random content you need to stick with either UDF or ISO9660 (Joliet).

Sonix wrote:
Quote:
IN PUDF_TREE_ITEM p__PUDF_TREE_ITEM__ISO9660UDFBridgeRootVideo
Pointer to UDF root node for VIDEO_TS directory.

Can this bridge only be used for UDF DVD Movie image?
My test folder doesn't contain VIDEO_TS/AUDIO_TS folders as I'm trying to build a data UDF image.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group