PDA

View Full Version : ANT build script for 11.5 MP



Rob Lintern
12-16-2005, 06:24 PM
Hi All,

Does anybody have an up-to-date ANT build script that works with 11.5 MP?
The one posted at http://www.installshield.com/news/newsletter/0211-articles/ISMPant.asp seems seriously out of date.

At the very least it would be nice to have an updated list of the minimum required classpath folders and jars needed to do a command line build with 11.5 MP. The example provided in the docs, ...\HelpLibrary\output\launch.txt, also seems out of date.

Cheers,
Rob

RobertDickau
12-20-2005, 01:17 PM
Here's a somewhat-updated version of the script from that newsletter article that seems to work:
<project name="ISMP Build" default="ismp">

<target name="ismp" description="Build project listed in ${UIP_PROJECT}">
<property name="ISMP"
location="C:\Program Files\Macrovision\IS11.5MP" />
<property name="UIP_PROJECT"
location="C:\InstallShield MultiPlatform 11.5 Projects\projectName.uip" />
<java classname="com.installshield.isje.ISJE" fork="true">
<arg value="${UIP_PROJECT}" />
<arg value="-build" />

<classpath>
<pathelement path="${ISMP}" />
<pathelement location="${ISMP}/classes" />
<pathelement location="${ISMP}/lib/ant.jar" />
<pathelement location="${ISMP}/lib/bootstrap.jar" />
<pathelement location="${ISMP}/lib/builder.jar" />
<pathelement location="${ISMP}/lib/dim.jar" />
<pathelement location="${ISMP}/lib/ib5core.jar" />
<pathelement location="${ISMP}/lib/ib5swing.jar" />
<pathelement location="${ISMP}/lib/ib5util.jar" />
<pathelement location="${ISMP}/lib/icebrowserbean.jar" />
<pathelement location="${ISMP}/lib/icebrowserlitebean.jar" />
<pathelement location="${ISMP}/lib/jhall.jar" />
<pathelement location="${ISMP}/lib/jsearch.jar" />
<pathelement location="${ISMP}/lib/parser.jar" />
<pathelement location="${ISMP}/lib/swing.jar" />
<pathelement location="${ISMP}/lib/xalan.jar" />
<pathelement location="${ISMP}/lib/xml-apis.jar" />
<pathelement location="${ISMP}/lib/ide.jar" />
<pathelement location="${ISMP}/lib/platform.jar" />
<pathelement location="${ISMP}/lib/ppk/win32ppk.jar" />
<pathelement location="${ISMP}/lib/ppk/linuxppk.jar" />
<pathelement location="${ISMP}/lib/ppk/solarisppk.jar" />
<pathelement location="${ISMP}/lib/ppk/aixppk.jar" />
<pathelement location="${ISMP}/lib/ppk/as400ppk.jar" />
<pathelement location="${ISMP}/lib/ppk/hpuxppk.jar" />
<pathelement location="${ISMP}/lib/ppk/macosxppk.jar" />
<pathelement location="${ISMP}/lib/ppk/webppk.jar" />
<pathelement location="${ISMP}/lib/ppk/genericunixppk.jar" />
<pathelement
location="${ISMP}/distributables/platform/ext/windowsppk.jar" />
<pathelement
location="${ISMP}/distributables/platform/ext/linuxppk.jar" />
<pathelement
location="${ISMP}/distributables/platform/ext/solarisppk.jar" />
<pathelement
location="${ISMP}/distributables/platform/ext/aixppk.jar" />
<pathelement
location="${ISMP}/distributables/platform/ext/as400ppk.jar" />
<pathelement
location="${ISMP}/distributables/platform/ext/hpuxppk.jar" />
<pathelement
location="${ISMP}/distributables/platform/ext/macosxppk.jar" />
<pathelement
location="${ISMP}/distributables/platform/ext/webppk.jar" />
<pathelement
location="${ISMP}/distributables/platform/ext/genericunixppk.jar" />
<pathelement
location="${ISMP}/distributables/library/hsqldb.jar" />
<pathelement
location="${ISMP}/distributables/engine/engine.jar" />
</classpath>
</java>
</target>
</project>

Rob Lintern
12-21-2005, 03:07 PM
Thank you very much, works well for me.

gamlidek
12-21-2005, 06:27 PM
This one may work, also. I like to build the java beans as part of the packaging process. If you try this, let me know if this works with IS 11.5 or not. Oh, and change the properties to match your config.


<project name="package" default="isui">
<property name="isui.home" location="C:\Program Files\Macrovision\IS11.5MP"/>
<property name="isui.projects.dir" location="C:\InstallShield MultiPlatform 11.5 Projects"/>
<property name="isui.project.name" value="My Project"/>
<property name="isui.project.dir" location="${isui.projects.dir}/${isui.project.name}"/>
<property name="isui.project.javabean.source" location="${isui.project.dir}/CustomCode/beans/src"/>

<path id="isui.class.path">
<pathelement location="${isui.home}" />
<pathelement location="${isui.home}/classes"/>
<fileset dir="${isui.home}/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${isui.home}/lib/ppk">
<include name="*.jar"/>
</fileset>
<fileset dir="${isui.home}/distributables/platform/ext">
<include name="*.jar"/>
</fileset>
<fileset dir="${isui.home}/distributables/library/">
<include name="*.jar"/>
</fileset>
<pathelement location="${isui.home}/i18n" />
<pathelement location="${isui.home}/distributables/library/hsqldb.jar" />
<pathelement location="${isui.home}/distributables/engine/engine.jar"/>
</path>

<target name="compile">
<javac srcdir="${isui.project.javabean.source}"
includes="**/*.java" destdir="${isui.home}/classes">
<classpath refid="isui.class.path"/>
</javac>
</target>

<target name="isui" depends="compile"
description="generate the distribution">
<java classname="com.installshield.isje.ISJE"
fork="true"
dir="${isui.project.dir}">
<arg value="${isui.project.name}.uip"/>
<arg value="-build"/>
<classpath refid="isui.class.path"/>
</java>
</target>
</project>


cheers,

/gam/

camcao
01-12-2006, 04:40 PM
I used the ANT build script (using the classpath) to bring up the IDE. The IDE comes up fine. However, in the View List, when I click on Additional Tools, nothing appears. Then when I expand the list and click on the String Table, I am getting a NullPoinerException error. But if I click on something else and click back on the String Table, then the NullPointerException is gone and the correct info is displayed. This symptom is similar when I click on others for the first time. What am I missing???

Cannot display view because the following error occurred:

java.lang.NullPointerException at com.installshield.isje.wizard.views.StringTableView.getEditorComponent(Unknown Source) at
com.installshield.isje.project.ProjectView.setCurrentView(Unknown Source) at com.installshield.isje.project.ProjectView.viewChanged(Unknown Source) at
com.installshield.isje.project.ViewListView.valueChanged(Unknown Source) at javax.swing.JTree.fireValueChanged(JTree.java:2399) at
javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:2770) at
javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629) at
javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1078) at
javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287) at
javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:170) at javax.swing.JTree.setSelectionPath(JTree.java:1174) at
javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2246) at
javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:3432) at
javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3393) at
java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at
java.awt.Component.processMouseEvent(Component.java:5485) at javax.swing.JComponent.processMouseEvent(JComponent.java:3093) at
java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at
java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at
java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at
java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1766) at
java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

camcao
01-13-2006, 10:29 AM
I found the cause. I needed to include this into the classpath:

<pathelement location="${ismp11_5}/Resources/idehtml"/>

gamlidek
01-13-2006, 12:07 PM
The ant script posted above is for running command line builds, not for launching the IDE. Try launching the IDE normally.

cheers,

/gam/

swepderek
03-14-2006, 10:14 PM
Here's a somewhat-updated version of the script from that newsletter article that seems to work:
Hi Robert,

Thanks for the updated script! I used it to build a test installer that I put together with the Project Assistant, and the build was successful. However, when I run the installer the buttons are inactive. Clicking on 'Next' or 'Cancel' does nothing -- the buttons don't even really "depress" unless I hold down for a second or so. Seems like this might be related to Swing.. as if the actions were somehow not defined for the buttons (??). Any ideas on why this would be happening? This problem does not occur when I build with the IDE.

[2006.03.15]
...so, it turns out (and this could be painfully obvious to some) that the ant build will only work after first using the IDE to build the package. The subdirectory generated by the IDE-invoked build (which has the same name as the .uip file) is required in order to create a functional installer -- though it isn't directly referenced in the ant script and, if missing, it will not break the build.

I was assuming that I could use the IDE to generate a valid .uip file, then point my ant script to this file and build. Not so. The ant build will not generate this subdirectory structure or the class files within, even though it depends on these files to create the installer.

Thanks much,
Derek

mihalich
03-20-2006, 09:03 PM
All,

I have tried the first ant target posted in this thread, and it works, except that I'm getting a ton of compiler errors that it cannot file the core install shield packages/classes. Here are the first two lines of the errors. (I have the engine.jar on the class path unmodified from the first post.

