This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: putResource/getResource issue
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 28, 2006
01:00 PM
putResource/getResource issue
Hello, I have used putResource( "path/filename", "filename") to
put files into the installation archive from a build() method.
The files are properly added to archive.
No problem so far.
However, I have created a custom control and want to be
able to access the file with URL url = something?.getResource( "filename" ) from
within a actionPerformed() method for the control.
Is there a way to do this?
James
put files into the installation archive from a build() method.
The files are properly added to archive.
No problem so far.
However, I have created a custom control and want to be
able to access the file with URL url = something?.getResource( "filename" ) from
within a actionPerformed() method for the control.
Is there a way to do this?
James
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 28, 2006
01:46 PM
For auxiliary files you want to use at run time but not install, per se, you might look at the Support Files view and the topic "Using Support Files". (For example, the license-agreement dialog box uses this technique.)
I haven't tried it from a dialog box class, but if you have used putResource in a build method somewhere, you can use the com.installshield.util.FileUtils class with something like this:
I haven't tried it from a dialog box class, but if you have used putResource in a build method somewhere, you can use the com.installshield.util.FileUtils class with something like this:
// get the location of the resource in the archive...(I think you'll need to catch java.io.IOException with this.)
java.net.URL url = getResource("resource.name");
// ...extract the resource to a temporary location...
String tempfile =
FileUtils.createTempFile(url, "temp.resource.name");
// ...and then do something with contents of tempfile
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 28, 2006
04:06 PM
Does this technique apply to DLL files. I have some custom code that calls out to a jar file (successfully imported using support.putArchive()) BUT the class in that jar file eventually makes a call to a DLL file (which is not in the PATH and not in the current directory). I know where the DLL is, I just don't know how to include it in my project. I tried to change the PATH variable, with no luck. How the heck do I simply supply some dependant DLLs that the install shield JVM will know about!