Skip to Content

Install.xml of NetWeaver Mobile Client Patch Decoded


Introduction of install.xml

The install.xml is the file which contains the instruction set for patching of the NetWeaver  Mobile client.

This file is also sometimes modified by customers to patch some jars which they might be using (Ex: jar containing the encryption algorithm for disc synchronization). Sometimes they also modify it to reduce the size of the patch by removing some specific folders and modifying the file accordingly. In certain cases they might want to put a property in a property file with the help of this file.

From Mobile client’s patching perspective this file is the most important file in the patch. Without this file the patching process will not know what it should do with the patch.

Through this file the client installer (the process that does the patching of the NetWeaver Mobile Client) can be instructed to stop the client, run a dos command (including a batch/exe file), put properties in property files or change certain values in text/bat files, even delete files along with the traditional job of copying files from the patch archive into the local folder of the NetWeaver Mobile Client.


Below are some examples which will be of help while customizing install.xml


*File copy </p><p>To copy a file from a folder in the patch archive to the client folder on the local file system one can use the below mentioned command in the xml file.</p><p><COPY source=”/clienthome” pattern=”” target=”%MI_HOME%/” />Delete file</p><p>Sometimes it is necessary to put a batch file in the patch archive and run it during the patching process after which do a cleanup of this file from the local file system (delete this file).</p><p>For such a scenario the below mentioned Delete command comes handy.</p><p><DELETE targetfolder=”%MI_HOME%” pattern=”DoSomething.bat” /></p><p> </p><p>Execute file</p><p>But before deleting DoSomething.bat we need to execute this, below are the two sets of commands which will execute it.</p><p><EXECUTE description=”Do Something” executable=”%WINDOWS%\system32\cmd.exe” commandline=”\/c “%MI_HOME%/DoSomething.bat” %MI_HOME%” blocking=”false” /></p><p>Or</p><p><EXECUTE description=”Do Something” executable=”%MI_HOME%/ DoSomething.bat” commandline=”” blocking=”true” /></p><p>In the first example notice that we execute cmd and DoSomething.bat is a part of the commandline, when we set blocking as false the installer process will not wait for this command to finish execution and will move to the next instruction line in the xml file, likewise if blocking is true the installer will wait till the end of execution of this command before moving to the next instruction.</p><p>In the second instruction we see that the full path of DoSomething.bat (where it is copied on the local file system) is passed as the executable.</p><p> </p><p>Add Entries to file</p><p>Sometimes to run DoSomething.bat we might need to maybe know the JAVA_HOME (or any other system variable) and put it in the file for the command present in the file to run successfully, for this too install.xml has a solution: ADD_ENTRIES_TO_FILE. Please see below example.</p><p><ADD_ENTRIES_TO_FILE source=”can be anything, doesn’t matter ” target=”%MI_HOME%/ DoSomething.bat” targetos=”Win32″ key=”REM SET JAVA_HOME=” value=”%JAVA_HOME%” /></p><p>For this to work, in DoSomething.bat one needs to place a place holder like</p><p>REM SET JAVA_HOME=</p><p>And while patching when the above mentioned ADD_ENTRIES_TO_FILE command is executed then this place holder is replaced by </p><p>SET JAVA_HOME= the actual java home.</p><p> </p><p>Set Properties</p><p>Now the last command for discussion: SET_PROPERTIES</p><p><SET_PROPERTIES source=”/defaultsProperty/” pattern=”*properties” target=”%MI_HOME%/settings/”/></p><p>Here source is the file which contains the properties to be added and target is the file where it needs to be added.</p><p> </p>

Be the first to leave a comment
You must be Logged on to comment or reply to a post.