Any ideas why it ant task can't find the IS jar files? Below is my ant target in whole.


[java] MESSAGE: Preparing project for compile...
[java] MESSAGE: Started compile at Mar 20, 2006 5:49:39 PM
[java] MESSAGE: Compiling classes D:\buildroot\installer\automated\installer\InstallShield\VueInstaller\CustomCode\lib
[java] WARNING: Error in FrameBegin.java on line 4: package com.installshield.event.ui does not exist
[java] WARNING: import com.installshield.event.ui.*;
[java] WARNING: ^
[java] WARNING: Error in FrameBegin.java on line 5: package com.installshield.wizard.swing does not exist
[java] WARNING: import com.installshield.wizard.swing.*;
[java] WARNING: ^
[java] WARNING: Error in FrameBegin.java on line 6: package com.installshield.ui.controls does not exist
[java] WARNING: import com.installshield.ui.controls.*;
[java] WARNING: ^




Ant Target:

<target name="ismp" description="Build project listed in ${UIP_PROJECT}">
<property name="ISMP" location="C:/Program Files/Macrovision/IS11.5MP" />
<property name="UIP_PROJECT" location="${dir.installshield.src}/MyInstaller.uip" />
<java classname="com.installshield.isje.ISJE" fork="true">
<arg value="${UIP_PROJECT}" />
<arg value="-build" />
<arg line="-pathVariable ZIP_FOLDER=&quot;C:\\Program Files\\Macrovision\\IS11.5MP&quot;" />
<arg line="-pathVariable BUILDS_FOLDER=d:\\builds\\${build.label}" />

<classpath>
<pathelement path="${ISMP}" />
<pathelement location="${ISMP}/classes" />
<pathelement location="${ISMP}/lib/ant.jar" />
<pathelement location="${ISMP}/lib/bootstrap.jar" />
<pathelement location="${ISMP}/lib/builder.jar" />
<pathelement location="${ISMP}/lib/dim.jar" />
<pathelement location="${ISMP}/lib/ib5core.jar" />
<pathelement location="${ISMP}/lib/ib5swing.jar" />
<pathelement location="${ISMP}/lib/ib5util.jar" />
<pathelement location="${ISMP}/lib/icebrowserbean.jar" />
<pathelement location="${ISMP}/lib/icebrowserlitebean.jar" />
<pathelement location="${ISMP}/lib/jhall.jar" />
<pathelement location="${ISMP}/lib/jsearch.jar" />
<pathelement location="${ISMP}/lib/parser.jar" />
<pathelement location="${ISMP}/lib/swing.jar" />
<pathelement location="${ISMP}/lib/xalan.jar" />
<pathelement location="${ISMP}/lib/xml-apis.jar" />
<pathelement location="${ISMP}/lib/ide.jar" />
<pathelement location="${ISMP}/lib/platform.jar" />
<pathelement location="${ISMP}/lib/ppk/win32ppk.jar" />
<pathelement location="${ISMP}/lib/ppk/linuxppk.jar" />
<pathelement location="${ISMP}/lib/ppk/solarisppk.jar" />
<pathelement location="${ISMP}/lib/ppk/aixppk.jar" />
<pathelement location="${ISMP}/lib/ppk/as400ppk.jar" />
<pathelement location="${ISMP}/lib/ppk/hpuxppk.jar" />
<pathelement location="${ISMP}/lib/ppk/macosxppk.jar" />
<pathelement location="${ISMP}/lib/ppk/webppk.jar" />
<pathelement location="${ISMP}/lib/ppk/genericunixppk.jar" />
<pathelement location="${ISMP}/distributables/platform/ext/windowsppk.jar" />
<pathelement location="${ISMP}/distributables/platform/ext/linuxppk.jar" />
<pathelement location="${ISMP}/distributables/platform/ext/solarisppk.jar" />
<pathelement location="${ISMP}/distributables/platform/ext/aixppk.jar" />
<pathelement location="${ISMP}/distributables/platform/ext/as400ppk.jar" />
<pathelement location="${ISMP}/distributables/platform/ext/hpuxppk.jar" />
<pathelement location="${ISMP}/distributables/platform/ext/macosxppk.jar" />
<pathelement location="${ISMP}/distributables/platform/ext/webppk.jar" />
<pathelement location="${ISMP}/distributables/platform/ext/genericunixppk.jar" />
<pathelement location="${ISMP}/distributables/library/hsqldb.jar" />
<pathelement location="${ISMP}/distributables/engine/engine.jar" />
</classpath>
</java>
</target>


Thanks,
Joe