diff --git a/how-to/hints-and-tips/docs/create-workspace-mobile-app.md b/how-to/hints-and-tips/docs/create-workspace-mobile-app.md index 5d523e86b7..9f34b8a9ef 100644 --- a/how-to/hints-and-tips/docs/create-workspace-mobile-app.md +++ b/how-to/hints-and-tips/docs/create-workspace-mobile-app.md @@ -54,65 +54,9 @@ npm install -g @openfin/create-workspace-mobile-app npx @openfin/create-workspace-mobile-app my-app cd my-app npm run build -npm start +npm run start ``` -### If you encounter an error while running npm run build - -> :warning: **Warning:** On Windows you may see the following error depending on the version being used when running **npm run build**. -> -> [Error: EPERM: operation not permitted, symlink 'C:\Code\my-directory\pwa\my-app\node_modules\@openfin\web-interop\out\shared-worker.js' -> 'C:\Code\my-directory\pwa\my-app\public\worker.js'] -> -> This is a copy step that copies a dependency from node_modules to the public directory of the sample application using symlinks. -> - -If you encounter the error you can navigate to scripts/symlink-worker.js and: - -Replace: - -```javascript -const fs = require('fs/promises'); -const path = require('path'); - -const worker = require.resolve('@openfin/web-interop/shared-worker'); -const symlinkPath = path.resolve(__dirname, '../public/worker.js'); -async function main() { - const shouldUnlink = await fs.stat(symlinkPath).catch(() => false); - if ((shouldUnlink && shouldUnlink.isFile) || shouldUnlink.isSymbolicLink) { - await fs.unlink(symlinkPath); - } - await fs.symlink(worker, symlinkPath); -} - -main() - .then(() => { - console.log(`Linked ${worker} to ${symlinkPath}`); - }) - .catch(console.error); -``` - -With this: - -```javascript -const fs = require('fs/promises'); -const path = require('path'); - -const worker = require.resolve('@openfin/web-interop/shared-worker'); -const targetPath = path.resolve(__dirname, '../public/worker.js'); -async function main() { - await fs.copyFile(worker, targetPath); -} - -main() - .then(() => { - console.log(`Copied ${worker} to ${targetPath}`); - }) - .catch(console.error); - -``` - -After you have saved this change then the file should copy from node_modules to the target location when you run **npm run build** without reporting errors. - ### After running build and start This will build and start a web server on port 3000. You should be able to open the following link: diff --git a/how-to/workspace-platform-starter/CHANGELOG.md b/how-to/workspace-platform-starter/CHANGELOG.md index 9b59b9707e..9b2275a5cb 100644 --- a/how-to/workspace-platform-starter/CHANGELOG.md +++ b/how-to/workspace-platform-starter/CHANGELOG.md @@ -8,6 +8,7 @@ - Added additional context event to the app channel `platform/events` when a language is changed: type: `platform.language` which includes the selected locale. - Added ability to specify initial language through platformProvider.language.initialLanguage in your settings. Default browser menu options and tooltips support the following locales: en-US (default), ja-JP, zh-CN, zh-Hant, ko-KR, ru-RU, de-DE. More information about this feature can be found here: - Added support for specifying notificationsCustomManifest ([self hosted notifications center](https://developers.openfin.co/of-docs/docs/register-notifications#host-on-your-cdn)) in the notificationsProvider settings so that it is used by the platform and the notificationClient passed to modules. As these settings are passed into the platform it will be available through the new platform api call of platform.getNotificationsConfig() (assuming you have used the getCurrentSync function from @openfin/workspace-platform or the function exposed by the module helper if you are building a module for workspace platform starter). Modules shouldn't need this as the notification client returned via the helper takes into account these settings. +- Added an example [apps-native-microsoft-office.json](./public/common/apps-native-microsoft-office.json) that can be added to the appProvider list of app json files to load in your manifest. This will add the native Microsoft Office Apps that you can launch. If you have the snapProvider enabled in your manifest these applications can also be snapped. This is an example for experimentation and discovery. ## v17.0.0 diff --git a/how-to/workspace-platform-starter/public/common/apps-native-microsoft-office.json b/how-to/workspace-platform-starter/public/common/apps-native-microsoft-office.json new file mode 100644 index 0000000000..901193d329 --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/apps-native-microsoft-office.json @@ -0,0 +1,135 @@ +[ + { + "appId": "ms-outlook-mail", + "name": "ms-outlook-mail", + "title": "Microsoft Outlook", + "description": "Launch Microsoft Outlook.", + "manifest": { + "path": "C:\\Program Files\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE" + }, + "manifestType": "inline-external", + "icons": [ + { + "src": "http://localhost:8080/common/images/ms/apps/outlook-mail.svg" + } + ], + "contactEmail": "contact@example.com", + "supportEmail": "support@example.com", + "publisher": "Microsoft", + "intents": [], + "images": [], + "tags": ["native", "microsoft", "outlook", "mail"], + "launchPreference": { + "options": { + "type": "native", + "snap": { + "strategy": { + "type": "waitForWindowOfClass", + "timeoutMs": 15000, + "matchRegex": "^(rctrl_renwnd32|OlkWV2Frame)" + } + } + } + } + }, + { + "appId": "ms-word", + "name": "ms-word", + "title": "Microsoft Word", + "description": "Launch Microsoft Word.", + "manifest": { + "path": "C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE" + }, + "manifestType": "inline-external", + "icons": [ + { + "src": "http://localhost:8080/common/images/ms/apps/word.svg" + } + ], + "contactEmail": "contact@example.com", + "supportEmail": "support@example.com", + "publisher": "Microsoft", + "intents": [], + "images": [], + "tags": ["native", "microsoft", "word"], + "launchPreference": { + "options": { + "type": "native", + "snap": { + "strategy": { + "type": "waitForWindowOfClass", + "timeoutMs": 15000, + "matchRegex": "^OpusApp" + } + } + } + } + }, + { + "appId": "ms-excel", + "name": "ms-excel", + "title": "Microsoft Excel", + "description": "Launch Microsoft Excel.", + "manifest": { + "path": "C:\\Program Files\\Microsoft Office\\root\\Office16\\EXCEL.EXE", + "arguments": "/x" + }, + "manifestType": "inline-external", + "icons": [ + { + "src": "http://localhost:8080/common/images/ms/apps/excel.svg" + } + ], + "contactEmail": "contact@example.com", + "supportEmail": "support@example.com", + "publisher": "Microsoft", + "intents": [], + "images": [], + "tags": ["native", "microsoft", "excel"], + "launchPreference": { + "options": { + "type": "native", + "snap": { + "strategy": { + "type": "waitForWindowOfClass", + "timeoutMs": 15000, + "matchRegex": "^XLMAIN" + } + } + } + } + }, + { + "appId": "ms-powerpoint", + "name": "ms-powerpoint", + "title": "Microsoft PowerPoint", + "description": "Launch Microsoft PowerPoint.", + "manifest": { + "path": "C:\\Program Files\\Microsoft Office\\root\\Office16\\POWERPNT.EXE" + }, + "manifestType": "inline-external", + "icons": [ + { + "src": "http://localhost:8080/common/images/ms/apps/powerpoint.svg" + } + ], + "contactEmail": "contact@example.com", + "supportEmail": "support@example.com", + "publisher": "Microsoft", + "intents": [], + "images": [], + "tags": ["native", "microsoft", "powerpoint"], + "launchPreference": { + "options": { + "type": "native", + "snap": { + "strategy": { + "type": "waitForWindowOfClass", + "timeoutMs": 15000, + "matchRegex": "^PPTFrameClass" + } + } + } + } + } +] diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/excel.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/excel.svg new file mode 100644 index 0000000000..77ad52019f --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/excel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/microsoft365.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/microsoft365.svg new file mode 100644 index 0000000000..e4c4fb16fb --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/microsoft365.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/onedrive.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/onedrive.svg new file mode 100644 index 0000000000..9fd7a2b8bf --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/onedrive.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/onenote.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/onenote.svg new file mode 100644 index 0000000000..95933777fb --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/onenote.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/outlook-calendar.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/outlook-calendar.svg new file mode 100644 index 0000000000..5ffff7062f --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/outlook-calendar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/outlook-mail.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/outlook-mail.svg new file mode 100644 index 0000000000..cc46020ae1 --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/outlook-mail.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/outlook-people.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/outlook-people.svg new file mode 100644 index 0000000000..b861d4ff51 --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/outlook-people.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/powerpoint.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/powerpoint.svg new file mode 100644 index 0000000000..251bee4311 --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/powerpoint.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/sharepoint.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/sharepoint.svg new file mode 100644 index 0000000000..045e1bc0d8 --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/sharepoint.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/teams.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/teams.svg new file mode 100644 index 0000000000..9cc618abe3 --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/teams.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/how-to/workspace-platform-starter/public/common/images/ms/apps/word.svg b/how-to/workspace-platform-starter/public/common/images/ms/apps/word.svg new file mode 100644 index 0000000000..575cb944bc --- /dev/null +++ b/how-to/workspace-platform-starter/public/common/images/ms/apps/word.svg @@ -0,0 +1 @@ + \ No newline at end of file