Tag in package-info.xml for uninstall only upgrade modifications

Started by davidhs, September 07, 2011, 08:40:35 AM

Previous topic - Next topic

davidhs

In 2.0 RC3 and previous, I can install/uninstall several upgrade packages without uninstall original package:
#1. Install original package.
#2. Install upgrade package 1.
#3. Uninstall upgrade package 1. This only uninstall the upgrade 1, not original package.
#4. Install upgrade package 2.
#5. Uninstall oupgrade package 2. This only uninstall the upgrade 2, not original package.

In 2.0 RC4 was fix:
SMF 2.0 RC4
June 2010
--------------------------------------------------------------------------------
! Uninstalling an upgrade did not set older versions as uninstalled. (Packages.php) [Bug 925]


and now (from 2.0 RC4 to 2.0 final) I can not do incremental upgrade because step
#3. Uninstall upgrade package 1.
uninstall upgrade and mark original package as uninstall.

I think that is necesary a new tag in package-info.xml for uninstall only upgrade (i.e. <degrade> or <uninstall type="upgrade">

With this new tag:

1. package-info.xml who contains <upgrade> and <uninstall> will be used for install upgrade and uninstall all (upgrade+original), It is like now.

2. package-info.xml who contains <upgrade> and <degrade> will be used for install upgrade and uninstall only upgrade, and original package still is install. It is like 2.0 RC3 and previous.

feline

The question is ... for what you need a upgrade uninstall?
The normal work flow process for a mod author is follow:
1.. create a package from first release with install / uninstall.
2.. apply changes with a second package with a install / upgrade / uninstall
3.. apply more changes with a third package with a install / upgrade / uninstall

So you can continue the work flow and if you don't need the mod, you can make a simple uninstall.
If the upgrade not work properly, you can uninstall the mod and reinstall the previous release.

davidhs

I need a upgrade unistall because with current upgrade I need copy all uninstall files for all version of SMF support by my MOD.

i.e. I have my MOD with many install/uninstall for each version of SMF. When I add a language I have create a line for each install/uninstall.

My package-info.xml is
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ATTENTION: If you are trying to install this manually, you should try
the package manager.  If it will not work for you, please take a look
at the following for information on this format:
http://mods.simplemachines.org/docs/manual-install.php
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>davidhs:PurgeMemberEnhancement</id>
<name>Enhancements to purge inactive members</name>
<version>1.3</version>
<type>modification</type>

<install for="2.0 Beta 3.1 Public, 2.0 Beta 4">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.Beta3.1-2.0.Beta4.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
<modification type="file" format="xml">languages/croatian.xml</modification>
<modification type="file" format="xml">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml">languages/english-utf8.xml</modification>
<modification type="file" format="xml">languages/english_british.xml</modification>
<modification type="file" format="xml">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml">languages/russian.xml</modification>
<modification type="file" format="xml">languages/russian-utf8.xml</modification>
<modification type="file" format="xml">languages/serbian_latin.xml</modification>
<modification type="file" format="xml">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish.xml</modification>
<modification type="file" format="xml">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_es.xml</modification>
<modification type="file" format="xml">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_latin.xml</modification>
<modification type="file" format="xml">languages/spanish_latin-utf8.xml</modification>
</install>
<install for="2.0 RC1-2.0 RC1.2">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.RC1.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
<modification type="file" format="xml">languages/croatian.xml</modification>
<modification type="file" format="xml">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml">languages/english-utf8.xml</modification>
<modification type="file" format="xml">languages/english_british.xml</modification>
<modification type="file" format="xml">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml">languages/russian.xml</modification>
<modification type="file" format="xml">languages/russian-utf8.xml</modification>
<modification type="file" format="xml">languages/serbian_latin.xml</modification>
<modification type="file" format="xml">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish.xml</modification>
<modification type="file" format="xml">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_es.xml</modification>
<modification type="file" format="xml">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_latin.xml</modification>
<modification type="file" format="xml">languages/spanish_latin-utf8.xml</modification>
</install>
<install for="2.0 RC2-2.0 RC3">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.RC2-2.0.RC3.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
<modification type="file" format="xml">languages/croatian.xml</modification>
<modification type="file" format="xml">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml">languages/english-utf8.xml</modification>
<modification type="file" format="xml">languages/english_british.xml</modification>
<modification type="file" format="xml">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml">languages/russian.xml</modification>
<modification type="file" format="xml">languages/russian-utf8.xml</modification>
<modification type="file" format="xml">languages/serbian_latin.xml</modification>
<modification type="file" format="xml">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish.xml</modification>
<modification type="file" format="xml">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_es.xml</modification>
<modification type="file" format="xml">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_latin.xml</modification>
<modification type="file" format="xml">languages/spanish_latin-utf8.xml</modification>
</install>
<install for="2.0 RC4">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.RC4.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
<modification type="file" format="xml">languages/croatian.xml</modification>
<modification type="file" format="xml">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml">languages/english-utf8.xml</modification>
<modification type="file" format="xml">languages/english_british.xml</modification>
<modification type="file" format="xml">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml">languages/russian.xml</modification>
<modification type="file" format="xml">languages/russian-utf8.xml</modification>
<modification type="file" format="xml">languages/serbian_latin.xml</modification>
<modification type="file" format="xml">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish.xml</modification>
<modification type="file" format="xml">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_es.xml</modification>
<modification type="file" format="xml">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_latin.xml</modification>
<modification type="file" format="xml">languages/spanish_latin-utf8.xml</modification>
</install>
<install for="2.0 RC5">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.RC5.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
<modification type="file" format="xml">languages/croatian.xml</modification>
<modification type="file" format="xml">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml">languages/english-utf8.xml</modification>
<modification type="file" format="xml">languages/english_british.xml</modification>
<modification type="file" format="xml">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml">languages/russian.xml</modification>
<modification type="file" format="xml">languages/russian-utf8.xml</modification>
<modification type="file" format="xml">languages/serbian_latin.xml</modification>
<modification type="file" format="xml">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish.xml</modification>
<modification type="file" format="xml">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_es.xml</modification>
<modification type="file" format="xml">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_latin.xml</modification>
<modification type="file" format="xml">languages/spanish_latin-utf8.xml</modification>
</install>
<install for="2.0">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
<modification type="file" format="xml">languages/croatian.xml</modification>
<modification type="file" format="xml">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml">languages/english-utf8.xml</modification>
<modification type="file" format="xml">languages/english_british.xml</modification>
<modification type="file" format="xml">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml">languages/russian.xml</modification>
<modification type="file" format="xml">languages/russian-utf8.xml</modification>
<modification type="file" format="xml">languages/serbian_latin.xml</modification>
<modification type="file" format="xml">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish.xml</modification>
<modification type="file" format="xml">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_es.xml</modification>
<modification type="file" format="xml">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_latin.xml</modification>
<modification type="file" format="xml">languages/spanish_latin-utf8.xml</modification>
</install>

<uninstall for="2.0 Beta 3.1 Public, 2.0 Beta 4">
<modification type="file" format="xml" reverse="true">modification-2.0.Beta3.1-2.0.Beta4.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin-utf8.xml</modification>
</uninstall>
<uninstall for="2.0 RC1-2.0 RC1.2">
<modification type="file" format="xml" reverse="true">modification-2.0.RC1.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin-utf8.xml</modification>
</uninstall>
<uninstall for="2.0 RC2-2.0 RC3">
<modification type="file" format="xml" reverse="true">modification-2.0.RC2-2.0.RC3.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin-utf8.xml</modification>
</uninstall>
<uninstall for="2.0 RC4">
<modification type="file" format="xml" reverse="true">modification-2.0.RC4.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin-utf8.xml</modification>
</uninstall>
<uninstall for="2.0 RC5">
<modification type="file" format="xml" reverse="true">modification-2.0.RC5.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin-utf8.xml</modification>
</uninstall>
<uninstall for="2.0">
<modification type="file" format="xml" reverse="true">modification-2.0.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin-utf8.xml</modification>
</uninstall>

</package-info>

In this code I have repeated 12 times <modification> with languages.

With <degrade> I can do two packages:
- Normal: package-info.xml is
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ATTENTION: If you are trying to install this manually, you should try
the package manager.  If it will not work for you, please take a look
at the following for information on this format:
http://mods.simplemachines.org/docs/manual-install.php
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>davidhs:PurgeMemberEnhancement</id>
<name>Enhancements to purge inactive members</name>
<version>1.3</version>
<type>modification</type>

<install for="2.0 Beta 3.1 Public, 2.0 Beta 4">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.Beta3.1-2.0.Beta4.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
</install>
<install for="2.0 RC1-2.0 RC1.2">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.RC1.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
</install>
<install for="2.0 RC2-2.0 RC3">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.RC2-2.0.RC3.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
</install>
<install for="2.0 RC4">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.RC4.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
</install>
<install for="2.0 RC5">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.RC5.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
</install>
<install for="2.0">
<readme>readme.txt</readme>
<modification type="file" format="xml">modification-2.0.xml</modification>
<modification type="file" format="xml">languages/english.xml</modification>
</install>

<uninstall for="2.0 Beta 3.1 Public, 2.0 Beta 4">
<modification type="file" format="xml" reverse="true">modification-2.0.Beta3.1-2.0.Beta4.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
</uninstall>
<uninstall for="2.0 RC1-2.0 RC1.2">
<modification type="file" format="xml" reverse="true">modification-2.0.RC1.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
</uninstall>
<uninstall for="2.0 RC2-2.0 RC3">
<modification type="file" format="xml" reverse="true">modification-2.0.RC2-2.0.RC3.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
</uninstall>
<uninstall for="2.0 RC4">
<modification type="file" format="xml" reverse="true">modification-2.0.RC4.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
</uninstall>
<uninstall for="2.0 RC5">
<modification type="file" format="xml" reverse="true">modification-2.0.RC5.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
</uninstall>
<uninstall for="2.0">
<modification type="file" format="xml" reverse="true">modification-2.0.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english.xml</modification>
</uninstall>

</package-info>

- Upgrade: package-info.xml is
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ATTENTION: If you are trying to install this manually, you should try
the package manager.  If it will not work for you, please take a look
at the following for information on this format:
http://mods.simplemachines.org/docs/manual-install.php
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>davidhs:PurgeMemberEnhancement</id>
<name>Enhancements to purge inactive members</name>
<version>1.3 languages 20110831</version>
<type>language</type>

<upgrade from="1.3">
<modification type="file" format="xml">languages/croatian.xml</modification>
<modification type="file" format="xml">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml">languages/english-utf8.xml</modification>
<modification type="file" format="xml">languages/english_british.xml</modification>
<modification type="file" format="xml">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml">languages/russian.xml</modification>
<modification type="file" format="xml">languages/russian-utf8.xml</modification>
<modification type="file" format="xml">languages/serbian_latin.xml</modification>
<modification type="file" format="xml">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish.xml</modification>
<modification type="file" format="xml">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_es.xml</modification>
<modification type="file" format="xml">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml">languages/spanish_latin.xml</modification>
<modification type="file" format="xml">languages/spanish_latin-utf8.xml</modification>
</upgrade>

<degrade>
<modification type="file" format="xml" reverse="true">languages/croatian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/croatian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british.xml</modification>
<modification type="file" format="xml" reverse="true">languages/english_british-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_brazilian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt.xml</modification>
<modification type="file" format="xml" reverse="true">languages/portuguese_pt-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian.xml</modification>
<modification type="file" format="xml" reverse="true">languages/russian-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/serbian_latin-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_es-utf8.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin.xml</modification>
<modification type="file" format="xml" reverse="true">languages/spanish_latin-utf8.xml</modification>
</degrade>

</package-info>


Perhaps exists other way to do this, without upgrade... I do not know.

feline


davidhs

Quote from: feline on September 10, 2011, 11:47:54 AM
Sorry .. I don't understand your logic ...
Sorry for my poor English. I try a better explanation.

I want update my MOD with more languages
- without repeat 12+ times all languages, one for each SMF version (this occurs if I write only one package)
- without write uninstall sentences in language upgrade package (this occurs if I write one package for code of MOD and other package for upgrade language).

I tried write two packagues with same ID
1. type modification, version 1.0
2. type language, version 1.0 lang 20110912
but... I can not install both because are same ID :(

青山 素子

Quote from: davidhs on September 12, 2011, 02:15:43 PM
I want update my MOD with more languages
- without repeat 12+ times all languages, one for each SMF version (this occurs if I write only one package)

You can use wildcards in the version numbers. Version 1.1.* will target all 1.1 versions (except for 1.1 itself).


Quote from: davidhs on September 12, 2011, 02:15:43 PM
- without write uninstall sentences in language upgrade package (this occurs if I write one package for code of MOD and other package for upgrade language).

Not sure what you mean by this.



Quote from: davidhs on September 12, 2011, 02:15:43 PM
I tried write two packagues with same ID
1. type modification, version 1.0
2. type language, version 1.0 lang 20110912
but... I can not install both because are same ID :(

That is correct. You can't duplicate the package ID because that's how the packages are identified.

There are also ways to apply upgrades on top of older versions using the XML package format. Look at the Coding Discussion board stickies for information on how to learn about that.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Advertisement: