Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Creating a package system
01-15-2008, 04:23 PM #1
- Join Date
- Jan 2006
- Thanked 0 Times in 0 Posts
Creating a package system
Hi, I want to learn how to create a package system like SMF's package system so that I can release modifications to my script easily.
The user can just download a patch file or a mod file, upload it to the server, and then my script would parse the actions, then add/remove/replace code in the files. That way, code modifications are automatic and the user doesn't need to go into the code. I'm wondering how I could create this script.
Does anybody know how the package system in SMF works, and how I could code something similar? It doesn't need to be very advanced, just a simple one will do.
Or, does anybody know of another way in which I can release code modifications easily?
I'm just stuck on how I could parse this kind of file and then perform the actions. What functions would I use for what?
btw, here's an example mod file from SMF (it's an old version):
-- This information needs to be the same as that in the package-info.xml. -- <id>username:testing123</id> <version>1.0</version> -- Edit a specific file.. -- <edit file>$sourcedir/Filename.php</edit file> -- The code to search for. -- <search for> Search for some code to add stuff after. </search for> -- Add this text when we find it, after what we found. --> <add after> This is what to add. </add after> <search for> Another search operation? </search for> <replace> Yes, another. This time, replacing! </replace>
I have an idea of how I want the format in JSON, and it's in another topic here: http://codingforums.com/showthread.php?t=131314
Last edited by Zegg90; 01-15-2008 at 04:26 PM.