Thursday, February 18, 2010

InstallAnywhere 2010

Flexera software formally know as Acresso software the owners or popular InstallShield and InstallAnywhere brands have come up with the much awaited release of InstallAnywhere 2010. The developers of the InstallAnywhere lobby always wanted the rich features of windows installer (repair and rollback) along with the existing multiplatform features.

I recall the days when I use to call then Acresso/Macrovision support for implementing a workaround for achieving rollback in our multiplatform installers. Since I was a migrated user from InstallShield 5.5 multiplatform, I was used to the rollback feature and suddenly when we migrated our projects to InstallAnywhere 8 it proved to be a fatel decision as many features in InstallShield multiplatform were discontinued.

It is quite important for a installer developer to have control over the installation as the boundary conditions can become devastating in nature if the software being updated is time critical in nature, the associated downtime of a server responsible for computing million $$ worth of money is beyond imagination.

The mere email from Flexera about the launch of InstallAnywhere 2010 with the bold foot steps in the world of rollback and feature level repairs made me excited, I am looking forward for more feature rich release with lots of support towards virtualization in their coming release.

I am yet to evaluate the new version with tall claims, I will come up with an article very soon that will have the entire compilation results of InstallAnywhere 2010.

If you are also interested in reading about the new supported features and resolved bug list in InstallAnywhere 2010 please go through these links

Features in new release of InstallAnywhere 2010

Free trial of InstallAnywhere 2010

Webinar on March 3rd on Whats new in IA 2010

Monday, June 29, 2009

Adding external jar to your CustomCodeAction

[Question]

In GUI mode, the installer launches and installs, and after the installation executes a PostInstall Action which runs a Script/Batch file. In this Script file we call another Java class which is interactive. (means it gets input and outputs messages on the same window or a separate window). The dependencies are added in the batch/script file using export Library Path

Now I want to emulate this in Console Mode. I want to call this class from Console Mode Custom Code execution action so that the input and output are done on the Console mode Installer. The class which is called in turn depends on a lot of 3rd party jars. As soon as I add dependencies for the 3rd party signed jars it always gives exception "no manifest section for signature file entry" .
Since the jars are 3rd party, I can't go back and modify the jar contents. Is there anyway to overcome this problem ?

[ANSWER]

If you are calling your java class from a script/batch file add the dependency of your 3rd party jar files in the script itself instead of adding dependency in the IA project. Since the java class file is called from a script which spawns a different process and into a new shell the dependencies added to the main project does not get resolved while loading the class file into the JRE when spawned through script/batch.
InstallAnywhere's feature of adding files into class path or adding dependencies only works correctly in case of custom code action.

To load the 3rd party jars when using with shell use the following java arguments in the shell script to execute it.

java -cp abc.jar;xerces.jar;ant.jar com.yourcompany.packagename.ClassName

Here -cp added to the Java command tells the JRE to load abc.jar, xerces.jar and ant.jar to be added in the class path for executing the com.yourcompany.packagename.ClassName class file.

Installing JBoss server and application using IA

[Question]

How can I modify the port number in JBoss server using InstallAnywhere. I install JBoss-3.2.7.zip with IA, I get a user input for the Port Number and I know that the port number has to be set in the file server.xml inside the JBoss-3.2.7.zip. Should I use the action 'Modify Text File in Archive' action to replace the port? I can use the variable  $PORT_NUMBER$ to replace the existing port number. But don't know how to use it in the action to search for the line
 
Connector port="8080" address="${jboss.bind.address}

[ANSWER]

If you are installing JBoss using InstallAnywhere  add action in your project modify files in Archive. In your case its a bundled archive so select installed archive then click configure, 
In the configure frame update  search for  "${jboss.bind.address}" and fill the replace with "<your desired port number>"

Once this activity is done add the extract archive action to actually install your JBoss server zip.

An alternative approach to this problem would be to deflate the archive and then add an action to modify ASCII file with the above data.
       If you want to deploy your application using InstallAynwhere go to the Organization -> Hosts tab of Advanced designer click on add host. Choose application server from the choice (there will be two hosts listed over there DataBase Host and Application Server host)
Once Application server host is added to the project in Host section, fill up the necessary details like in your case choose JBoss 4.0.5 or newer and then select "Server Path".
Once done go to the Install Section of the Advanced designer and add an Action to deploy war file.

Monday, April 27, 2009

HTML Display in InstallAnywhere swing Panel.

As a Install Anywhere user you might have been asked to display HTML files in IA Swing panels quite a lot of time, as a installer developer its quite tedious for the engineer to code and format html files.
Recently I had a change to do the same thing here I followed a trick, created a nice word document with all the formatting (text, paragraph and alignment) then saved the file in filtered html format. The result was a nice looking html page with all the formatting present when viewed in IE.
 
Without worrying any thing I added the file into HTML display panel and few of the surprises came in front of me
 
1. The preview panel button showed my HTML document inside the SWING but all the formatting was lost.
2. When the project was build the HTML display panel showed the HTML inside the frame with lots of white spaces, although the formatting was there but some of the special characters were visible in it.
 
The above experience left me scratching my head as what might have gone wrong, if I am opening the same .htm in IE or other browser things look quite good then why do I see weired results in case of Installer panel???
 
After close inspection and ofcource some hit and tries answered me,  and here's what I found
 
1. If your html document uses tags like col span, table to format the content and wrap it after say 55 characters from left
2. If you use <p> paragraph in your html file to format the look and feel of your html document
3. If you use xhtml where a schema is present to validate the DOM elements in your html
 
You might get experience the same kind of UI issue, to resolve the issue use all the tags for do not intend to use col span, table, paragraph that restrict the rendering of html file from left to right.
 
The root course
 
Install Anywhere uses text wrap to format the rend erring of html in its swing panel, so when a pre formatted document is encountered by IA it tries to reformat it thereby resulting into lot of white space and sometimes a left to right scroll bar also appears thereby taking away the nice look of your html and also poses difficulty to the user to read the mesage.
 
Use the above mentioned ways to get rid of cosmetic but yet irritating bugs like this...

Some more InDepth to segmentation fault on UNICES..

 
A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed (for example, attempting to write to a read-only location, or to overwrite part of the operating system).
 
Usually signal #11 (SIGSEGV) set, which is defined in the header file signal.h file. The default action for a program upon receiving SIGSEGV is abnormal termination. This action will end the process, but may generate a core file (also known as core dump) to aid debugging, or perform some other platform-dependent action. A core dump is the recorded state of the working memory of a computer program at a specific time, generally when the program has terminated abnormally.
 
Segmentation fault can also occur under following circumstances:
 
a) A buggy program / command, which can be only fixed by applying patch.
 
b) It can also appear when you try to access an array beyond the end of an array under C programming.
 
c) Inside a chrooted jail this can occur when critical shared libs, config file or /dev/ entry missing.
 
d) Sometime hardware or faulty memory or driver can also create problem.
 
e) Maintain suggested environment for all computer equipment (overheating can also generate this problem).
 
Suggestions to debug Segmentation Fault errors
 
To debug this kind of error try one or all of the following techniques :
 
  • Use gdb to track exact source of problem.
  • Make sure correct hardware installed and configured.
  • Always apply all patches and use updated system.
  • Make sure all dependencies installed inside jail.
  • Turn on core dumping for supported services such as Apache.
  • Use strace which is a useful diagnostic, instructional, and debugging tool.
  • Google and find out if there is a solution to problem.
  • Fix your C program for logical errors such as pointer, null pointer, arrays and so on.
  • Analyze core dump file generated by your system using gdb

 

Re: Segmentation Fault

Segmentation fault on a UNIX machine occurs when there are paging or swap violation. Installers some times use OS services which try to buffer quite a lot of things sometimes thereby causing a buffer overflow resulting into the segmentation fault. This issue can reproduced when handling a lot of date parallel over the machine having limited amount of resources.
 
Segmentation fault is something more related to OS and can be analyzed with the help of core dumps generated.
 
