Author Topic: 1UserFiles.bin  (Read 12729 times)

Offline hervé

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
1UserFiles.bin
« on: September 21, 2010, 01:08:16 PM »
Hello Mark,

Concerning the uploaded 1UserFiles.bin : how can i put in it the pseudo file "XML?Dummy" ?

Offline hervé

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
1UserFiles.bin and 0HTTP
« Reply #1 on: September 22, 2010, 10:52:34 AM »
I also want to include 0HTTP :
When I write :
Code: [Select]
// -w [remove additional white space to minimise size for all html files]
// -T [File type]
0HTTP -w -T=MIME_HTML
link.htm -w -T=MIME_HTML
...

in the user_files.txt , uTaskerFileCreate does not include it

When I write:
Code: [Select]
0HTTP. -w -T=MIME_HTML
uTaskerFileCreate includes it , but fnFilterUserFile() does not find it ...

How can I make ?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3060
    • View Profile
    • uTasker
Re: 1UserFiles.bin
« Reply #2 on: September 22, 2010, 12:31:19 PM »
Hi Hervé

Please could you send me your files so that I can test this, so that I have exactly the same input as you?

Thanks in advance

Regards

Mark


Offline hervé

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: 1UserFiles.bin
« Reply #3 on: September 22, 2010, 12:36:01 PM »
T:\TGIP\Web>..\..\uTasker\Tools\uTaskerFileCreate -f user_files.txt 1UserFiles.bin
Adding file _link
Adding file _favicon
Adding file _Status
Adding file _2admin
Output files 1UserFiles.bin and 1UserFiles.c successfully created
Embedded user file collection target address = 0x60000
Embedded user table location = 0x611b0


with  user_files.txt =
// This file is used as input to which files are added to the packed user file table (avoid tab use)
#define FILE_HEADER_LEN 5 // this must match with uFileSystem setting
#define MAX_FILE_LENGTH 4 // size in bytes
#define BIG_ENDIAN 0 // target is big-endian - set 0 for little
#define ALIGN 1 // align the table to allow direct accesses to long pointers - set 0 if not important

#define FILE_VISIBLE 0 // defines for use when generating binary content - use only decimal input
#define FILE_INVISIBLE 1
#define FILE_ADD_EXT 2

#define MIME_HTML                  0
#define MIME_JPG                   1
#define MIME_GIF                   2
#define MIME_CSS                   3
#define MIME_JAVA_SCRIPT           4
#define MIME_BINARY                5
#define MIME_TXT                   6
#define MIME_ICON                  7
#define MIME_BMP                   8

%60000 // location (hex) in uFileSystem (eg. corresponding to '1' if param are at the beggining)

// -w [remove additional white space to minimise size for all html files]
// -T [File type]
0HTTP -w -T=MIME_HTML
link.htm -w -T=MIME_HTML
favicon.ico -T=MIME_ICO
Status.htm -w -T=MIME_HTML
2admin.htm -w -T=MIME_HTML
XML?Dummy -w -T=MIME_HTML

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3060
    • View Profile
    • uTasker
Re: 1UserFiles.bin
« Reply #4 on: September 22, 2010, 12:51:03 PM »
Hi Hervé

Could you also check which version of the conversion tool you are using?

