问题
Could you please help me with next problem. I have stanalone GUI application and in the local directory I have file with update. How I can configure my install4j updater, that it do not download update file via http, but only launch update file from my local directory? Thanks and please sorry if this question has been asked before.
回答1:
It updater template executes the "Check for update" action. Its "Update descriptor URL" property defines where the updates.xml file is downloaded from. That file is generated by each install4j build and by default the property is set to ${compiler:sys.updatesUrl}. That compiler variable takes its value from the "URL for updates.xml" text field on the Installer->Auto-Update Options tab.
If you want to download that file from a local directory, I would recommend to change the "Update descriptor URL" property of the "Check for update" action to an installer variable, say ${installer:myUpdatesUrl}.
You predefine the installer variable "myUpdatesUrl" with the string value ${compiler:sys.updatesUrl}. This is done by selecting the updater application on Installer->Screens & Actions, switch to the "Installer variables" tab on the right side and clicking "Configure predefined installer variables".
Now you can pass the argument
-VmyUpdatesUrl=file:///C:/path/to/updates.xml
to the installer to change the URL for the updates.xml file (note the 3 slashes after the protocol).
The media files for the update installers should be in the same directory as updates.xml
来源:https://stackoverflow.com/questions/16170159/install4j-file-with-update-placed-in-my-local-directory