Relating the issue with the installer, the issue can only be debugged with the help core dumps which would probably answer questions like which Op Code tried to violate the OS boundaries and create race conditions.

On Fri, Apr 24, 2009 at 7:45 PM, tony prabhu <ruban142003@yahoo.com> wrote:
Hi,
 
Generally why does segmentation fault appears in Linux machine when an installer with a huge payload is run. But this does not happen while running a simple project in the same machine with all the java compatibility. I believe this fault will appear when the rules of the Linux machine are violated for exampe: trying to access a resource in the machine which is not available. So, does the large installer tries the scenario like what i have mentioned above? Please explain to me.
 
Thanks for your time.
Tony




--
FreshersDirect Team
http://www.freshersdirect.com

Saturday, April 18, 2009

Re: InstallAnywhere details

You are absolutely correct, Execute Script returns the exit code for the action not of the underlying batch/script file. My experience with says that IA execute script does not work correctly in case of DOS batch files.
The reason being, execute run script uses Java Process.getRuntime.exec() thread to run the batch or command passed. Here Process.waitfor() method is used, if the underlying script uses @echo ON inside the script the behavior is very abrupt. Only the first script's 1 to 6th or 7th steps are run after that the script keeps on waiting thereby making the installation hang.

I would suggest to use your own plugin for executing command or batch specifically when the command or script calls another shell to execute the sequence of steps.

In the plugin spawn a thead and dont wait for the thread to complete. here the disadvantage is you will not get the complete the stderr, stdout till the theread completes but its a nice tradeoff done where you want to set gurentee for the underlying command to complete sucessfully.

I have developed a plugin which you can use if you want.




On Thu, Apr 16, 2009 at 6:46 PM, tony prabhu <ruban142003@yahoo.com> wrote:
Hi,
 
I am a beginner with IA and I want to know about the Execute Script/Batch action and how it works. I believe the exit code in this action is only for the action and not for the script or the commands it executes. So, how can i get an exit code for the executed script? Please explain to me in a detailed manner.
 
Thanks
Tony

Friday, April 17, 2009

Re: Help

You are messing up two different things, earlier you said you want the user to input the architecture of the machine, now your requirement is going on the dev side.

Wait I will explain in detail

If your requirement is just to find the end users machine architecture

either run a custom java code or run a execute command utility in IA found under Add Action --> General Tab,

The command to run in uname -m, it will return u i386 which is 32 bit,

To find out more about various OS check out this link for determining the OS architecture, http://www.stata.com/support/faqs/win/64bit.html

Regarding running this write a Java class which would determine the OS version and subsiquently the OS architecture. Store the result in a IA variable

Code snippet

<>

class MyCustomCode(InstallerProxy ip) extends IACustomCode
{
   /* Run the logic to store the OS tye in a variable say MyOS */

   ip.substitute("OS_TYP", MyOS) // here the value of MyOS determined earlier is stored in a IA valiable $OS_TYP$
}

Inside the Install action under ur IDE you can add a compare installanywhere action to install any specific file or folder

e.g $OS_TYP$ equals 64bit then install else move ahead.

I do not have an IDE infront of me right now otherwise I would have sent you some screen shots.

If you are still face the issue I will create a sample project for you...for this logic

****************************************************************************************************
********************************************************************************************************

 

I am trying to download the enterprise version.

But there is still one doubt which is - the panel "get user input" is for the end user not for the developer (who is using InstallAnywhere for making installer e.g. me).

Can u throw some light on it please???

Actually I want InstallAnywehre to prompt me (developer) for taking the input as 32 bit or 64 bit at the time of building the project as shown below as per the requirement of the end user.

 

 

 

 


Thursday, April 16, 2009

An issue with 32 bit and 64 machine

Problem :
 
Installerwhich build the application for multiple platforms (targeting Linux, AIX, HP-UX, Solaris and Windows).

My application has  binaries for above 5 platforms each of 32bit and 64bit (so kind of 10 platforms).

 

I have a directory structure like below

 

Application

|

|-----Linux

|              |-Linux32

|              |-Linux64

|

|-----AIX

|              |-AIX32

|              |-AIX64

|

|-----HP-UX

|              |-HP-UX32

|              |-HP-UX64

|

|-----Solaris

|              |-Solaris32

|              |-Solaris64

|

|-----Windows

|              |-Windows32

|              |-Windows64

|

 

Now what required is when I build as shown below my application and check the Linux box it should prompt  me to take input as "Linux32" or "Linux64" (user input) so that the  Linux installer of 32bit or 64bit is built.

 

 

 

 Solution :


Its quite easy to do that, installanywhere  has an inbuild functionality to check the OS architecture. You can store the OS architecture in the IA variable and implement your logic once you are known to end users OS architecture.

You will find this feature in Organization settings.

InstallAnywhere buildoutputs are independent to platform architecture, you can build your application for any desired platform with or without VM and run it. At the run time have a user input panel or at rutime decide the architecture of the user machine and cotinue with your installation logic.

Like this


Application ----
                      Folder 1 <Only if 32 bit>
                      Folder 2 <Only if 64 bit>

In the install section you can put a rule of compare installAnywhere variable so that it gets installed only when the rule is met.
 

Tuesday, February 24, 2009

Uninstaller Errors

Recently after changing the product name of one of the Merge modules in my suite I started getting errors while uninstallation.

When the uninstaller was called it threw a java exception saying target invocation exception stating



ZeroGu5: c:\program files\OpenSource\InstallFrameWork\Uninstaller\resource\iawin32.dll not found

at ZeroGa2.b(DashoA10*..)

at ZeroGa2.b(DashoA10*..)

at com.zerog.ia.installer.LifeCycleManager.b(DashoA10*..)

at com.zerog.ia.installer.LifeCycleManager.a(DashoA10*..)

at com.zerog.ia.installer.Main.main(DashoA10*..)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.zerog.lax.LAX.launch(DashoA10*..)

at com.zerog.lax.LAX.main(DashoA10*..)

Upon inspection I found that the resource folder that contains platform specific dll's under the uninstall folder. Even the global registry file that contains the file/folder installation was also found to be missing, so practically the uninstaller cannot work without this file.

Scratching my head for hours I build the installer with high debug enabled (jvm parameters -Dlax.debug.level=3 -Dlax.debug.all=true) with stderr and stdout directed to a file, but could not trace out any specific problem.

The installer archive contained all the resources that are required inside the uninstall folder, so there was no question that its a build issue.

Then I started the the dry run of the program my normalizing the payload to zero, modifying the project information properties and found that the product name had a trailing space at the end

Once the trailing space was removed the installation and uninstallation started working properly.

Although a is a kind of cosmetic defect but took hell lot of time to dig it out. Probably the Install Anywhere team forgot to check the product name property for any trailing spaces that can disrupt their XML transformation logic.

Monday, February 2, 2009

Avinash Anand



An accomplished software engineer looking for a challenging opportunity with a globally respected organization that provides ample opportunities to showcase my expertise, enhance my knowledge and allows me to contribute as a positive factor in the progress of the company. Active contributor in open source world, currently working in Google appengine and Java based open source cross platform installer framework.


Professional Summary

* Over 42 months of Development experience in Java/J2EE (Core Java, JSP, Servlet, JDBC, XML).
* Responsible for System Analysis, Design, Coding, and Qualitative experience in managing project modules independently.
* Extensive exposure to: Waterfall and Agile Development approaches.
* Development processes like Analysis, Design, Coding, Testing and Maintenance.
* Client-Server Architecture and MVC Architecture.
* Object Oriented Analysis and Design (OOAD).
* Worked with protocols such as SNMP, TCP/IP, UDP, SIP, H.323.
* Well exposed to both Client/Server and Web environment.
* Experience in doing unit testing using JUnit. Created test plan for unit testing.
* Used Rational Purify Plus for analyzing code coverage, code optimization and memory management.
* Interactive team player and proactive personality.
* Experience in installation, configuration and maintenance of Operating Systems, Web Servers, Database Systems and Mail Servers.


Product Software Components :

Operating Systems : Windows 2000/2003, Sun Solaris, IBM AIX
Databases : SQL Server 2000, Oracle, DB2
Web Server : Microsoft Internet Information Server, Sun ONE Web Server, IBM HTTP Server, Tomcat
Application Server : IBM WebSphere Application Server

Work Profile includes :

* Involved in creating multi Installer for the product using ISMP 5.0 and InstallAnywhere over various platforms such as Windows AIX and Solaris.
* Worked in installer migration from ISMP to InstallAnywhere 2009.
* Written blog over InstallAnywhere http://installanywhere.blogspot.com
* Involved in writing Java Beans for integration with Install Shield, custom code and plugin development for InstallAnywhere
* Worked with Accresso support team bug reporting and getting timely fixes.
Integration of various modules created under the project.
* Addressed various bugs filled against the installer.
* Documented all the defects to be addressed against the product in concern with the current minor release
* Created Installer framework for the current service pack release over ISMP 5.0 for all the platforms supported by the product Windows, AIX and Solaris
* Worked on cumulative service project. Designed completely new architecture for the service pack layout.
* Preparing/Attending the Interim/Internal Audits.
* Project Status Reporting and other related Escalations to the Development Manager.



Skill Matrix

Languages : Java, C, C++, Junit, Python
Operating System : Windows, Linux, AIX, Solaris.
Database/RDBMS : Oracle, DB2, MS SQL Server 2000.
Application Server : IBM WebSphere Application Server, Tomcat
Web Server : Microsoft Internet Information Server, IBM HTTP Server
Scripting : JavaScript, XML
Knowledge of : VMware, LPAR and TDD



Contact me

avinash.anand007(at)gmail.com

Location : Pune, India

Thursday, January 29, 2009

InstallAnywhere global registry

Unlike InstallShield InstallAnywhere maintains its product information in a xml file (.com.zerog.registry.xml) as compared to the vpd.properties file created by Install Shield.

Some times it becomes tough for the end user or project author to get rid of a corrupt installation or uninstallation.

.com.zerog.regostry.xml file contains product name, version, UUID and description apart from the components and DIM registration information. This is typically useful if you have to identify a IA installation from a different framework say Install Shield.

This file is stored in /var directory or user on the UNIX machine if the installation is done by the root user else the file is stored in the home folder of the user.

In case of windows the file gets created under windows home drive (c: or d:)

A case study and its remedy

Q My installer/uninstaller did not run successfully! Can not proceed with a fresh installation

Ans- Remove/rename the global registry file and try running the installer/uninstaller

Q Needs to identify the components installed by the installer or need to find which components were removed by the uninstaller

Ans- Check the xml file it will contain the component information, the file in itself is self explanatory in nature.

Q. By mistake I have removed the global registry file but installation is intact, will by uninstallation work properly?

Ans- Yes absolutely, if the uninstaller does not find the global registry file it will look for the file at $USER_INSTALL_DIR$/Uninstall_$PRODUCT_NAME$/.com.zerog.registry.xml file it contains all the information about that individual installation.

So conclude with the global registry file can help the user to manipulate the installation or uninstallation in a desired manner and is sometimes very helpful in recovering the product instance after a corrupt installation

Thursday, December 4, 2008

Developer Installation Manifest

Developers of the InstallAnywhere community would be very much familiar with the terminology "Developer Installation Manifest" commonly refereed as DIM.

InstallAnywhere provides the installation developer add addition pay load to their projects without adding any rework or hassle. The use of DIM proves to be of great importance if the application is developed by a large team across multiple sites. The process of packaging and requirement gathering proves to be very tedious and error prone. Due to lack of communication or insufficient knowledge many a times small bugs are introduced to the application package in the form of extra files/files missing/non registration of OCX etc.

Now imagine if theres a way the application developers who are writing the actual software do not require to communicate the list of file to be shipped in the required directory structure :) , imagine if the developer can test his standalone package while debugging or testing his application in stand alone mode. That to the developer does not require to this into an xml with any common text editor, all he/she has to do is to use his frequently used dev IDE eclipse or .NET editor! Seems cool ..... But how????

InstallAnyewhere allows to install plugins to commonly used development IDE's currently Eclipse and .NET IDE, these plugins allow the application software engineer to author to create DIM's which contain source and target locations of the file needed to run his component . All he needs to do is to identify the files and folder source location and needs to provide the target location on the end machine where it is going to be installed. This DIM can be plugged into the main project owned by the installation author or the Build/Release engineer. This gives the development team the sense of ownership of the application files owned by them and reduces the cost of maintenance and authoring to a large extent.

If will be asked to rate features and benefits of DIM over the traditional benefit of adding the files and folder into the main project I would give it a 10 on 10.

I am listing down some of the key benefits of the DIM below

1. DIM's allows the flexibility to be updated and owned by individual developers
2. It creates sufficient data encapsulation to the rest of members of the project
3. Developers can add files and folders inside the DIM
4. They will have option to register the ocx and dll if required wihin the DIM
5. Environment variables can be created inside the DIM
6. Group functions can be assigned inside the DIM
7. DIM's can be build and tested in a stand alone mode there by reducing the build time and ease for the developer to test his/her application

Above all features are definitely a great boon for the developer and build engineers of distributed and gigantic applications

I have also observers some of the major issues with InstallAnyhwere collaboration plugin in Eclipse. They are big issues but still can be lived with, here are some of them.

1. If the folder addition feature in the DIM is given some filters to add the contents of the DIM, it cannot be build and gives some weired exception. The possible workaround for this issue is to add the folder as a speed folder inside the main project and then give constraints or filters
2. Files need to be physically present at the source location if you are trying it to add in the DIM. The possible work around for this issue is to create a dummy file at the specified source location using touch utility or its equivalent on any OS
3. The installer output of the DIM can not be used in a stand alone mode for the customer purpose as it shows a warning message that "This installer has been built using a collaboration tool and hence should not be used to production"
4. The most big issue is that all the plugins that are installed and used has to be compulsorily have a valid license for its use(i.e if you have a team of 100 people who will be writing DIM's for their small software piece you need to actually have 100 licenses). The only available workaround for this problem is to install IA collaboration tool on a common machine where all the developers are going to have access and each of them will be authoring their individual DIM at different point of time :(

All of the above pros and cons have taken me to the conclusion that DIM's are of great use if used efficiently and with proper planning.

Tuesday, June 24, 2008

Adding image to Add/Remove program

You might have noticed that when your installer is created using InstallAnywhere, the default icon is shown (probably ZeroG icon). To customize your product according to the look and feel of your comany its very important to add a customized icon of your company that is product specific.
This task is very easy to achieve, you just need to 'Set Windows Registry Entry' action to do it.
In your uninstaller registry key (eg: \\HKLM\Software\Microsoft\Windows\CurrentVersion\uninstall\MyProduct) create an entry named "DisplayIcon" with the value set to the full path to the icon you want to use. This means you'll need to install the icon file with your application.
There's also a host of other keys that IA doesn't automatically generate that you can manually create.
If you need any more detail pertaining to the issue browse through MSDN site for more details.

Monday, June 23, 2008

Pushing Install Updates to Customers

Dear readers all of you who has been involved in authoring installation projects must know the pain of IT companies in maintaining their product at the customer end. When a product goes through a release cycle the most important aspect of the company is to market the product, the most sell able aspects of the great products in the market is their ease of deployment and keeping it updated.
Companies spend millions of $$ in maintaining in release cycle and some more millions to support it, so that they are ahead of their competitors in the market. Releasing fixes, providing updates in a timely manner is their top priority so that they can win the confidence of their customers and keep the market growing for then.
But you all must realize that it requires huge investments for the IT companies for creating a dedicated support network for their customers to keep them updated with the latest fixes. Imagine a software which can update itself without any manual intervention, a system where the Administrator need not worry about reading the documentation before installing the updated manually, a huge enterprise system without going down for a single second updates itself !!
I think you must not have got surprised from the above statements, you might have already seen this "Windows Updates", "Java Updates" and millions of similar updates notification that might have gone un noticed!
These features are a must have for installers and frankly speaking they are very easy to achieve, just a few clicks during installation and here you are. All your customers will be using your latest version of the software and you can end up saving thousands of $$ on support calls.
You can add this feature in your installation product by using FLEXnet Connect from Macrovision.
All you need to do is add an update manager in your installation product, then list updates that will be pushed to the customers and you are done.
Some of the key benefits of using the FLEXnet Connect are listed below

Cut Costs with Electronic Software Delivery
Cut support costs by keeping users on your most current version
Cut product fulfillment, upgrade delivery, and renewal costs
Increase customer satisfaction by proactively delivering updates
Improve Customer Communication with In-Product Messaging
Deliver marketing messages to customers and evaluators as they use your software
Target users based on their product version, location, entitlement status, and more
Reach all of your customers directly, even if they purchased through a reseller
Improve Marketing and Development with Customer Data
Better understand your user base with data on total customer size, versions in use, and upgrade patterns
Learn how customers value your software by seeing which features are most popular
Use real customer data to create better marketing campaigns and more competitive products

For more details over the product visit Macrovision site

Tuesday, February 26, 2008

ASCII update problem with shell scripts in IA

InstallAnywhere supports ASCII update of files as its predecessor ISMP. But the interesting feature with InstallAnywhere is it substitutes everything between "$" sign. The reason behind this being IA resolves its variable which are in between two $ sign like $USER_INSTALL_DIR$ or $PRODUCT_NAME$
 
Here is the most interesting part which is going to attract your attention
 
A Shell script resolves its variable the same way IA does i.e the string starting with $ sign is considered to be a shell variable. Now here's the tweak if your shell script has multiple $ sign in a single line and if you are trying to update this file using IA ASCII update you will end up corrupting your file.
 
A very weired solution to this problem is to replace all the $ sign with "DOLLAR" 
Although tough to belief the Advanced designer has the feature where you can mention do not substitute IA variables but it actually does not respect your input.
 
So if you are trying to update a file that contains multiple $ sign in a file file use DOLLAR, once the IDE update the file as per your instruction it will automatically replace the DOLLAR with $
 
:) Keep reading many more to come....

Thursday, January 24, 2008

Advanced dubugging during installer builds

You might have encountered many instances where you need to turn on advanced debugging options to get proper and detailed debugging information. The usual build log does not provide detailed information. Some time you struggle through a Java I/O error or your custom code or your source code management system is behaving improper.
 
There have been instances when I noticed a build success but the installation operation failing, even after trying various options with my Install Anywhere IDE nothing was useful. Finally playing with the InstallAnywhere lax properties file worked for me.
 
These were the steps I took to get things working..
 

1.) Close the IDE.

2.) Open the file <IAHOME>/InstallAnywhere.lax in a text editor.

3.) Modify the following properties in the file so they read as follows:

lax.stderr.redirect=console

lax.stdout.redirect=console

4.) Add the following line to the top of the file:

lax.nl.java.option.additional=-Dlax.debug.level=3 -Dlax.debug.all=true

5.) Save the .lax file and close it.

6.) Start the IDE with the following command:

./InstallAnywhere 1>buildConsole.txt 2>&1

7.) Run the build.

Once you are done with these steps you will notice a launch anywhere window opening during the build, when your build finishes all the stderr that you were able to see in the console windows is written into a console.txt file at your <IA_HOME> directory.

A tweak here is that, if you keep this option on-ever you will always see a debug console opening whenever you launch a InstallAnywhere application, so it depends on you discretion to turn on this feature or to turn it off as it gives you a detailed report of your operations performed at the cost of few extra CPU cycles and additional memory usage.

Keep reading there are more to come.... :)

Friday, January 4, 2008

