You are not logged in.

#1 2009-12-22 17:17:18

teh
Member
From: Tijuana, Mexico
Registered: 2009-07-07
Posts: 374
Website

How to compress in 7z in GUI?

This is easy in terminal, but a 'mouse' way isn't bad at all sometimes.

When i right-clicked in any file/directory, i have a compress 'menu', that let me compress in various formats like ,tar, ,zip, ,tar.bz2, ,tar,gz and .gz. (and what app/package is this? hmm)
So i want to know how can i add a ".7z" option in that compress 'menu'?

Hope you can help, pretty sure it will be smile

I use PCManFM BTW,

Last edited by teh (2009-12-22 17:19:24)


arst

Offline

#2 2009-12-22 18:28:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to compress in 7z in GUI?

What archiver do you use?
tar isn't a compression format, it's an archiver.

Offline

#3 2009-12-22 19:07:57

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: How to compress in 7z in GUI?

I don't think you can enhance compression support of PCManFM without editing the source.

By a quick ``grep -R '\.zip' pcmanfm/src/'', I'm guessing you can add something like this to the file pcmanfm/src/ptk/ptk-file-archiver.c, in the `const ArchiveHandler handlers[]=' section:

         /* 7zip Archive Handler */
        {
            "application/x-7z-compressed",
            "7z a -t7z",
            "7z x",
            ".7z", TRUE
        }

Try recompile pcmanfm with this added.
Hope it works out for you.

Edit: Yeah, I've tested it: works fine for compress and extract!
       Note: you can't create tar.7z with this, and it won't be as simple I think.(needs a pipe, see man 7z)
       Also, you can add other archive formats (eg. xz, tar.xz) using this routine.

Last edited by lolilolicon (2009-12-23 03:38:35)


This silver ladybug at line 28...

Offline

Board footer

Powered by FluxBB