The only changes made to this fork of the original repo are in the Makefile and this README
to enable compilation and usage on macOS. Specifically:
-
Makefile Adjustments:
- Set prefix to
/usr/local
to avoid read-only/usr/bin
, and modifieduninstall
to match. - Ensured the use of
clang++
as the default compiler. - Added macOS-specific flags and flags for C++ version compatibility.
- Set prefix to
-
README Updates:
- Added detailed installation instructions for macOS, including dependencies and environment variable setup.
- Added usage examples and instructions for mounting archives with
fuse-archive
.
I am not affiliated with Google. See the original README for more information, and for anything else, please refer to the canonical source codebase.
I am not responsible for any actions you take or any consequences that arise from using this code. Use it at your own risk.
Ensure you have Homebrew installed. If not, you can install it by following the instructions at brew.sh.
Install the required dependencies using Homebrew:
brew install libarchive macfuse pkg-config
git clone https://github.com/Alchemyst0x/fuse-archive.git && cd fuse-archive
Alternatively, if you'd rather clone the original repo and modify the Makefile yourself:
git clone https://github.com/google/fuse-archive.git && cd fuse-archive
Locate libarchive.pc
and add the directory containing this file to the PKG_CONFIG_PATH
variable, e.g.:
find $(brew --prefix) -name libarchive.pc
# Output:
# /opt/homebrew/Cellar/libarchive/3.7.4/lib/pkgconfig/libarchive.pc
export PKG_CONFIG_PATH="/opt/homebrew/Cellar/libarchive/3.7.4/lib/pkgconfig:/usr/local/lib/pkgconfig"
make all
Install the binary to /usr/local/bin
:
sudo make install
Run the fuse-archive
binary with the -h
flag to see the usage instructions:
./out/fuse-archive -h
For example, to mount a ZIP archive on a macOS system, you might do the following:
sudo fuse-archive -o allow_other /Users/YourUsername/some_zip_file.zip /Volumes/some_mounted_zip
You can then verify the mount was successful, e.g.:
ls /Volumes/some_mounted/zip
To uninstall the binary:
sudo make uninstall