You use a JNLP-File right now, if I remember correctly?
With NGDesktop-Client you need a special client which can be exported in the Developer. You need a link to the solution (same link you use in the browser) an Icon and a logo and then you receive a mail with the link to the installer / files for the auto-update (windows only).
With this client you can use desktop-features, if you install the relevant webcomponents
NG-Desktop File plugin (Handling files similar to smartclient, but with much more callback),
NGDesktop UI plugin for Menus (Mac-Users can only use Cmd-C / X / V if the menu is defined, example is included) and
NG Desktop Utils which gives the ability to check if you are in NGDesktop and to execute programms / open URLs.
You can then do something like
- Code: Select all
plugins.ngdesktopfile.openFile(targetFileName);
of if you want to go the manual route and adapt the code from scopes.svyIO:
- Code: Select all
if (application.getApplicationType() == APPLICATION_TYPES.NG_CLIENT && scopes.svyDocumentManagement.isNgDesktopFile()) {
fileName = '"' + fileName + '"';
var osName = application.getOSName();
if (/Windows/.test(osName)) {
plugins.ngdesktoputils.executeCommand('rundll32', ['url.dll,FileProtocolHandler', fileName]);
} else if (/Linux|Freebsd/.test(osName)) {
plugins.ngdesktoputils.executeCommand('mozilla', [fileName]);
} else if (/Mac/.test(osName)) {
plugins.ngdesktoputils.executeCommand('open', [fileName]);
}
}