Results 1 to 3 of 3

Thread: FUSE driver for mounting .pack as virtual filesystem (for OSX and Linux)

  1. #1
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default FUSE driver for mounting .pack as virtual filesystem (for OSX and Linux)

    I'm not even going to pretend I did it to greatly advance the modding community,
    I was just looking for an excuse to play with fuse for very long time,
    and that one was as good as they get.

    With this driver (available from etwng repository) you can use .packs
    the way CA intended - as virtual filesystem.

    It's just like mounting a DVD image in .iso format, except you can mount
    multiple packs together, and driver will pick correct version from proper
    file (it doesn't do dependency headers yet, only pack types and whatever
    order you specified, I'll add that later).

    It looks like this (on random bunch of pack files I had around, notice how they're ordered):
    Spoiler Alert, click show to read: 
    $ cd ~/etwng/pack/fuse
    $ make
    g++ -D__FreeBSD__=10 -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -I/usr/local/include/fuse -Wall -g -Wno-deprecated -arch i386 -lfuse -o packfs packfs.cc
    $ ./packfs etw_packs/*.pack fs
    $ Loading pack etw_packs/boot.pack
    Loading pack etw_packs/anim.pack
    Loading pack etw_packs/battlepresets.pack
    Loading pack etw_packs/battleterrain.pack
    Loading pack etw_packs/groupformations.pack
    Loading pack etw_packs/local_en.pack
    Loading pack etw_packs/main.pack
    Loading pack etw_packs/models.pack
    Loading pack etw_packs/seasurfaces.pack
    Loading pack etw_packs/sound_non_wavefile_data.pack
    Loading pack etw_packs/sounds.pack
    Loading pack etw_packs/sounds_animation_triggers.pack
    Loading pack etw_packs/sounds_campaign.pack
    Loading pack etw_packs/sounds_music.pack
    Loading pack etw_packs/sounds_other.pack
    Loading pack etw_packs/sounds_sfx.pack
    Loading pack etw_packs/subtitles.pack
    Loading pack etw_packs/supertexture.pack
    Loading pack etw_packs/terrain_templates.pack
    Loading pack etw_packs/testdata.pack
    Loading pack etw_packs/ui.pack
    Loading pack etw_packs/voices.pack
    Loading pack etw_packs/patch.pack
    Loading pack etw_packs/patch2.pack
    Loading pack etw_packs/patch3.pack
    Loading pack etw_packs/patch4.pack
    Loading pack etw_packs/patch_en.pack
    Loading pack etw_packs/instant_research.pack
    Loading pack etw_packs/mod_Jedi_mod_v5_2_v3_0_vanilla.pack
    Loading pack etw_packs/movies.pack
    Loading pack etw_packs/patch_media.pack
    Loading pack etw_packs/ui_movies.pack
    $ ls -l fs/db/units_tables/
    total 448
    -r--r--r-- 1 root 831 2010-02-18 17:32 Fix_Maratha_units
    -r--r--r-- 1 root 31571 2010-02-18 17:32 Jedi_NAN_units
    -r--r--r-- 1 root 6259 2010-02-18 17:32 Jedi_eua_units
    -r--r--r-- 1 root 4613 2010-02-18 17:32 Jedi_eue_units
    -r--r--r-- 1 root 16643 2010-02-18 17:32 Jedi_garisson_units
    -r--r--r-- 1 root 171767 2010-02-18 17:32 Jedi_units
    -r--r--r-- 1 root 212235 2010-02-17 10:05 units

    And then you can use them in Finder.app or any other application as normal files.

    File modification date is copied from pack, but the rest is just silly defaults.

    Everything is read-only just like with DVD images, and will most likely stay so.

    This driver will crash if you look at it in a funny way, but it will not crash rest of the system -
    it will just unmount and exit (that's how FUSE works).

    I only tested it on 32-bit OSX 10.5. Compiling it on Linux, OSX 10.6, essentially nearly everything
    including OpenSolaris (but not Windows), will take like 5-15 minutes of figuring out what are your correct fuse compile options.

    I've heard rumors of Windows FUSE ports, and if they turn out to be true then you could have
    this driver on Windows by tomorrow, and that would probably be useful. Anyone from Windows
    world knows more about it?

  2. #2
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: FUSE driver for mounting .pack as virtual filesystem (for OSX and Linux)

    FUSE driver now supports both OSX and Linux.

    Any volunteers for making Windows port?

  3. #3
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: FUSE driver for mounting .pack as virtual filesystem (for OSX and Linux)

    Quick investigation reveals: dokan and winfuse.

    As far as I can tell porting FUSE packfs driver to either of them is a one weekend project,
    even if you don't know terribly much about fuse.

    Still no volunteers ;-) ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •