Jump to content

Built classes directly into an exe for dynamic loading. But now the installer builder claims that the files can't be found in the built exe?


Recommended Posts

Here's the situation:

 

I'm dynamically loading lots of classes in my application. These classes are sent to known destinations inside the exe, as specified in the exe build profile.

 

The exe builds and runs flawlessly.

 

But when I try to create an installer for the built exe, I get an error claiming that the files can't be found.

 

It looks like this:

 

 

The following file(s) are not found on the system:
 
 
C:buildsAPTAPT.exeDialogsConfiguration ManagerConfiguration Manager.lvclass
C:buildsAPTAPT.exeDialogsConfiguration ManagerConfiguration Manager.lvlib
C:buildsAPTAPT.exeDialogsConfiguration ManagerRead All Modules Ready.vi
C:buildsAPTAPT.exeDialogsConfiguration ManagerRead Caller Data SEQ.vi
C:buildsAPTAPT.exeDialogsConfiguration ManagerRead Dialog Launched.vi
C:buildsAPTAPT.exeDialogsConfiguration ManagerRead Element of Enqueuer Array.vi
C:buildsAPTAPT.exeDialogsConfiguration ManagerRead Elements of Enqueuer Array.vi
 
etc...
 
Ensure the files exist and any included build specifications are built.
 
 

That's no good!

 

When I hit "Show details" on the error window, it returns the following:

 

 

Click the link below to visit the Application Builder support page. Use the following information as a reference:
 
Error 7 occurred at CDK_Utility_GenerateErrorCluster.vi -> CDK_Engine_FileExists.vi
 
Possible reason(s):
 
LabVIEW:  File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.
=========================
NI-488:  Nonexistent GPIB interface.
 
 

 

 

I'm new to using dynamic class loading in applications; is this a common issue? What's the solution/workaround?

 

Thanks guys.

Edited by Mike Le
Link to comment

Mike, not sure if this will help you, but if you add

 

NI_Appbuilder_logging=TRUE

 

to your LabVIEW.ini file then you will get a comprehensive build log for your .exes and installers. If your installer is failing to build just scroll down to the last line and see if there is a more verbose error message there.

 

The log file is in the same directory as the .lvproj

  • Like 1
Link to comment

Thanks for the tip, but I'm worried that a log won't be so helpful in this case.

 

I think I've figured out what's wrong, but I don't know how to fix it. The installer erroneously thinks that "APT.exe" is a system folder and searches for a nonexistent folder, rather than trying to find files within the actual "APT.exe" executable.

 

Not sure how to correct it! The exe profile correctly bundles the classes into the exe, and the installer profile should get its information from the exe profile. But where the exe profile correctly interprets my custom Destinations as being inside the exe, the installer profile thinks there's a file folder instead.

 

I posted a bit about it here:

 

http://lavag.org/topic/15883-get-lv-class-default-value-from-memory-not-from-disk/page-2#entry109482

 

No clue how to fix it, pretty irritated at LabVIEW's app builder right now.

Link to comment

Wow, interesting program! I downloaded it and am looking through the documentation/examples. I'll give it a try tonight! Any "gotchas" I should be aware of? It looks like I can modify some of the example files and run them from the same directory as my built application.

Link to comment
Wow, interesting program! I downloaded it and am looking through the documentation/examples. I'll give it a try tonight! Any "gotchas" I should be aware of? It looks like I can modify some of the example files and run them from the same directory as my built application.

 

I use Inno Script Studio to generate the actual installer. There is nothing I can actually think of that caught me out, other than it just took some time to figure everything out (like admin rights, banner graphics, unlocking directories etc).

  • Like 1
Link to comment

Wow, that was incredibly trivial. Thanks Neil! Far easier to use than LabVIEW's app builder. I can see I'm going to have to tweak a few things to get it exactly how I want, but the fact that it builds a working installer on the first try (just using the GUI wizard you recommended) is huge.

 

NI probably still has some weird behavior on their hands but now I don't have to waste any more time trying to debug it!

Link to comment

Glad that helped you. I also prefer the fact that it creates a single setup.exe file, rather than the way the NI installer creation creations (I think) .msi 

 

Inno setup makes it quite easy to run other things as well as part of the setup, so you can install (for example) .net or the LabVIEW runtime etc.

Link to comment
Wow, that was incredibly trivial. Thanks Neil! Far easier to use than LabVIEW's app builder. I can see I'm going to have to tweak a few things to get it exactly how I want, but the fact that it builds a working installer on the first try (just using the GUI wizard you recommended) is huge.

 

NI probably still has some weird behavior on their hands but now I don't have to waste any more time trying to debug it!

 

.I have been bitten hard on all the LabVIEW installers (most recently by JKIs). Whilst I love Inno Setip and have used it for many years, I need a x-platform one and they are a bit few and far between (how I wish Inno was x-platform!!!!). Now I'm dissatisfied with all the "preferred" options I'm checking out InstallJammer to see if it is a better solution for my needs.

Link to comment

Do you guys know if Inno Setup has an easy way to install prerequisites, like the LabVIEW Run-Time Engine? My fallback plan was to make a "base installer package" that will install the RTE through LabVIEW's builder profile. Then have another installer for my program.

 

It's annoying, but it would only be a two-step process that first time. After that, I think people can just go directly to my latest installer for upgrades.

Link to comment
Do you guys know if Inno Setup has an easy way to install prerequisites, like the LabVIEW Run-Time Engine? My fallback plan was to make a "base installer package" that will install the RTE through LabVIEW's builder profile. Then have another installer for my program.

 

It's annoying, but it would only be a two-step process that first time. After that, I think people can just go directly to my latest installer for upgrades.

Depends what you mean by "easy". Write a pascal script to check in the registry for the Run-Time and if it doesn't exist invoke the run-time installer. If you have the download plugin, you can even get it to go and fetch the installer from NI, then run it.

Link to comment
Do you guys know if Inno Setup has an easy way to install prerequisites, like the LabVIEW Run-Time Engine? My fallback plan was to make a "base installer package" that will install the RTE through LabVIEW's builder profile. Then have another installer for my program.

 

It's annoying, but it would only be a two-step process that first time. After that, I think people can just go directly to my latest installer for upgrades.

 

You can get the Inno setup to execute another application as part of the setup, in the example pasted below I execute the RTE setup exe. Note I have manually extracted the RTE so that it consists of its bits and pieces. You also have to tell Inno to include the files in the setup (that is the [Files] section)


[Files]
Source: "C:YOURPROJECTNAMEResourcesInstallerLVRTE_Extracted*"; DestDir: "{tmp}LVRTE_Extracted"; Flags: recursesubdirs createallsubdirs

 

[Run] Filename: "{tmp}LVRTE_Extractedsetup.exe"; Parameters: "/q /AcceptLicenses yes /r /disableNotificationCheck"; WorkingDir: "{tmp}LVRTE_extracted"; Flags: waituntilterminated; StatusMsg: "Installing LabVIEW Run-Time Engine"

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.