├── License.txt
├── README.md
├── p7z_usr_0x9_a64.zip
├── p7z_usr_0x9_source.zip
└── test
└── test.cpp
/License.txt:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # p7z-usr
2 |
3 | -------------------------------------------------------
4 | P7Z Usr - Packer Plugin for DCMD on Linux
5 | -------------------------------------------------------
6 |
7 | Plugin for Double Commander (DCMD) that provides 7-Zip file archiver features.
8 | Open source, intended for Linux platforms.
9 | Its nain module is P7ZIP, a port of 7-Zip for POSIX systems.
10 |
11 |
12 | Library Information
13 | -------------------------
14 | Internally, P7Z Usr relies on a library file "7z.so".
15 |
16 | This is another shared library that is loaded dynamically
17 | and must be found durning this plugin initialization process.
18 |
19 | Locating "7z.so" library file:
20 | 1. File in the same dir "p7z_usr.wcx" is in.
21 | 2. Enviroment variable P7ZUSRWCX_7Z_SO_FILE containing full path,
22 | Ex: "$> export P7ZUSRWCX_7Z_SO_FILE=/path/to/7z.so"
23 |
24 | Recomended is #1, that is, keep compatible "7z.so" file in the same
25 | directory "p7z_usr.wcx" is in.
26 |
27 |
28 | Build Instructions
29 | -------------------------------
30 | 1. Unpack main P7Z Usr package file ("p7z_usr_xxxxx.zip") into selected directory.
31 | 2. Download P7ZIP version 15.09. Website: http://p7zip.sourceforge.net/
32 | 3. Unpack P7ZIP into "./p7zip/compatible_version", subdirectory of P7Z Usr.
33 | (Actually only ./CPP and ./C subdirectories are required for build process).
34 | 4. Locate the "makefile" file in "./projects/01_shared_lib" subdir.
35 | 5. Use this command to compile and build: "make release".
36 | (Note: the 'debug' build target is just a placeholder and currently has no use).
37 | 6. On successful build, shared library file "p7z_usr.wcx" will be
38 | creared in "./projects/01_shared_lib/bin/Release".
39 |
40 |
41 | Installation
42 | --------------------
43 | No special steps required, instructions below just follow standard
44 | steps as if to install any other WCX plugin in DCMD.
45 |
46 | Typically, creeate following new subdir under DCMD root directory:
47 | "./plugins/wcx/p7z_usr"
48 |
49 | Copy following files into it:
50 |
51 | * main plugin file: "p7z_usr.wcx".
52 | * configuration file: "p7z_usr.ini" (optional).
53 | * main P7ZIP library file, "7z.so" (or symlink to the file).
54 |
55 | Make sure "7z.so" library can be located by P7z Usr library,
56 | in case if using symlink instead of regular file.
57 |
58 | Default location for "7z.so" is the same directory "p7z_usr.wcx" is in,
59 | in this case:
60 | "./plugins/wcx/p7z_usr/7z.so"
61 |
62 | In DCMD go to Options then Plugins. In Packer Plugin tab click
63 | the "Add" button and select the "p7z_usr.wcx" file.
64 | In the "Tweak" dialog box, add the file extensions of file types for this plugin
65 | to open, see handlers list below.
66 |
67 | Notes:
68 | * this is a read-only plugin, omitting types supported by other, archive dedicated,
69 | plugins is recommended.
70 | * list of file types supported is long, direct editing of DCMD configuration file
71 | may be a better approach.
72 |
73 |
74 | Formats and suffix list sample
75 | -----------------------------------------
76 | Below is a dump of formats from "7z.so" version 15.09.
77 | Actual list is written to the console STDOUT on plugin initialization with debug mode on.
78 | More descriptive list can be found in an official 7-Zip documentation.
79 |
80 | 7z: [7z; ]
81 | APM: [apm; ]
82 | Ar: [ar a deb lib; ]
83 | Arj: [arj; ]
84 | bzip2: [bz2 bzip2 tbz2 tbz; * * .tar .tar]
85 | Cab: [cab; ]
86 | Chm: [chm chi chq chw; ]
87 | Hxs: [hxs hxi hxr hxq hxw lit; ]
88 | Compound: [msi msp doc xls ppt; ]
89 | Cpio: [cpio; ]
90 | CramFS: [cramfs; ]
91 | Dmg: [dmg; ]
92 | ELF: [elf; ]
93 | Ext: [ext ext2 ext3 ext4 img; ]
94 | FAT: [fat img; ]
95 | FLV: [flv; ]
96 | gzip: [gz gzip tgz tpz; * * .tar .tar]
97 | GPT: [gpt mbr; ]
98 | HFS: [hfs hfsx; ]
99 | IHex: [ihex; ]
100 | Iso: [iso img; ]
101 | Lzh: [lzh lha; ]
102 | lzma: [lzma; ]
103 | lzma86: [lzma86; ]
104 | MachO: [macho; ]
105 | MBR: [mbr; ]
106 | MsLZ: [mslz; ]
107 | Mub: [mub; ]
108 | Nsis: [nsis; ]
109 | NTFS: [ntfs img; ]
110 | PE: [exe dll sys; ]
111 | TE: [te; ]
112 | Ppmd: [pmd; ]
113 | QCOW: [qcow qcow2 qcow2c; ]
114 | Rar: [rar r00; ]
115 | Rar5: [rar r00; ]
116 | Rpm: [rpm; ]
117 | Split: [001; ]
118 | SquashFS: [squashfs; ]
119 | SWFc: [swf; ~.swf]
120 | SWF: [swf; ]
121 | tar: [tar ova; ]
122 | Udf: [udf iso img; ]
123 | UEFIc: [scap; ]
124 | UEFIf: [uefif; ]
125 | VDI: [vdi; ]
126 | VHD: [vhd; ]
127 | VMDK: [vmdk; ]
128 | wim: [wim swm esd; ]
129 | Xar: [xar pkg; ]
130 | xz: [xz txz; * .tar]
131 | Z: [z taz; * .tar]
132 | zip: [zip zipx jar xpi odt ods docx xlsx epub; ]
133 |
134 |
135 |
136 | Features and Limitations
137 | ---------------------------------
138 | [+] can browse or extract all archives 7-zip library can open.
139 | [+] configuration via INI file (documentation provided inside it).
140 | [+] should be forward compatible with P7ZIP libraries versions >= 15.09
141 | [-] read only
142 | [-] multi volume archives not supported
143 | [-] no file attributes
144 | [-] no Rar5 (can only see files are in the archive)
145 |
146 |
147 | FAQ
148 | -----------------------
149 |
150 | Q: What is "7z.so"?
151 | A: This is a Linux executable shared library, build by compiling P7ZIP project.
152 |
153 | Q: Where to get "7z.so"?
154 | A:
155 | Compile P7ZIP yourself or download from your linux distribution.
156 | Ubuntu has a binary package named "p7zip-full" that contains "7z.so".
157 | Note: Generally it is not a good idea to make P7Z Usr use this lib from
158 | an untested package.
159 |
160 | Q: How to build "7z.so"?
161 | A:
162 | See BUILD section in the README file of the P7ZIP.
163 | You can try the "make 7z" command, and if successfull, "7z.so"
164 | will be created in "./bin" subdirectory.
165 |
166 | Q: What is a Handler?
167 | A:
168 | It is an internal 7z module that handles particular archive type.
169 | For example: Iso handler, Chm handler, 7z, zip, ...
170 |
171 | Q: How to fix Access Voilation Errors on archives that should be handled?
172 | A:
173 | Some handlers inside some "7z.so" libs can cause theese.
174 | P7z Usr tries all handlers it finds in the library.
175 | Turning off problematic internal handlers using INI
176 | configuration may fix these problems.
177 |
178 | Q: How to diagnose which handlers aren't working properly?
179 | A:
180 | Set P7ZUSRWCX_DEBUG enviroment variable to turn on debug messages:
181 | $> export P7ZUSRWCX_DEBUG=1
182 | This causes various debug messages to be printed to the console STDOUT.
183 | Use Ctrl+PgDn, the "Try open archive" in DCMD, and
184 | find which (if any) handler tried comes as last in the incomplete list.
185 |
186 | Q: Why opening certain MSI archive file using Ctrl+PgDn yields
187 | contents of some CAB archive embeded inside it, rather
188 | than contents of MSI file itself?
189 | A:
190 | Opening files using Ctrl+PgDn is a method
191 | that tries handlers in predefined order, that does not take file
192 | extension into account.
193 | The algorithm looks at the begining of the archive file, from adderss 0 up to
194 | value specified by 'uCYHTFScanSize', and employs first handler that it finds
195 | suitable. Because list of handlers is orgainzed in an arbitrary order,
196 | it may happen that 'Cab' handler is tried before 'Compound' handler.
197 | Finally, if CAB file in question is embeded within first 8000002 bytes of the
198 | archive file, the whole archive file gets "prematurely" opened as 'Cab' archive.
199 |
200 | In short:
201 | * in handlers priority list 'Cab' handler appears before 'Compound' (MSI) handler.
202 | * CAB file is embeded within first 8000002 bytes of the MSI file.
203 |
204 | Solution 1:
205 | Edit handlers priority list and put 'Compound' before 'Cab'.
206 |
207 | Solution 2:
208 | Do not use Ctrl+PgDn on the MSI archive file in question.
209 | Make sure file extension "msi" is added in the plugin configuration,
210 | the 'Tweak' button in the DCMD Options in the Plugins section.
211 | Open MSI archive regural way, using Double-click or Enter key.
212 |
213 | References:
214 | * 'uCYHTFScanSize' default value is 8000002.
215 | * handlers priority list can be changed using 'szCYHTFHandlersPriority'.
216 |
217 | Links
218 | -------------------
219 | https://github.com/ikk00/p7z-usr
220 | http://doublecmd.sourceforge.net/
221 | http://doublecmd.sourceforge.net/forum/
222 | http://p7zip.sourceforge.net/
223 | http://www.7-zip.org/
224 | http://ikk.byethost9.com/
225 |
226 |
--------------------------------------------------------------------------------
/p7z_usr_0x9_a64.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ike9000e/p7z-usr/18892afbf33000fa0c47f7501c1f51efa19899c0/p7z_usr_0x9_a64.zip
--------------------------------------------------------------------------------
/p7z_usr_0x9_source.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ike9000e/p7z-usr/18892afbf33000fa0c47f7501c1f51efa19899c0/p7z_usr_0x9_source.zip
--------------------------------------------------------------------------------
/test/test.cpp:
--------------------------------------------------------------------------------
1 |
2 | template
3 | class TestClass{
4 | public:
5 | TestClass() {}
6 | };
7 | int main( int argc, const char*const* argv )
8 | {
9 | return 0;
10 | }
11 |
--------------------------------------------------------------------------------