How to include vi dependencies in application builder?

I have a small project in which I am trying to build an application.  I am having issues with the build including all dependencies.  In the project explorer "Items" tab, there are 7 files listed (1 dll and 6 vi's).  When I build the application, and try to run it on a different computer, it says it cannot find the dll and 3 of the 6 vi's.  Under "Source Files" for the build specifications, the only .vi I'm able to add is the main/startup vi.  It does not give me the option to add any of the vi's/dll that are listed as dependencies in the project explorer list.  Under "Source File Settings", when I click on dependencies, I have "Set destination for all contained items" checked and "Support Directory" selected.
Any thoughts as to what I'm missing?
Thanks,
Jordan
Attachments:
ProjectExplorer.jpg ‏49 KB
SourceFiles.jpg ‏51 KB
SourceFileSettings.jpg ‏64 KB

NeilR, let me know if this works for you.  
Edited to add:  As I already pointed out, this isn't the cleanest code.  Especially some of the stuff more recently added.  It's pretty messy!
Attachments:
LabJackAnalogINwGPS142.zip ‏374 KB

Similar Messages

  • How to include md5 package in application

    Hi All,
    First of all sorry I posted in another users thread. In the thread http://forums.sun.com/thread.jspa?threadID=5426671 the person used org.bouncycastle.crypto.digests.MD5Digest for doing md5.
    I need some help here on how you include the org.bouncycastle.crypto.digests.MD5Digest library in my java code as I want to use the md5.
    I am also working on something similar like that but without the web application part and a detail which consists on OTP part using md5.
    As the md5() doesn't work in j2me so was also searching for something which will work on MIDP.
    package com.abc; //package define
    public class messDig5 //class define
        private String generateHash(String OTP, int loopNum) {
            byte[] secretBytes = OTP.getBytes();
            for (int x = 0; x < loopNum; x++) {
                byte[] tempStore = new byte[16];
                tempStore = hash(secretBytes);
                secretBytes = tempStore;
         //   return convertToHex(secretBytes);
            return byteArrayToHexString(secretBytes);
        public byte[] hash(byte[] secretBytes) {
           org.bouncycastle.crypto.digests.MD5Digest digest = new org.bouncycastle.crypto.digests.MD5Digest();
            digest.reset();
            // Update MD5 digest with user secret in byte format
            digest.update(secretBytes, 0, secretBytes.length);
            // get length of digest to initialise new md5 byte array
            int length = digest.getDigestSize();
            // create md5 byte array using length
            byte[] md5 = new byte[length];
            // calculate MD5 hash, using md5 byte array, 0 for buffer offset
            digest.doFinal(md5, 0);
            return md5;
    //    private static String convertToHex(byte[] data) {
    //        StringBuffer buf = new StringBuffer();
    //        String Hex;
    //        String formattedHex;
    //        for (int i = 0; i < data.length; i++) {
    //            int halfbyte = (data[i] >>> 4) & 0x0F;
    //            int two_halfs = 0;
    //            do {
    //                if ((0 <= halfbyte) && (halfbyte <= 9)) {
    //                    buf.append((char) ('0' + halfbyte));
    //                } else {
    //                    buf.append((char) ('a' + (halfbyte - 10)));
    //                halfbyte = data[i] & 0x0F;
    //            } while (two_halfs++ < 1);
    //        Hex = buf.toString();
    //        formattedHex = "\n" + Hex.substring(0, 4) + " " + Hex.substring(4, 8) + " " + Hex.substring(8, 12) + " " + Hex.substring(12, 16) + " " + Hex.substring(16, 20) + " " + Hex.substring(20, 24) + " " + Hex.substring(24, 28) + " " + Hex.substring(28, 32);
    //        return formattedHex;
        static String byteArrayToHexString(byte byteValues[]) {
            byte singleChar = 0;
            if (byteValues == null || byteValues.length <= 0) {
                return null;
            String entries[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
                "a", "b", "c", "d", "e", "f"};
            StringBuffer out = new StringBuffer(byteValues.length * 2);
            for (int i = 0; i < byteValues.length; i++) {
                singleChar = (byte) (byteValues[i] & 0xF0);
                singleChar = (byte) (singleChar >>> 4);
                // shift the bits down
                singleChar = (byte) (singleChar & 0x0F);
                out.append(entries[(int) singleChar]);
                singleChar = (byte) (byteValues[i] & 0x0F);
                out.append(entries[(int) singleChar]);
            String rslt = new String(out);
            return rslt;

    Camellia,
    I take you already added bouncycatsle to your project as a compile dependency, since it compiles (unless it does not).
    All you have to do for your code to work on the phone, you need to build your JAR file (that you use to distribute your MIDlet) with bouncycastle packaged in. This will all depend on the method you use to build your JAD and JAR files.
    I use antenna tool, which provides me with ant tasks to compile, build jar, package external libraries etc. Your scenario can be different, but all you have to do is to search manuals and/or google for methods on how to package external libraries with your build.
    Daniel

  • How to include help file in application

    Hello,
    i developed an application using java swing. i need to include help file in my application. How to include it?
    Thanks,
    Sri

    Hi Sri,
    Use Java Help....
    There is some thing called as Help set. In a button action listener u have to call that.
    HelpSet helpSet = getHelpSet("path");
    HelpBroker helpBroker = helpSet.createHelpBroker();
    CSH.setHelpIDString (jButton,"filename");
    jButton.addActionListener(new CSH.DisplayHelpFromSource(helpBroker));
    Regards,
    Kumar

  • How to include the NIWebAppServer.conf when building a web service installer in LV2010

    Hi all,
    I'm build a LabVIEW 2010 web service and creates a deployable setup installation as described in Web Services FAQ:
    http://zone.ni.com/devzone/cda/tut/p/id/7747#toc12
    but also would like to include my .conf file for the NI Application Web Server. The file is located in:
    C:\Program Files\National Instruments\Shared\NI WebServer\NIWebAppServer.conf
    This is where all settings (listening ports, SSL, users etc.) are configured.
    If I look in LabVIEW 2009 build instructions for web services:
    http://digital.ni.com/public.nsf/allkb/62B9C2D5C91EE8B28625778800609FF2?OpenDocument
    they include this file, but it is a new procedure in LV2010 (as seen in the top link) and I can't seem to get this conf file included and installed on the deployed system automatically for LV2010. Today, I must copy it manually.
    Any ideas of how to do this?
    Thanks,
    Mattias

    Having the same problem, even if pointing the installer to install the particular file, the installer will install its own some default file. Did you find any solution?
    /Carl

  • How to include Managed bean class in build sciprt for taskflow (Jdev 11.4)

    Hi,
    I've developed a custom taskflow to be deployed in the webcenter spaces. The taskflow that I developed contains managed beans. I am using oracle provided build script with the sample application, to deploy custom taskflow. After the build, we don't see any .class files (managed bean files) in the generated war file. Once we deploy the taskflow into the space, it is failing may be because the managed bean class files are missing in the <taskflow>.war. Am i missing something? Should we specifically include the .class files in the build script?
    Below is the oracle provide build script..
    <?xml version="1.0" encoding="US-ASCII" ?>
    <!--Ant buildfile generated by Oracle JDeveloper-->
    <!--Generated Sep 29, 2009 11:47:41 PM-->
    <project name="WebCenterSpacesSharedLibExtension" default="all" basedir="."
    xmlns:wls="oracle.webcenter.tools.wls">
    <property file="../config.properties"/>
    <property file="build.properties"/>
    <import file="internal-targets.xml"/>
    <taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath>
    <pathelement location="${jdeveloper.install.home.directory}/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar"/>
    </classpath>
    </taskdef>
    <target name="clean-stage"
    description="Cleans the output directory and generates the war"
    depends="clean, stage"/>
    <target name="deploy-shared-lib"
    depends="init-wls"
    description="Deploy the extending WebCenter shared library">
    <echo> ---------------------------- </echo>
    <echo> ${wls.userconfig} ${wls.userkey} ${wls.host}:${wls.port} ${oracle.jdeveloper.deploy.dir}/exploded ${wls.webcenter.app.target} ${customer.library.name}</echo>
    <exec logerror="true"
    executable="${jdeveloper.install.home.directory}/oracle_common/common/bin/${wlst.executable}"
    dir="${jdeveloper.install.home.directory}/oracle_common/common/bin">
    <!--TODO:ExpDeploy Uncomment line after this and comment the one after that to deploy exploded. -->
    <arg line="${extending.spaces.home.dir}/WebCenterSpacesSharedLibExtension/extspaces.py ${wls.userconfig} ${wls.userkey} ${wls.host}:${wls.port} ${oracle.jdeveloper.deploy.dir}/exploded/${customer.library.name}.war ${wls.webcenter.app.target} ${customer.library.name}"/>
    <!--TODO:ExpDeploy Uncomment line below and comment line above to have non-exploded deploy -->
    <!--arg line="${extending.spaces.home.dir}/WebCenterSpacesSharedLibExtension/extspaces.py ${wls.userconfig} ${wls.userkey} ${wls.host}:${wls.port} ${oracle.jdeveloper.deploy.dir}/${shared.library.name} ${wls.webcenter.app.target} ${customer.library.name}"/-->
    </exec>
    <echo> ---------------------------- </echo>
    <echo> Restarting the app </echo>
    <echo> ---------------------------- </echo>
    <exec logerror="true"
    executable="${jdeveloper.install.home.directory}/oracle_common/common/bin/${wlst.executable}"
    dir="${jdeveloper.install.home.directory}/oracle_common/common/bin">
    <arg line="${extending.spaces.home.dir}/WebCenterSpacesSharedLibExtension/redepwc.py ${wls.userconfig} ${wls.userkey} ${wls.host}:${wls.port} "/>
    </exec>
    </target>
    </project>
    Thanks in advance
    Nitin

    Hi,
    I've developed a custom taskflow to be deployed in the webcenter spaces. The taskflow that I developed contains managed beans. I am using oracle provided build script with the sample application, to deploy custom taskflow. After the build, we don't see any .class files (managed bean files) in the generated war file. Once we deploy the taskflow into the space, it is failing may be because the managed bean class files are missing in the <taskflow>.war. Am i missing something? Should we specifically include the .class files in the build script?
    Below is the oracle provide build script..
    <?xml version="1.0" encoding="US-ASCII" ?>
    <!--Ant buildfile generated by Oracle JDeveloper-->
    <!--Generated Sep 29, 2009 11:47:41 PM-->
    <project name="WebCenterSpacesSharedLibExtension" default="all" basedir="."
    xmlns:wls="oracle.webcenter.tools.wls">
    <property file="../config.properties"/>
    <property file="build.properties"/>
    <import file="internal-targets.xml"/>
    <taskdef resource="net/sf/antcontrib/antcontrib.properties">
    <classpath>
    <pathelement location="${jdeveloper.install.home.directory}/modules/net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar"/>
    </classpath>
    </taskdef>
    <target name="clean-stage"
    description="Cleans the output directory and generates the war"
    depends="clean, stage"/>
    <target name="deploy-shared-lib"
    depends="init-wls"
    description="Deploy the extending WebCenter shared library">
    <echo> ---------------------------- </echo>
    <echo> ${wls.userconfig} ${wls.userkey} ${wls.host}:${wls.port} ${oracle.jdeveloper.deploy.dir}/exploded ${wls.webcenter.app.target} ${customer.library.name}</echo>
    <exec logerror="true"
    executable="${jdeveloper.install.home.directory}/oracle_common/common/bin/${wlst.executable}"
    dir="${jdeveloper.install.home.directory}/oracle_common/common/bin">
    <!--TODO:ExpDeploy Uncomment line after this and comment the one after that to deploy exploded. -->
    <arg line="${extending.spaces.home.dir}/WebCenterSpacesSharedLibExtension/extspaces.py ${wls.userconfig} ${wls.userkey} ${wls.host}:${wls.port} ${oracle.jdeveloper.deploy.dir}/exploded/${customer.library.name}.war ${wls.webcenter.app.target} ${customer.library.name}"/>
    <!--TODO:ExpDeploy Uncomment line below and comment line above to have non-exploded deploy -->
    <!--arg line="${extending.spaces.home.dir}/WebCenterSpacesSharedLibExtension/extspaces.py ${wls.userconfig} ${wls.userkey} ${wls.host}:${wls.port} ${oracle.jdeveloper.deploy.dir}/${shared.library.name} ${wls.webcenter.app.target} ${customer.library.name}"/-->
    </exec>
    <echo> ---------------------------- </echo>
    <echo> Restarting the app </echo>
    <echo> ---------------------------- </echo>
    <exec logerror="true"
    executable="${jdeveloper.install.home.directory}/oracle_common/common/bin/${wlst.executable}"
    dir="${jdeveloper.install.home.directory}/oracle_common/common/bin">
    <arg line="${extending.spaces.home.dir}/WebCenterSpacesSharedLibExtension/redepwc.py ${wls.userconfig} ${wls.userkey} ${wls.host}:${wls.port} "/>
    </exec>
    </target>
    </project>
    Thanks in advance
    Nitin

  • How to include a .lvlib in a build that was created using a custom .dll

    I am trying to build an executable in LV2010 that uses a .lvlib that was created using a .dll from Keyence. I have added the .lvlib to the source files as "Always Included" and I have also added all of the .vi files of the library to "Always Included." I still get the error saying "Missing External Function" when running the program. The executable seems to open fine on the development computer but not on a secondary computer. Any ideas?
    Solved!
    Go to Solution.

    ...I assumed too quickly that the problem was resolved. By specifying the path I was actually able to open the executable after installing but none of the .dll functions worked. I noticed that when I specified a path on the diagram, the .dll was no longer included in the dependencies and was no longer included in the build. I guess this would explain why none of the functions were working. I copied the .dll over to the path specified on the diagram and it still did not function.
    This brings me back to the original problem I was facing. I actually removed the .lvlib. I replaced all of the library vi references with the Call Library Function and deselected the "Specify path on diagram" Boolean. When I do this, the build includes the .dll in the dependencies list and it includes the .dll file in the destination folder of the install. However, when running the executable I get a list of errors that read, "Missing external function …” I have attached an image of this error. This is the same error that occurred when I was using the library, but I thought maybe the library was the cause of the problem, which is why I used the Call Library Function instead.
    *I have tried adding the .dll to the support files and I receive the same error when trying to run the executable.
    *I have tried adding the .dll to the support files and making it an “always include” in the installer properties under source files. This returns the same error.
    I’m really not sure where to go from here. Any help is greatly appreciated!
    Attachments:
    Call Library Function.jpg ‏56 KB
    Error.JPG ‏23 KB

  • How to include dll into a stand-alone application

    Hi, I wrote a vi to process images from my camera, and I want to build a stand-alone application(exe), so I can share the application with my friends. I just do as wht's in  the Labview help, but when I run the exe file in other PC, it  tells me I haven't nivision.dll etc. My question is how to find out the dll files in my vi and include these files in the stand-alone application?  

    To be honest I am not sure. Its been a while since have used the vision run-time engine. Before I installed it on the target computer. I ddn't include it with my application build.
    Take a look at this http://digital.ni.com/public.nsf/allkb/1A9A18AA574ABEDF86256F780062C240 it might help. Also look at the documentation supplied with the vision deployment license.
    David

  • APEX4.0 - How to get Application Builder

    Hello
    I am new to Apex and I have installed Apex4.0 on XE on windows successfully. I could successfully log in as a 'admin' , with 'internal' workspace and see the four admin menus such as 'Manage Requests','Manage Instance','Manage Workspaces' & 'Manage Activity'.
    Is there any special settings I need to do see 'Application Builder','SQLWorkshop' etc?
    Basically how do I get in to 'Application builder' all other developer stuff.
    Any help is really appreciated.
    I tried 'apex.oracle.com', for application builder, but I would like to have in my local machine.
    /with regards
    Murali

    Great to hear that you can now work with APEX.
    If your question is answered, please mark this thread and any helpful or correct answer post accordingly.
    I just found the following source using google:
    http://guruparan18.wordpress.com/2010/06/20/oracle-application-express-apex-interview-questions/
    A quick run over the questions gave me the impression that they cover a broad range of things you should know about working with APEX.
    -Udo

  • Can visa runtime engine be included in application build?

    I just installed my program on a new machine and it wouldn't work. Turned
    out I needed to also install the visa runtime engine. Is there any way to
    automatically include that in the application build?

    I've seen that you can tick of under the "additional installers" that Visa runtime is included, however, this will look for the installer files on the CD's. Is there a way to update this ? (I have 4.0 on the disc, and would like to included 4.2 in my build for installation/deployment.
    The file I download from NI is a .exe, but the linking to the build configurator is some strange windows code (see attached screenshot)
    /Brian
    Attachments:
    screenshot 13-08-2007 17.57.JPG ‏95 KB

  • How to Including Graph in Forms 6i Please Help Urgent

    How to include graph developed through graphic builder in the form 6i.
    Amir Sajjad

    1. attach the library og.pll.
    3. create a chart item.
    2. create a trigger and call procedure
    og.open to specify which graph display file .ogd is to be included in which
    chart item.
    If you want to see more details then see
    help of form builder
    1. click help menu
    2. click que cards
    3. click using chart item.

  • Application builder error.llb

    Hi all,
    I'm using application builder to compile an executable of my VI. Compile runs without a hitch.
    However, when I try to launch the .exe three subvis from error.llb are missing : Not Found Dialog.vi, Details Display Dialog.vi and Set String Value.vi
    The compiled .exe seems to be looking for these VIs in instr.lib, which is nowhere to be found in the compile folder.
    This happens even on my developpment machine, on which, of course, the VI runs fine from within LabView.
    Did I miss something during the compiler setup ?
    Thanks in advance for your help !
    Nico
    Solved!
    Go to Solution.

    I've had this before, and it was reported by NI as being a bug that comes from loading up a project that was built in an older version of LabVIEW and creating an application from it. For me it was loading a LV8.5 project into 8.6.
    The only workaround was to add the three missing vi's to the project, and ensure they are added to the Always Included list within the application builder.
    You will find these vi's in Program Files\National Instruments\LabVIEW 8.x\vi.lib\Utility\error.llb. Simply add them to your project somewhere, then in application builder made sure you select them as Always Included in the Source Files section, then rebuild your application.
    Message Edited by Thoric on 03-13-2009 03:52 PM
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • How to include another msi with LV application builder?

    I can use LV application builder to create an installer for my application. But my application relies on a 3rd part msi, which should be run after my application is installed.  So how to include this msi with LV app builder? Thanks in advance.

    I would recommend executing a batch file that launches your other installers after your LabVIEW executable finishes installing. The process of doing this (in addition to other suggestions about including 3rd party installers) can be found in the Knowledgebase linked here.
    Kind Regards,
    E. Sulzer
    Applications Engineer
    National Instruments

  • How can I use a shared library made with the application builder?

    Hi,
    I am using LabVIEW 7.1 running on Slackware 10.1 (kernel 2.4.29) and I am trying to call a graph display from a C program that I use for debugging VME access from a VMIVME controler. So using the application builder I built the VI as a shared library (graph.vi -> graph.so) containing a function called "graph". In my main program the call to the dlopen fails with the error: "graph.so: undefined symbol: UninitLVClient". When I examin graph.so with nm I see that UninitLVClient and other LabVIEW functions are indeed undefined and using ldd shows that graph.so has dependencies only on libc.so.* and *linux*.so.* but not on LabVIEW related stuff. Those functions are defined in the liblv.so that's in the cintools directory but I have no idea if the user is supposed to use that.
    So I think I am missing an important concept here. Can somebody help or direct me to some documentation (I found lots of information about how to link external code to LabVIEW but nothing about how to link LabVIEW code to an external program)?

    Thanks Watermann,
    your message has been very useful so now I am linking to the proper library but I still have problems when trying to load dynamically the shared library produced with LabVIEW. It is strange that I could successfully load the lvrt library at loading time but it does not work when I am loading the library at execution time.
    I made a small LabVIEW program that prints a hello window and I am calling it from a C program. In the first program main.c I am linking to the lvrt library at loading time and it works but in the second one I am linking dynamically at execution time and it does not work. For my work I need to be able to load code done in LabVIEW at execution time. Any help is appreciated!
    Program main.c:
    // small program to call a LabVIEW shared library
    #include
    #include
    #include "hello.h" // got this from the LabVIEW builder, i.e. when I made the hello.so
    int main(void)
    printf("Hello from C!\nLets call LabVIEW now\n");
    hello();
    printf("Bye ... \n");
    return 0;
    The command to compile main.c, i.e. linking shared library lvrt when loading main program:
    gcc -Wall -I /usr/local/lv71/cintools/ -o main main.c hello.so -l lvrt
    The LD_LIBRARY_PATH has been defined and exported:
    $ LD_LIBRARY_PATH=$PWD
    $ export LD_LIBRARY_PATH
    IT WORKS!
    Program main2.c:
    // small program to call a LabVIEW shared library
    #include
    #include
    #include
    int main(void)
    void * h_lvrt;
    void * h_hello;
    void (* hello)(void);
    char * error;
    printf("Hello from C!\nLets call LabVIEW now\n");
    // open LabVIEW RunTime shared library
    // in my computer located at /usr/local/lib/liblvrt.so
    h_lvrt = dlopen("/usr/local/lib/liblvrt.so", RTLD_NOW);
    // check for error
    error = dlerror();
    if (error) {
    printf("error : could not open LabVIEW RunTime library\n");
    printf("%s\n", error);
    return 1;
    // open hello shared library
    // in my computer located at /home/darss/lv_call/hello.so
    h_hello = dlopen("hello.so", RTLD_NOW);
    // check for error
    error = dlerror();
    if (error) {
    // close LabVIEW RunTime shared library
    dlclose(h_lvrt);
    printf("error : could not open hello library\n");
    printf("%s\n", error);
    return 1;
    // get function hello from library hello.so
    hello = dlsym(h_hello, "hello");
    // check for error
    error = dlerror();
    if (error) {
    // close hello shared library
    dlclose(h_hello);
    // close LabVIEW RunTime shared library
    dlclose(h_lvrt);
    printf("error : could not get the hello function\n");
    printf("%s\n", error);
    return 1;
    // call hello function
    hello();
    // close hello shared library
    dlclose(h_hello);
    // close LabVIEW RunTime shared library
    dlclose(h_lvrt);
    printf("Bye ... \n");
    return 0;
    The command to compile main2.c, i.e. dynamically linking library lvrt at execution of main2 program:
    gcc -Wall -o main2 main2.c -l dl
    The LD_LIBRARY_PATH still defined and exported.
    IT DOES NOT WORK!
    Program output:
    Hello from C!
    Lets call LabVIEW now
    error : could not open hello library
    /home/darss/lv_call/hello.so: undefined symbol: WaitLVDLLReady

  • How to include custom application.xml in JDev9i project

    Can anybody explain to me how to include a custom application.xml file when deploying to an .ear file? I need to include application wide security roles, and I can't see where in Jev9i how to do this.
    After searching this forum, I see that jdev9i can't include the orion-application.xml, but I want to include just the standard J2EE application.xml. Is this possible?
    Thanks,
    matt

    The standard application.xml file unfortunately can't be customized in JDev 9.0.2. The reasons why this capability was left out of JDev 9.0.2 are same reasons why the other EAR-level XML files were excluded. The OTN thread
    Re: Regarding 11i and E-business suite
    has a summary of those reasons, which you've probably seen. We know this is an area in need of improvement and will be adding this functionality in the JDev 9.0.3 release. Until then, you'll have to go with a work-around like an Ant build file, batch file, Java application, or some other kind of script.
    Below is a sample Java application which can be used to insert <security-role> elements into an EAR file's application.xml. Modify the main() method to customize for your purposes, and put xmlparserv2.jar on the classpath (in a JDev project, add the "Oracle XML Parser v2" library):
    package mypackage4;
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    public class PostProcessEAR
    public static void main( String[] args ) throws IOException
    final String earFile = "C:\\temp\\myapp.ear";
    final PostProcessEAR postProcess = new PostProcessEAR( earFile );
    postProcess.addSecurityRole( null, "first_role" );
    postProcess.addSecurityRole( "Description for the second role", "second_role" );
    postProcess.commit();
    System.out.println( "Done." );
    private final File _earFile;
    private final ArrayList _securityRoles = new ArrayList();
    public PostProcessEAR( String earFile )
    _earFile = new File( earFile );
    public void addSecurityRole( String description, String roleName )
    if ( roleName == null )
    throw new IllegalArgumentException();
    _securityRoles.add( description );
    _securityRoles.add( roleName );
    * Write out modified EAR file.
    public void commit() throws IOException
    if ( _securityRoles.size() == 0 )
    return;
    final ZipFile zipFile = new ZipFile( _earFile );
    final Enumeration entries = zipFile.entries();
    final File outFile = new File( _earFile.getAbsolutePath() + ".out" );
    final ZipOutputStream out = new ZipOutputStream( new BufferedOutputStream( new FileOutputStream( outFile ) ) );
    while ( entries.hasMoreElements() )
    final ZipEntry entry = (ZipEntry) entries.nextElement();
    final InputStream in = zipFile.getInputStream( entry );
    if ( "META-INF/application.xml".equals( entry.getName() ) )
    final XMLDocument modifiedApplicationXml = insertSecurityRoles( in );
    final ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
    modifiedApplicationXml.print( byteOutput );
    final int numBytes = byteOutput.size();
    entry.setSize( numBytes );
    if ( entry.getMethod() == ZipEntry.STORED )
    entry.setCompressedSize( numBytes );
    final CRC32 crc32 = new CRC32();
    crc32.update( byteOutput.toByteArray() );
    entry.setCrc( crc32.getValue() );
    out.putNextEntry( entry );
    byteOutput.writeTo( out );
    else
    // Copy all other zip entries as they are.
    out.putNextEntry( entry );
    copy( in, out );
    in.close();
    out.close();
    private XMLDocument insertSecurityRoles( InputStream in ) throws IOException
    final DOMParser domParser = new DOMParser();
    domParser.setAttribute( DOMParser.STANDALONE, Boolean.TRUE );
    try
    domParser.parse( in );
    final XMLDocument doc = domParser.getDocument();
    final Element docElem = doc.getDocumentElement();
    final Iterator iter = _securityRoles.iterator();
    while ( iter.hasNext() )
    final String desc = (String) iter.next(); // might be null
    final String roleName = iter.next().toString(); // must not be null
    final Element securityRoleElem = doc.createElement( "security-role" );
    if ( desc != null )
    securityRoleElem.appendChild( createPcdata( doc, "description", desc ) );
    securityRoleElem.appendChild( createPcdata( doc, "role-name", roleName ) );
    docElem.appendChild( securityRoleElem );
    return doc;
    catch ( SAXException e )
    e.printStackTrace();
    return null;
    private Element createPcdata( XMLDocument doc, String elemName, String pcdata )
    final Element elem = doc.createElement( elemName );
    elem.appendChild( doc.createTextNode( pcdata ) );
    return elem;
    private final byte[] buffer = new byte[4096];
    private void copy( InputStream in, OutputStream out ) throws IOException
    while ( true )
    final int bytesRead = in.read( buffer );
    if ( bytesRead < 0 )
    break;
    out.write( buffer, 0, bytesRead );

  • Including a Pre-Built LLB in Application Builder 8.X

    I have just recently updated some old code to 8.5.1. This code contains many dynamic calls to VIs located in pre-built LLBs (LLBs that were saved prior to application builder). This application is also compatible with a priority plug-in architecture. So when creating an application or installer in app builder 8.X, how does one include a LLB file? I do not wish to build it. I just want to include it the same way you may include a text file or someother type of source file. LLB files do not show up as individual files in the Project Manager.

    AstroGlen wrote: 
     I would like to create an installer that uninstalls the previous version of software (which was written in 7.1.1). I am assuming it is necessary to make edits to the "registry" category in the installer properties. I am also assuming that I would need to enter the product code for my application. This is the code found in the 7.1.1 application builder \ installer settings \ Properties button. But i do not know the particulars of what needs to be done.
    I think when you install an application created/built using a higher version of LV, it ll automatically overwrite any previous version(s) of that application installed in the target PC. We may not need it to be uninstalled manually. Did you try this?
    - Partha
    LabVIEW - Wires that catch bugs!

Maybe you are looking for