Author Topic: Can anyone compile xCHM for Qtopia or x  (Read 4102 times)

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Can anyone compile xCHM for Qtopia or x
« on: August 23, 2004, 12:35:02 pm »
Can anyone compile xCHM found here for Qtopia or xQt?

I can't, don't know how.

The main reason I'd like to use xCHM is I have lots of web site copies, books in html etc, that I have on a CF card to read on the Zaurus. However there's lots of small, say 500 byte files, which howere take up 4 kilos each, because of the FAT allocation unit size. So a site which is only 20 MB for instance takes up 200 MB, it's terrible.

But if I could pack the whole site into a CHM file and read it on the Zaurus this would save a hell of a lot of space.

Any ideas?

Thanks.

Later.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Can anyone compile xCHM for Qtopia or x
« Reply #1 on: August 24, 2004, 03:44:50 am »
If your original source is html then you could try Plucker (or JPluck) or MobiPocket formats. I know that Plucker/JPluck will download multiple pages and pack them into a single compressed file. I'm not so sure about the MobiPocket tools but there are some available for free which may work, especially as Mobipocket format is just compressed html anyway.

Both Plucker and Mobipocket formats are compatible with JustReader (I think) and definitely with opie-reader (providing you don't use the encryption/copy protection schemes).

Of course, if you have a lot of tables in your web pages then opie-reader at least probably isn't your best choice.

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Can anyone compile xCHM for Qtopia or x
« Reply #2 on: August 25, 2004, 02:01:18 pm »
OK, tried both, can say with confidence it doesn't work. I guess it's because both Plucker and MobiPocket tools both do some modifications to the files etc. so for complicated html the resulting output is mostly garbage. I.e. the ebook files contain the text, but it's messed up, many links don't work, strangely ordered etc. So basically not useable.

Whereas CHM would be perfect.

But unless someone compiles it, then I guess no CHM files on the Zaurus...

Anyone?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Can anyone compile xCHM for Qtopia or x
« Reply #3 on: August 25, 2004, 02:12:32 pm »
Pack your files into a cramfs volume and mount that.

That will get around the cluster size issue.
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Can anyone compile xCHM for Qtopia or x
« Reply #4 on: August 25, 2004, 02:21:22 pm »
Wow, great advice.

Could you point me to a newbie howto for cramfs? I've never done it...

Thanks.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Can anyone compile xCHM for Qtopia or x
« Reply #5 on: August 25, 2004, 02:31:08 pm »
OK, boot Linux on your desktop.

If you don't have Linux running on your desktop then you probably want to download Knoppix or one of SuSE Live CD and boot that.

Create a directory with the files in it that you want to cram.

Run mkfs.cramfs <directory> <outputfile>

That's it !, now assume that your file is called myfilesys.cramfs and is in /mnt/card

Copy to the Z and mount with....

mkdir /mnt/myfilesys
mount -t cramfs /mnt/card/myfilesys.cramfs /mnt/myfilesys -o loop

[oops, hope you didn't see the typo...]

You can add it to the fstab too if you want, however, that is beyond the scope of this message (dinner is nearly ready).

Hope this helps,

Andy
« Last Edit: August 25, 2004, 02:42:38 pm by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Can anyone compile xCHM for Qtopia or x
« Reply #6 on: August 25, 2004, 04:37:57 pm »
OK, I did the following, and need some more help, I think.

I use a Vaio notebook under XP with the NTFS file system, thus not easy to boot Knoppix and then access the harddisk.

So found mkcramfs Win32 here.

Converted some directory, containing a web site copy, to a cramfs volume.

On the zaurus, copied it to a cramfs subdir on the CF, created an empty dir for it, and then I had to do the following:

su
mknod /dev/loop2 b 7 2
mount -t cramfs /mnt/cf/cramfs/test.cramfs /mnt/cf/cramfs/test -o loop

This went OK.

Now I see the dir, and the index.htm file in it, but it's empty.

I.e. doing cat index.htm, there's no output, and most of the files in the subdir of the test dir are now empty, though they shouldn't be.

Is this a problem of the mkcramfs Win32 package, i.e. that it's not doing a good job at converting the files to cramfs? I did get the following error when I ran mkcramfs:

warning: gids truncated to 8 bits (this may be a security concern)

I tried and tried to find a mkfs.cramfs or mkcramfs for Cygwin, but no luck. Where should I look?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Can anyone compile xCHM for Qtopia or x
« Reply #7 on: August 25, 2004, 05:24:53 pm »
Sounds like the Win32 version of mkcramfs is causing problems here.

If on the chance that it is trying to interpolate permissions off NTFS, however, you may want to try granting the group 'Everyone' appropriate access over the folder before you run it. This may work.

Haven't time to fire up a Windows VM at the moment to take a look.

Anyway, try that, also try some test files in a dir on a FAT partition (on a floppy?) and see if they cram correctly.

Let us know what happens,

Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Can anyone compile xCHM for Qtopia or x
« Reply #8 on: August 26, 2004, 07:35:58 am »
Well, so far not lucky. I have permissions for everyone set on the folder. Tried cramming it on a FAT CF like you advised. However, the result is the same. When mounted the files, though showing a concrete file size seem to be empty.

Cat gives no output, when I tried viewing them in Midnight Commander on the Zaurus, I get a "lynx: not found" and "Empty output from child filter" errors.

Also downloaded the mkcramfs.arm package from the web, but when I try to run it on the Zaurus I get

Code: [Select]
./mkcramfs.arm: error while loading shared libraries: ./mkcramfs.arm undefined symbol: _udivsi3
Man, to be so close and not get it working... I can't believe it.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze