-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME.plugins
30 lines (22 loc) · 1.35 KB
/
README.plugins
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
How to write extractor plugins for setup
========================================
Starting from version 1.4.0, setup can be easily extended to recognize
some additional archive formats through a plugin system. This document
describes the basic guidelines to write such a plugin.
- Use the sample plugin as a basis for the new plugin (sample.c). You
should probably copy this file in the plugins directory to a relevant
name.
- Look at other plugins to get an idea of what the implementation of the
Copy() and Size() functions should be like. The most important is probably
that you MUST use the I/O functions from file.h in order for the files
created by your plugin to be registered in setup (for uninstallation purposes).
Also it will give you transparent access to compressed files through Zlib, so
you may want to register additional extensions for your plugin (i.e. .ext.gz).
Also you must call explicitly the 'update' function given to you whenever you
can, to update the installation status that the user is presented with.
- Add your plugin on the 'PLUGINS = ...' line in the Makefile in the plugins
directory.
- Edit plugins/plugindefs.h and add declarations for your plugin's SetupPlugin
structure in there (this will allow it to be statically linked if desired).
- Test it! It's done...
Stéphane Peter <[email protected]>