Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

Upgrade Packages

Aloittaja Metal_GunBlade, maaliskuu 04, 2006, 03:07:31 AP

« edellinen - seuraava »

Metal_GunBlade

Hi guys...

You see, I have previously made version 1.0 of my Avatars Package, now I have prepared a version 2.0, but I want it to be an Upgrade not a fresh install, so could someone please tell me what things should I change in the xml file so that it will be read as an upgrade and not a fresh install???

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<name>Female Avatars Extra</name>
<id>Metal_GunBlade;Female Avatars Extra</id>
<type>avatar</type>
<version>2.0</version>
<install>
<readme type="inline">Thank you for choosing this avatar pack, can be easily installed via package manager, works great with all versions of SMF... Enjoy!
<br /><strong>P.S: CONTINUE ONLY IF YOU HAVE VERSION 1.0 INSTALLED...</strong></readme>
<require-file name="Aishwaria Rai.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Ashley Hartman.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Busy Phillips.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Catherine Zeta Jones.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Gessica Iachini.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Josie Maran.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Laetitia Casta.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Lisa Martinaglia.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Sienna Miller.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Victoria Pratt.jpg" destination="$avatardir/Female Avatars Extra" />
</install>
<uninstall>
<remove-file name="$avatardir/Female Avatars Extra/Aishwaria Rai.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Ashley Hartman.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Busy Phillips.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Catherine Zeta Jones.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Gessica Iachini.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Josie Maran.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Laetitia Casta.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Lisa Martinaglia.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Sienna Miller.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Victoria Pratt.jpg" />
</uninstall>
</package-info>


Thank you...
Life is ours to be spent, not to be saved

Metal_GunBlade

*Bump* Bringing this topic back to the top... Come on guys, there must be someone who know how to do it...
Life is ours to be spent, not to be saved

Daniel15

Hi,
To do this, you use the <upgrade> tag. For example:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<name>Female Avatars Extra</name>
<id>Metal_GunBlade;Female Avatars Extra</id>
<type>avatar</type>
<version>2.0</version>
<upgrade from="1.0">
<readme type="inline">Thank you for choosing this avatar pack, can be easily installed via package manager, works great with all versions of SMF... Enjoy!
<br /><strong>P.S: CONTINUE ONLY IF YOU HAVE VERSION 1.0 INSTALLED...</strong></readme>
<require-file name="Aishwaria Rai.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Ashley Hartman.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Busy Phillips.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Catherine Zeta Jones.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Gessica Iachini.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Josie Maran.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Laetitia Casta.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Lisa Martinaglia.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Sienna Miller.jpg" destination="$avatardir/Female Avatars Extra" />
<require-file name="Victoria Pratt.jpg" destination="$avatardir/Female Avatars Extra" />
</upgrade>
<uninstall>
<remove-file name="$avatardir/Female Avatars Extra/Aishwaria Rai.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Ashley Hartman.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Busy Phillips.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Catherine Zeta Jones.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Gessica Iachini.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Josie Maran.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Laetitia Casta.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Lisa Martinaglia.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Sienna Miller.jpg" />
<remove-file name="$avatardir/Female Avatars Extra/Victoria Pratt.jpg" />
</uninstall>
</package-info>


Notice I change the install tag to an upgrade one.

<upgrade from="1.0">

means that those files will be copied over if version 1.0 of your mod is installed.
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Advertisement: