Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Command line build problems


2 replies to this topic

StlMatt

StlMatt
  • Members
  • 1 posts

Posted 22 August 2001 - 16:49

I am trying to set up command line builds using ISMP 4.0.1 and I am getting a java exception.  Below is the output that I get when I try to build from the command line.
--------------
C:\Program Files\InstallShield\IPMP401\Projects\70OS>java com.installshield.isje
.ISJE 70os.xml -build
com.installshield.lang.AssertionFailedException: Expected a non-null object.
       at com.installshield.lang.Debug.assertNotNull(Debug.java:26)
       at com.installshield.isje.Application.getHomeDirectory(Application.java:
952)
       at com.installshield.isje.Application.initializeRegistry(Application.jav
a:305)
       at com.installshield.isje.Application.initialize(Application.java:236)
       at com.installshield.isje.Application.start(Application.java:98)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.installshield.isje.ISJE.main(ISJE.java:13)

C:\Program Files\InstallShield\IPMP401\Projects\70OS>
----------

What have I done wrong? I have the classpath envrionment variable set to include the jar files in the lib and ppk directories as well.  Thanks in advance.

Matthew


josh

josh
  • Members
  • 6 posts

Posted 28 August 2001 - 15:59

Building a project from the command line is not as easy as it should be. I really hope that they fix this in the next version of installshild, because it seems like a simple thing to fix.

Anyway.... I don't know exactly what is causing the problem in your case. However, I can provide some informaiton that might get you back on track.

Here is the bat file that I use to run the installshield IDE to do a build from the command line:

---------------------
       echo 'launching installshield to build application'
       cd "D:\Program Files\InstallShield\IPMP401\"

       D:\jdk1.3\bin\java.exe -cp .;ppk\win32ppk.jar;ppk\linuxppk.jar;ppk\solarisppk.jar;ppk\aixppk.jar;ppk\os2ppk.jar;ppk\cim\ppk.jar;ppk\as400ppk.jar;ppk\webppk.jar;classes;lib\ide.jar;lib\wizard.jar;lib\product.jar;lib\help.jar;lib\swing.jar;lib\jhall.jar;lib\parser.jar;lib\xt.jar;lib\icebrowserbean.jar;lib\icebrowserlitebean.jar%2 com.installshield.isje.ISJE Projects\%1\%1.xml -build 0