There was an error corrected here (but I don't see a direct link to your difficulty):
http://www.utasker.com/forum/index.php?topic=873.msg4146#msg4146

Regards

Mark


Offline hervé

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: 1UserFiles.bin
« Reply #5 on: September 22, 2010, 12:54:32 PM »
T:\uTasker\Tools>uTaskerFileCreate -v
      uTaskerFileCreate V1.2

I think it's the last one

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3060
    • View Profile
    • uTasker
Re: 1UserFiles.bin
« Reply #6 on: September 22, 2010, 01:07:30 PM »
Hi Hervé

Yes, this is the latest version.

The basic problem is that the input files are expected to be in the form xxxxx.yyy (that is, to have an extension). I get errors messages and the program terminates when this is not the case.

Could you also send me the 0HTTP and XML?Dummy files that you are using as input? 0HTTP is possible (without extension) but XML?Dummy is not since this is not a valid file name.

If this is the basic problem I think that it will be necessary to be able to set an attribute so that a file with a different, valid name can be converted to the desired output name.

Please confirm....

Regards

Mark

Offline hervé

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: 1UserFiles.bin
« Reply #7 on: September 22, 2010, 01:11:19 PM »
T:\TGIP\Web>..\..\uTasker\Tools\uTaskerFileCreate -f user_files.txt 1UserFiles.bin
Adding file _0HTTP
Adding file _link
Adding file _favicon
Adding file _Status
Adding file _2admin
Output files 1UserFiles.bin and 1UserFiles.c successfully created
Embedded user file collection target address = 0x60000
Embedded user table location = 0x612b4


with
 
...
0HTTP. -w -T=MIME_HTML
...

but fnFilterUserFile() does not math :


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3060
    • View Profile
    • uTasker
Re: 1UserFiles.bin
« Reply #8 on: September 22, 2010, 02:41:16 PM »
Hi Hervé

I have made a modification to the utility that should help in these cases (uTaskerFileCreate V1.3).

So that files without extensions can be easily recognised they should be marked as follows ('|' used as terminator):

0HTTP| -w -T=MIME_HTML

This allows the parser to identify that the end of the file name has been reached and that it is not simply a space in the name.

XML?Dummy| -c=FILE_INVISIBLE -w -T=MIME_HTML

The same is true for the XML?dummy since it doesn't have an extension. The -c=FILE_INVISIBLE is not necessary but I added it so that the file is not displayed in the file system.
The new version will store the file name XML?Dummy in the embedded file but, since this is not a valid name for a file on the PC it expects to be able to find a file called "XML-Dummy". Therefore you need to put the content to be served by XML?Dummy into a file called "XML-Dummy".

This is the output from a test with these two files plus the link.htm file (I simply removed others):

uTaskerFileCreate -f userfiles.txt 1UserFiles.bin
Adding file _0HTTP
Adding file _link
Adding file _XML?Dummy
Output files 1UserFiles.bin and 1UserFiles successfully created
Embedded user file collection target address = 0x60000
Embedded user table location = 0x6002c


The C-File output looks correct:

Code: [Select]
static const unsigned char _0HTTP[] = {
0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,
};

static const unsigned char _link[] = {
};

static const unsigned char _XML?Dummy[] = {
0x74,0x65,0x73,0x74,
};

static const USER_FILE user_files[] = {
{"0HTTP", (unsigned char *)_0HTTP, sizeof(_0HTTP), MIME_HTML, FILE_VISIBLE},
{"link.htm", (unsigned char *)_link, sizeof(_link), MIME_HTML, FILE_VISIBLE},
{"XML?Dummy", (unsigned char *)_XML?Dummy, sizeof(_XML?Dummy), MIME_HTML, FILE_INVISIBLE},
{0} // end of list
};


Therefore I am assuming that also the binary output is now good.

Please confirm that this works for you. I don't think that these changes otherwise cause any compatibility problems with the utility.

Regards

Mark






Offline hervé

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: 1UserFiles.bin
« Reply #9 on: September 22, 2010, 03:09:36 PM »
Thank you for this rapid change.

It works fine.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3060
    • View Profile
    • uTasker
Re: 1UserFiles.bin
« Reply #10 on: November 11, 2010, 12:57:05 PM »
Hi

Please note that there is a new version V1.4 which solves some problems with combinations of options not always being recognised correctly. It also allows files to be included with sub-directories paths - eg. "images/picture.jpg"

Regards

Mark


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3060
    • View Profile
    • uTasker
Re: 1UserFiles.bin
« Reply #11 on: March 29, 2011, 11:37:10 PM »
Hi All

Version V1.6:
// V1.5 solves problem with image names like "image/" being generated by V1.4
// V1.6 solves problem with images without -x controls

Regards

Mark

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3060
    • View Profile
    • uTasker
Re: 1UserFiles.bin
« Reply #12 on: March 30, 2011, 05:40:27 PM »
Hi All

Another version (V1.7) which recognises monochrome bits maps that are already colour inverted.

Regards

Mark