- Extract the zip file
- Test that it will work on your version
- Create the needed directories & files
- Modify existing code (backing up the originals)
- Keeps a record of which mods are installed
This makes mods that affect core files much easier to install and easier to maintain.
SMF uses an XML based script like the one below:
Code: Select all
<operation>
<search position="after">string1</search>
<add>string2</add>
<search>xxx</search>
<replace>yyy</replace>
</operation>
Wordpress has a fairly advanced plugin API that seems quite involved, so I'm not really looking to their system.
PHPBB has a community created "EasyMod" addon that does something similar to the way that I usually type in the forums when explaining mods
Code: Select all
--- FIND ---
string 1
-------------
--- BEFORE, ADD ---
string 2
-------------
.patch
The last option I am looking into are ".patch" files. Patch files are popular on linux as they are generated from using the "diff" program. What's great about patch files is how easy they are to create and use, and that a single file can be used to create full directories, files, mods, etc.
The way it works is, You have 2 folders. Lets say v132_orig and v132_mods
v132_orig is the original code from the zip file
v132_mods has all your mods you've made for v132
You simply run "diff -ur v132_orig v132_mods > mychanges.patch"
That will generate a file of all the differences between the 2 folders and output it in a unified format to a single file.
This can be done easily in Windows as well by downloading the GnuWin32 diff package which includes the diff program.
I have a php patching script that can take the resulting patch file and execute it on your store, making all the changes needed. I can do this from the admin area by simply uploading the patch file and clicking "install". That's it!
So I'm leaning towards patch files at this time, at least for the first step. Perhaps later additional methods could be added. But I'd like to hear what others might have to say about it. Or other package installing systems you've used and liked.