------------------
Of course, the %1 (batch language for the first parameter passed on the command line) would have to be replaced by the folder name and the project file name (I always call the folder and the project by the same name, then I pass that name as the first parameter to the batch file.) Also, the %2 would be any additions that need to be made to the class path, (preceeded by a ';' , so for example ';d:\pathTo\myCustomJar.jar' could be passed as a second parameter.

Of course you will have to change the paths to point to stuff that exists on your machine.
And, it should be obvious that everything following 'D:\jdk1.3\bin\java.exe '  is one line.


There is a file in the installshield multiplatform directory (D:\Program Files\InstallShield\IPMP401 on my machine) that tells you how to launch the ISMP IDE from the command line.

The file is helpful, but there is one thing that you should know.  The example for win32 (as follows:)
--------------------------
c:\jre\118\bin\jre -cp .;ppk\win32ppk.jar;ppk\linuxppk.jar;ppk\solarisppk.jar;ppk\aixppk.jar;ppk\os2ppk.jar;ppk\cimppk.jar;ppk\as400ppk.jar;ppk\webppk.jar;classes;classes\MyCustomBeans.jar;lib\ide.jar;lib\wizard.jar;lib\product.jar;lib\help.jar;lib\swing.jar;lib\jhall.jar;lib\parser.jar;lib\xt.jar;lib\icebrowserbean.jar;lib\icebrowserlitebean.jar com.installshield.isje.ISJE
------------------------
only launches the ISMP application. To have it automatically build your project, you would have to add something like "Projects\YourProjectDir\YourProjectName.xml -build 0" to the end of the example as follows:

--------------------------
c:\jre\118\bin\jre -cp .;ppk\win32ppk.jar;ppk\linuxppk.jar;ppk\solarisppk.jar;ppk\aixppk.jar;ppk\os2ppk.jar;ppk\cimppk.jar;ppk\as400ppk.jar;ppk\webppk.jar;classes;classes\MyCustomBeans.jar;lib\ide.jar;lib\wizard.jar;lib\product.jar;lib\help.jar;lib\swing.jar;lib\jhall.jar;lib\parser.jar;lib\xt.jar;lib\icebrowserbean.jar;lib\icebrowserlitebean.jar com.installshield.isje.ISJE Projects\YourProjectDir\YourProjectName.xml -build 0
------------------------(all one line, of course, and issued from the ISMP directory with the correct path to your JRE)

The installshield file that describes this is called LAUNCH.TXT and it contains the following text:


------------------------------------------------------------------------------------------
----------


ISMP can be started from a command line console by invoking the
following command:

%jvm% %cpswitch% %cpelements% com.installshield.isje.ISJE %1 %2% %3 %4 %5

where
jvm - JVM executable file name with complete path name
cpswitch - classpath switch specific to the JVM used
cpelements - CLASSPATH elements
%1 %2 %3 %4 ...%n command line options for ISMP

cpelements are made of the following entries in the order specified.
Note that each element in the classpath must be followed by the classpath
separator for your JVM (typically a semi-colon on Win32, OS/2 and a colon
on Unix platforms).

1. path to the ISMP install directory
2. path(s) to Platform Pack [PPK] elements
3. path to custom bean classes directory
4. path(s) to custom bean JAR files
5. path(s) to ISMP product elements
6. path(s) to supporting library elements

path to custom bean class(s) directory:
%ismp-install-dir%\classes

PPK elements:
%ismp-install-dir%\ppk\win32ppk.jar
%ismp-install-dir%\ppk\linuxppk.jar
%ismp-install-dir%\ppk\solarisppk.jar
%ismp-install-dir%\ppk\aixppk.jar
%ismp-install-dir%\ppk\os2ppk.jar
%ismp-install-dir%\ppk\cimppk.jar
%ismp-install-dir%\ppk\as400ppk.jar
%ismp-install-dir%\ppk\webppk.jar

path(s) to ISMP product elements:
%ismp-install-dir%\lib\ide.jar
%ismp-install-dir%\lib\wizard.jar
%ismp-install-dir%\lib\product.jar
%ismp-install-dir%\lib\help.jar

path(s) to Supporting library elements:
%ismp-install-dir%\lib\swing.jar
%ismp-install-dir%\lib\jhall.jar
%ismp-install-dir%\lib\parser.jar
%ismp-install-dir%\lib\xt.jar
%ismp-install-dir%\lib\icebrowserbean.jar
%ismp-install-dir%\lib\icebrowserlitebean.jar

Note that as400ppk.jar and cimppk.jar will be present only if you have
purchased the Enterprise Edition.

Note that in the following examples, it is assumed that you will place the
script in the install directory for ISMP. You will need to change the path
to the JVM to match your machine.

EXAMPLE for Solaris
/usr/java/118/bin/jre -cp .:ppk/win32ppk.jar:ppk/linuxppk.jar:ppk/solarisppk.jar:ppk/aixppk.jar:ppk/os2ppk.jar:ppk/cimppk.jar:ppk/as400ppk.jar:ppk/webppk.jar:classes:classes/MyCustomBeans.jar:lib/ide.jar:lib/wizard.jar:lib/product.jar:lib/help.jar:lib/swing.jar:lib/jhall.jar:lib/parser.jar:lib/xt.jar:lib/icebrowserbean.jar:lib/icebrowserlitebean.jar com.installshield.isje.ISJE

EXAMPLE for Win32
c:\jre\118\bin\jre -cp .;ppk\win32ppk.jar;ppk\linuxppk.jar;ppk\solarisppk.jar;ppk\aixppk.jar;ppk\os2ppk.jar;ppk\cimppk.jar;ppk\as400ppk.jar;ppk\webppk.jar;classes;classes\MyCustomBeans.jar;lib\ide.jar;lib\wizard.jar;lib\product.jar;lib\help.jar;lib\swing.jar;lib\jhall.jar;lib\parser.jar;lib\xt.jar;lib\icebrowserbean.jar;lib\icebrowserlitebean.jar com.installshield.isje.ISJE

ISMP Product Team
Nov. 14, 2000.


robsahm

robsahm
  • Members
  • 15 posts

Posted 20 December 2001 - 07:12

did you add all your classes to the build method of one of your custom beans?  Any .class file that you need to use that isnt in your wizard tree, ie doesnt extend wizard action needs to be included the build method of a bean in your wizard sequence.  There is some KB artical on it, I just forget  wich