Jump to content

RFC: The Package System


W3bbo

Recommended Posts

(For those not in the know, RFC means "Request for Comments")

Because everyone loves extensibility here's the plan for Anolis 1.0 / xpize 5 / Vize 2, the plan is that the application binaries won't need to be changed for each distribution of the software. Instead the program will be bundled with a file that tells it what to look like (a zip file (with a different extension) containing a simple file telling it what images to load where, and a string table). This controls what the program itself looks like (no installation will be necessary, just run it from where you extracted it to).

These "Distributions" come with one or more "Packages", which is another zip file containing an XML file which details what files are patched or installed. The file also contains details on author attribution and a URL where an updated version might be downloaded from (the software does a HTTP GET on the given URL which is for a simple text file containing on Line 1: the latest version of the package, Line 2: a short description of the changes made, and Line 3: the URL to download the new package from).

A Package is made up of one or more "Sets", a Set is then a list of changes to make to any number of files or files to install. You can define the conditions for patching files based on a file's VS_VERSIONINFO structure as well as a few other rules. I'm open to suggestions. Sets can also be marked as being mutually-exclusive of each other (see the example below).

(Note this isn't the actual XML format in use, just an approximation for illustration. And apologies for the lack of indentation);

<package>

<set id="core">

<!-- Details a file to be modified by replacing resources -->

<respatch path="%systemroot%\explorer.exe" condition="version<6.0;version>5.0">

<!-- Instructions to replace Icon#100 with the *.ico file in the package zip file with the following relative path: -->

<res id="100" type="ICON" src="/core/explorer.exe/100.ico" />

<res id="101" type="ICON" src="/core/explorer.exe/101.ico" />

</respatch>

<!-- Replace the file in path="" with the file in the package with relative location src="" -->

<replace path="%systemroot%\system32\quartz.dll" src="/core/quartz.dll" />

<!-- Self-explanatory. Wilcard characters allowed. Use wisely and do not abuse it. -->

<delete path="%systemroot%\uselessDirectory" />

<!-- Installs a file that isn't very special -->

<install destination="" src="" />

<!-- "Extras" get special-case handling. Support will be added for: Visual Styles, Wallpapers, Cursor Sets, Desktop Themes (Plus! 98 anyone?), and a few other things -->

<!-- During installation users will be asked which of the installable wallpapers/visual styles/etc... they wish to activate on next boot, but you can set defaults. -->

<extra type="wallpaper" name="Nifty" src="/wallpapers/nifty.jpg" default="true" />

<extra type="visualstyle" name="Royale Noir" src="/vstyles/royale/" default="true" />

<extra type="visualstyle" name="Zune Theme" src="/vstyles/zune/" />

</set>

<!-- This set cannot be select at the same time as the Black one as they both replace the same resources -->

<set id="blue" mutex="black">

...

</set>

<set id="black" mutex="blue">

....

</set>

</package>

So.... discuss :) This has implications for anyone interested in releasing their own Anolis distributions such as the KDE one, or Vista-for-XP.

Edited by W3bbo
Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...