install4j - file with update placed in my local directory

跟風遠走 提交于 2019-12-10 23:33:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!