3

I'm having trouble getting the downloadable data files to work in Install4j. Here's what I'm doing. I expected to see the "phony_license_web.txt" in the AppData\Programs\myprogram folder.

  1. Create a file "phony_license_web.txt" in Define Distribution Tree. It is added to the Default file set > Installation directory.
  2. Go to Media > Windows > Data files
  3. Specify a download URL "http://localhost/testsite". There is a file at http://localhost/testsite/phony_license_web.txt.
  4. Check "Save downloaded files on Install files.
  5. Build the project
  6. Test the installer

I tried a Download Installation Components action but removed it since the documentation said Install Files would do this automatically.

Thanks, Carl

Updated Test Case

  1. Create a data file "license_web.txt" under an IIS folder with directory browsing turned on. Going to http://localhost/components displays the file item. Clicking on the link brings up the text file.
  2. In the Installation Components, add an Installation Component "Data Files". Set the downloadable option. There are no files checked for this component.
  3. In Media > Windows > Wizard, select Data files and check the downloadable radio button. Enter http://localhost/components.
  4. Test the installer
  5. Verify that the data file license_web.txt does not appear anywhere in the installation directory (subfolder of AppData\Programs)
Wall0p
  • 248
  • 1
  • 7

1 Answers1

1

Downloadable data files works with installation components, not with single files. You have to create an installation component on the

Files->Installation Components

step and mark it as downloadable. Then the compiler will create data files that you have to host on your web server under the specified URL.

Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
  • I forgot to mention that in after I added a File, I created an Installation Component with the download option. – Wall0p Nov 19 '18 at 22:11
  • Still, you don't host the file itself, but the produced data filed in the media output directory. The installer will download those files. – Ingo Kegel Nov 20 '18 at 09:27
  • Do I need to specify a file as the basis of the Installation Component or does the download URL use a directory index to grab everything? – Wall0p Nov 20 '18 at 16:23
  • On the "Data files" step of the media wizard you specify a URL to a directory. The download of the data files is done by the "Install files" action as required. – Ingo Kegel Nov 20 '18 at 21:58
  • I updated the test case. I don't understand where you specify what gets downloaded or if it's everything under the URL entered in "Data files". See my updated test procedure in the main question. – Wall0p Nov 23 '18 at 15:36
  • Step 1 is wrong. After building the installer, there is a directory with the name of the media file and a `.dat` extension that contains the data files. They have to be served at the specified download URL, not the individual files. Also, when you test the installer, it will find these data files if the exist locally, so you should first move it to a different location if you want to test the actual download. – Ingo Kegel Nov 24 '18 at 07:40