Using Data Files in Install4j - install4j

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.
Create a file "phony_license_web.txt" in Define Distribution Tree. It is added to the Default file set > Installation directory.
Go to Media > Windows > Data files
Specify a download URL "http://localhost/testsite". There is a file at http://localhost/testsite/phony_license_web.txt.
Check "Save downloaded files on Install files.
Build the project
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
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.
In the Installation Components, add an Installation Component "Data Files". Set the downloadable option. There are no files checked for this component.
In Media > Windows > Wizard, select Data files and check the downloadable radio button. Enter http://localhost/components.
Test the installer
Verify that the data file license_web.txt does not appear anywhere in the installation directory (subfolder of AppData\Programs)

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.

Related

Netbeans ignoring upload relative file path

Netbeans has stopped uploading files using the relative file structure. No matter what I upload path settings I enter, it uploads only to the server root. How can I fix this?
The problem is just for one project; other projects using the same configuration are okay.
I compared the files in nbproject with a working project and there are no differences.
I changed the "upload directory" but it doesn't change where the file gets uploaded to
I deleted the project and
created it anew.
It seems to be simply ignoring the config.
On my local computer, the path is:
/MyNetbeans/Project
/Source Files
/folder1
/folder2
MyFile.php
/Include Path
/Remote Files
When I upload, it saves the file to
/folder2/MyFile.php
but it should save it to
/folder1/folder2/MyFile.php
Netbeans 12.0,
Windows 10
Any ideas for getting it to upload using the relative path?
SOLUTION: change the Sources folder in Project Properties.
From the Netbeans File menu > Project properties > under Categories select "Sources". Next to "Source folder:" click BROWSE. Navigate to the folder, higher or lower, in the local directory structure which matches the directory structure on the server > OK.
Upload the file and check the server to see where it was saved. Rinse, lather and repeat as necessary.

Can't install JUnit into Netbeans 8 offline

I've downloaded the 2 NBM's for JUnit. In Netbeans 8 I'm using the Tools->Plugins->Downloaded window and have added the pertinent NMBs. They are both check-marked and when I press "Install" Netbeans then pops open a dialog that says (approximately) "Installer will download, verify, then install the selected modules". It then does attempt to use the Internet to download - and fails. This machine has no access to the Internet (hence the offline approach).
Have I not downloaded the proper NBMs (they were ZIP files and I renamed them to NBM - read that was the thing to do)? Is there some other piece that I'm missing?
The reason is that the .external file contrains URL to files to be downloaded from an active internet connection.
For example, in my case (netbeans 8.0) org-netbeans-libs-junit4.nbm contains the file
/netbeans/modules/ext/junit-4.10.jar.external
which contents is
CRC:3480621823
SIZE:253160
URL:http://repo1.maven.org/maven2/junit/junit/4.10/junit-4.10.jar
URL:m2:/junit:junit:4.10:jar
if you need to perform an offline installation of the plugins in netbeans you need to transform the .nbm files : replace the .external in .nbm file by the file refenced by URL.
In my case :
1) donwload http://repo1.maven.org/maven2/junit/junit/4.10/junit-4.10.jar
2) in the org-netbeans-libs-junit4.nbm, replace
/netbeans/modules/ext/junit-4.10.jar.external
by the donwloaded file at this location in the .nbm archive
/netbeans/modules/ext/junit-4.10.jar
3) save the transformed archive,
4) do the same for the other nbm archive
5) you can add and install the the .nbm files as plugin in Netbeans
remarks :
in `org-netbeans-libs-junit4.nbm, I had to replace
/netbeans/modules/ext/junit-4.10.jar.external
in `/netbeans/modules/ext/junit-4.10.jar.external, I had to replace
/netbeans/modules/ext/junit-3.8.2.jar.external
/netbeans/docs/junit-3.8.2-api.zip.external
/netbeans/docs/junit-4.10-javadoc.jar.external
/netbeans/docs/junit-4.10-sources.jar.external

Json Editor Plugin installation?

I feel really stupid by asking this question, but how can I install Json Editor Plugin in my Eclipse Helios? I looked at the Forum in sourceforge, but I can't install it neither through .zip or by adding a web site. And will I need to change the execution environment to Java 1.6?
Here is what I did to get the Json Editor Plugin to show up in the Install Dialog.
By doing a little Google-ing, I found this page which describes the steps to install JsonEditorPlugin on 3.4.
After you have followed the first 6 steps, make sure that Group items by category is un-ticked. After that, you can then choose Json Editor Plugin to be installed from the local Zip archive that you have downloaded from the net.
Edit: as a side note, you must not have the unzipped contents of the zip archive in the dropins/ folder, otherwise it will appear as if the plugin is already installed.
Simply dropping the zip contents into the dropins folder however did work also.
Note: You must right click your .json file and choose 'Open with' -> 'Json Editor'
You can install plugins by just unzipping them into the dropins folder.
It does not matter if the zip file contains the parent folders "plugins" and/or "eclipse".
I would recommend Java 1.6 as it brings a better performance and the plugin might require Java 1.6. On your desktop shortcut you use following execution arguments:
eclipse -vm <path to jre 1.6 installation folder>\bin\javaw
Download jsonedit-repository-0.9.7.zip (or whatever) and put it in a folder you like.
In Eclipse Help --> Install New Software
Add --> Archive button and select the zip file.
Name it and press OK
Press button Next and Follow master of installation.
Then after opening json file possibly needed right click mouse on the file --> open with --> JSON editor

AppEngine with Eclipse - Common war/ resources

I have been creating Google AppEngine projects using Eclipse SDK 3.6.1.
In all of the projects I have a StyleSheet default.css (all seperate copies) that I have in the war folder.
I would like to keep this file in one place to be included in all of the projects.
I have created a copy in the workspace folder.
I have tried linking the file into the war folder, it shows up as a linked file, I can edit it, and all looks fine.
When I run the application I can see by the webpage created that it is not recognizing the linked file.
I hope that I am missing something simple, I do not like keeping multiple copies of a common resource.
Any ideas?
Thanks,
RRaney
Creating a symbolic link to the file will do the job.
For example, on a Windows 7/Vista machine, run a command like this from the shell (as an administrator) to link two folders:
mklink /D C:\workspace\YetAnotherAppEngineProject\war\shared C:\workspace\SharedResourcesProject\shared
I assume that when you wrote "I have tried linking the file into the war folder" you meant that you tried linking a file/folder into the war folder using Eclipse's linked file/folder functionality. These links are limited to the Eclipse IDE and managed by it (int the .project file) - the Google App Engine runtime doesn't recognize them since it accesses the file system directly and not through Eclipse.
A symbolic link is done at the file-system level, and Google App Engine will recognize and respect it properly.
To create a symbolic link, use the "ln" shell command on Linux. On Windows Vista/7 use "mklink" (earlier Windows versions only have "hard links" which are not as nice for this purpose but should also get the job done, see the "linkd" command).
Have you tried "Static Files and Resource Files"?

Application Deployment

I deployed an application using this method and it worked very good. However, there are 2 missing things that I been trying to find but can't:
1) How do I include resource files in the installation? I have a folder with files that have some user data, and those need to be there after the installation so the application can run, this is an oversimplified example I'm working on (I need to include NecessaryFile1.xml, NecessaryFile2.xml and NecessaryFile3.xml and the folder they're in):
alt text http://img193.imageshack.us/img193/7782/resources.png
2) How can I put the application in the start -> programs menu? It doesn't seem to do that either. It just puts it in the C:\Program Files\My Company Name\ApplicationName\ directory.
Thanks for any suggestion!
Go to your Setup project in Visual Studio. In the "File System" tab, locate "Application Folder". Right-click and then click Add | Folder. Name the new folder "Data". Right-click on the new "Data" folder and click Add File, then add the needed XML files. Repeat for as many different folders and/or files as required by your application.
When you compile and run your setup project, the "Data" folder and its contents will be deployed along with the application.
Click on each XML file in the Solution Explorer and then in the Properties window below (see your screenshot) you click and change "Build Action" to "Copy" and "Copy to Output Directory" to "Copy If Newer". That does the trick for me, at least with ClickOnce...