InstallAnywhere 2008 Released

Macrovision released InstallAnywhere 2008 Enterprise and standard edition late 2007, it contains many fixes and new features.
The most important was removal of support for JRE 1.4, it came in support for Java 1.6. Other promising features that came in was support for MSI installers and Windows VISTA.

To download the latest version of InstallAnywhere browse the site

Download

Release notes for InstallAnwhere are located at

Release Notes

So old InstallAnywhere and InstallShield users start migrating your project to latest InstallAnywhere 2008 edition.

Thursday, January 3, 2008

File Service in Custom Codes

Many of the installer user use FileService and Win32RegistrySerives in their custom codes. Although InstallAnywhere provides support for putting and retriving Registry entries at the software install location but some times it becomes a complsion for the installer auother to use these services in their custom code.

In order to use FileService in you custom code you need to activate support for File Service in your project. This can be checking the property in Project-->>Java-->> Check the radio button saying "Add File Service support"

This would enable your project to over take File Service of the operating system. While developing the project add IAClasses.zip, services.jar, win32ppk.jar file to your project. IAClasses.jar file is present in the resources folder of your $IA_HOME services.jar will be found inside servises folder of Resources folder. Win32ppk.jar present in the OS specific folder under services.

FileServices interface and Win32RegistryService interface is present in Services.jar and win32ppk.jar respectively which are hidden for new InstallAnywhere users as they are aquinted of using IAClasses.zip files in their project.

When developing the custom code implement the FileService and Win32RegistryService interfaces in your project. I am putting an example below on how to implement the custom code, it will help the new users for using Registry and FileService

package com.mycompany.project

import com.zerog.IAClasses.*;
import com.installshield.FileServices.*;
import com.installsheild.RegistryService.*;

public myClass extends CustomCodeAction
{
public void install(InstallerProxy proxy) throws InstallException
{
String install_path = proxy.substitute("$USER_INSTALL_DIR$");
FileService fs = (FileService)proxy.getService(FileService.class);
// Now you will be able to use all the methods in FileService
fs.mkdir(install_path+"\\bin");
win32RegistryService reg = (win32RegistryService)proxy.getService(win32RegistryService.class);
/* Now you can use the methods exposed by Win32RegistryServices */
}
public void uninstall(UninstallerProxy Uproxy) throws InstallException
{
// @@TBD
}
}

The above code snippet will explain the basic usage of FileService and Win32RegistryService in Custom code.

As a matter of practice it is always advisable to use the actions provided inside the Advanced designer of InstallAnywhere, as the custom code maintenance and writing is costlier. Always refer to your installer design before deciding on the usage of InstallAnywhere Custom Code.

If you require any clarification on the topic feel free to write mailto:jha.yogi@gmail.com

Thursday, December 20, 2007

Creating and running Custom code for installation

InstallAnywhere provides support to run Custom Java code during installation of product. Although IA has added many custom features which saves lot of your development time but some times it becomes a necessity to write a custom code.
 
The Java code can be written in any development environment, the class has to extend from CustomCodeAction of InstallAnywhere. The use then has to override the install and un-install methods of the base class. Please find the snippet of the sample code below.
 
public class code extends CustomCodeAction
{
 public void install(InstallerProxy proxy) throws InstallException
 {
 }
 public void uninstall(UninstallerProxy Uproxy) throws InstallException
 {
 }
}
 
Its very simple to write custom for IA.
 
Once the Java file is compiled using the IAClasses.zip in the class path, create a .jar or .zip file for the class file.
 
Now go to the advance designer right click on Run Custom Code in the Install section. This will allow you to add a custom action to you installation project. In the properties of the run custom code action browse the .zip file and for the class name provide the fully qualified class file name like com.company.product.ClassFileName
 
Make sure that you are bundling the same VM pack with the installer that you have used to compile your Java code, other wise you might get errors during installation like could not find class com.company.product.ClassFileName
 
Happy developing your custom actions, if you have any questions on custom code feel free to put comments on the post or write to mailto:jha.yogi@gmail.com